Commit graph

816 commits

Author SHA1 Message Date
Vault Automation
3e07ddb12f
Backport Upgrade google.golang.org/grpc dependency into ce/main (#13182)
Co-authored-by: vinay-gopalan <86625824+vinay-gopalan@users.noreply.github.com>
Co-authored-by: Vinay Gopalan <vinay@hashicorp.com>
Co-authored-by: Ben Ash <bash@hashicorp.com>
2026-03-19 21:00:48 +00:00
Vault Automation
d34cb72e68
Add counting for SSH certs and OTPs (#12368) (#12755)
* add cert counting for ssh

* add system view and fix errors

* add otp counting and change units for certs

* add storage tests

* fix census errors

* run make fmt

* use incrementer and change storage to match rfc

* run make fmt

* fix interface and remove parameter

* fix errors

* Update builtin/logical/ssh/path_creds_create.go



* remove error check

* add ssh counts to billing endpoint

* fix error

* add test case

* add ssh metric to test

* add get functions and tests

* fix format

* create function for ssh metrics

* refactoring and add test cases

* replace test check

* add ssh to billing overview test

---------

Co-authored-by: Rachel Culpepper <84159930+rculpepper@users.noreply.github.com>
Co-authored-by: Victor Rodriguez Rizo <vrizo@hashicorp.com>
2026-03-11 10:30:48 -04:00
Vault Automation
9b35f7dae7
VAULT-42598 add resource cleanup to SCIM client delete (#12489) (#12826)
* add resource orphaning to SCIM client delete

* add background orphaning handling

* delete instead of orphan, add retry and startup tests

* revert: undo accidental changes to Makefile and golang instructions

* fix tests

* stop log flood (try again)

* fix linter findings

* try to silence spam again

* try to silence spam once more

* dont allow running outside of active primary

* go docs

* fix active check and pass client id via context

* remove unnecessary change

* Remove Test_SCIM_ClientDeletion_Cascading

this test was added in another PR but mine already has a bunch of deleting test that work with the new behavior

Co-authored-by: Bruno Oliveira de Souza <bruno.souza@hashicorp.com>
2026-03-10 11:52:50 -03:00
Vault Automation
5f77aa78fc
VAULT-42759: Fix logic around setting updated_at field in billing endpoint, enhance tests coverage for the endpoint (#12454) (#12584)
* fix updated_at logic for previous month, add tests

* improvement: separate out metric names into consts

* wholistically cover all metrics in billing api test

* add actual totp data in the ent test

* fix more wording errors

* feedback: remove consts and use metric names directly

* fix a test

* simplify the logic around refreshing data

* simplify the logic by centralizing the atomic tracker interacting inside updateBillingMetrics method, fix the logic inside the endpoint, add tests

* miner fixes

* feedback: set time tracker to zero at set up and at start of month to indicate data has not been updated yet, update test

* attempt to fix deadlock by using statelock free version of update billing metrics method

* remove unnecessary locks inside request handling

* remove duplicate methods - instead create 2 wrappers around the method one with lock and one without

* add a new prefix and methods to store and retrieve last update time

* add comments to explain local prefix behavior for the update method

* replace atomic tracker with storage methods

* add method level tests for the update time storage methods

* add external tests to verify perf replicated cluster independelty track last update time now

* normalize time to utc before storing to storage, fix comments

* code scanql feedback: remove logging of raw error to prevent leakage

* feedback: reorganize and refactor update billing metric method wrappers

* feedback: add go doc to the get method

* feedback: retrieve stored update time for last month, instead of always putting end of month inside computeUpdatedTime

* use equal test instead of within duration inside util tests

* use require equal inside external tests too

* use end of the requested month inside the endpoint for past months

* update tests

* add a new test case for when time is not stored in storage

* fix a bug: add nil check before passing role counts and managed key counts to update method

* feedback: remove update call of of time inside setup billing

* Update vault/consumption_billing_util.go



* Update vault/logical_system_use_case_billing.go



* Update vault/logical_system_use_case_billing.go



* comment fix

* feedback: do not allow refresh on perf standby, add a warning and just retrieve stored data

* add tests

---------

Co-authored-by: Amir Aslamov <amir.aslamov@hashicorp.com>
Co-authored-by: divyaac <divya.chandrasekaran@hashicorp.com>
2026-02-26 21:19:16 +00:00
Vault Automation
b706601bf7
Backport go: upgrade go.opentelemetry.io/otel/sdk => 1.40.0 and filippo.io/edwards25519 => v1.1.1 into ce/main (#12496)
Upgrade filippo.io/edwards25519 v1.1.0 => v1.1.1 to resolve GO-2026-4503
Upgrade go.opentelemetry.io/auto/sdk v1.1.0 => v1.2.1 to resolve GO-2026-4394

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2026-02-24 17:49:33 +00:00
Vault Automation
aa5bb66347
Backport KMSE HWM metrics CE fix into ce/main (#12481)
* KMSE HWM metrics: add missing function to oss file (#12475)

* [VAULT-41208] Add KMSE HWM Metrics (#12452)

* add kmse hwm key counts

* add kmse hwm key count census metrics

* add tests

* move storage functions to ent

* update billing endpoint tests

* add kmse to test billing response

* Apply suggestion from @aslamovamir

Co-authored-by: Amir Aslamov <amir.aslamov@hashicorp.com>

---------

Co-authored-by: Amir Aslamov <amir.aslamov@hashicorp.com>

---------

Co-authored-by: Jenny Deng <jenny.deng@hashicorp.com>
Co-authored-by: Amir Aslamov <amir.aslamov@hashicorp.com>
2026-02-23 14:49:09 -08:00
Vault Automation
c0e8de6ed9
VAULT-41572: hookup billing overview endpoint (#12328) (#12451)
* hookup the new path to the system backend

* add API client method for the new endpoint

* add test for the api method structure

* adjust the path implementation to capture all so-far added metrics

* add tests

* add go docs to the tests

* add more tests

* feedback: add go doc to test

* feedback: use require in tests

* fix the api: use parse secret method to properly parse response, add mapstructure definitions to api structs

* feedback: fix api method test by using mock api response

* Update vault/logical_system_use_case_billing.go



* Update vault/logical_system_use_case_billing.go



* feedback: refactor build month data method into methods that collect data separately

* feedback: make update_counts parameter a new user set field for the endpoint

* feedback: remove basic comments

* update logic around determining updated at field

* fix tests: add actual data and fix some assertions

* separate out ent only features from the neutral test file

* add a new test file to test ent only features

* call one update method to update all metrics

* add external tests for the endpoint

* add a changelog

* feedback: rename update_counts parameter to refresh_data

* feedback: fix determination of updated_at field

* feedback: convert created methods into core methods from system backend methods

* Update changelog/12328.txt



* feedback: create a new atomic tracker of last updated time for the metrics update and use that in the endpoint

* add unit tests to test updated_at

* always build metrics, even when the values are 0

* add test coverage to verify metrics still exist in the response with zero values even when there are no billing resources

* feedback: remove manual check of root namespace - rely on system backend to enforce root namespace restriction

* remove namespace test from oss test file

* properly accomodate new totp metric

* add pki cert and totp to endpoint response, add test coverage

* rename changelog file

* linters

* change changelog type to improvement, make the file CE and ENT

* test ent changelog

* fix some tests after the addition of totp and pki

* add test coverage for the new metrics in external and api tests

* make changelog CE file

---------

Co-authored-by: Amir Aslamov <amir.aslamov@hashicorp.com>
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
Co-authored-by: divyaac <divya.chandrasekaran@hashicorp.com>
2026-02-20 08:17:23 -05:00
Vault Automation
e7133e83f2
VAULT-40965 async option for scan API (#11011) (#11751)
* VAULT-40965 async option for scan API

* whoopsie

* whoopsie

* add test, return accepted (for real), fix docs

* Add extra time

* make test more resilient

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2026-01-13 17:40:37 +00:00
Vault Automation
8cce47281e
[VAULT-41179] go: bump golang.org/x/crypto to v0.45.0 (#11056) (#11065)
* [VAULT-41179] go: bump golang.org/x/crypto to v0.45.0

Bump the golang.org/x/crypto module to v0.45.0 to resolve several CVE's
with the prior version:
  - https://github.com/advisories/GHSA-f6x5-jh6r-wrfv
  - https://github.com/advisories/GHSA-j5w8-q4qc-rx2x
  - https://pkg.go.dev/vuln/GO-2025-4134
  - https://pkg.go.dev/vuln/GO-2025-4135

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-12-02 21:00:06 +00:00
Bianca
bfbd6a9a93
Sync SCIM related files to CE/main (#11037) 2025-12-02 11:44:43 -03:00
Vault Automation
77f1980d29
go: bump golang.org/x/crypto => v0.44.0 to resolve GO-2025-4116 (#10871) (#10891)
* go: bump golang.org/x/crypto => v0.44.0 to resolve GO-2025-4116

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-11-18 17:57:11 +00:00
Vault Automation
ab45220ae3
Include SHA256 sum field in the list response for external plugins (#10761) (#10805)
* Include SHA256 sum field in the list response for external plugins

* Add changelog

* remove mapstructure

Co-authored-by: Zlaticanin <60530402+Zlaticanin@users.noreply.github.com>
2025-11-17 09:58:58 -07:00
Vault Automation
bfa97b551b
Backport Add override_pinned_version support on tune and enable for secret and auth into ce/main (#10644)
* backport: Add override_pinned_version support on tune and enable for secret and auth (#9719)

* fix entWrappedAuthPath() and entWrappedMountsPath() oss stubs

---------

Co-authored-by: Thy Ton <maithytonn@gmail.com>
2025-11-06 18:55:42 -08:00
Vault Automation
965e279dba
VAULT-39878 Add database support to sys/reporting/scan (#10546) (#10654)
* Databases WIP

* whoopsie cleanup

* Updates for databases

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2025-11-06 20:28:34 +00:00
Vault Automation
e53661ce92
license: update headers to IBM Corp. on main (#10333) (#10361)
Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-10-23 20:54:04 +00:00
Vault Automation
6a9329d8a6
VAULT-39876 Add sys/reporting/scan to Vault, allowing an output of files with paths and names of Vault secrets (#10068) (#10323)
* VAULT-39876 sys/reporting/scan for KV secrets

* make fmt

* changelog

* stray t.log

* typo

* fix race probably

* Bug fix, add local mount

* remove comment

* bolster external tests

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2025-10-22 21:02:07 +00:00
Vault Automation
0c6c13dd38
license: update headers to IBM Corp. (#10229) (#10233)
* license: update headers to IBM Corp.
* `make proto`
* update offset because source file changed

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-10-21 15:20:20 -06:00
Ryan Cragun
93e1879749
go: synchronize module deps with enterprise (#10192)
Synchronize all common Go module versions with enterprise.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2025-10-17 11:13:53 -06:00
Vault Automation
5b2f37614c
Fix unsetting sys tunable values (on ent). (#9383) (#9458)
* Fix unsetting sys tunable values (on ent).

* Remove commented test, add GoDoc for test.

* Handle empty slices better (PR feedback).

* Fetch Auth endpoint without listing (PR feedback).

* Fatal vs. Error

* Add GetAuth instead of ListAuth

* Fix error format error.  Oops!

* One more list->get auth.  Remove extra check.

* Updated TuneMountWithContextAllowNil to use a struct (with all pointers).

* Allow setting empty values for userLockoutConfig too - use new struct.

* Extra pointer.

* Remove useless functions.

* Simple test to ensure any field we can set we can update and vice-versa.

* Add json tag checks.

Co-authored-by: Kit Haines <khaines@mit.edu>
2025-09-19 10:51:38 -04:00
Vault Automation
e40eca1286
VAULT-39294: Deprecate recover_snapshot_id query param and use a header instead (#8834) (#9042)
* deprecate snapshot query params, use a header instead

* keep read query param, but deprecate recover one

* fix test

* remove list change

* add changelog

* rename header, allow request method

* update changelog

Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2025-09-01 15:28:10 +00:00
Vault Automation
c9605c7eb0
VAULT-36947: Support force unloading a snapshot (#8740) (#9036)
* portion of changes for autoloading

* add test checking for panic

* add endpoint for force unloading

* separate method for force unload

* changelog

* don't redefine constants

Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2025-09-01 09:16:35 +00:00
Vault Automation
ea954aabaf
Backport bump go-getter to 1.7.9 into ce/main (#8926)
* bump go-getter to 1.7.9 (#8899)

* bump go-getter to 1.7.9

* add changelog

* go mod tidy

Signed-off-by: Ryan Cragun <me@ryan.ec>

---------

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Josh Black <raskchanky@gmail.com>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-08-26 12:31:43 -06:00
Vault Automation
eff87a134a
api/client: support setting extra headers with new logical request interface. (#8808) (#8858)
Co-authored-by: Ben Ash <32777270+benashz@users.noreply.github.com>
2025-08-22 19:33:20 +00:00
Vault Automation
9d27d4f837
VAULT-37630: Recover as a copy (#8640) (#8798)
* recover as a copy implementation

* get policy tests passing

* add helpers and testing support

* fixes

* revert a couple of changes

* more tests

* switch to query param

* correctly update source path with the namespace

* only add openapi recover source path if there's a path parameter

* add changelog

* check for no mount in path

Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2025-08-21 13:53:35 +00: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
Murali
aa73cbf04f
updating utilization api client (#31385) 2025-08-08 00:14:40 +05:30
Bruno Oliveira de Souza
194241e1d1
VAULT-35838: advance deprecation of duplicate HCL attributes to pending removal stage (#31215)
* HCL dup attr deprecation: pending removal

* correct docs

* add changelog

* better error message for possible common errors

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

Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com>

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

Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>

---------

Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com>
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2025-07-24 15:17:51 -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
helenfufu
abac619e0a
Vault 36295 Improve plugin mgmt ux in api and cli (#30811)
* cli: only set default command parameter to plugin name if sha256 is provided

* api: write warnings to RegisterPluginResponse, propagate up to cli

* api: filter out 'Endpoint replaced the value of these parameters' warning before returning in RegisterPluginWithContext

* docs

* add TODO on filtering that links to api type parameter deprecation ticket

* fix tests

* allocate filteredWarning slice only if there are warnings

* improve deferred resp close and early error return conditionals in RegisterPluginWithContext

* refer to sha256 as cli option -sha256 in command cli usage

* break up ui error lines for sha256 and version flag check

* consolidate if statements for sha256 and command, oci_image check in cli

* consolidate if statements for sha256 and command, oci_image check in api

* new RegisterPluginV2 and RegisterPluginWithContextV2 api client functions for backward compatibility

* add changelog

* more descriptive changelog

* rename RegisterPluginV2 to RegisterPluginDetailed and RegisterPluginWithContextV2 to RegisterPluginWithContextDetailed

* return nil, nil if no warnings to preserve status code

* fix eof from decoding (check if no content before decoding)

* doc for RegisterPluginResponse

* only validate plugin.Command in plugin catalog set for downloaded and binary plugins, which rely on plugin.Command input; extracted artifact plugins don't rely on plugin.Command input

* Update website/content/api-docs/system/plugins-catalog.mdx

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

* Update website/content/api-docs/system/plugins-catalog.mdx

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

* Update website/content/api-docs/system/plugins-catalog.mdx

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

* Update website/content/docs/commands/plugin/register.mdx

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

* Update website/content/docs/commands/plugin/register.mdx

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

* Update website/content/docs/commands/plugin/register.mdx

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

* Update website/content/docs/commands/plugin/register.mdx

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

* move up enterprise note on plugin register command doc

* [DOCS] Editorial suggestions for PR #30811 (#31111)

* suggestions

* move common reqs to a partial

* fix typo

* tweak reqs

* Update website/content/partials/plugins/prepare-plugin.mdx

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

* Update website/content/partials/plugins/prepare-plugin.mdx

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

* Update website/content/partials/plugins/prepare-plugin.mdx

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

* tweak feedback

* remove deprecation

* Update website/content/partials/plugins/common-requirements.mdx

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

* save

* Update website/content/docs/plugins/rollback.mdx

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

* Update website/content/docs/plugins/upgrade.mdx

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

* fix formatting

---------

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2025-06-30 10:00:54 -07:00
miagilepner
544edd58d6
VAULT-36112: Better handling for Retry-After rate limit header. (#30887)
* round up

* round up, test, update backoff

* add external test

* changelog

* use released version of go-retryablehttp

* update api version of go-retryablehttp

* fix name
2025-06-19 11:22:11 +02: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
ej-hashi
6bcb72af7e
update vault auth submodules to api/v1.20.0 (#30851)
* update vault auth submodules to api/v1.20.0

* updates to go mods

---------

Co-authored-by: Eric Jones <cirej2013@gmail.com>
2025-06-05 11:04:45 -07:00
miagilepner
318f858213
VAULT-36229: Nonce for rekey cancellations (#30794)
* require nonce for rekey

* update doc

* add changelog

* Apply suggestions from code review

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

* Apply suggestions from code review

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

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2025-06-05 19:55:41 +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
Kuba Wieczorek
4c1cf74b59
[VAULT-35076] Add methods for loading and unloading snapshots to the sys raft API client (#30719) 2025-05-22 16:54:26 +01:00
miagilepner
2c1d8b6fb4
VAULT-36198: Add API/CLI support for reading, listing, recovering from a snapshot (#30701) 2025-05-21 15:10:20 +02:00
Andrew Hewus Fresh
a6c35b6d5e
Directly exec ExternalTokenHelper rather than using a SHELL (#29653)
* [OT] use `new` builtin for visual clarity

`new(ExternalTokenHelper)` is a lot easier to parse than
`(*ExternalTokenHelper)(nil)`

* add `Args` field to `ExternalTokenHelper`

This will be used to store any extra command arguments and allows
`BinaryPath` to hold *just* the binary path.

* remove shell invocation

Since `BinPath` no longer has to hold any additional arguments we can
execute the command directly without inoking the shell first.

* update `testExternalTokenHelper` to make use of the new `Args` field

* updated `ExternalTokenHelper` documentation

* Add changelog entry for token_helper without shell

Currently using 0.txt until we have a PR id.

* Rename 0.txt to 29653.txt

We got a PR ID, so fix the changelog file

---------

Co-authored-by: Roosevelt Burden <rburden@grantstreet.com>
Co-authored-by: Roosevelt Burden <roosevelt.burden@grantstreet.com>
2025-04-04 14:34:26 -04:00
Violet Hynes
bbaaa3f76e
VAULT-34541 CE changes (#29920) 2025-03-18 16:01:59 -04:00
Steven Clark
e31d45514d
Rework certificate authentication client api (#29931)
* Rework certificate authentication api

 - Use the passed in Vault api client to perform the connection
    - This provides namespace support, retry behaviors and uses
      the existing secret parsing logic instead of re-implementing it
 - Change the cert auth role to be an optional argument
 - Allow users to use a different cert auth mount point

* Clean up test name

Co-authored-by: Amir Aslamov <amir.aslamov@hashicorp.com>

---------

Co-authored-by: Amir Aslamov <amir.aslamov@hashicorp.com>
2025-03-14 15:48:52 -04: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
Wito Chandra
a782fa859c
feat(api-client): add cert auth method (#29546)
* feat(api-client): add cert auth method

* chore: apply feedbacks

* doc: add copyright & update changelog

---------

Co-authored-by: Amir Aslamov <amir.aslamov@hashicorp.com>
2025-03-11 14:03:57 -04:00
Violet Hynes
9fd4ba9d14
VAULT-34126 CE part (#29849) 2025-03-06 11:09:03 -05: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
davidadeleon
6741773b0f
update vault auth submodules to api/v1.16.0 (#29548)
* update vault auth submodules to api/v1.16.0

* update go.mod

* make proto

---------

Co-authored-by: davidadeleon <ddeleon@hashicorp.com>
2025-02-11 07:28:45 -08:00
Steven Clark
9456671f04
Prepare code base for Go 1.24 update. (#29412)
* Fix "t.Fatal from a non-test goroutine" errors in cache_test.go

 - t.Fatal(f) should not be called within a Go routine based on it's documentation and only from the main test's thread.
 - In 1.24 this seems to cause build failures

* Address all "non-constant format string errors" from go vet

 - Within 1.24 these now cause test builds to fail

…" from go vet
2025-01-27 14:34:07 -05:00
Violet Hynes
32d61c3893
Update go/x/net and go/x/crypto to latest versions throughout (#29422) 2025-01-27 10:47:40 -05:00
miagilepner
73bf3ebc7c
VAULT-31755: Add removed and HA health to the sys/health endpoint (#28991)
* logic

* actually got test working

* heartbeat health test

* fix healthy definition and add changelog

* fix test condition

* actually fix test condition

* Update vault/testing.go

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

* close body

---------

Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2024-12-04 11:09:10 +01:00
miagilepner
4b98fd9b1a
VAULT-31751, VAULT-31752: removed_from_cluster in vault status (#28938)
* add removed from cluster to status output

* test for command

* update docs

* changelog
2024-11-19 11:13:10 +01: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
Josh Black
d1355cb98f
explain how -output-curl-string works in comments to avoid confusion (#28576) 2024-10-04 11:14:21 -07:00