Commit Graph

18722 Commits

Author SHA1 Message Date
claire bontempo
e3c3a52b7b ui: update multi-endpoint error handling for pki config (#21027)
* update error handling for pki config

* address comments!

* VAULT-17194 link jira and rename errors var

* add tests

* Update ui/lib/pki/addon/components/page/pki-configuration-edit.ts

* add test comment

* combine save logic, update interface

* stub router
2023-06-14 21:53:45 +00:00
Victor Rodriguez
58f029d608 Add paths for seal config to cache exceptions. (#21223)
Add paths for seal config to cache exceptions.

Add barrierSealConfigPath and recoverySealConfigPlaintextPath to
cacheExceptionsPaths in order to avoid a race that causes some
nodes to always see a nil value.
2023-06-14 21:09:29 +00:00
Ryan Cragun
ddff68c82a test: run enos scenarios with trace log level (#21213)
Set the vault and consul default log_level to trace.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-06-14 12:08:43 -06:00
Alexander Scheel
052719b9a8 Allow issuance of root certs no AIA when templating is enabled (#21209)
* Ignore templated AIA on root generation

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add test case verifying that roots generate OK

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add changelog entry

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add warning on generation

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-06-14 13:35:17 -04:00
Alexander Scheel
b346b52b62 Correctly validate ACME PoP against public key (#21190)
* Correctly validate ACME PoP against public key

ACME's proof of possession based revocation uses a signature from the
private key, but only sends the public copy along with the request.
Ensure the public copy matches the certificate, instead of failing to
cast it to a private key.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add ACME revocation tests

* Clarify commentary in acmeRevocationByPoP

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: Steve Clark <steven.clark@hashicorp.com>
2023-06-14 12:01:16 -04:00
Meggie
84e403972b Adding the summary file for Heimdall (#21221)
This file will be shared across the Vault OSS & ENT repos.
2023-06-14 10:58:28 -04:00
Sarah Thompson
a2993878f1 Onboard Vault to the prepare workflow. (#21011)
* Onboard Vault to the prepare workflow.

* remove after testing

* no message

* remove changes used for testing

* adding back comma - so as not to introduce unnecessary merge conflicts
2023-06-14 12:12:09 +01:00
Theron Voran
8946911078 docs/vso: updating pki secret destination doc string (#21195)
From hashicorp/vault-secrets-operator@90ae1b3095
2023-06-13 14:21:23 -07:00
Kuba Wieczorek
567917efac CI: make tests-completed fail when setup-go-cache fails (#21197) 2023-06-13 21:01:48 +01:00
Nick Cabatoff
c823bd99a8 Document known issues surrounding update-primary on PR secondaries. (#21141) 2023-06-13 14:02:56 -04:00
Nick Cabatoff
4654c15248 Fix: non-login requests shouldn't care about login roles for lease quotas. Also fix a potential deadlock (#21110)
* Use a deadlock-detecting mutex for auth/mountsLock
* Remove call to DetermineRoleFromLoginRequest: we shouldn't be trying to apply roles to non-login lease quotas.
2023-06-13 13:24:50 -04:00
Theron Voran
a3657dc604 docs/pki: add remove_roots_from_chain option to /pki/issue (#21161)
Adds the `remove_roots_from_chain` option to the docs for
`/pki/issue`, based on addNonCACommonFields().
2023-06-13 10:15:52 -07:00
Steven Clark
3b14cd2061 Allow CSRs with basic constraint extension with IsCA=false (#21149)
* Allow CSRs with basic constraint extension with IsCA=false

 - We previously forbid any CSR with a basic constraint extension within the CSR.
 - It was discovered that some ACME clients (Proxmox ACME client) do send us this extension with a value of IsCA to false.
 - So allow the extension to be set within the ACME CSR with
   a value of IsCA set to false
 - Add a test for both the IsCA=true and IsCA=false use-cases and make sure we don't actually set the extension back within the generated certificate.

* PR feedback

 - Move basic constraint function to sdk, increase test coverage
 - Error out on extra characters being returned from the asn1 unmarshalling.

* make fmt
2023-06-13 13:15:37 -04:00
Daniel Huckins
7a47df649d [docs] Add note about agent sidecar injector (#21171)
* add note about agent sidecar injector

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* Apply suggestions from code review

---------

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>
2023-06-13 12:38:54 -04:00
Steven Clark
aba75aac86 Verify FailureToTolerance prior to sealing in ACME test (#21167)
- When running the SubtestACMEStepDownNode by itself we would be sealing the active node within the cluster too quickly and would end up with the other nodes failing to become an active node with the message: not part of stable configuration, aborting election
 - Add an extra check that the raft autopilot state is healthy and that FailureToTolerance has a value of 1 or higher before letting the test continue.
2023-06-13 12:37:09 -04:00
Violet Hynes
f0c9519023 VAULT-15835 Add GHA that checks for nil, nil returns on functions that return an error (#21099)
* VAULT-15385 Add GHA that checks for nil, nil returns on functions that return an error

* VAULT-15385 add failing function, for sanity

* VAULT-15385 fix makefile

* VAULT-15385 remove test dir

* VAULT-15385 Fix typo

* VAULT-15385 fix job name

* VAULT-15385 Add test to packages

* VAULT-15835 add opt-out

* VAULT-15835 Wrong file for comment

* VAULT-15835 remove failing function

* VAULT-15835 return not nil-nil :)

* VAULT-15835 Restrict to two-result functions
2023-06-13 12:32:06 -04:00
Yoko Hyakuna
51c7e3e31a Add the payload parameter description (#21050)
* Add the payload parameter description

* Update website/content/docs/enterprise/license/utilization-reporting.mdx

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

* Update website/content/docs/enterprise/license/utilization-reporting.mdx

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

* Update website/content/docs/enterprise/license/utilization-reporting.mdx

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

* Adjust spacing

---------

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>
2023-06-13 09:17:24 -07:00
Steven Clark
820f7ee22f Clarify that no_store=true certs can still be revoked (#21169)
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-06-13 11:34:26 -04:00
Victor Rodriguez
4630332391 Refactor seal wrapping of recovery keys. (#21155) 2023-06-13 13:56:34 +00:00
Steven Clark
95ad246162 Update docs for new 1.14 ACME health checks (#21063)
* Update docs for new 1.14 ACME health checks

* Remove wording about informational warning only

 - The health check can report back warnings if permissions are an issue
   or if the local cluster configuration is missing.
2023-06-12 22:17:32 -04:00
Daniel Huckins
6d232b2dc5 [docs] Agent Process Supervisor Mode (#21056)
* first pass at docs

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* try to add anchors

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* links didn't work correctly, just remove

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* add partial

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* use new style

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* add to index

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* edit index

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* add config

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Anton Averchenkov <84287187+averche@users.noreply.github.com>

* update file name

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* more changes from PR review

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* updated name

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* exec -> process supervisor

* convert to old paragraph markers

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* exec -> process supervisor

* add link

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* exec -> process supervisor

* exec -> process supervisor

* "full stop"

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* little blurb about exit behavior

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* grammar

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* Apply suggestions from code review

* add link

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* expand the config section

* add env_template example

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* expand config description

* fix links

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* config example

* doesn't support anchors?

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* update functionality

* Update website/content/docs/agent-and-proxy/agent/process-supervisor.mdx

Co-authored-by: Daniel Huckins <dhuckins@users.noreply.github.com>

* Update website/content/docs/agent-and-proxy/agent/process-supervisor.mdx

* fix link

* move process supervisor mode in alphabetical order

* reference templating language

---------

Signed-off-by: Daniel Huckins <dhuckins@users.noreply.github.com>
Co-authored-by: Anton Averchenkov <84287187+averche@users.noreply.github.com>
Co-authored-by: Anton Averchenkov <anton.averchenkov@hashicorp.com>
2023-06-12 20:39:25 -04:00
Steven Clark
46141e65ce Remove ACME bugfix changelog (#21151)
- Reading the changelog process, it's clear we should not file bug
   changelogs if we fix issues prior to GA release.
2023-06-12 17:39:35 -04:00
Kyle Schochenmaier
810bb6ccb2 [docs] VSO documentation updates for GA (#21117)
* [docs] Remove beta tag and update example code, add HCP as a supported platform.
* [docs] extend vault secrets operator secret CRD examples (#20913)
* [docs] update helm docs for vso GA (#21150)
* [docs] Add some initial telemetry documentation (#21144)
* [docs] update api reference for VSO (#21153)
---------
Co-authored-by: Thy Ton <maithytonn@gmail.com>
2023-06-12 15:59:51 -05:00
Anton Averchenkov
8194ec14fd docs: vault agent generate-config (#21120) 2023-06-12 15:10:23 -04:00
Ryan Cragun
2ec5a28f51 test: handle occasional lower capacity in zone d (#21143)
We seen instances where we try to schedule a spot fleet in the
us-east-1d of the vault CI AWS account and cannot get capacity for our
instance type. That zone currently supports far fewer instance types so
we'll bump our max bid to handle cases where slightly more expensive
instances are available. Most of the time we'll be using much cheaper
instances but it's better to pay a fraction of a cent more than have to
retry the pipeline. As such, we increase our max bid price to something
that will almost certainly be fullfilled.

We also allow our package installer to go ahead when cloud init does not
update sources like we expect. This should handle occasional failures
where cloud-init doesn't update the sources within a reasonable amount
of time.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-06-12 10:49:58 -06:00
Steven Clark
c855ba6a90 Signal ACME challenge engine if existing challenges were loaded on startup (#21115)
* Signal ACME challenge engine if existing challenges were loaded

 - Addresses an issue of existing challenges on disk not being processed until a new challenge is accepted when Vault restarts
 - Move loading of existing challenges from the plugin's initialize method into the challenge engine's thread
 - Add docker test that validates we addressed the issue and ACME works across standby nodes.

* Add cl
2023-06-12 15:09:20 +00:00
Paul Banks
f2887a2535 Fix forwarding on token create on perf standby when an alias is created (#21100)
* Fix forwarding on token create on perf stanby when an alias is created

* Changelog entry

* Fix merge issues in docs

* Fix typo
2023-06-12 15:01:18 +01:00
Ryan Cragun
27621e05d6 [QT-527][QT-509] enos: use latest version of enos-provider (#21129)
Use the latest version of enos-provider and upstream consul module.
These changes allow us to configure the vault log level in configuration
and also support configuring consul with an enterprise license.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-06-12 10:00:16 -04:00
Josh Black
0ff9059967 OSS changes for fixing bug in update-primary (#21119) 2023-06-09 14:35:41 -07:00
Ryan Cragun
b0aa808baa [QT-509] enos: pin to enos-provider < 0.4.0 (#21108)
Temporarily pin the enos provider to < 0.4.0 to gracefully roll out new
provider changes.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-06-09 13:06:00 -06:00
Jason O'Donnell
787897fa3a Fix link in known issue (#21093) 2023-06-08 21:40:23 +00:00
Cinthia Conti
af4bd22b16 changelog update for 1.14.0, 1.13.3, 1.12.7, 1.11.11 (#21077)
* changelog update for 1.14.0-rc1, 1.13.3, 1.12.7, 1.11.11

* adding manual changelog entry for 19296.txt deleted file

* Update CHANGELOG.md

Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com>

---------

Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com>
2023-06-08 16:35:50 -04:00
Anton Averchenkov
00f42fa7de Fix release note for Secrets as Environment Variables (#21090) 2023-06-08 20:15:40 +00:00
Jason O'Donnell
698c39f988 secret/pki: add known issue for slow startup times (#21083)
* secret/pki: add known issue for slow startup times

* fix versions

* Fix typo in link

* Clarify impact
2023-06-08 15:38:21 -04:00
Matt Schultz
f147bc1fb1 Adds an ACME validation failure test for certbot. (#21028)
* Adds an ACME validation failure test for certbot that doesn't run in CI unless a particular regression test env var is provided. Also includes a helper function to determine whether or not CI is running and if the regression test env var is provided.

* Rename and move the local or regression test env check. Sinkhole our invalid domain for ACME certbot test to avoid spamming someone's domain if it's registered in the future.
2023-06-08 10:18:37 -05:00
Conor McCullough
bbcd3f1c1b S3 Auto-Snapshot IAM Roles EKS Incompatibility Footnote (#21039)
* S3 Auto-Snapshot IAM Roles EKS Incompatibility Footnote

This is a common source of confusion for customers when setting up S3 auto snapshots on EKS.

Currently internal feature request 0/1182317814772514/1200126608980599 is open for this.

By adding this footnote, we will save our customer's time spent attempting to configure an unsupported feature.

* Minor updates

---------

Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com>
2023-06-08 07:48:34 -07:00
miagilepner
5002489d27 VAULT-15394: Generate activity log precomputed queries (#20778)
* write precomputed queries

* fix comment
2023-06-08 15:54:36 +02:00
Alexander Scheel
508017d073 Add missing documentation on cert metrics (#21073)
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-06-08 09:09:10 -04:00
Thy Ton
b023353b2e [Docs] Update api-ref, helm docs, and vso version for v0.1.0-rc.1 (#21052)
Co-authored-by: Kyle Schochenmaier <kschoche@gmail.com>
2023-06-07 16:39:39 -07:00
Jordan Reimer
6c64a20a39 renames replication links in sidebar nav (#21061) 2023-06-07 15:41:19 -06:00
claire bontempo
28f72564f8 add is_default and serial_number to serialze:false attrs (#21055) 2023-06-07 21:10:34 +00:00
Victor Rodriguez
0ec352402c Refactor encryption funcs for the StoredBarrierKeysPath (root key) OSS (#21044)
Refactor encryption funcs for the StoredBarrierKeysPath (root key).

Add new file seal_util.go to hold functions that perform seal wrapping and
unwrapping.
2023-06-07 15:20:53 -04:00
Nick Cabatoff
f1649fcde3 Document how replicated data is handled by type. (#21047) 2023-06-07 14:24:41 -04:00
Angel Garbarino
6fa423e3f3 License banner - check for new license on localStorage. (#20999)
* fix things twice

* fix test and a whitespace that showed on my linter

* fix comment

* address pr comments

* change const name
2023-06-07 11:05:56 -06:00
Alexander Scheel
f079b7b0a4 Add TLS-ALPN-01 Challenge Type to ACME (#20943)
* Add ACME TLS-ALPN-01 Challenge validator to PKI

This adds support for verifying the last missing challenge type,
TLS-ALPN-01 challenges, using Go's TLS library. We wish to add this as
many servers (such as Caddy) support transparently renewing certificates
via this protocol, without influencing the contents of sites served.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Enable suggesting, validating tls-alpn-01 in PKI

Notably, while RFC 8737 is somewhat vague about what identifier types
can be validated with this protocol, it does restrict SANs to be only
DNSSans; from this, we can infer that it is not applicable for IP
typed identifiers. Additionally, since this must resolve to a specific
domain name, we cannot provision it for wildcard identifiers either.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Fix test expectations to allow ALPN challenges

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add tls-alpn-01 as a supported challenge to docs

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add test for tls-alpn-01 challenge verifier

This hacks the challenge engine to allow non-standard (non-443) ports,
letting us use a local server listener with custom implementation.

In addition to the standard test cases, we run:

 - A test with a longer chain (bad),
 - A test without a DNSSan (bad),
 - A test with a bad DNSSan (bad),
 - A test with some other SANs (bad),
 - A test without a CN (good),
 - A test without any leaf (bad), and
 - A test without the extension (bad).

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add changelog entry

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Update builtin/logical/pki/acme_challenges.go

Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: Kit Haines <khaines@mit.edu>
2023-06-07 16:34:00 +00:00
Bianca Moreira
aca58d81a1 Add new policy metrics (#21010)
* Add new policy metrics

* Add changelog entry

* Change policy wording
2023-06-07 15:19:29 +02:00
Alexander Scheel
08c1efa4d4 Gracefully handle CSRs without CNs (#20982)
* Allow not specifying CN on CSR

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add test case validating behavior

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add notice about failure to validate

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-06-07 08:15:19 -04:00
Alexander Scheel
9f87bcfb3b Fix race in DNS test server configs (#21024)
When writing DNS configs, make sure to push the zone file prior to
writing the reference to the zone in the named.conf.options file.
Otherwise, when adding the initial domain (or any subsequent domains,
which isn't really used by these tests), a race occurs between Docker,
writing the updated config files, and the bind daemon, detecting that
mtime has changed on the named.conf.options file and reloading it
and any referenced zone files.

This should fix the error seen in some tests:

> /etc/bind/named.conf:9: parsing failed: file not found

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-06-07 08:10:16 -04:00
Jaymala
b9f9f27e8e Fix autopilot scenario validation error (#21033)
Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2023-06-07 00:17:15 +00:00
Austin Gebauer
7d207b7d19 Upgrade hashicorp/cap to fix OIDC provider test on 32bit (#21034) 2023-06-06 17:14:57 -07:00