821 Commits

Author SHA1 Message Date
Vinay Gopalan
eb31d8360b add logging and update build.yml 2025-08-20 19:34:21 -07:00
Vault Automation
ae0e5e160f
[VAULT-38601] Modify response to MFA enforced requests to enable TOTP self-enrollment (#8723) (#8746)
Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2025-08-20 20:22:00 +00:00
Vault Automation
711ed1a740
Add support for AES-CBC to transit (#8367) (#8741)
* add key types and encryption for cbc

* add decryption

* start adding tests

* add tests for policy functions

* add convergent case

* add enterprise check and key creation test cases

* fix key generation and add import/export

* add tests and fixes

* add changelog

* linter

* refactor policy functions and fix IV

* add ce change

* fix function calls

* fix factories in function call

* fix IV test case

* test fixes

* add cbc keys to read

* change iv

* fix merge errors

* make fmt

* change error name and add iv error

* fix tests

Co-authored-by: Rachel Culpepper <84159930+rculpepper@users.noreply.github.com>
2025-08-20 17:39:02 +00:00
miagilepner
bcd584af20
VAULT-37630: CE changes for recover as a copy policy handling (#31472)
* CE changes for recover as a copy policy

* make proto
2025-08-12 10:29:22 +02:00
Bianca
eedc2b7426
Add limit to JSON nesting depth (#31069)
* Add limit to JSON nesting depth

* Add JSON limit check to http handler

* Add changelog
2025-08-06 14:08:01 +02:00
Ben Ash
e2273dbd77
auth/ldap: ensure consistent entity aliasing when set from the username (#31427)
[ent: a552ac1e80e3d334673c59a5bb825082cd56b1bf]
2025-08-05 19:14:15 +00:00
Victor Rodriguez
32e3ecbf83
Add hooks for enterprise token auth metadata feature. (#31391) 2025-08-05 12:32:48 -04:00
Bruno Oliveira de Souza
8f7d76d781
VAULT-35087: add Open-API support for secret recovery operations (#31331)
* support open-api secret recovery operations

* add changelog

* Update changelog/31331.txt

Co-authored-by: miagilepner <mia.epner@hashicorp.com>

---------

Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2025-07-23 11:33:25 -03:00
Violet Hynes
584a3daf21
Dependency updates for main (#31299)
* Dependency updates for main

* go mod tidy
2025-07-17 11:30:11 -04:00
kpcraig
8f522a2bca
add ce side code and stubs for rotation manager
* add ce side code and stubs

* add changelog

* style refactor

* try to use APIPath as mount point instead of request field

* fix linter

* return a response struct instead of a pure timestamp

* add issue time to response

* add ttl to GetRotationInformation response

* rename field for clarity

* update ttl to just seconds

* rename next and last rotation time field; describe what they are

* rename function

* catch up to ent PR

* fix patch merge mistake
2025-07-15 12:48:00 -04:00
Etourneau Gwenn
06eaa6d500
Added PSC Private Service Connect for GCP CloudSQL (#27889)
* Added PSC Private Service Connect for GCP CloudSQL
Added PrivateIP support for GCP MySQL

* Added changelog

* Update changelog

* Value need to be exported or will be false

* Exported variablee for MySQL as well

* Add test cases

* Add go doc test comments

---------

Co-authored-by: robmonte <17119716+robmonte@users.noreply.github.com>
2025-07-15 11:29:47 -05:00
Ellie
23e04c2409
Add MetricsReporter interface so that databaseBackend's can share their connection counts with CensusManager (#31269)
* add interface and impl

* add tests

* fix comments

* Update builtin/logical/database/backend.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-14 14:52:55 -05:00
Rachel Culpepper
844e2b3af0
add ce changes for slh-dsa (#31145) 2025-07-02 18:23:54 +00:00
Violet Hynes
7684ac9eab
VAULT-36562 CE changes (#31054)
* VAULT-36563 CE side

* CE changes

* Go mod changes

* I'm dumb
2025-06-20 15:16:40 -04:00
Kuba Wieczorek
0e11fbfe59
[VAULT-21456] Use interned regexp when initialising backends and validating authz headers in the AWS backend (#31022) 2025-06-20 17:33:28 +00:00
helenfufu
146c032600
CE changes for plugin download (#30927)
* ce changes for https://github.com/hashicorp/vault-enterprise/pull/8193

* lower case enterprise only errors

---------

Co-authored-by: Ben Ash <bash@hashicorp.com>
2025-06-10 10:31:24 -04:00
Tauhid Anjum
d9ecd5bd10
PostgreSQL backend passwordless authentication in cloud (#30681)
* PostgreSQL backend passwordless authentication in cloud

* updated changelog file name

* Update the changelog

Co-authored-by: Paul Banks <banks@banksco.de>

* fix image spec sha

---------

Co-authored-by: Paul Banks <banks@banksco.de>
2025-06-04 08:44:20 +02:00
Bruno Oliveira de Souza
0b9157156f
VAULT-32657 deprecate duplicate attributes in HCL configs and policies (#30386)
* upgrade hcl dependency on api pkg

This upgrades the hcl dependency for the API pkg,
and adapts its usage so users of our API pkg are
not affected. There's no good way of communicating
a warning via a library call so we don't.

The tokenHelper which is used by all Vault CLI
commands in order to create the Vault client, as
well as directly used by the login and server
commands, is implemented on the api pkg, so this
upgrade also affects all of those commands. Seems
like this was only moved to the api pkg because
the Terraform provider uses it, and I thought
creating a full copy of all those files back under
command would be too much spaghetti.

Also leaving some TODOs to make next deprecation
steps easier.

* upgrade hcl dependency in vault and sdk pkgs

* upgrade hcl dependency in vault and sdk pkgs

* add CLI warnings to commands that take a config

- vault agent (unit test on CMD warning)
- vault proxy (unit test on CMD warning)
- vault server (no test for the warning)
- vault operator diagnose (no tests at all, uses the
same function as vault server

* ignore duplicates on ParseKMSes function

* Extend policy parsing functions and warn on policy store

* Add warning on policy fmt with duplicate attributes

* Add warnings when creating/updating policy with duplicate HCL attrs

* Add log warning when switchedGetPolicy finds duplicate attrs

Following operations can trigger this warning when they run into a policy
with duplicate attributes:
* replication filtered path namespaces invalidation
* policy read API
* building an ACL (for many different purposes like most authZ operations)
* looking up DR token policies
* creating a token with named policies
* when caching the policies for all namespaces during unseal

* Print log warnings when token inline policy has duplicate attrs

No unit tests on these as new test infra would have to be built on all.
Operations affected, which will now print a log warning when the retrieved
token has an inline policy with duplicate attributes:
* capabilities endpoints in sys mount
* handing events under a subscription with a token with duplicate
attrs in inline policies
* token used to create another token has duplicate attrs in inline
policies (sudo check)
* all uses of fetchACLTokenEntryAndEntity when the request uses a
token with inline policies with duplicate attrs. Almost all reqs
are subject to this
* when tokens are created with inline policies (unclear exactly how that
can happen)

* add changelog and deprecation notice

* add missing copywrite notice

* fix copy-paste mistake

good thing it was covered by unit tests

* Fix manual parsing of telemetry field in SharedConfig

This commit in the hcl library was not in the
v1.0.1-vault-5 version we're using but is
included in v1.0.1-vault-7:
e80118accb

This thing of reusing when parsing means that
our approach of manually re-parsing fields
on top of fields that have already been parsed
by the hcl annotation causes strings (maybe
more?) to concatenate.

Fix that by removing annotation. There's
actually more occurrences of this thing of
automatically parsing something that is also
manually parsing. In some places we could
just remove the boilerplate manual parsing, in
others we better remove the auto parsing, but
I don't wanna pull at that thread right now. I
just checked that all places at least fully
overwrite the automatically parsed field
instead of reusing it as the target of the
decode call. The only exception is the AOP
field on ent but that doesn't have maps or
slices, so I think it's fine.

An alternative approach would be to ensure
that the auto-parsed value is discarded,
like the current parseCache function does

note how it's template not templates

* Fix linter complaints

* Update command/base_predict.go

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>

* address review

* remove copywrite headers

* re-add copywrite headers

* make fmt

* Update website/content/partials/deprecation/duplicate-hcl-attributes.mdx

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

* Update website/content/partials/deprecation/duplicate-hcl-attributes.mdx

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

* Update website/content/partials/deprecation/duplicate-hcl-attributes.mdx

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

* undo changes to deprecation.mdx

* remove deprecation doc

* fix conflict with changes from main

---------

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2025-05-23 16:02:07 -03:00
miagilepner
9de78a5136
VAULT-35083: CE changes for recover, read, list from snapshot (#30738) 2025-05-23 11:30:45 +02:00
Kit Haines
5dc4191164
CE-changes for ent-feature AES192-CMAC for transit. (#30721) 2025-05-22 11:47:50 -04:00
helenfufu
71edba2ccb
Vault 34905 support register ce plugin with extracted artifact (#30673)
* apply oss changes from https://github.com/hashicorp/vault-enterprise/pull/8071

* handle oss file deletions

* go mod tidy

* add changelog
2025-05-22 08:39:47 -07:00
Jordan Reimer
1d317af395
OpenAPI Patch Endpoints (#30641)
* adds patch endpoints to openapi

* adds patch to openapi operations testdata
2025-05-20 08:31:46 -06:00
JMGoldsmith
c4457366b3
Revert "PostgreSQL backend passwordless authentication in cloud (#30564)" (#30668)
This reverts commit 2dd0a1626e1d98c5b9dd48a697cc94188204d81e.
2025-05-19 16:57:51 +00:00
Jenny Deng
49851bbeec
CE changes (#30647) 2025-05-15 17:12:04 -07:00
miagilepner
6212f0986e
VAULT-35080: Snapshot storage routing (#30635)
* add storage router and test case

* add tests

* fix typo
2025-05-15 17:13:02 +02:00
Violet Hynes
26c337e9ee
VAULT-35396 CE changes for SDK observation update (#30626)
* VAULT-35396 CE changes for SDK observation update

* Make proto
2025-05-15 09:46:03 -04:00
miagilepner
d9932a0870
VAULT-35080: Snapshot ID context conversion for GRPC plugins (#30615)
* add context conversion for snapshot ID key

* fix license header
2025-05-15 14:43:33 +02:00
Steven Clark
f28303c5bb
Revert partial test changes for skipping FIPS tests for unsupported SHA3 hashes (#30598) 2025-05-13 14:32:39 -04:00
Tauhid Anjum
2dd0a1626e
PostgreSQL backend passwordless authentication in cloud (#30564)
* PostgreSQL backend passwordless authentication in cloud

* adding changelog

* Updating deprecated docker test types

* adding unit tests for getAuthConfig

* removing cloud auth based tests due to failure in CI. Unit test should focus on the default flow.

* Adding function name for lint
2025-05-13 15:52:02 +02:00
Luis (LT) Carbonell
ed52371b10
Upgrade FIPS 1402 -> 1403 (#30576)
* Upgrade FIPS 1402 -> 1403

* Clean up

* changelog
2025-05-12 15:01:30 -05:00
miagilepner
1c37b94d65
VAULT-35079: Scaffolding for recover operations on backends (#30556)
* allow snapshot read, recover operation, snapshot ID in request

* lint and add comment
2025-05-09 11:48:20 +01:00
kpcraig
83534ec583
Add RotationManager stubs to the mock plugin (#30532) 2025-05-06 13:36:15 -04:00
Violet Hynes
664dfbe838
VAULT-35384 Add new telemetry metrics for HTTP response status codes (#30354)
* VAULT-35384 Add new telemetry metrics for HTTP status codes

* VAULT-35384 Add new telemetry metrics for HTTP status codes

* Changelog

* Changelog

* Typo

* Missed metrics

* VAULT-35384 sys/health
2025-05-06 10:15:19 -04:00
Robert
bf339bc50d
Add snowflake DB API warning (#30327)
* Add API warning based on DB type

* Add deprecation notice

* Add warning to the top of the docs pages

* Update capabilities table

* Filter SQLConnectionProducer fields from unrecognized parameters warning

* Add test case
2025-04-28 13:05:55 -05:00
Amir Aslamov
10495d77f3
Fix the exposure of sensitive data from inside logs by dropping the entered value inside schema validation function (#30388)
* drop the actual value of the secret entered by the user from printing inside field validation

* add changelog

* upgrade vault radar version to 0.24.0

* feedback

* remove changelog
2025-04-25 15:20:29 -04:00
akshya96
10223f2d83
Vault-34681 : Remove estimates and return actual values for new clients in the current month CE (#30370)
* adding partial month activity log changes from ent

* check for empty billing start
2025-04-25 09:36:29 -07:00
Kit Haines
43a9fe5c96
Delta CRL enablement, including tests. (#30319)
* Delta CRL enablement, including tests.

* Add changelog.

* PR Review Feedback

* Remove openssl test, to be included in a separate testing PR.
2025-04-23 09:40:58 -04:00
Guy J Grigsby
08c5a52b02
disable_mlock must now be explicitly included in config (#29974)
* require explicit value for disable_mlock

* set disable_mlock back to true for all docker tests

* fix build error

* update test config files

* change explicit mlock check to apply to integrated storage only.

* formatting and typo fixes

* added test for raft

* remove erroneous test

* remove unecessary doc line

* remove unecessary var

* pr suggestions

* test compile fix

* add mlock config value to enos tests

* enos lint

* update enos tests to pass disable_mlock value

* move mlock error to runtime to check for env var

* fixed mlock config detection logic

* call out mlock on/off tradeoffs to docs

* rewording production hardening section on mlock for clarity

* update error message when missing disable_mlock value to help customers with the previous default

* fix config doc error and update production-hardening doc to align with existing recommendations.

* remove extra check for mlock config value

* fix docker recovery test

* Update changelog/29974.txt

Explicitly call out that Vault will not start without disable_mlock included in the config.

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

* more docker test experimentation.

* passing disable_mlock into test cluster

* add VAULT_DISABLE_MLOCK envvar to docker tests and pass through the value

* add missing envvar for docker env test

* upate additional docker test disable_mlock values

* Apply suggestions from code review

Use active voice.

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

---------

Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2025-04-17 15:35:40 +02:00
Steven Clark
7135d56f9c
Update to Go 1.24.2 (#30272) 2025-04-16 14:10:17 -04:00
Matt Keeler
cdc5fa796e
Introduce hashicorp/go-metrics compatibility to the SDK module (#29358)
* Introduce hashicorp/go-metrics compatibility

Compatability is attained with build tags

Using tag armonmetrics or no tag at all will result in the library utilizing github.com/armon/go-metrics for metrics emission

Using tag hashicorpmetrics will result in the library utilizing the updated github.com/hashicorp/go-metrics for metrics emission.

Bump root module go.mod to pull in indirect hashicorp/go-metrics dependency from the sdk module

Update module readme.

Updates

* Finish the sentence.

* Update sdk/README.md

Co-authored-by: Paul Banks <pbanks@hashicorp.com>

* Fix up errant usage of non-compat module

* Fix go fmt

---------

Co-authored-by: Paul Banks <pbanks@hashicorp.com>
Co-authored-by: Josh Black <raskchanky@gmail.com>
2025-04-10 11:20:49 -05:00
Kit Haines
2a14b1c616
Allow Root + Intermediate Key_Usage to be set (#30034)
* outline of key usage fix

* Changelog, and test-fix

* Simplify code setting key_usage

* make fmt

* Per internal dicussion to align closer to the CAB guidelines, only allow DigitalSignature.

* Breaking Change: error if invalid key_usage to generate root or sign-intermediate.

* Change error to warning in order to not break backwards compatibility.
2025-04-03 18:48:54 +00:00
Ryan Cragun
95b2d86870
ldap: pin test container to latest working version (#30148)
The test container that we use for many LDAP tests recently merged a
breaking change: https://github.com/rroemhild/docker-test-openldap/issues/62

Add support for using containers via references with digests and pin to the latest
version that worked. We can unpin later if so desired.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2025-04-01 22:24:15 +00:00
Raymond Ho
e50f2258be
fix rootless typo (#30135) 2025-04-01 10:56:49 -07:00
Steven Clark
1802204dec
Update golang.org/x/net to v0.37.0 for GO-2025-3503 (#29925) 2025-03-14 11:53:38 -04:00
Steven Clark
152e5b53e1
Update go-jose to v3.0.4/v4.0.5 (#29771)
* Update go-jose to v3.0.4

 - Updating to address CVE-2025-27144

* Update v4 references in sdk and api

* Update go-jose across all api auth projects to v4.0.5
2025-02-28 11:15:59 -05:00
Ryan Cragun
69646127df
fmt: check gosimports during pre-commit hooks (#29520)
`gosimports` is the preferred style for module imports and it is
enforced via CI. I've found that things often manage to drift so I've
taken the liberty to update our pre-commit hook to verify our imports
formatting before a change is committed.

Along with updating the formatting helper I've also run `make fmt` to
resolve any formatting drift that managed to make it into the codebase.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2025-02-27 15:56:34 -07:00
kpcraig
b078978b00
Update GRPC functions to send rotation window and period as seconds explicitly (#29721) 2025-02-26 16:13:46 -05:00
Violet Hynes
b5ded80e26
Pin CI tool versions (#29665)
* Pin CI tool versions

* Protoc-gen-go-grpc should be v1.5.1

* enumer

* More GHAs

* string

* misspell

* gopath

* gopath

* revert makefile stuff

* Export path

* path equals?

* Experimentation

* Go mod tidy
2025-02-25 12:56:36 -05:00
vinay-gopalan
e8c07ec68e
Small fixes on UX of Automated Root Rotation parameters (#29685) 2025-02-25 09:14:38 -08:00
vinay-gopalan
9e38a88883
Add automated root rotation support to DB Secrets (#29557) 2025-02-11 12:09:26 -08:00