1941 Commits

Author SHA1 Message Date
Scott Miller
415d260995
Support trimming trailing slashes via a mount tuneable to support CMPv2 (#28752)
* Support trimming trailing slashes via a mount tuneable to support CMPv2

* changelog/

* Perform trimming in handleLoginRequest too

* Eagerly fetch the mount entry so we only test this once

* Add a mount match function that gets path and entry

* Update vault/request_handling.go

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

* more docs

* Some patches (from ENT) didnt apply

* patch fail

* Update vault/router.go

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

* PR feedback

* dupe

* another dupe

* Add support for enabling trim_request_trailing_slashes on mount creation

* Fix read mount api returning configuration for trim_request_trailing_slashes

* Fix test assertion

* Switch enable and tune arguments to BoolPtrVal to allow end-users to specify false flag

* Add trim-request-trailing-slashes to the auth enable API and CLI

---------

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2024-10-24 10:47:17 -05:00
miagilepner
4439ee8798
Fix Windows chown error (#28748)
* noop for windows chown

* changelog
2024-10-22 14:57:26 +02:00
Violet Hynes
210da8f705
Fix data race around static secret capability manager (#28653)
* Fix data race around static secret capability manager

* Actually, clone the map
2024-10-09 15:43:49 -04:00
Josh Black
7307c56f59
-agent-address flag should have higher precedence than the env var (#28574)
* -agent-address flag should have higher precedence than the env var

* add changelog
2024-10-04 11:29:03 -07:00
Josh Black
d1355cb98f
explain how -output-curl-string works in comments to avoid confusion (#28576) 2024-10-04 11:14:21 -07:00
Mike Palmiotto
6a145af82a
CE: Remove RequestLimiter config plumbing (#28592)
This PR provides some plumbing for the enterprise counterpart PR:
hashicorp/vault-enterprise#6791
2024-10-04 13:48:16 -04:00
Jason Joo
a5caf4e1cb
fix: cert auth method watches cert file change and NewCreds() notification (#28126)
Signed-off-by: Jason Joo <hblzxsj@gmail.com>
2024-10-02 13:41:55 -04:00
Luis (LT) Carbonell
2d46c8d1fd
Add clarifying message (#28535) 2024-09-30 15:48:55 +00:00
Violet Hynes
6d66990cb6
Fix static secret caching race condition (#28494)
* Fix static ssecret caching data race

* Fix static ssecret caching data race

* Changelog
2024-09-24 14:08:48 -04:00
Luis (LT) Carbonell
352bbeb06c
VAULT-12732: Add Heap Profiling Option to Vault Server Command Line (#27033)
* Add pprof output option to CLI

* Add to docs

* Add changelog

* Update website/content/docs/commands/server.mdx

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

* some changes

* Update changelog/27033.txt

Co-authored-by: Josh Black <raskchanky@gmail.com>

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Co-authored-by: Josh Black <raskchanky@gmail.com>
2024-09-16 11:00:08 -04:00
akshya96
06fac16a1e
Add maximum request duration (timeouts) for all requests except actual monitor and events requests (#28230)
* fix paths for sys/monitor and sys/events

* add changelog

* add changelog

* Update http/handler.go

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

* added some modifications to check for timeout

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2024-08-30 11:00:12 -07:00
Violet Hynes
bc7923ad29
VAULT-30219 Bug fix for race condition (#28228) 2024-08-30 09:45:58 -04:00
Violet Hynes
a5262e08bb
VAULT-30219 CE changes for versioned secret fix (#28207)
* VAULT-30219 CE changes for versioned secret fix

* Changelog
2024-08-28 11:29:06 -04:00
kpcraig
dc81de7ec8
Easy go-jose updates (the codeless[ish] ones) (#28140) 2024-08-21 14:25:07 -04:00
Violet Hynes
474bcd8f11
VAULT-29738 CE changes for client count warning (#28068)
* VAULT-29738 CE changes for client count warning

* VAULT-29738 add changelog
2024-08-14 09:31:02 -04:00
Brian Howe
cbc06c0856
ensure response is not nil before sanitizing (#27923)
Co-authored-by: akshya96 <87045294+akshya96@users.noreply.github.com>
2024-08-12 12:48:48 -07:00
aphorise
88975a6c24
Core: CLI Doc improvements to example read / write. (#19064)
* Core: CLI Doc imporvements to example read / write. Resolves #16788

* Core: CLI Doc imporvements to example read / write. Resolves #16788. Updated Changelog filename.

* Core: CLI Doc imporvements to example read / write. Resolves #16788. Updated Changelog..

* Updated read example to use token lookup instead.
2024-08-09 11:48:21 -04:00
idnandre
e26c246cbb
chore: fix deprecated ioutil readall (#27823)
Signed-off-by: idnandre <andre@idntimes.com>
2024-07-30 09:18:24 -04:00
Violet Hynes
b689fc62f1
VAULT-29198 CE side changes for Proxy update forwarding (#27891)
* VAULT-29198 CE side changes for Proxy update forwarding

* VAULT-29198 changelog
2024-07-29 12:58:55 -04:00
divyaac
b32231a9eb
Deprecate distinct_entities and nont_entity_tokens (#27830)
* OSS Changes

* Added changelog

* Fix build errors
2024-07-23 20:57:38 +00:00
Violet Hynes
dbecbcec18
VAULT-27384 Fix faulty assignments and unchecked errors (#27810)
* VAULT-27384 Fix faulty assignments and unchecked errors

* Another missed error

* Small refactor
2024-07-22 16:53:02 -04:00
Violet Hynes
b9c892f8aa
VAULT-28656 CE changes for Proxy bug (#27730)
* VAULT-28656 CE changes for Proxy bug

* VAULT-28656 changelog

* VAULT-28656 rename changelog
2024-07-10 09:38:51 -04:00
Violet Hynes
fd884ad1a0
Removal of go-testing-interface (CE changes) (#27578)
* Removal of go-testing-interface CE changes

* CE only fine

* Changelog

* Changelog
2024-07-04 11:09:41 -04:00
idnandre
b833d4714d
chore: fix deprecated ioutil nopcloser (#27650)
Signed-off-by: idnandre <andre@idntimes.com>
2024-07-03 13:38:34 -04:00
Mike Palmiotto
3229cf192b
Add CE plumbing for CensusManager reload (#27664)
This PR adds the CE plumbing and stubs for forcing agent instantiation
whenever the Vault license changes.

Resolves: VAULT-28583
Enterprise PR: hashicorp/vault-enterprise#6168
2024-07-03 13:31:56 -04:00
Peter Wilson
89276a56b2
VAULT-6803: fix listener issue if using proxy_protocol_behavior with deny_unauthorized for untrusted upstream connections (#27589)
* timeout 'testListenerConnFn' waiting on the server connection after 3 secs

* return the invalid upstream error so the library knows not to stop listening/serving

* update go-proxyproto to use fork/tag

* test that fails before library and code update, but passes afterwards
2024-06-26 07:52:13 +00:00
Mike Palmiotto
93682b0547
Prepare CE changes for [census.Agent] SetMetadata (#27577) 2024-06-25 10:41:56 -04:00
Violet Hynes
3959722892
VAULT-28192 fix Agent and Proxy consuming large amounts of CPU for auto-auth self-healing (#27518)
* VAULT-28192 fix Agent and Proxy consuming large amounts of CPU for auto-auth self-healing

* Changelog

* Update changelog

* drain incoming if we get invalid token

---------

Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>
2024-06-19 10:23:51 -04:00
Thy Ton
28c2e94382
replace global vault handlers with newVaultHandlers() (#27515) 2024-06-18 15:17:40 +00:00
Jason O'Donnell
fe1f36a1dc
Add SIGUSR2 pprof to agent and proxy (#27510)
* Add SIGUSR2 pprof to agent

* changelog

* Update command/agent.go

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

* Update command/agent.go

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

* Add to proxy, update tests

* Fix path

* Changelog

* dry

* choose one error style

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2024-06-17 17:10:00 +00:00
Peter Wilson
b2ac030593
temp directory not used in a few places, switched to using testify require to clean up (#27512) 2024-06-17 10:53:31 +01:00
Peter Wilson
bf82dfeac8
lowercase first letter of error message (#27513) 2024-06-17 09:50:48 +00:00
Thy Ton
83111c010c
use BUILD_MINIMAL env to build minimal Vault with few storage options and plugins (#27394) 2024-06-12 16:53:49 +00:00
divyaac
f3eedc4aa2
Set default reporting start time to billing start date (#27379)
* Apply oss patch

* Added changelog
2024-06-06 10:13:04 -07:00
Luke Clifton
3e998a431f
Add option for not mounting the KV mount in --dev (#16974)
* Add option for not mounting the KV mount in --dev

* Fix whitespace I messed up during merge conflict resolution

* Feature -> Improvement

* Fix formatting for real

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2024-05-31 15:48:56 -04:00
Seena Fallah
5c275e7d88
agent: allow changing file ownership in file sink (#27123)
* agent: allow changing file ownership in file sink

Allow changing the ownership of the token file in file sink.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* Consistency: id -> ID

* Add changelog

* Remove empty line in changelog

* agent: add godoc for TestFileSinkMode_Ownership

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

---------

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2024-05-30 15:11:37 -04:00
Violet Hynes
b41dcee3fa
VAULT-24050 Fix erroneous warning showing when -address is provided (#27265)
* VAULT-24050 Fix erroneous warning showing when -address is provided

* VAULT-24050 changelog
2024-05-30 09:48:06 -04:00
markafarrell
476b0d57c9
Add vault.agent.authenticated metric (#26570)
* add vault.agent.authenticated metric

fix metric name

* Update command/agentproxyshared/auth/auth.go

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2024-05-28 12:28:24 -04:00
Violet Hynes
44673ebba6
VAULT-25848 replace mholt/archiver with native go calls (#27228)
* VAULT-25848 update product code to remove mholt/archiver dependency

* VAULT-25848 replace tests, still WIP while I figure out if there's a bug caught by TestDebugCommand_PartialPermissions

* VAULT-25848 actually remove the dep

* VAULT-25848 add headers for directories, improve test

* Comment cleanup

* Typo

* Use %w

* Typo
2024-05-27 16:28:25 -04:00
John-Michael Faircloth
91f2b9f91d
remove deprecated centrify auth method (#27130)
* remove deprecated centrify auth method

* changelog
2024-05-20 17:49:47 +00:00
Luis (LT) Carbonell
33d93652d5
Store Cluster Name in Physical Storage (#26878)
* Store Cluster Name in Physical Storage

* Add changelog
2024-05-13 14:36:29 -04:00
Mike Palmiotto
3150c321cb
AOP: Make config reloadable (enterprise) (#26907)
CE stubs to support reloadable AOP config.
2024-05-09 17:14:39 -04:00
Kevin Schoonover
c0ea7b1a35
reload service registration configuration on SIGHUP (#17598)
* add reloading service configuration

* add changelog entry

* add tests

* fix typo

* check if config.ServiceRegistration is nil before signaling

* add changes for deregistering service on nil config with failing tests

* fix tests by decreasing reconcile_timeout + setting consul agent tokens

* fix races

* add comments in test

---------

Co-authored-by: Marc Boudreau <marc.boudreau@hashicorp.com>
2024-05-09 17:13:14 -04:00
Violet Hynes
b16b94a72a
VAULT-25341 Address issue where having no permissions to renew caused auto-auth to attempt to renew with no backoff (#26844)
* VAULT-25341 Address issue where having no permissions to renew caused Agent and Proxy auth to attempt to renew with no backoff

* Fiddle with go.mod changes that shouldn't have happened

* VAULT-25341 small cleanup and extra test

* VAULT-25341 backoff only in error case

* VAULT-25341 godocs

* VAULT-25342 changelog

* Update command/agent_test.go

Co-authored-by: divyaac <divya.chandrasekaran@hashicorp.com>

* VAULT-25341 rename file audit

---------

Co-authored-by: divyaac <divya.chandrasekaran@hashicorp.com>
2024-05-09 11:12:42 -04:00
Steven Clark
259cfbf618
Add missing delegated_auth_accessors config field to /sys/mounts/<path> response (#26876)
* Add missing delegated_auth_accessors config field to /sys/mounts/<path> response

 - The field hadn't been properly populated in the JSON struct being returned
   through the API response, but had been properly set in the stored structs
   in the backend.
 - Add missing update to the command tune docs for the -delegated-auth-accessors
   option that existed
 - Add -delegated-auth-accessors to the secret enable vault command along with
   a docs update

* Add cl

* Fix documentation, using a comma separated list does not work

* Apply suggestions from code review

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

* Drop plural on doc update

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2024-05-08 19:58:46 +00:00
Violet Hynes
f2b4ca4def
VAULT-24736 CE changes for static secret capability behaviour toggle (#26744) 2024-05-03 14:12:19 -04:00
Mike Palmiotto
fdc330e622
Add inmem_transactional storage option for tests (#26780)
This PR adds inmem_transactional to the map of available physical
backends for TestServerCommand. This is harmless, as tests need to opt
into the backend.

This is required to test AOP configuration on enterprise.
2024-05-02 12:43:55 +00:00
Josh Black
75b0418d51
Add ACME client counts to vault operator usage (#26525)
* Add ACME client counts to vault operator usage

* add changelog

* remove a few errors
2024-04-29 08:51:37 -07:00
Violet Hynes
514d6d7111
VAULT-25987 Fully deflake self-healing tests (#26646) 2024-04-25 11:08:22 -04:00
Violet Hynes
fa61a060b4
VAULT-25987 de-flake Test_NoAutoAuthSelfHealing_BadPolicy (#26547)
* VAULT-25987 de-flake Test_NoAutoAuthSelfHealing_BadPolicy

* Send token to outputchannel too

* Remove initial sink checks
2024-04-19 15:11:30 -04:00