Commit graph

19318 commits

Author SHA1 Message Date
Robert
5fac327dae
Secrets Import documentation (#25594)
* Start import docs

* Use hideClipboard block on output

* Reorganize mappings and source docs

* Change experimental to alpha

* Change list tag to alpha

* Apply suggestions from code review

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2024-03-27 09:35:29 -05:00
Paul Banks
c605d1a846
Plumbing to support mount table path registration (#26176) 2024-03-27 13:25:31 +00:00
Christopher Swenson
a65d9133a1
database: Avoid race condition in connection creation (#26147)
When creating database connections, there is a race
condition when multiple goroutines try to create the
connection at the same time. This happens, for
example, on leadership changes in a cluster.

Normally, the extra database connections are cleaned
up when this is detected. However, some database
implementations, notably Postgres, do not seem to
clean up in a timely manner, and can leak in these
scenarios.

To fix this, we create a global lock when creating
database connections to prevent multiple connections
from being created at the same time.

We also clean up the logic at the end so that
if (somehow) we ended up creating an additional
connection, we use the existing one rather than
the new one. This by itself would solve our
problem long-term, however, would still involve
many transient database connections being created
and immediately killed on leadership changes.

It's not ideal to have a single global lock for
database connection creation. Some potential
alternatives:

* a map of locks from the connection name to the lock.
  The biggest downside is the we probably will want to
  garbage collect this map so that we don't have an
  unbounded number of locks.
* a small pool of locks, where we hash the connection
  names to pick the lock. Using such a pool generally
  is a good way to introduce deadlock, but since we
  will only use it in a specific case, and the purpose
  is to improve performance for concurrent connection
  creation, this is probably acceptable.

Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>
2024-03-26 16:58:07 +00:00
Peter Wilson
7bd75eb858
Known issues: Vault Enterprise - Performance Standby nodes audit log all request headers (#26158)
* Add known issue docs for Ent Perf Standby audit header logging issue

* attempt to improve description
2024-03-26 14:54:11 +00:00
Peter Wilson
54e19c50d5
Audit: remove any race to read headers (#26155)
* adjust code to prevent any data race in reading audited headers

* header tests

* Comment improvement

* make fmt 'fix' for unrelated file
2024-03-26 09:22:13 -04:00
miagilepner
1885f16d8b
Add make clean command (#26150) 2024-03-26 10:30:30 +00:00
Robert
483dd209f6
Overwrite restrictions documentation for GCP (#25645)
* Move secret write access conditions info to each destination page, reword index to match

* Add condition info for GCP

* Remove unrelated note copied from AWS

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

* Link to individual access control sections, rename section titles, make tip more specific

* Add image showing where to add IAM Conditions

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2024-03-25 18:51:12 -05:00
Josh Black
6d69761751
raft-wal docs (#25572)
* starting on docs

* add docs for raft-wal

* some tweaks

* Apply suggestions from code review

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

* Edits for Raft WAL (#26123)

* not just one filename

* update file pattern for wal files

---------

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2024-03-25 16:42:48 -07:00
aphorise
7bb5561b58
Docs: Policy Syntax page to include UI details. (#25449)
Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2024-03-25 22:45:01 +00:00
akshya96
5a889711c6
Change minimum retention window CE changes (#26118)
* Retention window oss changes

* latest oss changes

* remove operator_diagnose change
2024-03-25 14:49:57 -07:00
gerardma77
d9b840c627
changing vault.audit.log_response_failure metric doc (#26038)
* changing log_response_failure metric doc

* Update website/content/partials/telemetry-metrics/vault/audit/log_response_failure.mdx

Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>

---------

Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2024-03-25 14:16:39 -07:00
claire bontempo
d0a7560d3b
move templates to component directory (#26139) 2024-03-25 12:14:47 -07:00
claire bontempo
37140c1b4f
remove resolutions that were no longer in yarn.lock file (#26127) 2024-03-25 11:48:32 -07:00
Chelsea Shaw
5c18a4e7a4
UI: Ember deprecation - addObject, removeObject (#25952)
* Update add-to-array and remove-from-array helpers

* remove search-select-has-many, moved logic directly into mfa-login-enforcement-form (see #16470)

* Replace add/remove object in MFA files - All MFA tests pass

* Replace in PKI components (pki tests all passing)

* Replace in core addon where applicable

* glimmerize console service -- console tests pass

* more replacements

* update string-list, add comment to vertical-bar-chart

* Refactor CSP Event service

- only used one place (auth-form) so simplified that usage
- glimmerize and refactor so that the tests work

* small updates

* more cleanup

* Fix tests

* Remove objectAt from console-helpers

* Address PR comments

* move commandIndex clearing back

* Remove extra model set
2024-03-25 18:31:31 +00:00
Christopher Swenson
74c350474b
docs: Adding events to a plugin (#26083)
This adds a short doc describing the basic process
of adding event notifications to a plugin as well
as some examples and best practices.

Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
2024-03-25 16:50:49 +00:00
miagilepner
ec0b17d31c
VAULT-20400: Validate azure container and account name (#26135)
* add verification

* tests

* changelog

* fix container name for tests
2024-03-25 17:32:58 +01:00
Violet Hynes
da00addcb6
VAULT-20396 Add limit of 100,000 to string templates (#26110)
* VAULT-20396 Add size limit to sdk string templates

* VAULT-20396 wording changes

* VAULT-20396 changelog
2024-03-25 10:04:12 -04:00
Noelle Daley
792eb3b8c3
tests: remove incorrect dom assertion (#26131) 2024-03-22 17:42:05 -07:00
Hansanto
49014b29e0
doc: Add kault library reference (#26111)
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2024-03-22 15:26:17 -07:00
Yoko Hyakuna
de7c905477
[Docs] Remove 'Beta' badge for Secrets Sync (#26116)
* Remove the beta badge

* Remove the 'beta' badge & callout
2024-03-22 15:03:27 -07:00
Jamie Wright
20c58ad038
Clarify wrapping token language (#26086) 2024-03-22 14:48:47 -07:00
Sarah Chavis
f661f4354c
Add UI policy notes partial and include in overview (#25956) 2024-03-22 14:24:12 -07:00
Max Coulombe
fa469f8bdc
- removed beta badges (#26120) 2024-03-22 17:00:30 -04:00
claire bontempo
3df09357b2
UI: Follow on sync updates for 1.16 GA (#26114)
* hide sync average stat when sync average is 0

* add bug fix for community users without billing start date

* VAULT-25315 link jira

* add CE stub for sync test

* cleanup template to only calculate average once

* fix comment

* add test

* fix conditional
2024-03-22 20:48:49 +00:00
Angel Garbarino
7b939bdbfd
change doc link to anchored tag. (#26113) 2024-03-22 13:55:18 -06:00
Angel Garbarino
a953a3cade
Secret Sync Permissions cleanup (#26069)
* add secrets sync feature to version service

* fix syntax for feature in version service

* UI [Sidebranch]: correctly call activation flags endpoints (#26068)

* Show empty state on client count sync page if feature isn't activated (#26024)

* page/sync: show empty state if sync is not activated

* tests: add sync page integration tests

* tests: add secrets sync acceptance tests

* cleanup: remove redundant empty state selector

* chore: rename to isSecretsSyncActivated

* Only make POST request to activation-flags in root namespace (#26081)

* Clean up around opt-in banner on non-secrets-sync views (#26039)

* only show and make request to activated-features  if enterprise with secrets sync feature

* waiting for final badge title but hiding banner and network request based on if user has secrets-sync feature.

* final copy for badge

* handle dismiss erorr message, custom messaging in errors, different badge names and upsell if not on license.

* add secrets sync feature to version service

* nope, add to main sidebranch not in this PR

* use version service directly to check for secrets sync feature

* update badges to use version service directly

* do not unnecessarily pass hasSecretsSyncFeature, access from version directly

* last spot to update using the feature getter

* cleanup landing cta logic

* UI [Sidebranch]: correctly call activation flags endpoints (#26068)

* small cleanups after merge

* remove unused type imports

* update tests

* update nav link test

* add test waiter for race condition on test

* add waiter to fetch activation-flags

* remove customer waiters and go for waitFors in test

* worth a try? mirage issues?

* closer?

* fix issue with inconsistent asserts

* adding back in in case this is the issue

* revert cluster.hbs change

* skip test

* delete test

---------

Co-authored-by: clairebontempo@gmail.com <clairebontempo@gmail.com>
Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>

* Hide sync for managed vault (#26084)

* [secrets sync] hide sync content from client overview (#26078)

* clients/overview: hide secrets sync content if not in license

* clients: remove sync tab if not in license

* routes: fetch isSecretsSyncActivated at clients/counts route level

* wip - hide secrets sync from overview page

* tests: fix usage-stats test

* more wip hiding from overview page

* hide secrets sync on attribution component/modal

* hide secrets sync content on running total component

* fix RunningTotal class name

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* controllers: fix type

* tests: usage tests

* tests: running totals tests

* add s to secrets-sync

* tests: running-total test cleanup

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
Co-authored-by: clairebontempo@gmail.com <clairebontempo@gmail.com>

* cleanup unused version service

* return extra line

* wip - sync tests

* wip -- clients overview acceptance tests

* test coverage for sync in license, activated

* tests: add more robust sync-related overview tests

* hide sync client charts if feature not in license

---------

Co-authored-by: clairebontempo@gmail.com <clairebontempo@gmail.com>
Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>
Co-authored-by: Noelle Daley <noelledaley@users.noreply.github.com>
Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
Co-authored-by: Chelsea Shaw <cshaw@hashicorp.com>
2024-03-22 14:07:09 -05:00
BiKangNing
f8ad26c89f
chore: fix function names (#26087)
Signed-off-by: depthlending <bikangning@outlook.com>
Co-authored-by: Chris Capurso <1036769+ccapurso@users.noreply.github.com>
2024-03-22 12:43:01 -04:00
Rachel Culpepper
f7301bc5fa
add check for enable_multiseal with sighup (#26105) 2024-03-22 11:21:32 -05:00
Karuppiah Natarajan
30667916b7
fix link to specifying ttl and audience section of kubernetes oidc provider (#26097) 2024-03-22 12:21:17 -04:00
Victor Rodriguez
b112eb9877
Reload seals if necessary when a node gains leadership. (#26098)
As part of the process of becoming a leader node, check to see if the seal
configuration needs to be reloaded. Reloading may be necessary if the seal
generation information computed during start up is outdated. For example, a new
node that has just joined the cluster will have incorrect seal generation
information in memory, even if it has the correct seal configuration, since it
did not have access to the stored seal generation information.
2024-03-22 15:51:42 +00:00
Scott Miller
c6da02962d
Add a configuration flag for enabling multiseal (Seal HA), CE side (#25908)
* Add a configuration flag for enabling multiseal (Seal HA), CE side

* imports

* no quotes

* get rid of dep on ent config

* Abstract enableMultiSeal for a build time switch

* license headers

* wip

* gate physical seal gen fetch by a param

* docs tweak, remove core flag

* updates from the ent pr

* update stub

* update test fixtures for enable_multiseal

* use accessor

* add a test fixture for non-multiseal diagnose

* remove debugging crtuch

* Do handle phys seal gen info even if multiseal is off, in order to facilitate enable/disable safeties

* more enabled flag handling

* Accept seal gen info if we were previously disabled, and persist it

* update unit test

* Validation happens postUnseal, so this test is invalid

* Dont continue setting conf if seal loading fails during SIGHUP

* Update website/content/docs/configuration/seal/seal-ha.mdx

Thanks, that does sound much clearer

Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>

* use validation if previous gen was enabled

* unit test update

* stub SetMultisealEnabled

* bring over more changes from ent

* this was an unfix

---------

Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>
2024-03-22 14:23:05 +00:00
Steven Clark
2fe676e75b
Validate OCSP response is signed by expected issuer (#26091)
* Validate OCSP response is signed by expected issuer and serial number matches request

 - There was a bug in the OCSP response signature logic, it properly
   verified but kept around the ocspRes object around so we ignored
   the errors found and passed the response object back up the stack.
 - Now extract the verification logic into a dedicated function, if
   it returns an error, blank the ocspRes response as we can't trust it.
 - Address an issue that the OCSP requests from multiple servers were
   clobbering each others responses as the index loop variable was not
   properly captured.
 - Add a missing validation that the response was for the serial number
    we requested

* Add cl
2024-03-22 09:28:02 -04:00
Peter Wilson
5a1d20bd35
Audit: Timestamps on sink entries should match the creation time of the audit event (#26088)
* Sync timestamps in sinks to the creation time of the audit entry (event)

* changelog
2024-03-22 13:26:55 +00:00
Scott Miller
14816dcf86
Be explicit about Shamir seals in Seal HA (#26092) 2024-03-22 09:25:20 -04:00
miagilepner
f2cd7e2c32
VAULT-24581: Generalize activity log tests to run for all client types (#26071)
* generalize tests for all client types

* fix godoc
2024-03-22 10:19:23 +01:00
Robert
c647835af9
Add new ent stub for unauthenticated paths (#26079)
* Add new ent stub for unauthenticated paths
2024-03-21 16:52:37 -05:00
Chelsea Shaw
6091ad4f71
Remove internal version endpoint (#25998)
* VAULT-24469 use sys/seal-status instead of internal version endpoint

* Update tests and mirage handlers

* Revert "VAULT-20669: Add New Authenticated Endpoint for Version  (#23740)"

This reverts commit 550c99ae3b.

* Readded version_test.go

* Reverted any old changes on versionlgo

---------

Co-authored-by: divyaac <divyaac@berkeley.edu>
2024-03-21 09:14:22 -07:00
Violet Hynes
0048a205ce
VAULT-20396 CE side changes for identity test-identified issue (#26072)
* VAULT-20396 CE side changes for identity test-identified issue

* Weird git stuff
2024-03-21 11:16:35 -04:00
John-Michael Faircloth
69fd338c78
fix plugin update check pr num fetching (#26066) 2024-03-20 18:57:42 +00:00
Paul Banks
fc0abf2d9f
Remove CE-only warning from shared tests (#26052)
* Remove CE-only warning from shared tests

* Add tests for all warnings emitted during raft config parsing

* Unmark warnings as CE only that are universal
2024-03-20 17:08:33 +00:00
Peter Wilson
f706c20084
VAULT-15682: Audit request header invalidation (#26043)
* Update audited headers to provide a mechanism for invalidation
* Extra tests for AuditedHeadersConfig
* Make sure we clear headers on invalidation if we cannot reload
2024-03-20 16:33:03 +00:00
Ciara Clements
89c9f86f22
Update upgrade-to-1.13.x.mdx (#25990)
Changed the wording of "For integrated storage users, Vault needs to be upgraded to 1.13 will enable this feature by default." to be more clear and concise to "For integrated storage users, upgrading Vault to 1.13 will enable this feature by default."
2024-03-20 08:17:00 -07:00
mickael-hc
55b4f1c42f
docs: secrets-sync - move destination note (#26044) 2024-03-20 10:54:43 -04:00
Wes Gilleland
3106f26474
Fix small typo in troubleshooting-acme.mdx (#24547)
* Fix small typo in troubleshooting-acme.mdx

* Create changelog/24547.txt

* Delete changelog/24547.txt

---------

Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2024-03-20 09:16:19 -04:00
miagilepner
3c3c0d48db
Add stubs for new raft methods (#26051) 2024-03-20 10:44:39 +01:00
claire bontempo
4e85411dd0
add to resolutions block (#26041) 2024-03-19 17:45:58 -07:00
claire bontempo
3adcf19f18
UI: resolve dependabot socket.io parser vulnerability (actually) (#26042)
* add to resolutions block

* fix typo for resolution pacakge ~face palm~

* Revert "add to resolutions block"

This reverts commit 42acc8b192.
2024-03-19 15:10:51 -07:00
Noelle Daley
76d51dcf61
tests: add more confirm-modal test coverage / remove flaky test (#26040) 2024-03-19 10:55:37 -07:00
Paul Banks
3a2a922b26
Raft config refactor for mount entry size limit (#25992)
* CE parts for mount-namespace entry limit

* Remove redundant code from refactor

* Add doc comment note about ent-only use of interface

* Add CHANGELOG
2024-03-19 17:28:23 +00:00
Josh Black
012c3422f8
Add acme clients internal data structures and adjust tests (#26020)
* add acme clients internal data structures and adjust tests

* fix another acme test

* replace manual list with ActivityClientTypes

* add changelog
2024-03-19 09:24:54 -07:00