2161 Commits

Author SHA1 Message Date
Steven Clark
c3d5c1b3ec
Update to Go 1.23.3 (#28920)
* Update to Go 1.23.3

 - Update to latest major version of Go 1.23.3 from 1.22.8.
 - Update github.com/sasha-s/go-deadlock to address deadlock timer
   issue we were seeing.
 - Fix one of our tests to only reset the member variable we change
   instead of the entire Opts parameter to avoid a data race during
   testing.

* Add workaround for MSSQL TLS certificate container issue
2024-11-15 13:32:09 -05:00
Steven Clark
95a16dbafe
PKI: Add a new leaf_not_after_behavior value to force erroring in all circumstances (#28907)
* PKI: Add a new leaf_not_after_behavior value to force erroring in all circumstances

 - We introduce a new value called `always_enforce_err` for the existing
   leaf_not_after_behavior on a PKI issuer. The new value will force we
   error out all requests that have a TTL beyond the issuer's NotAfter value.

 - This will apply to leaf certificates issued through the API as did err,
   but now to CA issuance and ACME requests for which we previously changed
   the err configuration to truncate.

* Add cl

* Update UI test

* Fix changelog type
2024-11-15 11:59:54 -05:00
Steven Clark
0adf2664b6
secrets/ssh: Return the allow_empty_principals field in read api (#28901)
* secrets/ssh: Return the allow_empty_principals field in read api

 - Return the new field in the read response api and add a test case
   that will catch these errors in the future of adding a field to
   the ssh role and not returning it in the read api response

* Add cl
2024-11-13 12:49:51 -05:00
Amir Aslamov
bf132719cf
VAULT-32330: fix sanitize path function to account for backslashes (#28878)
* expand the leading prefix check to check for double forward and back slashes

* improve the logic to be more concise

* add unit tests

* add a changelog

* make it a bug type

* feedback: reconstruct the check to explicitly check for backslash as well as slash followed by backslash
2024-11-13 10:56:55 -05:00
Violet Hynes
aa09d0cec5
Product usage reporting docs (#28858)
* First draft of product usage reporting docs

* Table data, fix issues

* Changelog
2024-11-12 09:15:52 -05:00
Paul Banks
1aa9a7a138
Make identity store loading and alias merging deterministic (#28867)
* Make identity store loading and alias merging deterministic

* Add CHANGELOG

* Refactor our Ent-only logic from determinism test

* Use stub-maker

* Add test godoc
2024-11-11 15:53:16 +00:00
Kajeepan Kandeepan
c09ca8c124
[Docs] update reference consul-helm url to consul-k8s (#28825)
* chore: update reference consul-helm url to consul-k8s

* docs: add changelog

---------

Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com>
2024-11-08 16:24:13 -08:00
Angel Garbarino
c7ca295816
Solve cntrl+f issue on KVv2 JSON details and edit views (#28808)
* initial changes need to add test coverage

* change icon

* replace original idea with hds::codeblock on kvv2 details view

* changelog

* fixing edit view by addressing viewportMargin

* fix failing test

* missedone

* Update 28808.txt

* Update json-editor.js

* test coverage

* update codeblock selector

* Update general-selectors.ts

* Update kv-data-fields.js

* Update ui/lib/core/addon/components/json-editor.js

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

* Update ui/lib/kv/addon/components/kv-data-fields.js

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

* update test name

* add default to modifier

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
2024-11-08 18:23:01 +00:00
Angel Garbarino
2c3c585d70
Add identity_token_key to Azure and GCP secret engines (#28822)
* changes then onto tests

* fix wif test failures

* changelog

* clean up

* address pr comments

* only test one wif engine for relevant tests

* add back engine loop for tests that depend on type
2024-11-08 16:32:05 +00:00
miagilepner
6c184c8756
VAULT-31393: Return 500 for some gRPC errors during login on perf standbys (#28807)
* return 500 for RPC failures during perf standby logins

* godoc

* changelog
2024-11-07 15:47:20 +01:00
hc-github-team-secure-vault-core
9cb10e41da
Update vault-plugin-auth-azure to v0.19.2 (#28848)
* Update vault-plugin-auth-azure to v0.19.2

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2024-11-06 17:19:28 -05:00
claire bontempo
30d4e21e88
UI: LDAP Hierarchical roles (#28824)
* remove named path adapter extension, add subdirectory query logic to adapter

* add subdirectory route and logic to page::roles component

* fix overview page search select

* breadcrumbs

* update tests and mirage

* revert ss changes

* oops

* cleanup adapter, add _ for private methods

* add acceptance test

* remove type

* add changelog

* add ldap breadcrumb test

* VAULT-31905 link jira

* update breadcrumbs in Edit route

* rename type interfaces
2024-11-06 00:52:29 +00:00
Steven Clark
752bb08664
Transit: fix race in the key update api (#28839)
- The key update API would release the lock a little too early
   after it persisted the update so the reference could be updated
   when it was preparing the response to the caller across updates
   and/or key rotations
 - The storage updates were okay, just the response back to the caller
   of the update might see a mixture of different updates
2024-11-05 14:41:09 -05:00
Victor Rodriguez
c855f6e982
Fix bug setting PKI issuer enable_aia_url_templating to be set to false (#28832)
Fix bug setting PKI issuer enable_aia_url_templating to be set to false.
2024-11-04 20:51:01 +00:00
miagilepner
10bd15f956
VAULT-30877: Repopulate AWS static creds queue in initialize (#28775)
* populate rotation queue in initialize

* docs, changelog

* add t.Helper()
2024-11-04 09:32:14 -06:00
claire bontempo
17d29f983c
UI: Upgrade Ember data 5.3.2 (and upgrade minor versions of ember-source and ember-cli) (#28798)
* upgrade ember-data 5.3.2, uninstall legacy compat, upgrade ember-cli, ember-source

* use query instead of findAll for auth methods, update tests

* set mutableId for kmip

* show generated private key data before transitioning to details

* update kv metadata test

* remove deprecated methods from path help service

* add changelog, update readme version matrix

* remove toggle template helper
2024-10-30 09:10:22 -07:00
Victor Rodriguez
2eaae5e87b
Update to Go 1.22.8. (#28786) 2024-10-25 17:36:55 -04:00
hc-github-team-secure-vault-core
a384eac192
Update vault-plugin-secrets-openldap to v0.14.3 (#28780)
* Update vault-plugin-secrets-openldap to v0.14.3

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2024-10-25 19:54:45 +00:00
Tin Vo
48cf1a1809
VAULT-21710 - prevent duplicate audit file_path targets (#28751)
* updating audit file_path duplication

* update test

* updating tests

* fixing go test errors

* adding go test doc for TestCore_EnableExistingAudit

* adding go test doc for TestCore_EnableExistingAudit

* adding go test doc for TestCore_EnableExistingAudit

* adding changelog

* adding suggested comments
2024-10-24 10:54:48 -07:00
Scott Miller
415d260995
Support trimming trailing slashes via a mount tuneable to support CMPv2 (#28752)
* Support trimming trailing slashes via a mount tuneable to support CMPv2

* changelog/

* Perform trimming in handleLoginRequest too

* Eagerly fetch the mount entry so we only test this once

* Add a mount match function that gets path and entry

* Update vault/request_handling.go

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

* more docs

* Some patches (from ENT) didnt apply

* patch fail

* Update vault/router.go

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

* PR feedback

* dupe

* another dupe

* Add support for enabling trim_request_trailing_slashes on mount creation

* Fix read mount api returning configuration for trim_request_trailing_slashes

* Fix test assertion

* Switch enable and tune arguments to BoolPtrVal to allow end-users to specify false flag

* Add trim-request-trailing-slashes to the auth enable API and CLI

---------

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2024-10-24 10:47:17 -05:00
miagilepner
4439ee8798
Fix Windows chown error (#28748)
* noop for windows chown

* changelog
2024-10-22 14:57:26 +02:00
claire bontempo
9097689d2a
Adds copy button to entity, alias and mfa method ID fields (#28742)
* make id buttons copyable

* add changelog
2024-10-21 12:48:00 -07:00
Luis (LT) Carbonell
efd6148f43
Fix typo in changelog (#28743) 2024-10-21 15:12:31 -04:00
Theron Voran
8f1850baa3
sdk: updating to docker v27.2.1 (#28456)
Also update to vault-testing-stepwise v0.3.2
2024-10-17 14:14:35 -07:00
Angel Garbarino
f2041b00e5
Remove decodeURIComponent method for KVv2 secret path on list view (#28698)
* remove encoding for KVv2

* test coverage

* changelog

* validations

* Revert "validations"

This reverts commit d6fd291d856a2005ed8f3a1a4f0f42add4ecb272.

* update subtext for secret path

* Update list.js

* Update secret-edit.js

* test coverage for data-octets

* Update list-directory.js

* fix modelForm test

* amend subText

* test selector things
2024-10-16 23:06:52 +00:00
Steven Clark
bce085bd3f
Fix issue building urls with IPv6 IPs for ACME http-01 challenges (#28718)
* Fix ACME http-01 challenges for IPv6 IPs

 - We weren't properly encapsulating the IPv6 IP within the url provided
   to the http client with [].

* Add cl

* Cleanup a test println
2024-10-16 14:26:44 -04:00
Scott Miller
a0af792437
Adds ACME specific error types to errors returned by challenge validation functions. (#28678)
* wip

* Change test expectation

* changelog

* remove ultimately unnecessary changes

* adjust unit test again
2024-10-15 17:13:13 +00:00
hc-github-team-secure-vault-core
6caff7a02e
Update vault-plugin-auth-azure to v0.19.1 (#28712)
* Update vault-plugin-auth-azure to v0.19.1

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2024-10-15 16:30:54 +00:00
hc-github-team-secure-vault-core
0a13127dbe
Update vault-plugin-secrets-openldap to v0.14.2 (#28704)
* Update vault-plugin-secrets-openldap to v0.14.2

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2024-10-14 16:50:28 -05:00
hc-github-team-secure-vault-core
fd96ac79b9
Update vault-plugin-secrets-azure to v0.20.1 (#28699)
* Update vault-plugin-secrets-azure to v0.20.1

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2024-10-14 16:31:09 +00:00
Chris Capurso
458de6d118
only strip v1 prefix from path if present (#28669)
* only strip v1 prefix from path if present

* add changelog entry

* adjust changelog
2024-10-10 12:25:14 -04:00
Scott Miller
004dfc49f8
Add a max_crl_size parameter to CRL config (#28654)
* wip

* Unit test the CRL limit, wire up config

* Bigger error

* API docs

* wording

* max_crl_entries, + ignore 0 or < -1 values to the config endpoint

* changelog

* rename field in docs

* Update website/content/api-docs/secret/pki/index.mdx

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

* Update website/content/api-docs/secret/pki/index.mdx

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

---------

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2024-10-09 21:38:55 +00:00
Scott Miller
3c0656e4c4
Update marcellanz/transit_pkcs1v15 RSA encryption support (#25486)
* [transit-pkcs1v15] transit support for the pkcs1v15 padding scheme – without UI tests (yet).

* [transit-pkcs1v15] renamed padding_scheme parameter in transit documentation.

* [transit-pkcs1v15] add changelog file.

* [transit-pkcs1v15] remove the algorithm path as padding_scheme is chosen by parameter.

* Update ui/app/templates/components/transit-key-action/datakey.hbs

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

* Update ui/app/templates/components/transit-key-action/datakey.hbs

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

* Update ui/app/templates/components/transit-key-action/datakey.hbs

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

* Update website/content/api-docs/secret/transit.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/transit.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/transit.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Add warnings to PKCS1v1.5 usage

* Update transit

* Update transit, including separating encrypt/decrypt paddings for rewrap

* Clean up factory use in the presence of padding

* address review feedback

* remove defaults

* lint

* more lint

* Some fixes for UI issues

 - Fix padding scheme dropdown console error by adding values
   to the transit-key-actions.hbs
 - Populate both padding scheme drop down menus within rewrap,
   not just the one padding_scheme
 - Do not submit a padding_scheme value through POST for non-rsa keys

* Fix Transit rewrap API to use decrypt_padding_scheme, encrypt_padding_scheme

 - Map the appropriate API fields for the RSA padding scheme to the
   batch items within the rewrap API
 - Add the ability to create RSA keys within the encrypt API endpoint
 - Add test case for rewrap api that leverages the padding_scheme fields

* Fix code linting issues

* simply padding scheme enum

* Apply suggestions from code review

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

* Fix padding_scheme processing on data key api

 - The data key api was using the incorrect parameter name for
   the padding scheme
 - Enforce that padding_scheme is only used on RSA keys, we
   are punting on supporting it for managed keys at the moment.

* Add tests for parsePaddingSchemeArg

* Add missing copywrite headers

* Some small UI fixes

* Add missing param to datakey in api-docs

* Do not send padding_scheme for non-RSA key types within UI

* add UI tests for transit key actions form

---------

Co-authored-by: Marcel Lanz <marcellanz@n-1.ch>
Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Co-authored-by: Steve Clark <steven.clark@hashicorp.com>
Co-authored-by: claire bontempo <cbontempo@hashicorp.com>
2024-10-09 09:30:14 -05:00
Victor Rodriguez
770d902f60
Use stored seal generation info for response to sys/seal-backend-status (#28631)
Use stored seal generation info for response to sys/seal-backend-status.
2024-10-09 14:04:50 +00:00
claire bontempo
902d853f7a
UI: Add copy button for secret path (#28629)
* add copy button to secret headers

* add changelog

* add test
2024-10-08 14:06:39 -07:00
Chris Capurso
69411d7925
VAULT-30108: Include User-Agent header in audit requests by default (#28596)
* include user-agent header in audit by default

* add user-agent audit tests

* update audit default headers docs

* add changelog entry

* remove temp changes from TestAuditedHeadersConfig_ApplyConfig

* more TestAuditedHeadersConfig_ApplyConfig fixes

* add some test comments

* verify type assertions in TestAudit_Headers

* more type assertion checks
2024-10-07 10:02:17 -04:00
Scott Miller
bae00721d2
Dont add the error from validating via issuer signature if the subsequent verification from extraCas succeeds (#28597)
* Dont add the error from validating via issuer signature if the subsequent verification from extraCas succeeds

* changelog
2024-10-04 18:59:40 +00:00
Guillermo Barroso
aeca0cdee6
secrets/aws: add sts_region parameter to root config (#22726)
* Set region parameter to be used for STS only on AWS secrets engine

* Add changelog

* Fix formatting

* region fix when not setting iam_endpoint or sts_endpoint

* Add 'sts_region' parameter for AWS secrets engine.

* Update TestBackend_PathConfigRoot for aws secrets

* Update changelog entry

---------

Co-authored-by: Robert <17119716+robmonte@users.noreply.github.com>
2024-10-04 18:33:09 +00:00
Josh Black
7307c56f59
-agent-address flag should have higher precedence than the env var (#28574)
* -agent-address flag should have higher precedence than the env var

* add changelog
2024-10-04 11:29:03 -07:00
Scott Miller
1eaca82bbd
Log when the seal is unavailable as error (#28564)
* Log when the seal is unavailable as error

* changelog

* Update changelog/28564.txt

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

---------

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2024-10-03 18:47:50 +00:00
VAL
53bb78ce5f
Log when MAP_POPULATE gets disabled (#28526)
* add warning for when MAP_POPULATE mmap flag not set

* Make mmap flags method handle any flags, where MAP_POPULATE is just one of them

* Only have the log print out on restores

* Add test, make logic more consistent

* Add changelog

* Add godoc for test

* Make test less dangerous
2024-10-02 12:27:25 -07:00
Jason Joo
a5caf4e1cb
fix: cert auth method watches cert file change and NewCreds() notification (#28126)
Signed-off-by: Jason Joo <hblzxsj@gmail.com>
2024-10-02 13:41:55 -04:00
claire bontempo
71422d4cdd
UI: Fix oidc auth method missing default_role field (#28539)
* add auth-config/oidc to openapi model helper

* alphabetize

* update maskedinput selector to be standard data-test-input

* add test

* add changelog

* fix maskedinput test and kv selector

* final textarea selector!
2024-10-01 09:21:16 -07:00
Eléonore Carpentier
b195342e51
Add sys/storage/raft/bootstrap option to reset TLS keyring (#18615)
* Add sys/storage/raft/bootstrap option to reset TLS keyring

* Add a comment

* Remove resetTLSKeyring arg & fix based on review comments

* Add changelog

* Update vault/raft.go

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>

* fix failing test

* typo in go doc  :sadpanda:

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2024-10-01 11:52:12 -04:00
Lee Boynton
55dac2a319
Fix potential error revoking privileges in postgres secret engine (#28519)
* Fix potential error revoking privileges in postgres secret engine

* add changelog entry

* fix changelog format

---------

Co-authored-by: JM Faircloth <jmfaircloth@hashicorp.com>
2024-09-26 16:08:14 -05:00
Steven Clark
2db2a9fb5d
PKI: Track last time auto tidy was run across restarts (#28488)
* Track the last PKI auto-tidy time ran for use across nodes

 - If the interval time for auto-tidy is longer then say a regularly
   scheduled restart of Vault, auto-tidy is never run. This is due to
   the time of the last run of tidy is only kept in memory and
   initialized on startup to the current time
 - Store the last run of any tidy, to maintain previous behavior, to
   a cluster local file, which is read in/initialized upon a mount
   initialization.

* Add auto-tidy configuration fields for backing off at startup

* Add new auto-tidy fields to UI

* Update api docs for auto-tidy

* Add cl

* Update field description text

* Apply Claire's suggestions from code review

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

* Implementing PR feedback from the UI team

* remove explicit defaults and types so we retrieve from backend, decouple enabling auto tidy from duration, move params to auto settings section

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
Co-authored-by: claire bontempo <cbontempo@hashicorp.com>
2024-09-26 09:47:11 -04:00
Luis (LT) Carbonell
b861d8b03f
Fix Issue with Lost Timezone in Metadata for Database Secret Engines (#28509)
* Set cron schedule location after pulling from storage

* Add changelog
2024-09-25 18:40:50 -04:00
Chris Capurso
f0782ee3fb
calculate token lease TTL using tune config (#28498)
* calculate token lease TTL using tune config

* add changelog entry
2024-09-24 15:29:56 -04:00
Violet Hynes
6d66990cb6
Fix static secret caching race condition (#28494)
* Fix static ssecret caching data race

* Fix static ssecret caching data race

* Changelog
2024-09-24 14:08:48 -04:00
Scott Miller
12f03b073a
Make reception of an empty valid principals configurable based on a role flag. (#28466)
* Make reception of an empty valid principals configurable based on a role flag.

Adds allow_empty_principals, which if true allows valid_principals on credential generation calls
to be empty.

* changelog

* Allow empty principals on unrelated unit test

* whitespace
2024-09-23 17:20:11 -05:00