Commit Graph

18103 Commits

Author SHA1 Message Date
Christopher Swenson
022469da45 events: WebSocket subscriptions support go-bexpr expressions (#22835)
Subscribing to events through a WebSocket now support boolean
expressions to filter only the events wanted based on the fields

* `event_type`
* `operation`
* `source_plugin_mount`
* `data_path`
* `namespace`

Example expressions:

These can be passed to `vault events subscribe`, e.g.,:
* `event_type == abc`
* `source_plugin_mount == secret/`
* `event_type != def and operation != write`

```sh
vault events subscribe -filter='source_plugin_mount == secret/' 'kv*'
```

The docs for the `vault events subscribe` command and API endpoint
will be coming shortly in a different PR, and will include a better
specification for these expressions, similar to (or linking to)
https://developer.hashicorp.com/boundary/docs/concepts/filtering
2023-09-07 20:11:53 +00:00
Kuba Wieczorek
3130e8ba94 [VAULT-1324] Fix the CLI failing to return wrapping information for KV PUT and PATCH operations when format is set to 'table' (#22818) 2023-09-07 20:43:57 +01:00
hc-github-team-secure-vault-core
db662131e7 Update hashicorp/vault-plugin-secrets-ad to v0.16.1 (#22856)
---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
Co-authored-by: Thy Ton <maithytonn@gmail.com>
2023-09-07 12:03:28 -07:00
Christopher Swenson
7f7907d3a0 events: Enable by default, disable flag (#22815)
The flag `events.alpha1` will no longer do anything, but we keep it
to prevent breaking users who have it in their configurations or
startup flags, or if it is referenced in other code.
2023-09-07 18:27:14 +00:00
hc-github-team-secure-vault-core
9af1c4a183 Update hashicorp/vault-plugin-database-couchbase to v0.9.3 (#22854)
---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-09-07 11:18:05 -07:00
Christopher Swenson
81f30d26e4 events: remove flaky test (#22808)
The more I looked at this test, the more I realized it wasn't testing
anything except that the namespace parameter was being parsed by the
websocket.

So, I moved that parameter parsing check to `TestEventsSubscribe()`,
which is not flaky, and removed the flaky test altogether.

There is a similar set of tests in the enterprise repo that I will
try to simplify and make less flaky, though.
2023-09-07 11:03:41 -07:00
Jordan Reimer
62b1e39acc fixes issue checking in ldap library account from overview (#22853) 2023-09-07 11:57:37 -06:00
Jordan Reimer
17f5aeb0a1 disables ldap library and role name fields when editing (#22849) 2023-09-07 09:51:17 -06:00
Jordan Reimer
18101d3514 fixes issue using removeObject on array proxy when deleting ldap libraries and roles (#22844) 2023-09-07 08:53:19 -06:00
miagilepner
5ab88a076b [VAULT-15398] Activity log data generation fixes (#22752) 2023-09-07 10:53:29 +02:00
Thy Ton
953f6cd818 Vault 18538 reference runtime on plugin register (#22744)
---------

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
2023-09-06 23:37:10 -07:00
Scott Miller
28bdfe6c14 Update go-kms-wrapping dependencies for community (#22833) 2023-09-06 21:59:00 -04:00
Jordan Reimer
068a57c204 Form Field Tooltip Alignment (#22832)
* fixes alignment issues with form field labels that have tooltips

* adds gap to is-label to preserve tooltip spacing

* adds changelog entry
2023-09-06 22:14:17 +00:00
kpcraig
2172786316 Add support for IAM Auth for Google CloudSQL DBs (#22445) 2023-09-06 14:40:39 -07:00
Chelsea Shaw
2ca784ad11 UI: Show error if tool action is not recognized (#22821) 2023-09-06 15:29:35 -05:00
Ryan Cragun
862b7dbb95 fmt: fix formatting (#22826)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-09-06 20:28:17 +00:00
hc-github-team-secure-vault-core
868906d47a Update hashicorp/vault-plugin-secrets-kubernetes to v0.6.0 (#22823)
* Automated dependency upgrades

* Add changelog

* fix typo

* gofumpt fix

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
Co-authored-by: robmonte <17119716+robmonte@users.noreply.github.com>
2023-09-06 20:27:06 +00:00
hc-github-team-secure-vault-core
4436c24b34 Update hashicorp/vault-plugin-secrets-azure to v0.16.3 (#22824)
* 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-09-06 20:08:41 +00:00
hc-github-team-secure-vault-core
16654d7242 Update hashicorp/vault-plugin-auth-oci to v0.14.2 (#22805)
* 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-09-06 09:53:23 -07:00
hc-github-team-secure-vault-core
35fd8f3496 Update hashicorp/vault-plugin-secrets-azure to v0.16.2 (#22799)
* 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-09-06 16:38:46 +00:00
hc-github-team-secure-vault-core
1e414cf6a2 Update hashicorp/vault-plugin-auth-kerberos to v0.10.1 (#22797)
* 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-09-06 16:17:21 +00:00
Sarah Thompson
a9a4b0b9ff Onboard Vault to CRT version bump automation (#18311)
* adding new version bump refactoring

* address comments

* remove changes used for testing

* add the version bump event!

* fix local enos scenarios

* remove unnecessary local get_local_metadata steps from scenarios
* add version base, pre, and meta to the get_local_metadata module
* use the get_local_metadata module in the local builder for version
  metadata
* update the version verifier to always require a build date

Signed-off-by: Ryan Cragun <me@ryan.ec>

* Update to embed the base version from the VERSION file directly into version.go.
This ensures that any go tests can use the same (valid) version as CI and so can local builds and local enos runs.
We still want to be able to set a default metadata value in version_base.go as this is not something that we set in the VERSION file - we pass this in as an ldflag in CI (matters more for ENT but we want to keep these files in sync across repos).

* update comment

* fixing bad merge

* removing actions-go-build as it won't work with the latest go caching changes

* fix logic for getting version in enos-lint.yml

* fix version number

* removing unneeded module

---------

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Claire <claire@hashicorp.com>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-09-06 17:08:48 +01:00
hc-github-team-secure-vault-core
18a1bece15 Update hashicorp/vault-plugin-auth-azure to v0.16.1 (#22795)
* 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-09-06 16:07:41 +00:00
Victor Rodriguez
f97822da31 Skip unhealthy seal wrappers when performing encryption or decryption. (#22791)
Add timeout to Access.Encrypt() to allow for partial success.

Start goroutines for each of the seal wrappers to encrypt values. After a
timeout, return any successful encryption results and errors for those that
failed or did not complete on time.

Return from Access.Decrypt() on first successful result.

Start goroutines for each of the seal wrappers to decrypt values, and return on
the first successful result.

Start the highest priority wrapper immediately, and the rest after a delay to
give it a head start.
2023-09-06 15:49:49 +00:00
Max Coulombe
ac009ab27a * bumped kv plugin (#22790)
+ changelog
2023-09-06 11:07:48 -04:00
Christopher Swenson
f0a23e117f events: Continuously verify policies (#22705)
Previously, when a user initiated a websocket subscription,
the access to the `sys/events/subscribe` endpoint was checked then,
and only once.

Now, perform continuous policy checks:

* We check access to the `sys/events/subscribe` endpoint every five
  minutes. If this check fails, then the websocket is terminated.
* Upon receiving any message, we verify that the `subscribe`
  capability is present for that namespace, data path, and event type.
  If it is not, then the message is not delivered. If the message is
  allowed, we cache that result for five minutes.

Tests for this are in a separate enterprise PR.

Documentation will be updated in another PR.

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
2023-09-05 16:28:09 -07:00
Josh Black
545b6e4eae bump version to 1.16 beta1 (#22783) 2023-09-05 22:16:29 +00:00
Kianna
00331b742e UI: [VAULT-19478] Fix info table row value overflow (#22776) 2023-09-05 14:52:14 -07:00
Kianna
2cd8f59845 [VAULT-19341] convert secrets engines, learn more to ts and fix date bug (#22762) 2023-09-05 14:44:20 -07:00
hc-github-team-secure-vault-core
824a8a5901 Update hashicorp/vault-plugin-auth-oci to v0.14.1 (#22774)
* 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-09-05 13:30:06 -07:00
Angel Garbarino
83216b54c0 make change and change test (#22773) 2023-09-05 14:06:24 -06:00
Josh Black
1e34eb5ef8 update vault auth submodules to api/v1.10.0 (#22772) api/auth/userpass/v0.5.0 api/auth/approle/v0.5.0 api/auth/aws/v0.5.0 api/auth/azure/v0.5.0 api/auth/gcp/v0.5.0 api/auth/ldap/v0.5.0 api/auth/kubernetes/v0.5.0 2023-09-05 18:57:10 +00:00
Josh Black
23932dee23 Use new sdk and api versions (#22771) 2023-09-05 18:37:17 +00:00
Divya Pola
dcb7083260 Validate seal generation info only if beta flag is enabled (#22741) 2023-09-05 13:13:43 -05:00
hc-github-team-secure-vault-core
b97ec49125 Update hashicorp/vault-plugin-secrets-gcpkms to v0.15.1 (#22757)
* Automated dependency upgrades

* Add changelog

---------

Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
api/v1.10.0 sdk/v0.10.0
2023-09-05 15:27:46 +00:00
Cinthia Conti
fcd6f01761 UI: [VAULT-18126] adding style to prevent namespace to overflow on sidebar (#22733)
* adding style to prevent namespace to overflow

* adding helper css classes

* adding changelog entry

* removing namespace-name class in favour of helper classes

* style cleanup

* removing identation
2023-09-05 11:04:08 -04:00
hc-github-team-secure-vault-core
dc896a5aa1 Update hashicorp/vault-plugin-auth-cf to v0.15.1 (#22758)
* 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-09-05 14:53:20 +00:00
Alexander Scheel
f150a52593 Fix transit panic with invalid PEM (#22753)
* Fix transit panic with invalid PEM

When an invalid (non-PEM) public key is given to Transit's import, this
fails with a panic in server logs:

    2023-09-05T08:11:11.526-0400 [INFO]  http: panic serving 127.0.0.1:42414: runtime error: invalid memory address or nil pointer dereference
    goroutine 950 [running]:
    net/http.(*conn).serve.func1()
	    /usr/local/go/src/net/http/server.go:1868 +0xb9
    panic({0x8371620?, 0x1050b390?})
	    /usr/local/go/src/runtime/panic.go:920 +0x270
    github.com/hashicorp/vault/sdk/helper/keysutil.(*Policy).ImportPublicOrPrivate(0xc003fff440, {0xaf02918, 0xc004509920}, {0xaf03670, 0xc0032e4180}, {0xc004532ea0, 0x188, 0x1a0}, 0x0, {0xae7f5e0, ...})
	    /home/cipherboy/GitHub/cipherboy/vault/sdk/helper/keysutil/policy.go:1538 +0x687
    github.com/hashicorp/vault/sdk/helper/keysutil.(*LockManager).ImportPolicy(0xc001a29410, {0xaf02918, 0xc004509920}, {{0xaf03670, 0xc0032e4180}, {0xc003eb5ab5, 0xb}, 0x3, 0x0, 0x0, ...}, ...)
	    /home/cipherboy/GitHub/cipherboy/vault/sdk/helper/keysutil/lock_manager.go:517 +0x38a

This is unfortunate and doesn't reveal the cause of the failure: input
was not provided in PEM format, per docs.

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

* Fix additional PEM decode without error check

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

* Add changelog entry

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

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-09-05 14:32:20 +00:00
Steven Clark
a7c2b15f4e Improve transit import command error handling (#22755)
- Doubtful this will ever happen in real life
 - We would nil panic if the public_key field was not present in the
   wrapping key response
 - Also trap a casting error if the public key was not an RSA public key
2023-09-05 10:04:37 -04:00
miagilepner
de043d6736 Fix flaky rollback test (#22754)
* fix flaky rollback test

* better fix

* switch to defer

* add comment
2023-09-05 13:44:40 +00:00
miagilepner
4e3b91d91f [VAULT-17827] Rollback manager worker pool (#22567)
* workerpool implementation

* rollback tests

* website documentation

* add changelog

* fix failing test
2023-09-04 15:48:09 +02:00
hc-github-team-secure-vault-core
c25e1a5fd4 Update hashicorp/vault-plugin-secrets-mongodbatlas to v0.10.1 (#22748)
* 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-09-01 15:08:39 -07:00
hc-github-team-secure-vault-core
f3c0bfeb5d Update hashicorp/vault-plugin-secrets-gcp to v0.17.0 (#22746)
Co-authored-by: hc-github-team-secure-vault-ecosystem <hc-github-team-secure-vault-ecosystem@users.noreply.github.com>
2023-09-01 20:40:44 +00:00
Tom Proctor
d5b223424d Revert "Pin security scan's semgrep version to 1.37.0 (#22731)" (#22745)
This reverts commit 9808578086.

Previous issue fixed in returntocorp/semgrep#8604, released in 1.38.1
2023-09-01 20:32:48 +00:00
Josh Black
dbf094940f Add more docs for update-primary (#22677)
* add more docs for update-primary

* Update website/content/api-docs/system/replication/replication-dr.mdx

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

* Update website/content/api-docs/system/replication/replication-dr.mdx

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

* Update website/content/api-docs/system/replication/replication-dr.mdx

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

* Update website/content/api-docs/system/replication/replication-performance.mdx

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

* Update website/content/api-docs/system/replication/replication-performance.mdx

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

* PR feedback

* Apply suggestions from code review

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

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2023-09-01 12:42:46 -07:00
Victor Rodriguez
5dc85c58c1 Protect SealWrapper health fields (#22740)
* Create accessors for SealWrapper fields protecteb by the lock.

* Use NewSealWrapper constructor to create all seal wrappers.
2023-09-01 14:38:11 -04:00
Tom Proctor
07e76196ba Support running plugins in isolated containers (#22712)
Implements running plugins in containers to give them some degree
of isolation from the main Vault process and other plugins. It only
supports running on Linux initially, where it is easiest to manage unix
socket communication across the container boundary.

Additionally

* Adds -env arg to vault plugin register.
* Don't return env from 'vault plugin info'

Historically it's been omitted, and it could conceivably have secret information in
it, so if we want to return it in the response, it should probably only be via explicit
opt-in. Skipping for now though as it's not the main purpose of the commit.
2023-09-01 17:55:17 +00:00
Thy Ton
c26aa9cb9e add copyright header (#22739) 2023-09-01 17:42:02 +00:00
Peter Wilson
3eba73892b Eventbus related refactoring (#22732)
* refactored test to try and see if we can solve flakey test errors

* refactored code for readability

* don't defer in a for loop
2023-09-01 17:00:37 +00:00
Sarah Chavis
133e9ac793 Add WAF links and remove tip notation from guide (#22710) 2023-09-01 12:51:32 -04:00