104 Commits

Author SHA1 Message Date
Vault Automation
eadd2bde15
bump cap/ldap dependency to fix data race (#9760) (#9783)
Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
2025-10-02 11:35:43 -05:00
Vault Automation
10855a6bcd
Update to Go 1.25.1 (#8284) (#9191)
* Update github.com/petermattis/goid to support Go 1.25
* Update to Go 1.25.1

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2025-09-09 13:21:57 +00:00
Vault Automation
3e4627137e
Backport [VAULT-38910]: upgrade docker package to resolve GO-2025-3829 into ce/main (#8875)
* [VAULT-38910]upgrade docker package to resolve GO-2025-3829 (#8642)

* bump github.com/hashicorp/go-secure-stdlib/plugincontainer to v0.4.2
* bump github.com/docker/docker to v28.3.3+incompatible

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

* go mod tidy

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

---------

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-08-26 16:16:55 -06:00
Vault Automation
a233f7ac1a
update vault-plugin-secrets-openldap to v0.16.1 (#8820) (#8821)
* update vault-plugin-secrets-openldap to v0.16.1

* changelog

Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
2025-08-22 09:55:21 -04:00
Violet Hynes
584a3daf21
Dependency updates for main (#31299)
* Dependency updates for main

* go mod tidy
2025-07-17 11:30:11 -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
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
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
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
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
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
Scott Miller
0c3449dacd
Missed updating go-secure-stdlib in sdk :( (#29502) 2025-02-04 19:54:40 +00:00
Scott Miller
73a98ddd48
Update go-kms-wrapping wrapper dependencies, adding ParsePaths support for sensitive values. (#29402)
* Update go-kms-wrapping wrapper dependencies, adding ParsePaths support for sensitive values

* changelog

* document indirect value references, e.g ParsePath
2025-02-03 18:23:52 +00:00
Kit Haines
371ffc4bd4
Move all pki-verification calls from sdk-Verify() to pki-specific (#29342)
* Move all pki-verification calls from sdk-Verify() to pki-specific
VerifyCertifcate(...); update sdk-Verify to allow multiple chains,
but validate that at least one of those chains is valid.

* Updates to Validate on Parse PEMBlock, so that a single cert or a single key parses (test fixes).

* Add changelog.

* Make test certificate expire in a while, not at linux epoch.

* Remove duplicate code.

* Fix header file + go mod tidy.

* Updates based on review.
2025-01-29 11:05:55 -05:00
Violet Hynes
5ff8a3d6f1
Fix SDK net and crypto versions on main (#29429) 2025-01-27 14:13:59 -05:00
Johan Brandhorst-Satzkorn
8d83c5d047
physical: use permitpool from go-secure-stdlib (#29331)
* sdk/physical: use permitpool from go-secure-stdlib

* physical: use permitpool from go-secure-stdlib

* fixup! sdk/physical: use permitpool from go-secure-stdlib

* fixup! sdk/physical: use permitpool from go-secure-stdlib
2025-01-24 12:33:44 -05:00
Mike Palmiotto
9d80c4548f
proto: bump protoc-gen-go to 1.36.3 (#29359) 2025-01-22 13:58:43 -05:00
helenfufu
b74e2e798c
Vault 27421 update cap/ldap dep (#29302)
* go get github.com/hashicorp/cap/ldap@main && go mod tidy

* add 1.19 upgrade note

* changelog

* cd sdk && go get github.com/hashicorp/cap/ldap@main && go mod tidy

* add more detail in changelog

* update changelog

* go mod tidy after resolving merge conflicts
2025-01-08 13:27:45 -06:00
vinay-gopalan
27bd3e9535
Add SDK helpers and Core stubs for plugins to communicate with Enterprise Rotation Manager (#29273)
Co-authored-by: Robert <17119716+robmonte@users.noreply.github.com>
Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
2025-01-07 22:22:45 +00:00
Scott Miller
86ba0dbdeb
Use go-secure-stdlib's RSA key generator backed by a DRBG (#29020)
* Use DRBG based RSA key generation everywhere

* switch to the conditional generator

* Use DRBG based RSA key generation everywhere

* switch to the conditional generator

* Add an ENV var to disable the DRBG in a pinch

* update go.mod

* Use DRBG based RSA key generation everywhere

* switch to the conditional generator

* Add an ENV var to disable the DRBG in a pinch

* Use DRBG based RSA key generation everywhere

* update go.mod

* fix import

* Remove rsa2 alias, remove test code

* move cryptoutil/rsa.go to sdk

* move imports too

* remove makefile change

* rsa2->rsa

* more rsa2->rsa, remove test code

* fix some overzelous search/replace

* Update to a real tag

* changelog

* copyright

* work around copyright check

* work around copyright check pt2

* bunch of dupe imports

* missing import

* wrong license

* fix go.mod conflict

* missed a spot

* dupe import
2024-12-05 15:39:16 -06: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
Theron Voran
ffb88e93ce
sdk: update to docker v26.1.5 (#28269)
Updates to plugincontainer@v0.4.0 in sdk/, and
vault-testing-stepwise@v0.3.1 in root, which updates vault/sdk and
vault itself to docker v26.1.5.
2024-09-05 15:51:25 +00:00
Mike Palmiotto
6069e665c0
sdk: go mod tidy (#28290) 2024-09-05 15:24:02 +00:00
kpcraig
dc81de7ec8
Easy go-jose updates (the codeless[ish] ones) (#28140) 2024-08-21 14:25:07 -04:00
akshya96
9e4bc33d5e
bumping versions for grpc and docker/docker (#28071)
* bumping versions for grpc and docker/docker

* go get github.com/docker/docker@v25.0.6 && go mod tidy

* updating to 25.0.6 in sdk

* updating grpc in sdk
2024-08-14 14:24:15 -07:00
Violet Hynes
62e6b062f0
VAULT-28422 SDK upversion for go-retryablehttp (#27612) 2024-06-26 11:25:55 -04:00
Mike Palmiotto
027888be73
sdk: Bump grpc version to 1.64.0 (#27532) 2024-06-18 15:41:45 -04:00
Violet Hynes
7ac5358185
VAULT-26300 update golang/net to 0.25.0 in sdk (#27041) 2024-05-15 11:30:00 -04:00
Peter Wilson
4fbe7d9665
updated protobuf dependency to v1.34.1 in main go.mod and sdk/go.mod (#27030) 2024-05-15 09:36:50 -04:00
Peter Wilson
f89531759d
SDK: updated github.com/jackc/pgx/v4 dependency to 4.18.3 (#27005) 2024-05-14 14:04:52 +01:00
Violet Hynes
b5d3c213bb
Update docker to v25.0.5+incompatible (#26953)
* Update docker to v26.1.2+incompatible

* go mod tidy

* Some docker updates

* Update to 25.0.5 instead

* Fix go.mod weirdness
2024-05-13 11:34:17 -04:00
John-Michael Faircloth
b01edee904
sdk: prepare for release (#26348)
* sdk: prepare for release

* remove toolchain
2024-04-11 09:50:58 -05:00
Peter Wilson
3dc16db87e
VAULT-24798: audit - improve error messages (#26312)
* audit: remove 'op' from error messages and do some clean up

* Allow early error checking to be concerned with vault/Core vs. audit
2024-04-11 09:09:32 +01:00
Luis (LT) Carbonell
751ebeb065
add deadlock detection in barrier and sealwrap (#26198)
* add deadlock detection in barrier and sealwrap
2024-04-09 14:56:57 +00:00
dependabot[bot]
7834f45197
Bump github.com/jackc/pgx/v4 from 4.18.1 to 4.18.2 in /sdk (#25888)
* Bump github.com/jackc/pgx/v4 from 4.18.1 to 4.18.2 in /sdk

Bumps [github.com/jackc/pgx/v4](https://github.com/jackc/pgx) from 4.18.1 to 4.18.2.
- [Changelog](https://github.com/jackc/pgx/blob/v4.18.2/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v4.18.1...v4.18.2)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* go mod tidy

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Wilson <peter.wilson@hashicorp.com>
2024-03-15 18:04:40 +00:00
dependabot[bot]
674f7b4fc9
Bump github.com/jackc/pgproto3/v2 from 2.3.2 to 2.3.3 in /sdk (#25962)
* Bump github.com/jackc/pgproto3/v2 from 2.3.2 to 2.3.3 in /sdk

Bumps [github.com/jackc/pgproto3/v2](https://github.com/jackc/pgproto3) from 2.3.2 to 2.3.3.
- [Commits](https://github.com/jackc/pgproto3/compare/v2.3.2...v2.3.3)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgproto3/v2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* go mod tidy

* go mod tidy

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Wilson <peter.wilson@hashicorp.com>
2024-03-15 16:29:20 +00:00
dependabot[bot]
47abad7fde
Bump github.com/opencontainers/runc from 1.1.6 to 1.1.12 in /sdk (#25158)
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.6 to 1.1.12.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.12/CHANGELOG.md)
- [Commits](https://github.com/opencontainers/runc/compare/v1.1.6...v1.1.12)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mickael-hc <86245626+mickael-hc@users.noreply.github.com>
Co-authored-by: Chris Capurso <1036769+ccapurso@users.noreply.github.com>
2024-03-12 09:51:44 -04:00
Violet Hynes
f55750d8d6
Update containerd to latest (#24939) 2024-01-18 15:32:43 -05:00
dependabot[bot]
d13edc6107
Bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /sdk (#24576)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2024-01-08 11:15:57 -05: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
Dominik Baláž
b148f24d91
Update dependency packages for sdk package (#23913)
* Update dependency packages for sdk package

* Add changelog

* Tidy up main package dependencies

---------

Co-authored-by: Chris Capurso <1036769+ccapurso@users.noreply.github.com>
2023-11-06 16:55:46 -05:00
Tom Proctor
a074bf9cbf
Support mlock and custom tmpdir for containerized plugins (#23215) 2023-09-22 12:14:02 +01:00
Raymond Ho
25221fe012
downgrade go-ldap client to v3.4.4 due to race conditions in tests (#23103) 2023-09-14 23:18:20 +00:00
Tom Proctor
e29c6c129d
Bump plugincontainer dep v0.2.0 -> v0.2.1 (#23075)
Fixes a bug that prevented Vault from streaming plugin containers' logs
2023-09-14 18:33:14 +01:00
Raymond Ho
018e5675fe
VAULT 18227/introduce cap ldap library (#22185) 2023-09-14 10:26:29 -07:00
Tom Proctor
d6da79aa5f
Make runsc the default plugin container runtime (#22850)
* Also makes plugin directory optional when registering container plugins
* And threads plugin runtime settings through to plugin execution config
* Add runsc to github runner for plugin container tests
2023-09-07 23:01:27 +00:00
kpcraig
2172786316
Add support for IAM Auth for Google CloudSQL DBs (#22445) 2023-09-06 14:40:39 -07:00
Tom Proctor
07e76196ba
Support running plugins in isolated containers (#22712)
Implements running plugins in containers to give them some degree
of isolation from the main Vault process and other plugins. It only
supports running on Linux initially, where it is easiest to manage unix
socket communication across the container boundary.

Additionally

* Adds -env arg to vault plugin register.
* Don't return env from 'vault plugin info'

Historically it's been omitted, and it could conceivably have secret information in
it, so if we want to return it in the response, it should probably only be via explicit
opt-in. Skipping for now though as it's not the main purpose of the commit.
2023-09-01 17:55:17 +00:00
Evan Gilman
1c4d3dd0c0
Bump go-plugin dep (#20966) 2023-08-22 15:21:38 +00:00