14369 Commits

Author SHA1 Message Date
Austin Gebauer
62127751c7
Adds OIDC Token and UserInfo endpoints (#12711) 2021-10-13 18:59:36 -07:00
Brian Kassouf
06580f85ff
Fix tools build (#12827) 2021-10-13 18:12:40 -07:00
Alex Cahn
c73cb6524d
Docs/vip update (#12826) 2021-10-13 18:05:19 -07:00
swayne275
9ed4d8f547
port relevant ent changes (#12823) 2021-10-13 18:15:54 -06:00
Amy Lam
c4e1a58878
Delete package-lock.json (#12809)
* Remove package-lock, repo is using yarn

* Update gitignore
2021-10-13 16:03:36 -07:00
Alex Cahn
2da6cfa89c
Docs/vip update (#12818)
* Update the Vault Integration program page

This includes now support for HCP Vault as well as general updates to the program

* Updated process flow image

* Adding HCP V image

* Update website/content/docs/partnerships.mdx

* Update website/content/docs/partnerships.mdx

* Update website/content/docs/partnerships.mdx

* Update website/content/docs/partnerships.mdx

* Update website/content/docs/partnerships.mdx

* Update website/content/docs/partnerships.mdx

* Update website/content/docs/partnerships.mdx

* Update website/content/docs/partnerships.mdx

* Update website/content/docs/partnerships.mdx

* Update website/content/docs/partnerships.mdx

* Update website/content/docs/partnerships.mdx

Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com>
2021-10-13 13:06:09 -07:00
Chelsea Shaw
9c6bd51754
UI/OIDC provider (#12800)
* Add new route w/ controller oidc-provider

* oidc-provider controller has params, template has success message (temporary), model requests correct endpoint

* Move oidc-provider route to under identity

* Do not redirect after poll if on oidc-provider page

* WIP provider -- beforeModel handles prompt, logout, redirect

* Auth service fetch method rejects with fetch response if status >= 300

* New component OidcConsentBlock

* Fix redirect to/from auth with cluster name, show error and consent form if applicable

* Show error and consent form on template

* Add component test, update docs

* Test for oidc-consent-block component

* Add changelog

* fix tests

* Add authorize to end of router path

* Remove unused tests

* Update changelog with feature name

* Add descriptions for OidcConsentBlock component

* glimmerize token-expire-warning and don't override yield if on oidc-provider route

* remove text on token-expire-warning

* Fix null transition.to on cluster redirect

* Hide nav links if oidc-provider route
2021-10-13 15:04:39 -05:00
Chris Capurso
6f65a4addc
Add HTTP PATCH support to KV (#12687)
* handle HTTP PATCH requests as logical.PatchOperation

* update go.mod, go.sum

* a nil response for logical.PatchOperation should result in 404

* respond with 415 for incorrect MIME type in PATCH Content-Type header

* add abstraction to handle PatchOperation requests

* add ACLs for patch

* Adding JSON Merge support to the API client

* add HTTP PATCH tests to check high level response logic

* add permission-based 'kv patch' tests in prep to add HTTP PATCH

* adding more 'kv patch' CLI command tests

* fix TestHandler_Patch_NotFound

* Fix TestKvPatchCommand_StdinValue

* add audit log test for HTTP PATCH

* patch CLI changes

* add patch CLI tests

* change JSONMergePatch func to accept a ctx

* fix TestKVPatchCommand_RWMethodNotExists and TestKVPatchCommand_RWMethodSucceeds to specify -method flag

* go fmt

* add a test to verify patching works by default with the root token

* add changelog entry

* get vault-plugin-secrets-kv@add-patch-support

* PR feedback

* reorder some imports; go fmt

* add doc comment for HandlePatchOperation

* add json-patch@v5.5.0 to go.mod

* remove unnecessary cancelFunc for WriteBytes

* remove default for -method

* use stable version of json-patch; go mod tidy

* more PR feedback

* temp go get vault-plugin-secrets-kv@master until official release

Co-authored-by: Josh Black <raskchanky@users.noreply.github.com>
2021-10-13 15:24:31 -04:00
claire bontempo
1f1459eba2
UI/InfoTableRow testing (#12811)
* updates storybook

* adds computed property valueIsEmpty

* adds tests to info table row
2021-10-13 10:52:23 -07:00
John-Michael Faircloth
56c6f3c9d0
Add support to parameterize unauthenticated paths (#12668)
* store unauthenticated path wildcards in map

* working unauthenticated paths with basic unit tests

* refactor wildcard logic

* add parseUnauthenticatedPaths unit tests

* use parseUnauthenticatedPaths when reloading backend

* add more wildcard test cases

* update special paths doc; add changelog

* remove buggy prefix check; add test cases

* prevent false positives for prefix matches

If we ever encounter a mismatched segment, break and set a flag to
prevent false positives for prefix matches.

If it is a match we need to do a prefix check. But we should not return
unless HasPrefix also evaluates to true. Otherwise we should let the for
loop continue to check other possibilities and only return false once
all wildcard paths have been evaluated.

* refactor switch and add more test cases

* remove comment leftover from debug session

* add more wildcard path validation and test cases

* update changelong; feature -> improvement

* simplify wildcard segment matching logic

* refactor wildcard matching into func

* fix glob matching, add more wildcard validation, refactor

* refactor common wildcard errors to func

* move doc comment to logical.Paths

* optimize wildcard paths storage with pre-split slices

* fix comment typo

* fix test case after changing wildcard paths storage type

* move prefix check to parseUnauthenticatedPaths

* tweak regex, remove unneeded array copy, refactor

* add test case around wildcard and glob matching
2021-10-13 11:51:20 -05:00
hghaf099
e0bfb73815
Customizing HTTP headers in the config file (#12485)
* Customizing HTTP headers in the config file

* Add changelog, fix bad imports

* fixing some bugs

* fixing interaction of custom headers and /ui

* Defining a member in core to set custom response headers

* missing additional file

* Some refactoring

* Adding automated tests for the feature

* Changing some error messages based on some recommendations

* Incorporating custom response headers struct into the request context

* removing some unused references

* fixing a test

* changing some error messages, removing a default header value from /ui

* fixing a test

* wrapping ResponseWriter to set the custom headers

* adding a new test

* some cleanup

* removing some extra lines

* Addressing comments

* fixing some agent tests

* skipping custom headers from agent listener config,
removing two of the default headers as they cause issues with Vault in UI mode
Adding X-Content-Type-Options to the ui default headers
Let Content-Type be set as before

* Removing default custom headers, and renaming some function varibles

* some refacotring

* Refactoring and addressing comments

* removing a function and fixing comments
2021-10-13 11:06:33 -04:00
Loann Le
3aafbd0e8a
Vault Documentation: Modified What is Vault description (#12783)
* modified vault description

* modified paragraph based on feedback

* Update what-is-vault.mdx

Removed characters that were arbitrarily added.

* Update what-is-vault.mdx

changed markdown syntax for 'secret's
2021-10-13 07:48:00 -07:00
DJCrabhat
7d2fa4323e
Add nonce configuration parameter to agent AWS auto-auth documentation (#10926)
* Update aws.mdx

Was looking how to give the vault agent with AWS auth-auth the same nonce, but saw it wasn't documented.  Dove through the code, found https://github.com/hashicorp/vault/blob/master/command/agent/auth/aws/aws.go#L139 and https://github.com/hashicorp/vault/blob/master/command/agent/auth/aws/aws.go#L215 

(tried to call out the importance and point to docs, know setting `nonce` poorly could be very bad!)

* add line breaks

* Apply suggestions from code review

Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com>

Co-authored-by: hghaf099 <83242695+hghaf099@users.noreply.github.com>
Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com>
2021-10-13 10:45:34 -04:00
Victor Rodriguez
c0abf719cc
Wait for expiration manager to be out of restore mode while testing. (#12779) 2021-10-13 08:58:02 -04:00
dr-db
7640d6a840
Update index.mdx (#12395)
Typo fix.
2021-10-12 18:50:20 -07:00
Angel Garbarino
6404d83082
fix copy issue (#12810) 2021-10-12 18:05:32 -06:00
Jeff Escalante
cce1354ddd
update dependencies (#12807)
* full dependency update, cut unnecessary deps

* remove husky

* add simple-git-hooks, fix package.json formatting

* fix button spacing on use case page footers

* bugfixes
2021-10-12 17:07:16 -04:00
Angel Garbarino
92bbc5aee4
KV: handle various metadata permissions (#12673)
* fix delete issue when no read on metadata

* show create button

* fix navigation on metadata

* dont show search unless its version 2

* need to query because can't be certain the model will have loaded

* fix issue with no read metadata and create new version

* cleanup the delete reload issues

* cleanup modal refresh issues

* extra conditional on delete

* test coverage

* add more test coverage

* some pr comments but also fix soft delete

* test cleanup

* fix soft delete issue
2021-10-12 13:42:04 -06:00
Matt Greenfield
c0d8df90eb
Dedup from_entity_ids when merging two entities (#10101)
Fixes #10100
2021-10-12 15:35:19 -04:00
Pratyoy Mukhopadhyay
e558e58d50
Update naptime for retrytoken test (#12799) 2021-10-12 11:12:06 -07:00
John-Michael Faircloth
ee40205a62
Filter identity token keys (#12780)
* filter identity token keys

* Update test cases to associate keys with roles

* use getOIDCRole helper

* add func comment and test assertion

* add changelog

* remove unnecessary code

* build list of keys to return by starting with a list of roles

* move comment

* update changelog
2021-10-12 11:14:03 -05:00
contrun
452e47cbf2
remove trailing comma in json file (#12640)
Signed-off-by: YI <uuuuuu@protonmail.com>
2021-10-12 12:03:01 -04:00
Calvin Leung Huang
dc244a7532
dep: update tencentcloud-sdk-go to v1.0.162 (#12781) 2021-10-12 08:05:05 -07:00
Mike Green
7095d0507d
Clarify max TTL and system max TTL behavior (#12391) 2021-10-12 13:24:07 +01:00
swayne275
6935afa842
update function signature and call (#12806) 2021-10-11 18:21:38 -06:00
claire bontempo
698d48526d
UI/Serialize DB Connection Attributes (#12770)
* creates serializer and moves available plugin types constant to util

* adds if block catch if no plugin_type, renames util file

* updates imports

* adds changelog

* fixes rendering of default attrs

* checks that plugin exists
2021-10-11 16:42:11 -07:00
vinay-gopalan
8c0cea56d9
Fix connection_url in AzureSQL Config Example in Secret Engine Docs (#12803)
* remove newline in azuresql example conn url

* add changelog

* remove changelog
2021-10-11 14:11:24 -07:00
Jason O'Donnell
0ca3b0500c
docs: add additional resources for vault agent templating language (#12798)
* docs: add templating language links

* docs: add templating language links
2021-10-11 14:31:50 -04:00
Brian Kassouf
acc353b6ec
Update a few hashicorp deps (#12757) 2021-10-11 10:06:41 -07:00
Arnav Palnitkar
d919e328b8
Added support for Oracle db connection (#12752)
* Added support for Oracle db connection

* Added changelog

* Fixed test

* Added test for role setting

* Skip full acceptance test in case of oracle db

* Fix db role test

* Update changelog

* Fix db role fields after rebase

* Added missing test
2021-10-11 09:20:23 -07:00
Rémi Lapeyre
f7ab7aa53e
Return 404 response when looking for a secret_id_accessor that does not exist (#12788)
* Return 404 response when looking for an secret_id_accessor that does not exist

Closes https://github.com/hashicorp/vault/issues/12660
2021-10-11 15:07:51 +01:00
Loann Le
818502bc83
Vault documentation: added new code sample to Kubernetes documentation (#12774)
* added new code sample for k8s auth

* Update kubernetes.mdx

removed spacing
2021-10-08 14:57:53 -07:00
John-Michael Faircloth
f76d182197
OIDC: Unique prefix to client_secret (#12745)
* Unique prefix to client_id and client_secret

* only prefix client secret and use constants

* split client secret checks
2021-10-08 16:02:20 -05:00
Loann Le
b23af15b42
Documentation: added new c# code samples to Vault documentation (#12769)
* added new code sample for C-sharp

* Update aws.mdx

Removed extra spacing

* added more code samples

* Update gcp.mdx

removed spacing

* Update aws.mdx

remove spacing
2021-10-08 08:54:26 -07:00
Rowan Smith
25458af28e
raft auto_join_scheme documentation update (#12701) 2021-10-08 08:32:50 -04:00
Tom Proctor
67069f011f
agent: tolerate partial restore failure from persistent cache (#12718)
* agent: tolerate partial restore failure from persistent cache

* Review comments: improved consistency, test robustness, comments, assertions
2021-10-08 11:30:04 +01:00
Jim Kalafut
7f42e01682
Update docs to reference paths filters instead of mount filters (#12717) 2021-10-07 22:53:07 -07:00
claire bontempo
3400fd33a3
UI/Add Elasticsearch DB (#12672)
* displays empty state if database is not supported in the UI

* adds elasticsearch db plugin

* adds changelog

* updates elasticsearch attrs

* move tls_server_name to pluginConfig group

* move role setting fields to util

* updates comments and refactors using util function

* adds tests for elasticsearch

* fixes indentation

* when local host needs https

* adds line at bottom of hbs file
2021-10-07 14:00:42 -07:00
hghaf099
9b966f4669
Adds note about policy needed for batch dr token (#12767) 2021-10-07 16:15:32 -04:00
Jason O'Donnell
035eb77999
docs: add note for rolesets to avoid globs in policies (#12756)
* docs: add note for rolesets to avoid wildcards in policies

* Add note about not using example

* Change wildcard to glob

* Update website/content/docs/upgrading/upgrade-to-1.8.0.mdx

Co-authored-by: mickael-hc <86245626+mickael-hc@users.noreply.github.com>

* Update documentation per review

* Update per review

* Update website/content/docs/upgrading/upgrade-to-1.8.0.mdx

Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com>

Co-authored-by: mickael-hc <86245626+mickael-hc@users.noreply.github.com>
Co-authored-by: Calvin Leung Huang <1883212+calvn@users.noreply.github.com>
2021-10-07 15:35:56 -04:00
Scott Miller
3dab9d2320
Add a TRACE log with TLS connection details on replication connections (#12754)
* remove cruft
use helper
Add a helper for getting public key sizes
wip

* error names

* Fix ecdsa

* only if trace is on

* Log listener side as well

* rename

* Add remote address

* Make the log level configurable via the env var, and a member of the Listener and thus modifiable by tests

* Fix certutil_test
2021-10-07 14:17:31 -05:00
Chelsea Shaw
3337caaa57
UI update changelog link (#12766)
* Update changelog link

* Update test
2021-10-07 11:38:12 -06:00
Austin Gebauer
74b74568dd
Adds ability to define an inline policy and internal metadata on tokens (#12682)
* Adds ability to define an inline policy and internal metadata to tokens

* Update comment on fetchEntityAndDerivedPolicies

* Simplify handling of inline policy

* Update comment on InternalMeta

Co-authored-by: Brian Kassouf <briankassouf@users.noreply.github.com>

* Improve argument name

Co-authored-by: Brian Kassouf <briankassouf@users.noreply.github.com>

* Use explicit SkipIdentityInheritance token field instead of implicit InlinePolicy behavior

* Add SkipIdentityInheritance to pb struct in token store create method

* Rename SkipIdentityInheritance to NoIdentityPolicies

* Merge latest from main and make proto

Co-authored-by: Brian Kassouf <briankassouf@users.noreply.github.com>
2021-10-07 10:36:22 -07:00
Pamela Bortnick
f9a9c6b22e
Update social share image (#12441)
* Update social share image

* Update image for social share
2021-10-07 13:34:44 -04:00
swayne275
a17a75f595
oss port (#12755) 2021-10-07 11:25:16 -06:00
Bryce Kalow
0b833db0f4
website: upgrades dependencies (#12670)
* upgrades deps and gets it building

* remove unneeded css file

* fix: hide intended elements in print (#12710)

* upgrade deps to latest

Co-authored-by: Zachary Shilton <4624598+zchsh@users.noreply.github.com>
2021-10-07 11:23:19 -04:00
Tim Peoples
7bd2be52c8
Update plugin proto to send tls.ConnectionState (Op.2) (#12581) 2021-10-07 08:06:09 -04:00
Rowan Smith
905ccda15b
updated vault.core.license.expiration_time_epoch (#12760) 2021-10-07 07:14:25 -04:00
Yoan Blanc
6a62d8c4e8
docs: since Vault 1.0 Unseal is OSS (#12268)
* docs: since Vault 1.0 Unseal is OSS

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>

* fixup! docs: since Vault 1.0 Unseal is OSS

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>

* fixup! fixup! docs: since Vault 1.0 Unseal is OSS

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2021-10-06 13:35:35 -07:00
Meggie
0ae9ffd694
Updating website for 1.8.4 (#12751) 2021-10-06 16:23:37 -04:00