Commit Graph

18644 Commits

Author SHA1 Message Date
Peter Wilson
3ae669df34 Bump the node version (#24304)
* make node happy

* Updated package-lock.json for website
2023-11-30 19:30:31 +00:00
Christopher Swenson
9d39b6f2cb events: Add filters to keep track of local and other subscriptions (#24201)
This adds a very basic implementation of a list of namespace+eventType
combinations that each node is interested in by just running the
glob operations in for-loops. Some parallelization is possible, but
not enabled by default.

It only wires up keeping track of what the local event bus is interested
in for now (but doesn't use it yet to filter messages).

Also updates the cloudevents source URL to indicate the Vault node that generated the event.

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
2023-11-30 09:49:22 -08:00
Angel Garbarino
56f793d0c8 🧹 HDS button replacement (#24230)
* namespace things

* kmip

* init and mount-info:

* ssh sign

* replication and remove type button

* fix learn more on replication mode summary

* use dropdown.

* clean up

* Update ui/lib/kv/addon/components/kv-version-dropdown.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* pr comments

* Update replication-mode-summary.hbs

* blah

* fix

* Update replication-mode-summary.hbs

* add back mount-info

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
2023-11-30 09:49:45 -07:00
Angel Garbarino
2e9578bc96 Default to Json editor if KV secret is nested (#24290)
* initial fix

* changelog

* fix

* fix test and add test coverage

* remove useless escape characters

* pr comments add more test coverage
2023-11-30 16:36:26 +00:00
Chelsea Shaw
b0ed4297bf UI: Prevent replication disable action from sending data payload (#24292)
* Prevent replication disable action from sending data payload

* Add changelog
2023-11-29 16:40:40 -06:00
Scott Miller
31f399d147 Re-wrap partial failure improvements, CE side (#24293)
* Re-wrap partial failure improvements, CE side

* Resolve import cycle
2023-11-29 15:42:07 -06:00
Violet Hynes
ef3021f1a4 Fix bug in static secret caching where no token is present in a request to Proxy (#24287) 2023-11-29 09:35:59 -05:00
Peter Wilson
64dfff080a Fix non-JSON log messages when using -log-format JSON (#24252)
* Fix non-JSON log messages when using -log-format JSON

Removed the call to consul-template's logging.Setup inside the created of config for the Runner. Instead we call it when we assign the logger to the Agent command.

* The elusive extra line

* Adjust the approach

* changelog

* Infer levels *with* timestamp prefix

* InferLeveslWithTimestamp required InferLevels

* Test to show -log-format and -log-file working in consul-template generated messages

* classic typo

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2023-11-29 12:46:18 +00:00
Violet Hynes
2dd3ab9da0 Correct required policy in static secret caching docs (#24282) 2023-11-28 16:52:21 -05:00
Angel Garbarino
ef14ae87a5 Fix KV "View secret" or "View list" HDS button styling (#24278)
* wip

* remove is-flex and put input on same different row

* remove wide
2023-11-28 21:00:28 +00:00
Scott Miller
78d756acdb Provide a more reasonable error message for disabled Shamir seals (#24275) 2023-11-28 18:03:24 +00:00
Angel Garbarino
e9f7c5bcef Fix failing LDAP test with new attribute (#24273)
* add in new attribute to fix failing api test

* fix replication test failures
2023-11-28 17:56:33 +00:00
Tom Proctor
a823fdb3ef testfix: Skip runsc test earlier (#24274) 2023-11-28 17:35:00 +00:00
Victor Rodriguez
625cb00b61 Run make fmt. (#24272) 2023-11-28 15:37:28 +00:00
Victor Rodriguez
2e54ae0d61 Check that multi-seal wrappers provide unique key IDs (#24266)
* Remove duplicate function NewToggleableTestSeal.

NewToggleableTestSeal is almost the same as NewTestSeal, so remove it and adapt
the callers to use the duplicated function.

* Remove unnecessary function CreateTestSealWrappers.

The only caller of CreateTestSealWrappers can use NewTestSeal instead and
obtain the wrappers from the seal Access object instead.

* Ensure NewTestSeal does not generate "duplicate" wrappers.

NewTestSeal uses TestWrappers to create multi-seal Access objects. However, the
default behaviour for TestWrapper is to reverse the byte slice, which means that
two different wrappers will be identical, which is a problem for testing since
one wrapper will be able do "decrypt" another wrapper's encryption.

To fix this problem, NewTestSeal now creates TestWrappers with a different
secret for each one.

* Make NewTestSeal give unique Key IDs to its test wrappers.

* Fix some typos.

* Detect multi-seal wrappers producing duplicate Key IDs.

The Access object relies on all the encryption wrappers generating distinct key
IDs, so guard against this happening.

If a duplicate key ID is detected, do not use the encrypted value produced by
the wrappers that generated it. Return an error instead.
2023-11-28 09:56:39 -05:00
Kuba Wieczorek
8f064b90ec [VAULT-22270] API: add enterprise field to the response from /sys/health/ endpoint (#24270) 2023-11-28 14:22:33 +00:00
Tom Proctor
51d99fc7cf cli: Improve error handling for plugin commands (#24250)
* Stop supporting vault plugin info and deregister without a type argument
* Make a best-effort attempt to report whether a plugin was actually deregistered and give more descriptive errors
* Fix error message for vault plugin reload
2023-11-28 14:13:26 +00:00
Tom Proctor
030bba4e68 Support rootless plugin containers (#24236)
* Pulls in github.com/go-secure-stdlib/plugincontainer@v0.3.0 which exposes a new `Config.Rootless` option to opt in to extra container configuration options that allow establishing communication with a non-root plugin within a rootless container runtime.
* Adds a new "rootless" option for plugin runtimes, so Vault needs to be explicitly told whether the container runtime on the machine is rootless or not. It defaults to false as rootless installs are not the default.
* Updates `run_config.go` to use the new option when the plugin runtime is rootless.
* Adds new `-rootless` flag to `vault plugin runtime register`, and `rootless` API option to the register API.
* Adds rootless Docker installation to CI to support tests for the new functionality.
* Minor test refactor to minimise the number of test Vault cores that need to be made for the external plugin container tests.
* Documentation for the new rootless configuration and the new (reduced) set of restrictions for plugin containers.
* As well as adding rootless support, we've decided to drop explicit support for podman for now, but there's no barrier other than support burden to adding it back again in future so it will depend on demand.
2023-11-28 14:07:07 +00:00
Robert
3726d8fb1d Add configuration section to sync API docs (#24179)
* Add configuration section

* Add restricted root namespace alert
2023-11-27 16:10:37 -06:00
Chelsea Shaw
83a6ffcff6 UI: Replace instances of <table> with <HDS::Table> (#24257)
* Remove and replace InfoTable on replication-secondary-card

* Raft storage table update

* Known secondaries table replace

* remove vlt-table class and styles

* Fix tests
2023-11-27 15:51:46 -06:00
Steven Clark
5781891292 PKI: Address some errors that were not wrapped properly (#24118) 2023-11-27 15:50:54 -05:00
Steven Clark
c329ed8d3b api/leader: fix deadlock when namespace is set on leader calls (#24256)
* api/leader: fix deadlock when namespace is set on leader calls

* Add cl
2023-11-27 15:50:41 -05:00
kpcraig
9b7d06839f Add a /config/rotate-root path to the ldap auth backend (#24099) 2023-11-27 15:48:16 -05:00
Raymond Ho
e69b0b2bcf add custom permissions for azurekv (#23298) 2023-11-27 17:46:20 +00:00
Angel Garbarino
0ca6135f68 Glimmerize Splash Page (#24104)
* make splash page view only block content

* change invocation of component

* address some of the pr comments

* add test coverage

* remove conditional because of issue with it always showing

* solve for mfa errors

* move altcontent outside
2023-11-27 10:21:35 -07:00
Christopher Swenson
904c08e1e4 Remove runtime patch for SHA1 support in X.509 certs (#24243)
This code only executes when the Vault version is <1.11,
so is now dead code and can be removed safely.
2023-11-27 09:11:01 -08:00
Peter Wilson
511ce92852 fix import formatting (#24248) 2023-11-24 09:30:10 +00:00
Peter Wilson
3976217420 Audit: logging a response uses a separate 5 second timeout (#24238)
* added a 5s timeout to attempts to process nodes in the audit pipeline for logging a response

* added changelog

* ensure we supply namespace to the new context
2023-11-22 11:54:47 -08:00
Marccio Silva
8e8bc82a5a Update go-jose dependency to 3.0.1 (#24226) 2023-11-21 13:36:58 -08:00
Chelsea Shaw
82ca52d447 UI: Fix KV v2 json editor (#24224)
* Fix JSON editor in KVv2 unable to paste. Fixes #23940

* Default to JSON view on edit with secret is complex

* Add changelog
2023-11-21 15:11:14 -06:00
Mike Palmiotto
18e6385e05 Consistently use OperationHandler for entity paths (#24225) 2023-11-21 20:45:07 +00:00
Steven Clark
b7dff9777d Allow backends to extract credentials from payloads and trigger an authentication workflow (#23924)
* wip

* Work on the tuneable allowance and some bugs

* Call handleCancellableRequest instead, which gets the audit order more correct and includes the preauth response

* Get rid of no longer needed operation

* Phew, this wasn't necessary

* Add auth error handling by the backend, and fix a bug with handleInvalidCredentials

* Cleanup req/resp naming

* Use the new form, and data

* Discovered that tokens werent really being checked because isLoginRequest returns true for the re-request into the backend, when it shouldnt

* Add a few more checks in the delegated request handler for bad inputs

 - Protect the delegated handler from bad inputs from the backend such
   as an empty accessor, a path that isn't registered as a login request
 - Add similar protections for bad auth results as we do in the normal
   login request paths. Technically not 100% needed but if somehow the
   handleCancelableRequest doesn't use the handleLoginRequest code path
   we could get into trouble in the future
 - Add delegated-auth-accessors flag to the secrets tune command and
   api-docs

* Unit tests and some small fixes

* Remove transit preauth test, rely on unit tests

* Cleanup and add a little more commentary in tests

* Fix typos, add another failure use-case which we reference a disabled auth mount

* PR Feedback

 - Use router to lookup mount instead of defining a new lookup method
 - Enforce auth table types and namespace when mount is found
 - Define a type alias for the handleInvalidCreds
 - Fix typos/grammar
 - Clean up globals in test

* Additional PR feedback

 - Add test for delegated auth handler
 - Force batch token usage
 - Add a test to validate failures if a non-batch token is used
 - Check for Data member being nil in test cases

* Update failure error message around requiring batch tokens

* Trap MFA requests

* Reword some error messages

* Add test and fixes for delegated response wrapping

* Move MFA test to dedicated mount

 - If the delegated auth tests were running in parallel, the MFA test
   case might influence the other tests, so move the MFA to a dedicated
   mount

* PR feedback: use textproto.CanonicalMIMEHeaderKey

 - Change the X-Vault-Wrap-Ttl constant to X-Vault-Wrap-TTL
   and use textproto.CanonicalMIMEHeaderKey to format it
   within the delete call.
 - This protects the code around changes of the constant typing

* PR feedback

 - Append Error to RequestDelegatedAuth
 - Force error interface impl through explicit nil var assignment on
   RequestDelegatedAuthError
 - Clean up test factory and leverage NewTestSoloCluster
 - Leverage newer maps.Clone as this is 1.16 only

---------

Co-authored-by: Scott G. Miller <smiller@hashicorp.com>
2023-11-21 14:36:49 -05:00
Scott Miller
913481fb1f OSS fixes (#24200) 2023-11-21 10:25:01 -06:00
Angel Garbarino
f60c643aa8 UI: HDS adoption replace <Button> in lib/replication (#24161)
* replication directory components update

* need to wait for another pr to merge for revoke and fixing a one off in distribute:

* clean up

* amend revoke with new ConfirmAction work.

* some PR comments

* remove wrapping LinkTo

* Update ui/lib/replication/addon/templates/mode/secondaries/revoke.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
2023-11-21 16:06:45 +00:00
Steven Clark
68fbb17b9c TestTransitImport: Generate Transit wrapping key with a longer context (#24212)
- Instead of relying on the initial call to import to generate the
   wrapping key, generate it within the test setup with a longer
   dedicated timeout.
 - This hopefully is enough of a timeout for the 32 bit nightly runner
2023-11-21 10:58:44 -05:00
Scott Miller
66b3e439d8 wordsmithing (#24205) 2023-11-21 09:53:41 -06:00
Nick Cabatoff
1bf366ccdc Use our fork of bbolt to improve freelist performance (#24010) 2023-11-21 10:08:18 -05:00
Victor Rodriguez
c0014c9640 Augment testCore_Rekey_Update_Common to test for RekeyUpdate errors. (#24206) 2023-11-21 08:56:58 -05:00
Chelsea Shaw
b833b30315 UI: always send capabilities-self request in user's root namespace (#24168)
* Add getRelativePath helper and use to calculate relativeNamespace

* Always request capabilities-self on users root ns and prefix body with relative path

* Update capabilities adapter with test

* add changelog

* Simplify getRelativePath logic

* test update
2023-11-20 13:21:00 -06:00
Alex
4cf837d56a UI: HDS adoption replace footer element (#24191)
* Replace footer with `Hds::AppFooter`

* Remove unused `.footer` styles

* Add changelog entry

* Use `doc-link` helper for 'Documentation' link
2023-11-20 12:00:03 -06:00
Steven Clark
bcbd45b380 Handle expired OCSP responses from server (#24193)
* Handle expired OCSP responses from server

 - If a server replied with what we considered an expired OCSP response (nextUpdate is now or in the past), and it was our only response we would panic due to missing error handling logic.

* Add cl
2023-11-20 10:51:03 -05:00
Violet Hynes
d2afea92a1 VAULT-22030 update error message when from entity isn't found as part of automated entity merge (#24188)
* VAULT-22030 update error message when from entity isn't found as part of automated entity merge

* VAULT-22030 add extra info
2023-11-20 10:45:36 -05:00
Steven Clark
53040690a2 PKI: Do not set NextUpdate OCSP field when ocsp_expiry is 0 (#24192)
* Do not set NextUpdate OCSP field when ocsp_expiry is 0

* Add cl
2023-11-20 10:32:05 -05:00
claire bontempo
4ac07e1d97 UI: HDS adoption replace <ConfirmAction> component (#21520)
* replace confirm-action dropdown with button+modal

* add modal frame to sidebar

* fix weird paragraph indent

* pass button text as arg

* add warning color to rotate modals

* update seal action and config ssh

* cleanup confirm action

* edit form

* add dropdown arg

* put back seal text

* put back confirm button text

* fix toolbar stylinggp

* popup member group

* move up title

* finish popup- components

* keymgmt

* fix modal button logic

* remaining app template components

* add period for angel

* vault cluster items

* add button text assertion

* remaining instances

* remove arg for passing confirm text

* contextual confirm action components

* delete old components

* update docs

* ammend dropdown loading states, add getter for confirm button color

* address feedback

* remove @disabled arg and add @disabledMessage

* add changelog;

* mfa tests

* update test selectors

* lol cleanup selectors

* start confirm action tests WIP

* move dropdown class directly to component

* add default color of isInDropdown

* final cleanup

* add tests

* remove @buttonColor as arg for dropdown

* update confirm action tests

* updae modals with disabled message

* refactor provider edit test
2023-11-17 23:44:21 +00:00
Angel Garbarino
24f5807da4 UI: HDS adoption replace <Button> in lib/pki (#24176)
* initial run through

* search for button

* wip addressing pr comments

* wip clean up

* clean up

* address overview

* add in conditional
2023-11-17 22:34:54 +00:00
Divya Pola
117118e2bd Add error checking when creating seal.Access object (#24181) 2023-11-17 19:28:24 +00:00
Theron Voran
5415d3c8a1 docs/vault-secrets-operator: GKE workload identity auth (#23684)
Adding overview docs for using GKE workload identity with Vault
Secrets Operator under Secret Sources/Vault/Auth Methods/. Updates the
Vault Auth method section in the Vault/Auth Methods overview page with
links to the VSO API sections for the other supported auth methods
(until they have their own pages).
---------
Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
2023-11-17 11:06:10 -08:00
Theron Voran
f951fe5429 docs/vault-helm: updates for v0.27.0 release (#24178) 2023-11-17 10:13:48 -08:00
Ben Ash
fb29c1437a Update VSO docs for v0.4.0 (#24171) 2023-11-16 17:00:22 -05:00
Nick Cabatoff
edb60b63f7 Use test package parallelism of 2 for docker/binary-based tests. (#24173) 2023-11-16 16:27:43 -05:00