Commit Graph

17947 Commits

Author SHA1 Message Date
hc-github-team-secure-vault-core
b45d944960 Update hashicorp/vault-plugin-database-snowflake to v0.9.0 (#22516)
* Automated dependency upgrades

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-08-22 21:39:09 +00:00
Christopher Swenson
4a5cde0afb Forward websocket event subscription requests (#22446)
For now, only the leader of a cluster can handle subscription requests,
so we forward the connection request otherwise.

We forward using a 307 temporary redirect (the fallback way).
Forwarding a request over gRPC currently only supports a single request
and response, but a websocket connection is long-lived with potentially
many messages back and forth.

We modified the `vault events subscribe` command to honor those
redirects. `wscat` supports them with the `-L` flag.

In the future, we may add a gRPC method to handle forwarding WebSocket
requests, but doing so adds quite a bit of complexity (even over
normal request forwarding) due to the intricate nature of the `http` /
`vault.Core` interactions required. (I initially went down this path.)

I added tests for the forwarding header, and also tested manually.
(Testing with `-dev-three-node` is a little clumsy since it does not
properly support experiments, for some reason.)

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
2023-08-22 14:33:31 -07:00
Alexander Scheel
b14b0aba25 Bump Go version to 1.21.0 on main (#22497)
* Bump Go version to 1.21.0

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

* Update to Docker v24.0.5 to fix host header issue

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

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-08-22 15:09:29 -04:00
Theron Voran
8984201141 docs/vault-secrets-operator: add openshift page (#22456)
Adds info about installing the operator on openshift.
2023-08-22 18:22:06 +00:00
Christopher Swenson
12fc5bed7c Add subscribe capability to policies (#22474)
* Add `subscribe` capability to policies

... and `subscribe_event_types` to the policy body.

These are not currently enforced in the events system (as that
will require populating the full secrets path in the event).

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
2023-08-22 18:07:32 +00:00
hskiba
6e41be5e04 Update azuread.mdx link to "Use claims to reliably identify a user" (#22491)
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2023-08-22 16:52:32 +00:00
Evan Gilman
1c4d3dd0c0 Bump go-plugin dep (#20966) 2023-08-22 15:21:38 +00:00
Alexander Scheel
a2a4831754 Minor improvements to transit & csrs (#22494)
* Remove note

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

* Remove duplicate curve check

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

* Remove CreateOperation from new Transit X.509 endpoints

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

* Add test to validate key matching works

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

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-08-22 10:51:37 -04:00
Gabriel Santos
1996377b4f Transit backend: Create CSR's from keys in transit and import certificate chains (#21081)
* setup initial boilerplate code for sign csr endpoint

* add function to sign csr

* working version of sign csr endpoint

* improving errors for csr create and sign endpoint

* initial implementation for import leaf certificate endpoint

* check if more than one certificate was provided in the ceritificate chain

* improve validate cert public key matches transit key

* convert provided cert chain from PEM to DER so it can be parsed by
x509.ParseCertificates and fixing other bugs

* fix creation of csr from csrTemplate

* add missing persist of certificate chain after validations in set-certificate endpoint

* allow exporting a certificate-chain

* move function declaration to end of page

* improving variable and function names, removing comments

* fix certificate chain parsing - work in progress

* test for signCsr endpoint

* use Operations instead of Callbacks in framework.Path

* setup test for set-certificate endpoint

fix problems with sign-csr endpoint returning base64

* finish set-certificate endpoint test

* use public key KeyEntry fields instead of retrieving public key from private

* improve error message and make better distinction between client and server error

also moved check of key types before checking if key match to endpoint handler

* check if private key has been imported for key version selected when signing a csr

* improve errors

* add endpoint description and synopsis

* fix functions calls in backend as function names changed

* improve import cert chain test

* trim whitespaces on export certificate chain

* changelog

* pass context from handler function to policy Persist

* make fmt run

* fix: assign returned error from PersistCertificateChain to err so it can be evaluated

* additional validations and improvements to parseCertificateChain function

* add validation to check if there is only one certificate in the certificate chain and it is in the first position

* import cert chain test: move creation of cluster to exported test function

* move check of end-cert pub key algorithm and key transit algorithm match into a separate function

* test export certificate chain

* Update sdk/helper/keysutil/policy.go

Co-authored-by: Alexander Scheel <alexander.m.scheel@gmail.com>

* fix validateLeafCertPosition

* reject certificate actions on policies that allow key derivation and remove derived checks

* return UserError from CreateCSR SDK function as 400 in transit API handler

* add derived check for ED5519 keys on CreateCSR SDK func

* remove unecessary calls of x509.CreateCertificateRequest

* move validate key type match back into SDK ValidateLeafCertMatch function

* add additional validations (ValidateLeafCertKeyMatch, etc) in SDK PersistCertificateChain function

* remove uncessary call of ValidateLeafCertKeyMatch in parseImportCertChainWrite

* store certificate chain as a [][]byte instead of []*x509.Certificate

* include persisted ca chain in import cert-chain response

* remove NOTE comment

* allow exporting cert-chain even if exportable is set as false

* remove NOTE comment

* add certifcate chain to formatKeyPublic if present

also added an additional check to validate if field is added when
certchain is present

---------

Co-authored-by: Alexander Scheel <alexander.m.scheel@gmail.com>
2023-08-22 08:24:56 -04:00
Josh Black
d50bd4eb05 OSS changes for https://github.com/hashicorp/vault-enterprise/pull/4254 (#22482) 2023-08-21 15:03:44 -07:00
Chelsea Shaw
822fc751ba UI: Fix Expected a stable identifier error when leaving & reentering a route (#22483) 2023-08-21 17:01:34 -05:00
Chelsea Shaw
2a4dbc197f UI: Enable KV create secret with Control Group (#22471) 2023-08-21 21:17:19 +00:00
Josh Black
75eebddba9 bolt.write.time should actually be a counter, not a gauge (#22468)
* bolt.write.time should actually be a counter, not a gauge

* add changelog

* Update website/content/docs/upgrading/upgrade-to-1.14.x.mdx

Co-authored-by: Paul Banks <pbanks@hashicorp.com>

* correct changelog

---------

Co-authored-by: Paul Banks <pbanks@hashicorp.com>
2023-08-21 20:11:57 +00:00
miagilepner
616c3a5ba5 [VAULT-17826] Remove mount point from rollback metrics (#22400)
* remove metrics

* add test and documentation

* update docs

* changelog

* fix TestConfig_Sanitized

* Update website/content/docs/upgrading/upgrade-to-1.15.x.mdx

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

* Update website/content/docs/upgrading/upgrade-to-1.15.x.mdx

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

* Update website/content/partials/telemetry-metrics/rollback-intro.mdx

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

* Update website/content/partials/telemetry-metrics/route-intro.mdx

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

* separate partials for metrics

* remove debugging line

* add high cardinality warning

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2023-08-21 16:55:37 +02:00
Max Bowsher
35a5fbfc60 Fix misattribution of activity log entries to incorrect auth methods (#18809)
* Fix misattribution of activity log entries to incorrect auth methods

In a production Vault Enterprise instance, I noticed incorrect
information in the sys/internal/counters/activity endpoints. Eventually,
I was able to spot a pattern of entities being misattributed to auth
methods of the same name in child namespaces, which led me to this bug
in the code.

When attempting to map from a token's path to an auth method, we need to
do so with respect to the namespace of the token, which may be different
from the namespace of the request, as tokens from parent namespaces can
make requests that reach into child namespaces.

* Changelog

* Use a real namespace ID in tests where it now matters

* gofumpt

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2023-08-21 14:59:39 +02:00
claire bontempo
abd6324e50 UI: fix default values resetting form inputs (#22458) 2023-08-20 10:55:41 -07:00
divyaac
98523a6874 Quota Inheritance for Rate Limit (OSS) (#22452)
* Quota Inheritance for Rate Limit (OSS)

* Added changelog

* Fix lease quota inheritance issue

* Edit formatting
2023-08-18 15:33:46 -07:00
Artur Faizullin
8250fba0e6 Update docs for standalone tls (#13455) 2023-08-18 13:47:15 -07:00
Fulton Byrne
915f44be2c best-practice: prom format by header (#16364)
* best-practice: prom format by header

* move config related doc closer to config example

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2023-08-18 16:26:06 -04:00
Hamid Ghaf
b5e9963703 adding testonly CI test job (#22439)
* adding testonly CI test job

* small instance for testonly tests

* feedback

* shopt

* disable glob expansion

* revert back to a large instance

* fix a mistake
2023-08-18 19:49:33 +00:00
Mike Palmiotto
67a2f743f0 Fix remaining activity/write CreateOperation (#22444)
In 00e13ab we updated the activity/write endpoint to get rid of the CreateOperation in favor of the UpdateOperation. At the time, testonly tests weren't running, but they're about to be, so go ahead and fix this before re-activating.
2023-08-18 18:33:16 +00:00
Justin Hill
619f5786e8 Add permet pool metrics to dynamo db backend (#21742)
* Add permet pool metrics to dynamo db backend

* Fmt and use permit pool with metrics

* Add changelog

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2023-08-18 13:15:35 -04:00
Rebecca Willett
6ae9f8d4ed Add get_local_metadata step back into upgrade scenario (#22419) 2023-08-18 12:04:55 -04:00
Peter Wilson
fc71469036 Missed using the parseutil for parsing a Bool (#22438) 2023-08-18 13:51:19 +00:00
Nicholas Anthony Suhartono
9bb921f5f2 fix typo by changing shoud to should (#19915) 2023-08-17 23:47:32 +00:00
Daniel Greeninger
7cc0d8cfa0 Update awskms.mdx (#17870)
fixing the documentation typo
2023-08-17 23:44:08 +00:00
Brian Shumate
614f50de66 Docs: AppRole API docs updates (#19162)
- Add example response for Read AppRole Secret ID
- Add example response for Read AppRole Secret ID Accessor
2023-08-17 16:25:06 -07:00
Mark Lewis
8441ff655b Update signed-ssh-certificates.mdx (#17899)
Minor typo
2023-08-17 23:23:56 +00:00
Aram Mirzadeh
ea56dd7e89 Added note about windows clients using cmd.exe (#16451)
Added a note that when using a windows, cmd.exe does not interpret single quotes
2023-08-17 16:04:01 -07:00
Peter Zujko
e746d8d8d7 Add doc for metrics_prefix telemetry configuration (#16562) 2023-08-17 23:03:39 +00:00
ssurana90
4ff9fb3fd3 adding explanation for allow_store_key flag , based on internal engineering conversation. (#17258) 2023-08-17 16:00:38 -07:00
hayden
c6f2845f6b docs: Add more keycloal oidc URL, URIs information (#17314) 2023-08-17 16:00:21 -07:00
Josh Black
ef0872f6cf Correct bolt write time (#22428)
* raft_storage.bolt.write.time is cumulative, not per write

* correct a bunch of deprecations

* add changelog
2023-08-17 22:47:37 +00:00
Sarah Chavis
ec6fc13c71 Replace "tbd" with a meaningful example (#22022) 2023-08-17 15:21:15 -07:00
Nestor Reyes
c147fba33c Update oracle-tde.mdx to remove deprecated sqlnet.ora configuration (#22342)
* Update oracle-tde.mdx to remove deprecated sqlnet.ora configuration steps
* Remove text regarding updating  sqlnet.ora in the Enable TDE section. 
* Add steps to set the wallet location using parameters. 
* Update Oracle Documentation references from 12c docs to 19c docs.
* Update website/content/docs/enterprise/pkcs11-provider/oracle-tde.mdx

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2023-08-17 15:03:47 -07:00
Alicia Clark
da5b84ac93 Add clarifications to reporting documents (#21994)
* Add clarifications to reporting documents

* Update language

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2023-08-17 21:07:37 +00:00
akshya96
c2ba113def Background thread to update locked user entries runs on DR secondaries (#22355)
* fix background thread

* add changelog

* updating updateLockedUserEntries
2023-08-17 14:02:07 -07:00
Jack Jackson
c498bebe6f Update lambda-extension.mdx (#22021)
Correction to link-syntax
2023-08-17 20:59:31 +00:00
Josh Black
c56b0bb3c9 Be more clear about bolt write timing (#22097) 2023-08-17 13:41:18 -07:00
Markus Cisler
a58d650e58 Fix link formatting in Vault lambda extension docs (#22396)
* Fix link formatting in Vault lambda extension docs

The link pointing to supported lambda runtimes does not use correct markdown formatting so it is not rendered as a link on developer.hashicorp.com. This commit renders it as a link again.

* Add changelog entry

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2023-08-17 20:39:54 +00:00
Kevin Wang
cbae51fdbc docs: fix codeblock language (#22367) 2023-08-17 13:25:08 -07:00
Theron Voran
11aaca5102 docs/vault-secrets-operator: 0.2.0 release updates (#22392)
* docs/vault-secrets-operator: 0.2.0 release updates

* update k8s supported versions
2023-08-17 13:24:23 -07:00
Peter Wilson
93f18cbd7a VAULT-19046: Audit eventlogger escape hatch (#22344)
* add escape hatch to use feature flag for reversion of audit behavior

* Setup pipeline which ends with a NoopSink

* explicitly call out old way of running test

* old behavior for audit trail tests

* More manual forcing of tests to legacy audit system

* Add NOTE: to suggest that the feature flag is temporary
2023-08-17 21:20:30 +01:00
Alexander Scheel
f24dddf342 Add documentation on troubleshooting ACME (#21381)
* Add documentation on troubleshooting ACME
---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2023-08-17 19:40:09 +00:00
Adrian Todorov
b49d668e6a Clarify Tokens use and structure recommendation (#21569)
* Clarify Tokens use and structure recommendation

* Update website/content/docs/concepts/tokens.mdx

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2023-08-17 19:38:47 +00:00
Violet Hynes
8f1bf532f6 Fix client clone with headers deadlock (#22410)
* Fix client clone with headers deadlock

* Changelog

* Typo
2023-08-17 15:13:28 -04:00
Violet Hynes
41ca6d427a Skip milestone check for community PRs (#22402) 2023-08-17 13:03:05 -04:00
claire bontempo
2c6a3e72d5 UI: remove default setting for max_versions in kv metadata (#22394)
* remove default setting for max versions - leave unset with a value of 0

* add changelog
2023-08-17 09:47:35 -07:00
Marty Pauley
6ceee6276f Don't say "Success!" when a specific field is requested. (#21546)
* add a test to show the bug

* do not output a "Success!" message if a specific field was requested

* Create 21545.txt

* Fix changelog name

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2023-08-17 11:49:04 -04:00
Alexander Scheel
7d361eec46 Add documentation on CIEPS protocol (#22398)
* Add documentation on CIEPS protocol

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

* Update website/content/docs/secrets/pki/cieps.mdx

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

* Update website/content/docs/secrets/pki/cieps.mdx

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

* Fix indentation, link to Vault SDK

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

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2023-08-17 11:05:58 -04:00