Commit Graph

20721 Commits

Author SHA1 Message Date
Ryan Cragun
012cd5a42a VAULT-33008: ipv6: always display RFC-5952 §4 conformant addresses (#29228)
USGv6[0] requires implementing §4.1.1 of the NISTv6-r1 profile[1] for
IPv6-Only capabilities. This section requires that whenever Vault
displays IPv6 addresses (including CLI output, Web UI, logs, etc.) that
_all_ IPv6 addresses must conform to RFC-5952 §4 text representation
recommendations[2].

These recommendations do not prevent us from accepting RFC-4241[3] IPv6
addresses, however, whenever these same addresses are displayed they
must conform to the strict RFC-5952 §4 guidelines.

This PR implements handling of IPv6 address conformance in our
`vault server` routine. We handle conformance normalization for all
server, http_proxy, listener, seal, storage and telemetry
configuration where an input could contain an IPv6 address, whether
configured via an HCL file or via corresponding environment variables.

The approach I've taken is to handle conformance normalization at
parse time to ensure that all log output and subsequent usage
inside of Vaults various subsystems always reference a conformant
address, that way we don't need concern ourselves with conformance
later. This approach ought to be backwards compatible to prior loose
address configuration requirements, with the understanding that
going forward all IPv6 representation will be strict regardless of
what has been configured.

In many cases I've updated our various parser functions to call the
new `configutil.NormalizeAddr()` to apply conformance normalization.
Others required no changes because they rely on standard library URL
string output, which always displays IPv6 URLs in a conformant way.

Not included in this changes is any other vault exec mode other than
server. Client, operator commands, agent mode, proxy mode, etc. will
be included in subsequent changes if necessary.

[0]: https://www.nist.gov/publications/usgv6-profile
[1]: https://www.nist.gov/publications/nist-ipv6-profile
[2]: https://www.rfc-editor.org/rfc/rfc5952.html#section-4
[3]: https://www.rfc-editor.org/rfc/rfc4291

Signed-off-by: Ryan Cragun <me@ryan.ec>
2025-01-27 14:14:28 -07: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
Angel Garbarino
53d2ae2a4d add serialNumberSource to get backend test change but not show visually until design input (#29424) 2025-01-27 10:48:43 -07: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
devon-mar
a401afe824 Add serial_number_source option to PKI role (#29369)
* Add `serial_number_source` option to PKI role

* Add changelog for #29369

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2025-01-27 08:51:26 -05:00
Bruno Oliveira de Souza
e0d60e91d1 add docs for missing accessor flag in token renew command (#29347) 2025-01-27 10:49:29 -03:00
John-Michael Faircloth
04e75372fb database/mssql: set default root rotation stmt for contained db (#29399)
* database/mssql: set default root rotation stmt for contained db

* changelog

* add rotate root test

* fix test

* update passwords to make mssql happy

* create admin user

* update contained user create query

* remove test
2025-01-24 15:42:27 -05:00
claire bontempo
9d31bb8586 add enableSamaccountnameLogin param (#29410) 2025-01-24 20:09:47 +00:00
Ryan Cragun
b239a71934 actions: pin to the latest approved workflows (#29321)
The genesis of this PR is updating our cache action due to older actions
being shut down[0]. While not mentioned in the changelog, the migration
guide does call out versions <3.4.0 or <4.2.0 as too old.[1]

Since I was updating cache I went ahead and updated minor versions of
all our actions.

[0]: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
[1]: https://github.com/actions/cache/discussions/1510

Signed-off-by: Ryan Cragun <me@ryan.ec>
2025-01-24 20:08:01 +00:00
John-Michael Faircloth
28b2746545 db: return success response on static role create/update (#29407) 2025-01-24 11:02:38 -08: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
Angel Garbarino
088bb4b6b9 One WIF configuration component (#29367)
* make one component and make one test file for that component. remove the two components and associated files the new component replaces

* make access type subtext dynamic based on model type

* clean up

* clean up

* remove model attr for display purposes

* split out lease to another second config model type and make is-wif-engine helper

* welp missed the old controller

* small removal of overkill comment

* pr feedback

* save lease config if only thing changed

* error handling in acceptance test

* test fix

* replace notOk with throw

* move back error message

* clean up focused largely on wif component test

* replace ok with true
2025-01-24 11:05:00 -07: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
miagilepner
1bfe364d65 VAULT-31907: Entity loading speedup (#29326)
* perf improvements for loading entities in unseal

* lint

* changelog

* abort on error

* update to defer
2025-01-24 16:06:01 +01:00
mickael-hc
d6d49390a9 update go-slug to 0.16.3 (#29404)
does not affect vault but addresses CVE-2025-0377 to reduce scanner noise
2025-01-23 17:40:47 -08:00
helenfufu
ede1469302 use elevated github token in plugin-update gha ent step (#29400) 2025-01-23 16:26:55 -08:00
Sarah Chavis
eef8370118 Update release notes for 1.17.x (#29395)
Add missing important change to 1.17 release notes
2025-01-23 11:35:20 -08:00
Tin Vo
ac3bb7b2d4 VAULT-32188: Enos test for PKI certificates (#29007)
* updating pki test

* updating pki test

* updating pki test

* updating pki script

* resolving conflicts

* adding pki cert verifications

* resolving conflicts

* updating test

* removing comments

* addressing bash formatting

* updating test

* adding description

* fixing lint error

* fixing lint error

* fixing lint issue

* removing unneeded scenario

* resolving conflicts

* debugging pipeline error

* fixing pipeline tests'

* fixing pipeline tests'

* testing smoke test

* fixing pipeline error

* debugging pipeline error

* debugging pipeline error

* debugging pipeline error

* debugging agent test ci failure

* fixing ci errors

* uncomment token

* updating script

* updating hosts

* fixing lint

* fixing lint

* fixing lint

* adding revoked certificate

* undo kv.tf change

* updating cert issuing

* updating issuing certs to include issuer

* updating pki cert verification

* addressing comments

* fixing lint

* fixing lint

* fixing lint

* fixing lint

* updating verify_secrets_engine_read module

* fixing lint

* fixing lint

* fixing lint

* debugging lint

* testing pipeline

* adding verify variables for autopilot

* adding pki read variable for autopilot

* updating vault engine read variables

* addressing comments

* fixing lint

* update test for enterprise

* update pki tests to adapt to enterprise
2025-01-23 11:30:20 -08:00
Thy Ton
e6a8443f59 ignore system view service ent in buf linter (#29393) 2025-01-23 10:09:15 -08:00
himran92
31499884c4 doc updates to include new fields for SAML sig validation (#29195)
* doc updates to include new fields for SAML sig validation

* edit description

* changes

* remove extra option of validating both options
2025-01-22 17:03:07 -05:00
Nick Cabatoff
13c445bd45 Websocket lib has moved, see https://coder.com/blog/websocket. (#29386) 2025-01-22 19:30:03 +00:00
Mike Palmiotto
9d80c4548f proto: bump protoc-gen-go to 1.36.3 (#29359) 2025-01-22 13:58:43 -05:00
divyaac
dcd737b32b VLT-32875 Export API panics when mount is deleted #7288 (#29376)
* Export API Bug

* Revert "Export API Bug"

This reverts commit 044597748d8b2c726996e515ffff3e0dea9d30a8.

* Export API Bug

* Added changelog

* Update changelog/29376.txt

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

* Revert "Export API Bug"

This reverts commit 9cdd28c59ea4907f8a44c20a4a048045d56d9d12.

* Export API Bug Change

* Edited one more deletedMount to renamed

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2025-01-22 10:38:43 -08:00
Violet Hynes
3fd8a31614 Fix misleading comments about namespaces in docs (#29370) 2025-01-21 14:28:31 -05:00
Michael Diggin
5b4b606c0d [Storage/DynamoDB] Let vault modify dynamodb tables (#29371)
* [Storage/DynamoDB] Let vault modify dynamodb tables

* add changelog

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2025-01-21 14:27:54 -05:00
Merouane Atig
4ff9bdba90 Fix typo: compatability => compatibility (#29372)
* Fix typo in awskms.mdx

* Fix typo in Makefile

* Fix typo in gcpkms/index.mdx

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2025-01-21 12:49:36 -05:00
Violet Hynes
47a6855e98 Remove rootless docker build step (#29373) 2025-01-21 12:17:14 -05:00
swati
e69f2ace06 Fix Static Role Name Consistency in PostgreSQL Configuration (#29138)
* Updated the PostgreSQL database creation command to ensure the static role name is consistent.

The role name specified in allowed_roles="my-role" under the section "Rootless Configuration and Password Rotation for Static Roles" should align with the static role name in step #3. Previously, the command incorrectly used "my-static-role"; it should be "my-role" to match the earlier step.

The same role name should also be used when reading the static credentials in step #4

* Added the file changelog/29138.txt

* Delete changelog/29138.txt

---------

Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com>
Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2025-01-16 16:05:20 -05:00
Mark Lewis
ad79edff17 Update counting.mdx (#29352)
Typo in client count references.
2025-01-16 15:35:42 -05:00
Mark Lewis
84b95a86c7 Update index.mdx (#29351)
Typo
2025-01-16 15:35:32 -05:00
Moritz Rathberger
4536c987d9 fixed typo in kv v1 upgrade docs (#29361) 2025-01-16 14:41:58 -05:00
Mike Palmiotto
f503f739de identity: Resolve conflicts with rename (#29356)
This PR introduces a new type of conflict resolution for duplicate
Entities and Groups. Renaming provides a way of preventing Vault from
entering case-sensitive mode, which is the current behavior for any kind
of duplicate.

Renames append the conflicting identity artifact's UUID to its name and
updates a metadata field to indicate the pre-existing artifact's UUID.

The feature is gated by the force-identity-deduplication activation flag.

In order to maintain consistent behavior between the reporting resolver
and the rename operation, we need to adjust the behavior of generated
reports. Previously, they intentionally preserved existing Group merge
determinism, wherein the last MemDB update would win and all others
would be renamed. This approach is more complicated for the rename
resolver, since we would need to update any duplicated entity in the
cache while inserting the new duplicate (resulting in two MemDB
operations). Though we can ensure atomic updates of the two identity
artifacts with transactions (which we could get for groups with a minor
adjustment, and we will get along with batching of Entity upserts on 
load), it's far simpler to just rename all but the first insert as proposed
in the current PR.

Since the feature is gated by an activation flag with appropriate 
warnings of potential changes via the reporting resolver, we opt
for simplicity over maintaining pre-existing behavior. We can revisit
this assumption later if we think alignment with existing behavior
outweighs any potential complexity in the rename operation.

Entity alias resolution is left alone as a destructive merge operation
to prevent a potentially high-impact change in existing behavior.
2025-01-15 14:24:49 -05:00
John-Michael Faircloth
a0ecbe993c docs: DB skip auto import rotation (#29098)
* docs: DB skip auto import rotation

* add usage section

* add password field; mark self_managed_password as deprecated
2025-01-10 16:17:36 -06:00
Angel Garbarino
a73a6983c4 Prep work for creating one WIF configuration component (#29345)
* initial things without helper changes

* adjust test for clean up of secret-engine-helper

* remove added line thats better in next pr

* remove extra check

* 🧹

* replace return with continue within loops
2025-01-10 14:06:42 -08:00
Rebecca Willett
8cee664204 Add 'how to run' instructions to each Enos scenario (#29299)
* Add 'how to run' instructions for each scenario
2025-01-10 21:17:09 +00: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
Angel Garbarino
8404d07264 String to camelCase helper (#29338)
* string-to-camel helper

* fix:

* Update string-to-camel-test.js

* update comment

* rename and clarify comment

* welp, forgot to update test
2025-01-10 17:52:03 +00:00
miagilepner
dc0cd5af90 Exit raft removed checker if raft isn't initialized (#29329)
* check if not initialized

* add comment and fix flake
2025-01-10 14:16:43 -03:00
Kuba Wieczorek
50509c6bab [VAULT-21282] Add a changelog entry for the updated Raft Autopilot reconciliation logic (#29328) 2025-01-10 16:07:46 +00:00
Bianca
896532ef89 Add state change logic to reload from storage -- activation flags (#29341) 2025-01-10 11:56:40 +00:00
Theron Voran
dac2ffca81 docs/vault-k8s: updates for v1.6.0 release (#29152)
* docs/vault-k8s: updates for v1.6.0 release

* Apply suggestions from code review

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

* updating whitespace and an extra "injector"

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2025-01-09 20:54:21 -08:00
Mike Palmiotto
ff2d7ecd34 Add build flag for CE-specific activation flag tests (#29335) 2025-01-09 17:03:15 -05:00
John-Michael Faircloth
49d8fb2b64 replace keyring dependency to address zombie dbus-daemons processes (#29334)
* replace keyring dependency to address zombie dbus-daemons processes

* changelog
2025-01-09 22:00:41 +00:00
Rachel Culpepper
75ddf6e4ed Add docs for ML-DSA and hybrid keys (#29246)
* add api docs for pqc key types

* add pqc key types to docs

* remove slh-dsa and add hybrid
2025-01-09 14:57:29 -06:00
Ryan Cragun
1105755321 protobuf: rebuild sdk backend protos with 1.36.2 (#29332)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2025-01-09 12:07:15 -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
Kit Haines
55ca52f3fd Add information about an enterprise feature related to validating iss… (#29300)
* Add information about an enterprise feature related to validating issued certificates to the PKI API docs.

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

Update RFC name and link, as suggested by Steve.

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

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

Update RFC name and link, as suggested by Steve.

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

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

Update RFC name and link, as suggested by Steve.

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

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

Update RFC name and link, as suggested by Steve.

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

* Update enterprise tag to be on the same line for vercel reasons.

---------

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2025-01-09 11:30:29 -05: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