Commit Graph

18722 Commits

Author SHA1 Message Date
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
Victor Rodriguez
648dea82dc Run make fmt. (#24174) 2023-11-16 20:52:21 +00:00
divyaac
5d5d3b832e Implementation for global exempt paths: (#24172) 2023-11-16 12:11:59 -08:00
Victor Rodriguez
2f01a059c6 Use seal wrappers rather than config to determine autoSeal barrier type. (#24165)
* Use seal wrappers rather than config to determine autoSeal barrier type.

A seal's Access object contains all seal configuration, which in the case of
seal migration includes the "unwrap seal" as well as the barrier seal. Thus, to
determine whether an autoSeal is of a specific type such as 'Transit' or whether
it is a 'Multiseal', use the wrappers of the seal's Access.

* Fix seal type reported by /sys/seal-status.

Fix an error that resulted in the wrong seal type being reported while Vault is
in seal migration mode.
2023-11-16 19:17:40 +00:00
Chelsea Shaw
87f09c8b84 UI: Allow token configuration tune from namespace (#24147)
* check methodType instead of type when checking to remove token_type from payload

* Add changelog
2023-11-15 16:18:53 -06:00
Scott Miller
7a8ced4d36 Implement RFC 5785 (.well-known) Redirects (#23973)
* Re-implementation of API redirects with more deterministic matching

* add missing file

* Handle query params properly

* licensing

* Add single src deregister

* Implement specifically RFC 5785 (.well-known) redirects.

Also implement a unit test for HA setups, making sure the standby node redirects to the active (as usual), and that then the active redirects the .well-known request to a backend, and that that is subsequently satisfied.

* Remove test code

* Rename well known redirect logic

* comments/cleanup

* PR feedback

* Remove wip typo

* Update http/handler.go

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>

* Fix registrations with trailing slashes

---------

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2023-11-15 15:21:52 -06:00
claire bontempo
d7b8dddd2e UI: HDS adoption replace <Button> in lib/core (2) (#24122)
* first four buttons

* swap button in object list input and update styling

* swap search select buttons

* string list input

* update text file

* toggle button

* add comment

* swap eye-con

* revert toggle button, add deprecation note

* cleanup css for object list input

* fix test

* revert toggle changes

* add margin
2023-11-15 19:58:41 +00:00
Chelsea Shaw
8756dccb11 Kv directory fixes (#24129)
* update icon if kv path ends in slash. Fixes #23978

* Correctly link to directory in kv if search-select uses fallback input
2023-11-15 10:51:26 -06:00
Robert Hanzlík
28e3507680 allow to skip TLS check in acme http-01 challenge (#22521)
* allow to skip TLS check in acme http-01 challenge

* remove configurable logic, just ignore TLS

* add changelog

* Add test case

---------

Co-authored-by: Steve Clark <steven.clark@hashicorp.com>
2023-11-15 11:10:29 -05:00
Violet Hynes
91ab8a5178 Add a sleep to give the event system time to start (#24141) 2023-11-15 10:33:27 -05:00
Violet Hynes
15ee7dd6c8 Update error message when merging entity fails due to alias deletion failure (#24125) 2023-11-15 09:11:24 -05:00
Violet Hynes
3e054cbd4c VAULT-19239 Add capability to disable dynamic secret caching for Vault Proxy (#23801)
* VAULT-19239 create disable static secret caching config

* VAULT-19239 missed file

* VAULT-19239 didn't finish a log line

* VAULT-19239 adjust test to use new option

* Fix typo

Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>

---------

Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2023-11-15 09:11:10 -05:00
Nick Cabatoff
22a2e74fcc Fix error not being handled when creating a docker cluster. (#24136) 2023-11-15 14:09:06 +00:00
davidadeleon
0ab8cfdff6 [VAULT-21623] Close rate-limit client purge goroutines when sealing (#24108)
* close purge goroutines when sealing

* add changelog
2023-11-15 08:49:29 -05:00
Jordan Reimer
a0562419ce Copywrite pre-commit (#24091)
* adds pre-commit function for adding copyright headers for files in ui directory

* removes additional log level change

* fixes issue looping staged files

* adds comment

* updates to stage changes after adding headers rather than blocking commit

* cleanup comments and unused code from ui_copywrite bash function
2023-11-14 15:32:17 -07:00
claire bontempo
c265f5a132 UI: helper sort-objects to alphabetize list items (#24103)
* move list to component

* use helper instead

* add changelog

* clarify changelog copy

* delete components now that helper is in use

* move helper to util, remove template helper invokation

* add optional sorting to lazyPaginatedQuery based on sortBy query attribute

* Add serialization to entity-alias and entity so that they can be sorted by name on list view

* Same logic as base normalizeItems for extractLazyPaginatedData so that metadata shows on list

* Add headers

---------

Co-authored-by: Chelsea Shaw <cshaw@hashicorp.com>
Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>
2023-11-14 21:57:29 +00:00
Hamid Ghaf
e77800b2ff update go version to 1.21.4 (#24121) 2023-11-14 13:21:24 -08:00
claire bontempo
55f187235d UI: HDS adoption replace <Button> in lib/core (1) (#24113)
* fix pgp key label

* add todos for confirm action popup menu situation

* choose pgp form

* wrap secret button

* couplea form buttons

* readmore

* replication actions

* delete leftover file

* slattributes
2023-11-14 11:43:22 -08:00
Angel Garbarino
70d0e7c69c Glimmerize Saml Auth (#24100)
* glimmerize saml

* update roleName

* remove constructor
2023-11-14 09:55:09 -07:00
Steven Clark
92682f33ce Address a panic when exporting RSA public keys in transit (#24054)
* Address a panic export RSA public keys in transit

 - When attempting to export the public key for an RSA key that
   we only have a private key for, the export panics with a nil
   deference.
 - Add additional tests around Transit key exporting

* Add cl
2023-11-14 09:40:37 -05:00
claire bontempo
5f86fa7785 move to addon (#24112) 2023-11-13 21:51:45 -08:00
claire bontempo
7f03393630 UI: Increase base font size (#23994)
* fix button padding

* rename spacing variables using numerical values

* fix toggle aligment

* remove unused toggle classes

* replace margin and padding with spacing vars

* increase base font size

* remove switch css, use toggle consistently

* remaining margin/padding size vars to spacing pixels

* add deprecated note, rever changes to size vars

* decrease console size

* remove function

* adjust card size for small selectable cards

* fix select to fit to content width

* fix toolbar-scroller height

* add changelog;

* fix checkbox styling
2023-11-13 21:29:39 +00:00
Austin Gebauer
a21e58a7c9 sync: setup backend with system backend config (#24109) 2023-11-13 09:18:52 -08:00