Commit Graph

749 Commits

Author SHA1 Message Date
hc-github-team-es-release-engineering
2766fa2297 [DO NOT MERGE UNTIL EOY] EOY license fixes 1.13.x (#24391) 2024-01-02 10:35:40 -08:00
Hamid Ghaf
c19fea2527 Buffer body read up to MaxRequestSize (#24354) (#24365)
* Buffer body read up to MaxRequestSize (#24354)

* adding back a context
2023-12-04 17:45:17 -08:00
hc-github-team-secure-vault-core
0fe4970c06 fix -log-file so that it uses the correct name and only adds timestamps on rotation (#24297) (#24321)
* fix -log-file so that it uses the correct name and only adds timestamps on rotation

* added some tests for naming/rotation

* changelog

* revert to previous way of getting created time

* remove unused stat

* comment shuffle

* Update changelog/24297.txt



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

Update 'agent' docs page



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

Update 'proxy' docs page



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

Update 'server' docs page



* fix typos

---------

Co-authored-by: Peter Wilson <peter.wilson@hashicorp.com>
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2023-12-01 12:33:00 +00:00
Hamid Ghaf
e8ebe6b565 Revert "Automatically track subloggers in allLoggers (#22038)" (#24004)
This reverts commit 4c8cc87794.
2023-11-03 14:39:56 -07:00
hc-github-team-secure-vault-core
9a9f21ff67 backport of commit 4c8cc87794 (#22246)
Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>
2023-09-01 13:16:25 -04:00
Alexander Scheel
1c06cfbbc0 Bump go version to 1.20.7 on Vault 1.13.x (#22499)
* Bump go version to 1.20.7 on Vault 1.13.x

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>

* Fix Docker arguments incompatibility

See also: b6e0077a7f

Co-authored-by: vinay-gopalan <86625824+vinay-gopalan@users.noreply.github.com>
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: vinay-gopalan <86625824+vinay-gopalan@users.noreply.github.com>
2023-08-23 11:24:31 -04:00
hc-github-team-secure-vault-core
41a9f67abb Use Hashicorp docker proxy for CI docker images (#22195) (#22197)
* Use library/consul as the mirror path instead of hashicorp/consul

 - Looks like the older 1.4.4 image was not published within the
   hashicorp/consul space, only newer images are.
 - Switch to library/consul which seems to have both versions

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2023-08-03 14:18:12 -04:00
hc-github-team-secure-vault-core
6b68741911 backport of commit 9ace8751ff (#21726)
Co-authored-by: divyaac <divya.chandrasekaran@hashicorp.com>
2023-07-10 12:50:58 -07:00
hc-github-team-secure-vault-core
65f8e67ce8 backport of commit c5549cdac6 (#21271)
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
2023-06-16 12:32:51 -04:00
Mike Palmiotto
b4a9266b1f Bump protoc-gen-go to v1.29.1 (#21101) 2023-06-15 11:29:49 -04:00
Mike Palmiotto
fa4153dc1f backports for ActivityLog and Reporting 1.13.x (#21140)
* backport of commit 9f7f8d5bfa

* backport of commit e3c59773e9

* backport of commit b4fab6ac2a

* backport of commit 54904e4cd6

* backport of commit 4b6ec4079d

* backport of commit 05ba6bbddd

* backport of commit 002a59a370

* backport of commit 77f83d9fe8

* backport of commit 730d0e2821

* backport of commit 35e2c1665f

* backport of commit 810d504e4f

* backport of commit 5b23dd506f

* backport of commit 018ea84997

* backport of commit 541f18eeb7

* backport of commit b4e2751a09

* backport of commit dc5dd71c72

* backport of commit 5002489d27

---------

Co-authored-by: miagilepner <mia.epner@hashicorp.com>
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
2023-06-14 17:07:26 -04:00
Josh Black
3ef4a14a9e OSS changes for fixing bug in update-primary (#21119) (#21125)
* OSS changes for fixing bug in update-primary (#21119)

* whoops
2023-06-12 18:47:08 +00:00
hc-github-team-secure-vault-core
b3ff0d2a65 backport of commit c4e1753919 (#20632)
Co-authored-by: Rachel Culpepper <84159930+rculpepper@users.noreply.github.com>
2023-05-17 18:50:21 +00:00
hc-github-team-secure-vault-core
051475a3a8 backport of commit a19322d575 (#20452)
Co-authored-by: Peter Wilson <peter.wilson@hashicorp.com>
2023-05-01 20:06:58 +00:00
hc-github-team-secure-vault-core
1ed28d9589 backport of commit 2054ffcbfa (#20436)
Co-authored-by: Peter Wilson <peter.wilson@hashicorp.com>
2023-04-29 13:50:20 +00:00
hc-github-team-secure-vault-core
fc1bbf436f Backport of Add Configurable LDAP Max Page Size into release/1.13.x (#20283)
* Add Configurable LDAP Max Page Size (#19032)

* Add config flag for LDAP max page size

* Add changelog

* move changelog to correct file

* cleanup

* Default to non-paged searching for with -1

* Update website/content/api-docs/auth/ldap.mdx

Co-authored-by: Austin Gebauer <34121980+austingebauer@users.noreply.github.com>

* Update website/content/docs/auth/ldap.mdx

Co-authored-by: Austin Gebauer <34121980+austingebauer@users.noreply.github.com>

* Update tests

---------

Co-authored-by: Austin Gebauer <34121980+austingebauer@users.noreply.github.com>

* remove

---------

Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
Co-authored-by: Austin Gebauer <34121980+austingebauer@users.noreply.github.com>
2023-04-20 17:07:15 -05:00
hc-github-team-secure-vault-core
8fc7490d6e backport of commit 88cbf25afb (#19900)
Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
2023-04-17 18:56:24 +00:00
hc-github-team-secure-vault-core
f980e0b3d9 backport of commit 044efbca5e (#20077)
Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-04-11 15:00:38 +00:00
hc-github-team-secure-vault-core
9063cfe113 backport of commit 431b4243e7 (#19335)
Co-authored-by: Austin Gebauer <34121980+austingebauer@users.noreply.github.com>
2023-02-24 00:41:02 +00:00
hc-github-team-secure-vault-core
6a73f37ba4 backport of commit 20b347e3cd (#19315)
Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2023-02-23 19:29:52 +01:00
hc-github-team-secure-vault-core
dbdbe9547c backport of commit 063a782e2d (#19169)
Co-authored-by: Christopher Swenson <christopher.swenson@hashicorp.com>
2023-02-13 19:34:42 +00:00
Nick Cabatoff
192baa88db Make API not depend on SDK (#18962) 2023-02-06 09:41:56 -05:00
John-Michael Faircloth
f8e7acefca test/plugin: refactor compilePlugin for reuse (#18952)
* test/plugin: refactor compilePlugin for reuse

- move compilePlugin to helper package
- make NewTestCluster use compilePlugin

* do not overwrite plugin directory in CoreConfig if set

* fix getting plugin directory path for go build
2023-02-03 16:27:11 -06:00
Nick Cabatoff
970ed07b04 Vault test cluster helper refactorings, mostly audit related (#18928)
* Move some test helper stuff from the vault package to a new helper/testhelpers/corehelpers package.  Consolidate on a single "noop audit" implementation.
2023-02-01 08:33:16 -05:00
Nick Cabatoff
efa8c22f17 TestClusterCore's TLSConfig becomes a method and does a Clone. (#18914) 2023-01-31 11:05:16 -05:00
Hamid Ghaf
46b9921aae Allow Token Create Requests To Be Replicated (#18689)
* Allow Token Create Requests To Be Replicated

* adding a test

* revert a test
2023-01-24 14:00:27 -05:00
Hamid Ghaf
e18fd32946 named Login MFA methods (#18610)
* named MFA method configurations

* fix a test

* CL

* fix an issue with same config name different ID and add a test

* feedback

* feedback on test

* consistent use of passcode for all MFA methods (#18611)

* make use of passcode factor consistent for all MFA types

* improved type for MFA factors

* add method name to login CLI

* minor refactoring

* only accept MFA method name with its namespace path in the login request MFA header

* fix a bug

* fixing an ErrorOrNil return value

* more informative error message

* Apply suggestions from code review

Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>

* feedback

* test refactor a bit

* adding godoc for a test

* feedback

* remove sanitize method name

* guard a possbile nil ref

Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
2023-01-23 15:51:22 -05:00
Tom Proctor
398bfa960e Event system alpha experiment (#18795) 2023-01-23 19:26:49 +00:00
Tom Proctor
e36690e067 Add experiment system + events experiment (#18682) 2023-01-16 16:07:18 +00:00
Peter Wilson
8abcde7cbb VAULT-12264: Fix log rotation params which require an integer (#18666)
* integer values for some log flags
* Adjusted `log_flags` to expect `int` for max files and max bytes
* Updated `server` and `agent`
 Renamed updateConfig (and updateLogConfig)
* Added int log params to test
* Adjust config/params so we can identify when they're not present
* Removed pointer confusion
2023-01-11 20:04:57 +00:00
Ellie
49da2544ce add core state lock deadlock detection config option v2 (#18604)
* add core state lockd eadlock detection config option v2

* add changelog

* split out NewTestCluster function to maintain build flag

* replace long func with constant

* remove line

* rename file, and move where detect deadlock flag is set
2023-01-11 13:32:05 -06:00
Mike Palmiotto
31772c930b Mark deprecated builtins Removed (#18039)
* Remove logical database builtins

* Drop removed builtins from registry keys

* Update plugin prediction test

* Remove app-id builtin

* Add changelog
2023-01-09 09:16:35 -05:00
Chris Capurso
186ee31b10 Link OSS (#18228)
* add Link config, init, and capabilities

* add node status proto

* bump protoc version to 3.21.9

* make proto

* adding link tests

* remove wrapped link

* add changelog entry

* update changelog entry
2022-12-08 15:02:18 -05:00
Nick Cabatoff
35df9489c7 Move version out of SDK. (#14229)
Move version out of SDK.  For now it's a copy rather than move: the part not addressed by this change is sdk/helper/useragent.String, which we'll want to remove in favour of PluginString.  That will have to wait until we've removed uses of useragent.String from all builtins.
2022-12-07 13:29:51 -05:00
Peter Wilson
f80e788129 Only attempt rotation if files already exist when a Write is requested. (#18262) 2022-12-07 15:47:43 +00:00
Peter Wilson
075fdbae95 Updated go-hclog to v1.4.0 to allow access to GetLevel. Refactored TranslateLoggerLevel (#18260) 2022-12-07 14:25:54 +00:00
Peter Wilson
7b837edb1e Ensure base logging uses IndependentLevels (#18249) 2022-12-06 22:10:44 +00:00
Nick Cabatoff
c8cb303773 Create global quotas of each type in every NewTestCluster. (#18038)
Create global quotas of each type in every NewTestCluster.  Also switch some key locks to use DeadlockMutex to make it easier to discover deadlocks in testing.

NewTestCluster also now starts the cluster, and the Start method becomes a no-op.  Unless SkipInit is provided, we also wait for a node to become active, eliminating the need for WaitForActiveNode.  This was needed because otherwise we can't safely make the quota api call.  We can't do it in Start because Start doesn't return an error, and I didn't want to begin storing the testing object T instead TestCluster just so we could call t.Fatal inside Start. 

The last change here was to address the problem of how to skip setting up quotas when creating a cluster with a nonstandard handler that might not even implement the quotas endpoint.  The challenge is that because we were taking a func pointer to generate the real handler func, we didn't have any way to compare that func pointer to the standard handler-generating func http.Handler without creating a circular dependency between packages vault and http.  The solution was to pass a method instead of an anonymous func pointer so that we can do reflection on it.
2022-11-29 14:38:33 -05:00
Peter Wilson
2598651caf VAULT-9900: Log rotation for 'agent' and 'server' commands (#18031)
* Work to unify log-file for agent/server and add rotation
* Updates to rotation code, tried to centralise the log config setup
* logging + tests
* Move LogFile to ShareConfig in test
* Docs
2022-11-29 14:07:04 +00:00
Chris Capurso
1440b0bfc7 VAULT-9427: Add read support to sys/loggers endpoints (#17979)
* add logger->log-level str func

* ensure SetLogLevelByName accounts for duplicates

* add read handlers for sys/loggers endpoints

* add changelog entry

* update docs

* ignore base logger

* fix docs formatting issue

* add ReadOperation support to TestSystemBackend_Loggers

* add more robust checks to TestSystemBackend_Loggers

* add more robust checks to TestSystemBackend_LoggersByName

* check for empty name in delete handler
2022-11-28 11:18:36 -05:00
Alexander Scheel
b45180ac0b Add pki nginx/wget/curl/Go integration tests (#17320)
* Rename integation_test.go->integration_test.go

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

* Add ability to fetch container's network addresses

This lets us return the on-network container address, allowing us to
spawn client containers which contact server containers.

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

* Add integration tests with nginx, curl, wget, Go

We build new integration tests, spawning a test instance on nginx and
ensuring we can connect with a variety of clients against a variety of
CA and leaf certificate types. This will ultimately let us detect issues
with compatibility as we expand the matrix of supported servers and
clients.

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

* Make runner reference unique

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

* Attempt to fix CI with longer wait

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

* Finish moving nginx tests to pkiext package

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

* make fmt

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

* Add more debugging, work on CircleCI

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

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2022-11-23 15:00:18 -05:00
Tom Proctor
3c95f15cea Remove pinned builtin plugin versions from storage (#18051)
* Removes _builtin_ versions from mount storage where it already exists
* Stops new builtin versions being put into storage on mount creation/tuning
* Stops the plugin catalog from returning a builtin plugin that has been overridden, so it more accurately reflects the plugins that are available to actually run
2022-11-23 18:36:25 +00:00
Michael Anthony
f91bebcb18 [QT-309] Ensure environment variables are populated before proceeding (#17915)
* Ensure environment variables are populated before proceeding

* DRY up credNames var
2022-11-17 11:55:17 -07:00
Peter Wilson
7ae65df94e VAULT-8732: Add log-file to Vault Agent (#17841)
* Started work on adding log-file support to Agent
* Allow log file to be picked up and appended
* Use NewLogFile everywhere
* Tried to pull out the config aggregation from Agent.Run

Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
2022-11-11 10:59:16 +00:00
Mike Palmiotto
5d481e282c Bump up period and skew to prevent timeouts (#17804)
Give the default SetupLoginMFATOTP helper a more robust period/skew. 403 failures on test-go-race are likely due to TOTP code timeouts being too aggressive.
2022-11-03 11:57:25 -04:00
Alexander Scheel
881a38034c Use hashicorp mirror for container pulls (#17778)
When running the test suite in CI (where requests are centralized from
relatively few IPs), we'd occasionally hit Dockerhub's rate limits.
Luckily Hashicorp runs a (limited) public mirror of the containers we
need, so we can switch to them here in the tests.

For consistency between developer and CI, we've opted to have the tests
always pull from the Hashicorp mirror, rather than updating the CI
runner to prefer the mirror.

We exclude nomad and influxdb as we don't presently mirror these repos.

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

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2022-11-02 13:33:17 -04:00
Milena Zlaticanin
2a1753a469 Fix tests - Update MongoDB driver (#17662)
* Fix tests - Update MongoDB driver

* increase timeout and disconnect client after ping

* increase timeout

* disconnect client after the ping
2022-10-27 15:48:33 -05:00
Mike Palmiotto
1075ac42d4 Tweak totp test to fix race failures (#17692) 2022-10-27 09:41:40 -04:00
akshya96
0423ffbe24 update protoc version to 3.21.7 oss (#17499)
* update protoc to 3.21.7

* adding changelog
2022-10-26 16:49:44 -07:00
Mike Palmiotto
1a2ee3ab33 Store login MFA secret with tokenhelper (#17040)
* Store login MFA secret with tokenhelper
* Clean up and refactor tokenhelper paths
* Refactor totp test code for re-use
* Add login MFA command tests
* Use longer sleep times and sha512 for totp test
* Add changelog
2022-10-26 17:02:26 -04:00