This project is mirrored from https://gitee.com/mirrors/nomad.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
  1. 12 Jul, 2022 5 commits
  2. 11 Jul, 2022 35 commits
    • Phil Renaud's avatar
      Remove namespace cache (#13679) · 86524918
      Phil Renaud authored
      86524918
    • Tim Gross's avatar
      docs: rename Internals to Concepts (#13696) · f295396e
      Tim Gross authored
      f295396e
    • Michele Degges's avatar
      96f00218
    • Phil Renaud's avatar
      Adds sort, show/hide, and copy functionality to Variable pages (#13680) · 1f368ac0
      Phil Renaud authored
      * Sortable header added to variable page
      
      * Showhide and copyable
      1f368ac0
    • Phil Renaud's avatar
      Allow wildcard for Evaluations API (#13530) · a7bd071a
      Phil Renaud authored
      
      * Failing test and TODO for wildcard
      
      * Alias the namespace query parameter for Evals
      
      * eval: fix list when using ACLs and * namespace
      
      Apply the same verification process as in job, allocs and scaling
      policy list endpoints to handle the eval list when using an ACL token
      with limited namespace support but querying using the `*` wildcard
      namespace.
      
      * changelog: add entry for #13530
      
      * ui: set namespace when querying eval
      
      Evals have a unique UUID as ID, but when querying them the Nomad API
      still expects a namespace query param, otherwise it assumes `default`.
      Co-authored-by: default avatarLuiz Aoqui <luiz@hashicorp.com>
      a7bd071a
    • Luiz Aoqui's avatar
      changelog: add entry for #13659 (#13691) · 711f46dc
      Luiz Aoqui authored
      711f46dc
    • Tim Gross's avatar
      Merge pull request #13000 from hashicorp/secure-variables · 826863f1
      Tim Gross authored
      Secure Variables (feature branch)
      826863f1
    • Tim Gross's avatar
      docs: move operator subcommands under their own trees (#13677) · b209fc47
      Tim Gross authored
      The sidebar navigation tree for the `operator` sub-sub commands is
      getting cluttered and we have a new set of commands coming to support
      secure variables keyring as well. Move these all under their own
      subtrees.
      b209fc47
    • Tim Gross's avatar
      core job for secure variables re-key (#13440) · 86270003
      Tim Gross authored
      When the `Full` flag is passed for key rotation, we kick off a core
      job to decrypt and re-encrypt all the secure variables so that they
      use the new key.
      86270003
    • Phil Renaud's avatar
      Link Variables to Jobs (#13627) · bad23ee6
      Phil Renaud authored
      * Related entities scaffolded
      
      * Added hint on edit
      
      * Re-classic'd
      
      * Dont create entities when path goes beyond task level
      
      * only show the related entities hint for new vars, not edited ones
      
      * Unit tests for pathLinkedEntities
      
      * Acceptance tests for linked entities
      
      * Add hint on creation
      
      * Will be vs Is on @new boolean flag
      
      * Link styles and namespaces on links
      
      * Unused component class
      
      * Delog
      
      * Defensive shouldShowLinked
      
      * Properly instantiating the accessibilty check test
      bad23ee6
    • Phil Renaud's avatar
    • Charlie Voiselle's avatar
      cc8a9221
    • Jai's avatar
      ui: create variable permission logic (#13447) · d5ce3744
      Jai authored
      * ui:  inject router service into Variable ability to compute path
      
      * ui:  test create secure variable ability
      
      * refact:  update templates to properly check create ability
      
      * chore:  update token factory to enable 1 path to have create ability
      
      * refact:  remove router service injection for path variable
      
      * refact:  update mirage factory for edit and delete perms on  path for testing
      
      * ui:  handle path matching (#13474)
      
      * test:  write specifications for nearestPath computation
      
      * ui:  write logic for getting all paths
      
      * ui:  nearestPathMatching algorithm
      
      * test:  nearestPathMatching algorithm test
      
      * ui:  handle namespace filtering for capabilities check (#13475)
      
      * ui: add namespace handling
      
      * refact:  add logical OR operator to handle unstructured  object.
      
      * ui:  acceptance test for create flow in secure variables (#13500)
      
      * test:  write happy path test for creating variable
      
      * refact:  add missing data-test attribute...
      d5ce3744
    • Phil Renaud's avatar
      Edit Secure Variables as JSON (#13461) · a769c12c
      Phil Renaud authored
      * Toying with insert and update helpers before translation func
      
      * Working prototype that lets you switch between json and tabular
      
      * No longer add the bonus items row in json mode
      
      * Trimmed the ivy from the codemirror (#13503)
      
      * Trimmed the ivy from the codemirror
      
      * editedJSONItems removal
      
      * De-debugger
      
      * Replaced other instances of IvyCodeMirror throughout the app (#13528)
      
      * Replaced other instances of IvyCodeMirror throughout the app
      
      * PR requests for codemirror modifier
      
      * Screen reader setting as param
      
      * Trying a simpler codemirror test helper
      
      * Lint removal
      
      * Screen Reader Label added for a11y
      
      * JSONViewer cleanup
      
      * JSON editor added to /new and all variables stringified before save or translate
      
      * Give users a foothold when editing an empty item in JSON mode
      
      * Copy the empty KV
      
      * No duplicate keys in KV
      
      * Better handling of cursor snapping in json edit field
      
      * Catch formatting errors on the fly
      
      * Basic...
      a769c12c
    • Charlie Voiselle's avatar
      SV: CAS: Implement Check and Set for Delete and Upsert (#13429) · ee38ee03
      Charlie Voiselle authored
      * SV: CAS
          * Implement Check and Set for Delete and Upsert
          * Reading the conflict from the state store
          * Update endpoint for new error text
          * Updated HTTP api tests
          * Conflicts to the HTTP api
      
      * SV: structs: Update SV time to UnixNanos
          * update mock to UnixNano; refactor
      
      * SV: encrypter: quote KeyID in error
      * SV: mock: add mock for namespace w/ SV
      ee38ee03
    • Tim Gross's avatar
      implement quota tracking for secure variablees (#13453) · b8d95817
      Tim Gross authored
      We need to track per-namespace storage usage for secure variables even
      in Nomad OSS so that a cluster can be seamlessly upgraded from OSS to
      ENT without having to re-calculate quota usage.
      
      Provide a hook in the upsert RPC for enforcement of quotas in
      ENT. This will be a no-op in Nomad OSS.
      b8d95817
    • Tim Gross's avatar
      additional ACL Policy tests (#13464) · 86666ec8
      Tim Gross authored
      This changeset includes some additional unit tests for secure
      variables ACL policies, so that we have explicit coverage of edge
      cases we're discussing with the UI folks.
      86666ec8
    • Tim Gross's avatar
      secure variable server configuration (#13307) · d03fd4b8
      Tim Gross authored
      Add fields for configuring root key garbage collection and automatic
      rotation. Fix the keystore path so that we write to a tempdir when in
      dev mode.
      d03fd4b8
    • Phil Renaud's avatar
      Secure Variables: JSON view (#13439) · d0c98021
      Phil Renaud authored
      * JSON view init
      
      * Overeager config history reverted
      
      * Set as query parameter
      
      * border added to copy button
      
      * More robust stringifyObject helper
      
      * Testing for stringify-object helper
      d0c98021
    • Jai's avatar
      dx: update `canCreate` logic and token generation for secure var dev environment (#13438) · c6d12ef1
      Jai authored
      * ui:  add logic for create permission computed property
      
      * ui:  update token factory and variable ability to simulate create permissions for dev env
      c6d12ef1
    • Phil Renaud's avatar
      Append an empty item when editing an existing Secure Variable (#13436) · 83fbe06e
      Phil Renaud authored
      * Did-insert modifier to add an extra row when editing
      
      * Defensive logic on model existing
      
      * Defensive pattern on copy keyValues
      83fbe06e
    • Phil Renaud's avatar
      Throw an error if you try to save a Secure Variable with no items (#13424) · 5fc980ff
      Phil Renaud authored
      * Error thrown if you have no KVs on save
      
      * Acceptance tests for flash messages and no-key-value adds
      
      * Post-hoc accounting for new variable path routing
      
      * Trim on key before validating it as existing
      5fc980ff
    • Tim Gross's avatar
      core job for key rotation (#13309) · bbef759d
      Tim Gross authored
      Extend the GC job to support periodic key rotation.
      
      Update the GC process to safely support signed workload identity. We
      can't GC any key used to sign a workload identity. Finding which key
      was used to sign every allocation will be expensive, but there are not
      that many keys. This lets us take a conservative approach: find the
      oldest live allocation and ensure that we don't GC any key older than
      that key.
      bbef759d
    • Tim Gross's avatar
      move gossip keyring command to their own subcommands (#13383) · 8c5a669a
      Tim Gross authored
      Move all the gossip keyring and key generation commands under
      `operator gossip keyring` subcommands to align with the new `operator
      secure-variables keyring` subcommands. Deprecate the `operator keyring`
      and `operator keygen` commands.
      8c5a669a
    • Phil Renaud's avatar
      Secure Variables: show file metadata on list pages (#13423) · e938ced2
      Phil Renaud authored
      * Add modified times and namespaces to layout
      
      * Undo typing change
      
      * Post-hoc accounting for new variable path routing
      e938ced2
    • Tim Gross's avatar
      fix blocking query for `Keyring.List` RPC (#13384) · ca300727
      Tim Gross authored
      The blocking query for `Keyring.List` appended the keys for each pass
      through the blocking query to the response. This results in mulitple
      copies of keys in the response. Overwrite the `reply.Keys` field on
      each pass through the blocking query to ensure we only get the
      expected page of responses.
      ca300727
    • Tim Gross's avatar
      secure variables ACL policies (#13294) · 01d19d71
      Tim Gross authored
      Adds a new policy block inside namespaces to control access to secure
      variables on the basis of path, with support for globbing.
      
      Splits out VerifyClaim from ResolveClaim.
      The ServiceRegistration RPC only needs to be able to verify that a
      claim is valid for some allocation in the store; it doesn't care about
      implicit policies or capabilities. Split this out to its own method on
      the server so that the SecureVariables RPC can reuse it as a separate
      step from resolving policies (see next commit).
      
      Support implicit policies based on workload identity
      01d19d71
    • Tim Gross's avatar
      implement Encrypt/Decrypt methods of encrypter (#13375) · 64b38be5
      Tim Gross authored
      The `Encrypt` method generates an appropriately-sized nonce and uses
      that buffer as the prefix for the ciphertext. This keeps the
      ciphertext and nonce together for decryption, and reuses the buffer as
      much as possible without presenting the temptation to reuse the
      cleartext buffer owned by the caller.
      
      We include the key ID as the "additional data" field that's used as an
      extra input to the authentication signature, to provide additional
      protection that a ciphertext originated with that key.
      
      Refactors the locking for the keyring so that the public methods are
      generally (with one commented exception) responsible for taking the
      lock and then inner methods are assumed locked.
      64b38be5
    • Charlie Voiselle's avatar
      Implement HTTP search API for Variables (#13257) · 39dcef84
      Charlie Voiselle authored
      * Add Path only index for SecureVariables
      * Add GetSecureVariablesByPrefix; refactor tests
      * Add search for SecureVariables
      * Add prefix search for secure variables
      39dcef84
    • Jai's avatar
      ui: make eye toggles only toggle on/off for their respective row (#13406) · f060647c
      Jai authored
      * chore:  update tests to handle invidual toggle responsibility
      
      * chore:  prettify secure-variable-form template
      
      * ui:  extract input group markup into seperate component
      f060647c
    • Jai's avatar
      ui: update component api to accept callback fns to be fired on cancel/prompt (#13414) · 89f7b402
      Jai authored
      * ui:  update  component api to accept callback fns to be fired on cancel/prompt
      
      * refact:  cancel callback should fire with outside click handler not on idle
      
      * refact:  rename action to be more specific
      89f7b402
    • Phil Renaud's avatar
      Toast-style global notification state (#13341) · 3bb71d04
      Phil Renaud authored
      * toast style notification init
      
      * Notificatino styles and messaging for variable save
      
      * pre-PR cleanup
      
      * Typo fix and 5sec timeout
      
      * Prevent text from overlapping the close button
      3bb71d04
    • Phil Renaud's avatar
      Path Tree compaction refactor (#13415) · 2e433c8c
      Phil Renaud authored
      * Bones of a just-in-time compaction pathTree
      
      * wooo got compaction going in sub-ms times
      
      * PR cleanup
      
      * Path compaction tests
      
      * lint fix to equal instead of .ok()
      
      * Name prop specifically being equality checked
      2e433c8c
    • Charlie Voiselle's avatar
      Secure Variables: Seperate Encrypted and Decrypted structs (#13355) · 75495f42
      Charlie Voiselle authored
      
      This PR splits SecureVariable into SecureVariableDecrypted and
      SecureVariableEncrypted in order to use the type system to help
      verify that cleartext secret material is not committed to file.
      
      * Make Encrypt function return KeyID
      * Split SecureVariable
      Co-authored-by: default avatarTim Gross <tgross@hashicorp.com>
      75495f42
    • Tim Gross's avatar
      keyring CLI: refactor to use subcommands (#13351) · 5c6ba1cc
      Tim Gross authored
      Split the flag options for the `secure-variables keyring` into their
      own subcommands. The gossip keyring CLI will be similarly refactored
      and the old version will be deprecated.
      5c6ba1cc