Commit Graph

776 Commits

Author SHA1 Message Date
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
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
vinay-gopalan
9b70487623 Automated rotate root support for AWS Auth and Secrets (#29497) 2025-02-10 18:36:44 -05:00
Thy Ton
5dc9dea8ed add EntStaticSystemView to StaticSystemView and its ce stubs (#29516) 2025-02-06 08:32:14 -08: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
Thy Ton
193796bfc9 refactor database plugin SDK (#29479)
* prepare for enterprise database plugin SDK development
2025-02-03 09:50:33 -07:00
Mike Palmiotto
6d5759ecb3 identity: Introduce ActivationFunc for managing feature state (#29467)
* identity: Ensure state is changed on activation

This PR introduces some changes to the way activation flags are
processed in Vault.

Rather than reaching into subsystems and modifying
state from the activationflags package, each plugin can now register its
own ActivationFunc. Updates to activation flags now trigger the the
feature's ActivationFunc, which can encapsulate the associated
subsystem state.

We include a few bugfixes and minor cosmetic changes, like updates to
log lines and godocs.

* Check for nil system backend

* Move deduplication activation to common file

* Add identity dedup activation log lines

* Make interface methods clearer

* Clean up some comments

* More cleanups

* fixup! More cleanups

* fixup! More cleanups
2025-01-31 12:25:07 -03: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
Victor Rodriguez
f4fab41e7e Fix missing permitted_dns_domains parameter when signing certificates (#29436)
* Use PermittedDNSDomains parameter when signing certificates.

* Add missing name constraints extension docs for PKI root/generate.
2025-01-28 14:54:20 -08:00
vinay-gopalan
838a38443f Update Rotation Manager OSS Stubs and SDK methods (#29401) 2025-01-28 14:24:44 -06: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
5ff8a3d6f1 Fix SDK net and crypto versions on main (#29429) 2025-01-27 14:13:59 -05:00
Equus quagga
19adf7c6cc Adds an option to enable sAMAccountname logins when upndomain is set (#29118)
* Adds an option to enable sAMAccountname logins when upndomain is set

* Adds an option to enable sAMAccountname logins when upndomain is set

* Updated changelog entry

* Update 29118.txt

* Updated cap/ldap version due to needed dependency

* Updated cap/ldap version due to needed dependency

* Restart CI

* Updated LDAP api-docs and docs describing the enable_samaccountname_login option

* Added missing comma in config_test.go

* Update enables_samaccountname

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

* Update enable_samaccountname_login feature documentation

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

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2025-01-24 12:08:18 -06: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
Thy Ton
bcd89f875d move system view interface, grpc server, and client to stubs_oss files (#29291) 2025-01-10 10:11:45 -08:00
Josh Black
f625f506ed CE changes for vault-31750 (#29303)
* ce changes for vault-31750

* add changelog

* make proto

* refactor naming

* clarify error message

* update changelog

* one more time

* make proto AGAIN
2025-01-09 11:58:29 -08:00
John-Michael Faircloth
36d7e0c6bd sdk/db: do not hold the lock on Close (#29097)
* sdk/db: do not hold the lock on Close

* fix missing locks on return; ensure we don't overrite instance

* add type and close timeout env vars

* changelog
2025-01-09 17:33:23 +00:00
Thy Ton
4f14f7bfec plugin register with artifact stubs VAULT-32686 (#29113)
* add plugin catalog's entValidate() and setInternal() oss stubs 
* create plugin register command constructor oss stub
* create EntPluginRunner oss stub
* add validateSHA256() oss stub to validate plugin catalog update input
2025-01-09 08:20:09 -08:00
Ryan Cragun
357b2949e3 protobuf: rebuild protos with protobuf 1.36.2 (#29318)
* protobuf: rebuild protos with protobuf 1.36.2
* format: please buf formatter

Signed-off-by: Ryan Cragun <me@ryan.ec>
2025-01-08 21:35:04 +00: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
Ryan Cragun
f730d31bc6 protobuf: rebuild protos with protobuf 1.36 (#29229)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2025-01-03 14:19:00 -07:00
Scott Miller
7c1d6e5e84 CE side changes to key policy engine for ML-DSA/Hybrid support (#29274)
* CE side changes to key policy engine for ML-DSA/Hybrid support

* fix ce mismatch for verify

* restore omitempty

* unnecessary

* Perform code reuse of ed25519 validation differently

* make parts of export testing ent only

* license
2025-01-03 09:46:00 -05:00
divyaac
1aa49af191 Revert "Store global clients at separate storage paths (#28926)" (#29272)
This reverts commit e21dfa6b1c.

Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>
2025-01-02 19:42:41 +00:00
akshya96
3c15d4b7fa Revert "Storing local clients to local storage paths ce changes (#28958)" (#29268)
This reverts commit 504227bd74.
2025-01-02 09:17:27 -08:00
divyaac
3622e22101 Revert "Remove all references to current fragments, standbyfragments and part…" (#29267)
This reverts commit 6ed4ad0851.
2024-12-30 13:19:09 -08:00
Victor Rodriguez
b9e949bf73 Support all fields of the name constraints extension when generating CA certificates (#29245)
Support all fields of the name constraints extension when generating CA certs.

The PKI secrets engine only provided parameter permitted_dns_domains to create
the name constraints extension when generating CA certificates.

Add the following parameters to provide full support for the extension:

  * permitted_email_addresses
  * permitted_ip_ranges
  * permitted_uri_domains
  * excluded_dns_domains
  * excluded_email_addresses
  * excluded_ip_ranges
  * excluded_uri_domains

Specifying any combination of these parameters will trigger the creation of the
name constraints extension as per RFC 5280 section 4.2.1.10.
2024-12-20 14:55:25 -05:00
Mike Palmiotto
bf1741e123 make fmt (#29196) 2024-12-16 13:07:28 -05:00
Michael Blaum
ca203c21d0 use const for in relation to vault eventing metadata (#29130)
* use const for  in relation to vault eventing metadata

* update comments

* fix comment lengths
2024-12-11 17:34:38 -05:00
helenfufu
c27a54a99c add vault build date to system view plugin env VAULT-32676 (#29082)
---------

Co-authored-by: Thy Ton <maithytonn@gmail.com>
2024-12-10 14:30:21 -08:00
Rachel Culpepper
5701c5b492 add ce changes for ecdsa hybrid (#29123) 2024-12-09 10:58:46 -06: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
divyaac
6ed4ad0851 Remove all references to current fragments, standbyfragments and partialMonthTracker (#29066)
* Oss Changes Patch

* Remove test from oss file
2024-12-02 11:44:03 -08:00
Andy Bao
4b456ffcec Fix OSS sealunwrapper adding extra get + put request to all storage get requests (#29050)
* fix OSS sealunwrapper adding extra get + put request to all storage requests

* Add changelog entry
2024-11-29 18:19:45 +01:00
Steven Clark
9bf3d115fc Add an option to allow cert-auth to return metadata about client cert that fails login (#29044)
* Add an option to allow cert-auth to return metadata about client certs that fail login

* Add cl

* Update SPDX header for sdk/logical/response_test.go
2024-11-29 10:22:09 -05:00
Rachel Culpepper
a0ceaf6772 Add ml-dsa key type and stubs (#28961)
* add ml-dsa key type and stubs

* add in sdk changes

* ent breakout

* fix private key func and run go mod tidy

* change function name

* tidy go.mod

---------

Co-authored-by: Scott G. Miller <smiller@hashicorp.com>
2024-11-20 15:57:00 -06:00
akshya96
504227bd74 Storing local clients to local storage paths ce changes (#28958)
* storing local clients to local storage paths ce changes

* fix tests to be compatible with ce
2024-11-19 14:08:37 -08:00
divyaac
52ba156d47 Fix protoc issue (#28928) 2024-11-15 19:33:48 +00:00
divyaac
e21dfa6b1c Store global clients at separate storage paths (#28926) 2024-11-15 19:15:41 +00:00
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
2e4a30f914 Fail sign/verify apis when Ed25519ph/ctx arguments are provided on CE (#28838) 2024-11-06 12:23:14 -05:00
Steven Clark
e489631e87 Transit: Allow ENT only arguments for sign/verify. Add docs for new Ed25519 signature types (#28821) 2024-11-01 12:57:52 -04:00
miagilepner
41c0a3040b VAULT-31748: add removable node HA backend interface and raft implementation (#28726) 2024-10-30 18:19:49 +01:00