Commit Graph

18722 Commits

Author SHA1 Message Date
Peter Wilson
2d01ba635d VAULT-20476: vault.NewCore refactor. (#23644)
* NewCore tech debt refactoring

* addExtraCredentialBackends

* singletonMounts => mountTypeToken instead of 'token'

* NewCore tests support ent backend addition

* PR feedback

* reorder method calls

* mounthPath___ standardization

* Try to be more explicit about the min number of backends

* Include cluster listener

* explicit declaration of events before assignment

* Removed nil checking

* resolve conflicts
2023-10-14 17:56:09 +01:00
claire bontempo
676ed96a6c minor doc fixes (#23656) 2023-10-13 21:55:19 -04:00
claire bontempo
9197f002eb fix repository typo (#23654) 2023-10-13 13:39:31 -07:00
Nick Cabatoff
b5c4e41de7 For now, go back to the hook approach for addExternalPlugins. I've broken many tests on ent that relied on a broken behaviour. I'll fix them properly later, for now I want to unbreak the build. (#23652) 2023-10-13 20:26:58 +00:00
Marc Boudreau
9a6294fbdb copy disable_replication_status_endpoints context value from request context to active context (#23650) 2023-10-13 16:02:19 -04:00
Marc Boudreau
4e22153987 VAULT-19869: Use Custom Types for Context Keys (#23649)
* create custom type for disable-replication-status-endpoints context key
make use of custom context key type in middleware function

* clean up code to remove various compiler warnings
unnecessary return statement
if condition that is always true
fix use of deprecated ioutil.NopCloser
empty if block

* remove unused unexported function

* clean up code
remove unnecessary nil check around a range expression

* clean up code
removed redundant return statement

* use http.StatusTemporaryRedirect constant instead of literal integer

* create custom type for context key for max_request_size parameter

* create custom type for context key for original request path
2023-10-13 14:04:26 -04:00
Nick Cabatoff
67d743e273 Step 3 of part 3 of removing ent init hooks: call stubs instead of var func hooks. (#23646) 2023-10-13 13:36:15 -04:00
Theron Voran
fb1a012575 docs/k8s-versions: updating supported k8s versions (#23645)
Dropping 1.23 and adding 1.28
2023-10-13 10:05:26 -07:00
Angel Garbarino
27170b662d Replace KV v2 List route with wildcard instead of dynamic segment (#23620)
* initial work on the LIST route.

* fix

* changelog

* add s

* add in prepending forward slash
2023-10-13 11:01:23 -06:00
Jordan Reimer
b0ce08bb4b Button Conversion Part 1 (#23633)
* adds codemod for transforming button element to hds component

* runs button codemod on kmip and kubernetes enginges

* manully updates kuberenetes roles button

* runs button codemod on ldap engine

* manually updates remaining ldap buttons

* updates button codemod to check if all child nodes were included in text arg construction

* runs button codemod on kv engine

* adds comment for future kv button update

* Update ui/lib/kv/addon/components/page/secret/details.hbs

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

* updates remaining instance of toolbar-link class on button and adds class name transform to button codemod

* adds display inline override to hds button

* updates hds button display override to inline-flex

* updates ldap account check in button to tertiary

* updates ldap library check out icon to tertiary and adds icon

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
2023-10-13 09:38:57 -06:00
John-Michael Faircloth
71067d291f remove unused param from entEnableFourClusterDev (#23647) 2023-10-13 10:19:26 -05:00
Sarah Chavis
1b2b647b21 Fix anchor ID and add link to admin namespace guide (#23641) 2023-10-12 13:06:07 -07:00
Nick Cabatoff
e232da5ffa Teach stubmaker how to work with methods, not just funcs. (#23634)
Teach stubmaker how to work with methods, not just funcs.  Fix some stubs defined in #23557 which either had the wrong signature or needed to be public.
2023-10-12 14:38:28 -04:00
Jason O'Donnell
7872338ec1 command/server: fix bug with sigusr2 where pprof files were not closed (#23636)
* command/server: fix bug with sigusr2 where pprof files were not closed

* changelog
2023-10-12 18:29:23 +00:00
Angel Garbarino
e277571c37 Upgrade to HDS 2.13.0 (#23580)
* upgrade

* add changelog

* Update changelog/23580.txt

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

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
2023-10-12 17:34:38 +00:00
Angel Garbarino
44fb9a0f1b known issues (#23595) 2023-10-12 17:18:35 +00:00
Skybladev2
a485837cb6 Add method and path for Read the client count configuration (#23551) 2023-10-12 10:10:04 -04:00
claire bontempo
9c1898578f UI: prep for running button codemod (#23628)
* replace buttons with tabs

* update console buttons

* update ssh role item buttons

* remove tracked variable

* more tab cleanup

* remove unwrapActiveTab variable

* fix button control

* fix search select with modal test
2023-10-12 05:44:28 +00:00
Kianna
f1554425c3 UI: [VAULT-19783] Set up root token warning modal (#23277) 2023-10-12 01:36:59 +00:00
Sarah Chavis
1b7b5a1c6e Update enterprise vs hcp alerts (#23619) 2023-10-11 17:59:27 -05:00
Peter Wilson
beafc1de75 Docs listener config - tweak (#23572)
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2023-10-11 12:10:52 -07:00
Marc Boudreau
01cd9d37bb Add Ability to Disable Replication Status Endpoints in Listener Configuration (#23547)
* CI: Pre-emptively delete logs dir after cache restore in test-collect-reports (#23600)

* Fix OktaNumberChallenge (#23565)

* remove arg

* changelog

* exclude changelog in verifying doc/ui PRs (#23601)

* Audit: eventlogger sink node reopen on SIGHUP (#23598)

* ensure nodes are asked to reload audit files on SIGHUP

* added changelog

* Capture errors emitted from all nodes during proccessing of audit pipelines (#23582)

* Update security-scan.yml

* Listeners: Redaction only for TCP (#23592)

* redaction should only work for TCP listeners, also fix bug that allowed custom response headers for unix listeners

* fix failing test

* updates from PR feedback

* fix panic when unlocking unlocked user (#23611)

* VAULT-18307: update rotation period for aws static roles on update (#23528)

* add disable_replication_status_endpoints tcp listener config parameter

* add wrapping handler for disabled replication status endpoints setting

* adapt disable_replication_status_endpoints configuration parsing code to refactored parsing code

* refactor configuration parsing code to facilitate testing

* fix a panic when parsing configuration

* update refactored configuration parsing code

* fix merge corruption

* add changelog file

* document new TCP listener configuration parameter

* make sure disable_replication_status_endpoints only has effect on TCP listeners

* use active voice for explanation of disable_replication_status_endpoints

* fix minor merge issue

---------

Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
Co-authored-by: Angel Garbarino <Monkeychip@users.noreply.github.com>
Co-authored-by: Hamid Ghaf <83242695+hghaf099@users.noreply.github.com>
Co-authored-by: Peter Wilson <peter.wilson@hashicorp.com>
Co-authored-by: Mark Collao <106274486+mcollao-hc@users.noreply.github.com>
Co-authored-by: davidadeleon <56207066+davidadeleon@users.noreply.github.com>
Co-authored-by: kpcraig <3031348+kpcraig@users.noreply.github.com>
2023-10-11 14:23:21 -04:00
Peter Wilson
6fc1888cf7 Docs: known issue - audit file reload on SIGHUP (#23608)
* known issue documentation for Vault 1.15 related to file audit device - log rotation

* fix caps in URL anchor

* Update website/content/partials/known-issues/1_15-audit-file-sighup-does-not-trigger-reload.mdx

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

* PR feedback

* Warning not Important tag

* Update website/content/partials/known-issues/1_15-audit-file-sighup-does-not-trigger-reload.mdx

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

* Update website/content/partials/known-issues/1_15-audit-file-sighup-does-not-trigger-reload.mdx

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

* Update website/content/partials/known-issues/1_15-audit-file-sighup-does-not-trigger-reload.mdx

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

* Update website/content/partials/known-issues/1_15-audit-file-sighup-does-not-trigger-reload.mdx

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

* Update website/content/partials/known-issues/1_15-audit-file-sighup-does-not-trigger-reload.mdx

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

* Update website/content/partials/known-issues/1_15-audit-file-sighup-does-not-trigger-reload.mdx

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

* Update website/content/partials/known-issues/1_15-audit-file-sighup-does-not-trigger-reload.mdx

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

* changes to known issue doc

* changes to known issue doc - 2

---------

Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2023-10-11 18:05:48 +00:00
claire bontempo
feeda224c8 UI: Add version 1 if KV engine has no version data (#23585)
* add logic to add version 1

* add comments

* add changelog

* add test

* remove redundant backend check
2023-10-11 18:04:31 +00:00
Josh Black
1f1ead0dc7 CE changes for https://github.com/hashicorp/vault-enterprise/pull/4780 (#23362) 2023-10-11 10:44:33 -07:00
Mark Collao
44043004d1 Update security-scan.yml 2023-10-11 12:26:20 -05:00
kpcraig
30f19b383f VAULT-18307: update rotation period for aws static roles on update (#23528) 2023-10-11 17:06:58 +00:00
davidadeleon
2f8e59c856 fix panic when unlocking unlocked user (#23611) 2023-10-11 12:59:48 -04:00
Peter Wilson
813c786032 Listeners: Redaction only for TCP (#23592)
* redaction should only work for TCP listeners, also fix bug that allowed custom response headers for unix listeners

* fix failing test

* updates from PR feedback
2023-10-11 12:38:05 -04:00
Mark Collao
525bf2f894 Update security-scan.yml 2023-10-11 11:07:54 -05:00
Peter Wilson
bc64648e89 Capture errors emitted from all nodes during proccessing of audit pipelines (#23582) 2023-10-11 15:48:28 +00:00
Peter Wilson
88fb88e3db Audit: eventlogger sink node reopen on SIGHUP (#23598)
* ensure nodes are asked to reload audit files on SIGHUP

* added changelog
2023-10-11 16:46:49 +01:00
Hamid Ghaf
163c03f514 exclude changelog in verifying doc/ui PRs (#23601) 2023-10-11 08:18:23 -07:00
Angel Garbarino
f144d1be54 Fix OktaNumberChallenge (#23565)
* remove arg

* changelog
2023-10-11 09:12:44 -06:00
Kuba Wieczorek
83ae451df8 CI: Pre-emptively delete logs dir after cache restore in test-collect-reports (#23600) 2023-10-11 15:40:16 +01:00
Ben Ash
d5df561032 Docs: update VSO docs for 0.3.2 (#23594) 2023-10-11 08:28:34 -04:00
Luis (LT) Carbonell
42a141cf34 Update Telemetry Docs (#23535)
* update remote wal docs

* Update website/content/partials/telemetry-metrics/vault/replication/fsm/last_remote_wal.mdx

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

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2023-10-10 17:00:34 -04:00
Angel Garbarino
9d52e08e72 Fix failing transform modal test (#23589)
* fix

* remove all other hds-modal class in tests
2023-10-10 18:34:24 +00:00
Skybladev2
d74d920b6e Fix Read config title level (#23543) 2023-10-09 13:06:18 -07:00
Skybladev2
6ff9fcabab Fix path for Delete metadata and all versions (#23542)
* Fix path for Delete metadata and all versions

* fix template - remove unneeded trailing double colon
2023-10-09 13:05:49 -07:00
Skybladev2
ec026ad2ce Remove asterixes in header (#23548) 2023-10-09 13:03:54 -07:00
Peter Wilson
2912f5b539 documentation for redaction configuration on listeners (#23568)
* documentation for redaction configuration on listeners

* fix relative paths for /vault/
2023-10-09 20:34:41 +01:00
Scott Miller
42a484c6ce Correct the post-unseal meaning of the seal status type (#23022)
* Correct the post-unseal meaning of the seal status type

And at the same time add a RecoverySealType to the response which preserves the old meaning.
Updated the CLI to display both when relevant.

* changelog

* no longer needed

* Don't need this field either, which fixes unit tests

* fix unit tests
sdk/v0.10.1
2023-10-09 12:53:13 -05:00
Kianna
61f8aff24b UI: Fix failing dashboard tests (#23562) 2023-10-06 23:10:10 +00:00
claire bontempo
43258c28fa UI: HDS adoption replace <Modal> (#23382)
* UI: Part 1 - hds adoption replace <Modal> (#23363)

* replace policy-form modal

* replace clients/attribution modal

* clients/config modal

* scope form odal

* remove button type

* include toolbar to match other example templates

* rotate credentials modal

* add toolbar button class for hds buttons

* transformation-edit modal

* add back test selector

* add route arg to button!

* update link status

* fix link-status tests

* remove prevent default

* update db tests

* update tests

* use page alert for hcp link status banner

* fix scopy button selector

* fix sidebar test

* change to neutral banner

* UI: Part 2 - hds adoption replace <Modal>  (#23398)

* upgrade HDS library (adds support for snippet containers

* cleanup flight icons

* replace transit key action modals

* re-add deps as devDeps

* remove line

* address transit tests

* UI: Part 3 - hds adoption replace <Modal> (#23415)

* cleanup css

* cleanup extra type attr

* masked input download modal

* use Hds::Button in  download button"

* fix size of modal

* tiny icon fix

* refactor download button to always render download icon

* update tests

* UI: Part 3.5 - hds adoption replace <Modal> (#23448)

* replication-promote modal

* replication component modals

* replication add secondary modal

* move update text for diff

* UI: Part 4 - hds adoption replace <Modal>  (#23451)

* k8 configure modal

* kv delete modal

* ldap modals

* pki modals

* add trash icon

* move deps

* UI: Part 5 - hds adoption replace <Modal> (#23471)

* replace confirmation modals
---------

* UI: Part 6 - hds adoption replace <Modal>  (#23484)

* search select with modal

* policy search select modal

* replace date dropdown for client dashboard

* change padding to top

* update policy example args

* lolllll test typo wow

* update dropdown tests

* shamir flow modals!

* add one more container

* update test selectors

* UI: Final hds adoption replace <Modal> cleanup PR (#23522)

* search select with modal

* policy search select modal

* replace date dropdown for client dashboard

* change padding to top

* update policy example args

* lolllll test typo wow

* update dropdown tests

* shamir flow modals!

* add one more container

* update test selectors

* remove wormhole and modal component

* fix selectors

* uninstall wormhole

* remove shamir-modal-flow class

* fix confirm modal test

* fix pki and kv test

* fix toolbar selector kv

* client and download button test

* fix-confirmation-modal-padding

* fix replication modal tests so relevant modal opens (#23540)

* more confirmation modal tests

* adds changelog
2023-10-06 22:06:36 +00:00
davidadeleon
92fcfda8ad Implement user lockout log (#23140)
* implement user lockout logger

* formatting

* make user lockout log interval configurable

* create func to get locked user count, and fix potential deadlock

* fix test

* fix test

* add changelog
2023-10-06 15:58:42 -04:00
Robert
8202c7db4b auth/aws: fix panic in IAM-based login when client config doesn't exist (#23555)
Co-authored-by: Austin Gebauer <34121980+austingebauer@users.noreply.github.com>
2023-10-06 14:29:28 -05:00
Nick Cabatoff
2b460a3a21 Define a bunch of stubs that will replace existing init hooks. (#23557) 2023-10-06 15:17:18 -04:00
Violet Hynes
1e132479f0 VAULT-19233 Second part of caching static secrets work (#23177)
* VAULT-19237 Add mount_type to secret response

* VAULT-19237 changelog

* VAULT-19237 make MountType generic

* VAULT-19237 clean up comment

* VAULT-19237 update changelog

* VAULT-19237 update test, remove mounttype from wrapped responses

* VAULT-19237 fix a lot of tests

* VAULT-19237 standby test

* ensure -log-level is added to core config (#23017)

* Feature/document tls servername (#22714)

* Add Raft TLS Helm examples

Co-authored-by: Pascal Reeb <pascal.reeb@adfinis.com>
---------

* Clean up unused CRL entries when issuer is removed (#23007)

* Clean up unused CRL entries when issuer is removed

When a issuer is removed, the space utilized by its CRL was not freed,
both from the CRL config mapping issuer IDs to CRL IDs and from the
CRL storage entry. We thus implement a two step cleanup, wherein
orphaned CRL IDs are removed from the config and any remaining full
CRL entries are removed from disk.

This relates to a Consul<->Vault interop issue (#22980), wherein Consul
creates a new issuer on every leadership election, causing this config
to grow. Deleting issuers manually does not entirely solve this problem
as the config does not fully reclaim space used in this entry.

Notably, an observation that when deleting issuers, the CRL was rebuilt
on secondary clusters (due to the invalidation not caring about type of
the operation); for consistency and to clean up the unified CRLs, we
also need to run the rebuild on the active primary cluster that deleted
the issuer as well.

This approach does allow cleanup on existing impacted clusters by simply
rebuilding the CRL.

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Add test case on CRL removal

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>
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>

* UI: Handle control group error on SSH (#23025)

* Handle control group error on SSH

* Add changelog

* Fix enterprise failure of TestCRLIssuerRemoval (#23038)

This fixes the enterprise failure of the test
 ```
  === FAIL: builtin/logical/pki TestCRLIssuerRemoval (0.00s)
     crl_test.go:1456:
         	Error Trace:	/home/runner/actions-runner/_work/vault-enterprise/vault-enterprise/builtin/logical/pki/crl_test.go:1456
         	Error:      	Received unexpected error:
         	            	Global, cross-cluster revocation queue cannot be enabled when auto rebuilding is disabled as the local cluster may not have the certificate entry!
         	Test:       	TestCRLIssuerRemoval
         	Messages:   	failed enabling unified CRLs on enterprise

 ```

* fix LDAP auto auth changelog (#23027)

* VAULT-19233 First part of caching static secrets work

* VAULT-19233 update godoc

* VAULT-19233 invalidate cache on non-GET

* VAULT-19233 add locking to proxy cache writes

* VAULT-19233 add caching of capabilities map, and some additional test coverage

* VAULT-19233 Additional testing

* VAULT-19233 namespaces for cache ids

* VAULT-19233 cache-clear testing and implementation

* VAULT-19233 adjust format, add more tests

* VAULT-19233 some more docs

* VAULT-19233 Add RLock holding for map access

* VAULT-19233 PR comments

* VAULT-19233 Different table for capabilities indexes

* VAULT-19233 keep unique for request path

* VAULT-19233 passthrough for non-v1 requests

* VAULT-19233 some renames/PR comment updates

* VAULT-19233 remove type from capabilities index

* VAULT-19233 remove obsolete capabilities

* VAULT-19233 remove erroneous capabilities

* VAULT-19233 woops, missed a test

* VAULT-19233 typo

* VAULT-19233 add custom error for cachememdb

* VAULT-19233 fix cachememdb test

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: Chris Capurso <1036769+ccapurso@users.noreply.github.com>
Co-authored-by: Andreas Gruhler <andreas.gruhler@adfinis.com>
Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>
2023-10-06 14:44:43 -04:00
Peter Wilson
455a4505c1 make sure we initialize the DefaultHandlerProperties -> ListenerConfig in ClusterSetup (#23558) 2023-10-06 18:37:48 +00:00