Commit Graph

17619 Commits

Author SHA1 Message Date
Jordan Reimer
78a86b4508 Login View Fix for Safari (#21582)
* adds height to brand-icon-large class to fix display issue in Safari

* adds changelog entry
2023-07-05 17:20:18 +00:00
Violet Hynes
44354eb147 VAULT-17590 Add failure notifications for OSS builds (#21561)
* VAULT-17590 Add failure notifications for OSS builds

* VAULT-17590 Incur build failure for testing purposes

* VAULT-17590 head_ref for testing

* VAULT-17590 rework to rely on completed status checks

* VAULT-17590 Use slackapi/slack-github-action

* VAULT-17590 Remember dollar sign

* VAULT-17590 finalize PR

* VAULT-17590 add extra empty line

* Update .github/workflows/build.yml

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

* Update .github/workflows/ci.yml

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

---------

Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2023-07-05 16:44:39 +00:00
Jordan Reimer
52baf01e53 Hide Nav Links in Child Namespaces (#21562)
* hides enterprise related nav links when in child namespace

* adds changelog entry
2023-07-05 09:47:45 -06:00
mickael-hc
c6ef0800a0 update github.com/protonmail/go-crypto (#21560)
Updates the transitive dependency github.com/cloudflare/circl which will help address scanning noise related to CVE-2023-1732.

Vault is not affected by this issue as it does not use the vulnerable functionality.
2023-07-05 09:24:14 -04:00
Peter Wilson
772cda4eb2 Fix: Ensure log related settings appear in 'sanitized' config (#21567)
* include log related settings in SharedConfig.Sanitize()
* add optional log config to sanitized config when not default
* tests
2023-07-05 13:14:05 +00:00
miagilepner
7522ca248f VAULT-17774: Allow test parallelism and timeout to be configurable (#21557) 2023-07-04 17:13:49 +02:00
miagilepner
eecae3a827 VAULT-17586: Add concurency to ci and build workflows (#21550) 2023-07-04 13:43:47 +02:00
Max Bowsher
c9b18c43ea Fix incorrect OpenAPI operation ID (#21543)
The operation ID for `GET auth/token/lookup` has been overridden in
a way which *implies* it can only perform lookup-self operations.

This is not true, as shown:

1) Here is my current token:
```
$ vault read -field=display_name auth/token/lookup
userpass-admin
```

2) I create a second token, with a different display name to distinguish
   it:
```
$ othertoken=$(vault token create -field=token -display-name=testing123)
```

3) I use this operation, still authenticated with the first token, to
   lookup the second token, proving it does not have lookup-self nature:
```
$ vault read -field=display_name auth/token/lookup token=$othertoken
token-testing123
```

I have set the new operation ID suffix to `"2"` adhering to current
conventions in `vault-client-go` and `vault-client-dotnet` for secondary
versions of APIs which should be excluded from the generated library
code.
2023-07-03 20:09:12 -04:00
Anton Averchenkov
f4f0412b6a [docs] Convert titles to sentense case (#21426)
* Convert documentation titles to sentense case

* Docker, Google, Foundry, Cloud proper case
2023-06-30 19:22:07 -04:00
Kianna
d01a3c1763 UI: VAULT-17699 Fix masked input bug (#21531) 2023-06-30 13:17:34 -07:00
Rebecca Willett
f1c6ab41fc Add Slack notification for failed Enos workflow runs (#21332)
* Add separate Slack notification steps for run, run_retry, and destroy steps
2023-06-30 15:00:54 -04:00
Tom Proctor
1ffc56cb42 Docs: Updates for vault-mssql-ekm-provider-enterprise release v0.2.1 (#21529) 2023-06-30 18:00:44 +00:00
kpcraig
bbb01ed554 update plugin-dependency-check workflow (#21525) 2023-06-30 16:57:49 +00:00
kpcraig
3feb157fc7 fix curl, add reviewers, fix label call (#21522) 2023-06-30 15:49:28 +00:00
Max Bowsher
2f677665b3 Fix vault path-help for selected paths with bad regexps (#18571)
* Fix `vault path-help` for selected paths with bad regexps

See the comment being added in `sdk/framework/path.go` for the
explanation of why this change is needed.

* Grammar fix and add changelog

* Also fix hardcoded expectations in a new test

* Add a couple more testcases, and some comments.

* Tweak spelling in comment
2023-06-30 08:42:30 -07:00
Christophe Deliens
325233ea7d Fix "vault agent generate-config" documentation URL (#21466) 2023-06-30 00:26:15 +00:00
John-Michael Faircloth
00295d2bf5 plugin automation: fix create pr (#21518)
* plugin automation: fix create pr

* get vault pr num
2023-06-29 22:20:01 +00:00
kpcraig
208336d251 Add some debugging to figure out what is happening (#21516)
* println debugging

* add more print debugs
2023-06-29 21:07:28 +00:00
John-Michael Faircloth
ab97243ed0 plugin automation: fix branch name (#21515)
* plugin automation: fix branch name

* fix input name
2023-06-29 19:45:53 +00:00
John-Michael Faircloth
bc71fdf040 plugin automation: use correct path to helper script (#21512) 2023-06-29 18:38:00 +00:00
John-Michael Faircloth
cc5240f47d updates to plugin update check (#21511)
* updates to plugin update check

* use script to make curl request easier
2023-06-29 16:23:52 +00:00
Ben Ash
3ca3397676 Add support for cloning a Client's tls.Config (#21424)
Additional fixes:
- handle a failed type assert in api.Config.configureTLS()

Co-authored-by: Anton Averchenkov <84287187+averche@users.noreply.github.com>
2023-06-28 17:56:39 -04:00
John-Michael Faircloth
3e60da075b plugin: use gh token for plugin workflow (#21505) 2023-06-28 21:26:06 +00:00
Angel Garbarino
1a780d8380 Capitlization Policy: First word only for title is-5 (#21501)
* initial fixes

* fix test

* fix test
2023-06-28 13:24:09 -06:00
kpcraig
08facd2bb2 Add plugin-update-check workflow (#21491) 2023-06-28 13:57:39 -04:00
Sarah Chavis
282b4a0738 Correct typos in 1.14.0 release notes (#21499) 2023-06-28 17:20:05 +00:00
Yoko Hyakuna
81a5e2ee65 [Docs] Add namespace naming restriction (#21493)
* Add naming restriction

* Update website/content/docs/enterprise/namespaces.mdx

Co-authored-by: Jonathan Frappier <92055993+jonathanfrappier@users.noreply.github.com>

* Use sentence case for heading

---------

Co-authored-by: Jonathan Frappier <92055993+jonathanfrappier@users.noreply.github.com>
2023-06-28 08:57:28 -07:00
Angel Garbarino
53d34dd930 Missed some Titlelize of the h1 title is-3 (#21482)
* missed a lot

* test fix

* wip context switch

* last of the test?

* last test, please
2023-06-28 08:33:13 -06:00
Yoko Hyakuna
9f741af664 Update the tutorial link to point to the default collection link (#21490) 2023-06-27 14:34:52 -07:00
Angel Garbarino
936fb74a18 Add UI safari login screen known issue (#21489)
* add known issue to docs

* update to correct pattern

* fix

* Update website/content/partials/known-issues/ui-safari-login-screen.mdx

Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>

* Update website/content/partials/ui-safari-login-screen.mdx

Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>

---------

Co-authored-by: Chelsea Shaw <82459713+hashishaw@users.noreply.github.com>
2023-06-27 21:20:06 +00:00
Violet Hynes
c3741b0177 Calculate namespace prefix before tainting route entries (#21470)
* Calculate namespace prefix before tainting route entries

* Changelog

* Remove check, log just about tainting

* Typo

* Better log

* Update log message
2023-06-27 15:09:25 -04:00
Yoko Hyakuna
bcd7083d94 Add a step to revert the configuration (#21480) 2023-06-27 11:37:04 -07:00
Angel Garbarino
20228a42ea Capitalize all UI h1 title is-3 titles (#21454)
* address all h1 title is-3 headings

* fix mult-factor and tests

* qa'ing

* clean up

* clean up

* clean up

* fix tests

* fix test

* one more

* okay this is the last one.

* blah
2023-06-27 18:11:11 +00:00
Christopher Swenson
c59d423387 Use the sorted values so that the test is not flaky (#21479) 2023-06-27 17:38:58 +00:00
Ryan Cragun
fd1683698b test: always use a unique id for target resources (#21472)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-06-27 12:30:56 -04:00
Steven Clark
e3b3c7a8de Fix OpenAPI spec definitions for PKI EAB APIs (#21458)
* Fix OpenAPI spec definitions for PKI EAB APIs

 - Do not generate duplicate operation ids for the various new-eab apis
 - Fill out proper operation verb for eab delete call
 - Pluralize operation verb for list-eab-keys api
 - Fill out proper response data for new-eab and list-eab-keys

* Add cl
2023-06-27 08:44:21 -04:00
Ryan Cragun
aed2783658 enos: use on-demand targets (#21459)
Add an updated `target_ec2_instances` module that is capable of
dynamically splitting target instances over subnet/az's that are
compatible with the AMI architecture and the associated instance type
for the architecture. Use the `target_ec2_instances` module where
necessary. Ensure that `raft` storage scenarios don't provision
unnecessary infrastructure with a new `target_ec2_shim` module.

After a lot of trial, the state of Ec2 spot instance capacity, their
associated APIs, and current support for different fleet types in AWS
Terraform provider, have proven to make using spot instances for
scenario targets too unreliable.

The current state of each method:
* `target_ec2_fleet`: unusable due to the fact that the `instant` type
  does not guarantee fulfillment of either `spot` or `on-demand`
  instance request types. The module does support both `on-demand` and
  `spot` request types and is capable of bidding across a maximum of
  four availability zones, which makes it an attractive choice if the
  `instant` type would always fulfill requests. Perhaps a `request` type
  with `wait_for_fulfillment` option like `aws_spot_fleet_request` would
  make it more viable for future consideration.
* `target_ec2_spot_fleet`: more reliable if bidding for target instances
  that have capacity in the chosen zone. Issues in the AWS provider
  prevent us from bidding across multiple zones succesfully. Over the
  last 2-3 months target capacity for the instance types we'd prefer to
  use has dropped dramatically and the price is near-or-at on-demand.
  The volatility for nearly no cost savings means we should put this
  option on the shelf for now.
* `target_ec2_instances`: the most reliable method we've got. It is now
  capable of automatically determing which subnets and availability
  zones to provision targets in and has been updated to be usable for
  both Vault and Consul targets. By default we use the cheapest medium
  instance types that we've found are reliable to test vault.

* Update .gitignore
* enos/modules/create_vpc: create a subnet for every availability zone
* enos/modules/target_ec2_fleet: bid across the maximum of four
  availability zones for targets
* enos/modules/target_ec2_spot_fleet: attempt to make the spot fleet bid
  across more availability zones for targets
* enos/modules/target_ec2_instances: create module to use
  ec2:RunInstances for scenario targets
* enos/modules/target_ec2_shim: create shim module to satisfy the
  target module interface
* enos/scenarios: use target_ec2_shim for backend targets on raft
  storage scenarios
* enos/modules/az_finder: remove unsed module

Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-06-26 16:06:03 -06:00
Rachel Culpepper
049b205527 update env vars to use wrapper constants (#21456) 2023-06-26 17:38:04 +00:00
Anton Averchenkov
df304012f3 openapi: Fix response schema for PKI Issue requests (#21449)
* openapi: Fix response schema for PKI Issue requests

* tests

* changelog

* another expiration for generate/rotate root

* more type fixes from @stevendpclark
2023-06-26 13:31:56 -04:00
Alexander Scheel
f381fba4a6 Document multiple changelog entries in one file (#21442)
Related: #20903
See also: #20864

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-06-26 13:23:52 -04:00
Max Bowsher
5ebda5d8f4 Add a new log message, reporting collisions between OpenAPI paths (#20873)
Vault API endpoints are defined using regexes in instances of the SDK's
framework.Path structure. However, OpenAPI does not use regexes, so a
translation is performed. It is technically possible that this
translation produces colliding OpenAPI paths from multiple
framework.Path structures. When this happens, there has formerly been no
diagnostic, and one result silently overwrites the other in a map.

As a result of this, several operations are currently accidentally
missing from the Vault OpenAPI, which is also the trigger for
https://github.com/hashicorp/vault-client-go/issues/180.

This PR adds a log message, to help catch such accidents so that they
can be fixed. Much of the PR is propagating a logger to the point where
it is needed, and adjusting tests for the API change.

With current Vault, this will result in the following being logged each
time a request is made which triggers OpenAPI generation:
```
[WARN]  secrets.identity.identity_0cd35e4d: OpenAPI spec generation: multiple framework.Path instances generated the same path; last processed wins: path=/mfa/method
[WARN]  secrets.identity.identity_0cd35e4d: OpenAPI spec generation: multiple framework.Path instances generated the same path; last processed wins: path=/mfa/method/totp
[WARN]  secrets.identity.identity_0cd35e4d: OpenAPI spec generation: multiple framework.Path instances generated the same path; last processed wins: path=/mfa/method/okta
[WARN]  secrets.identity.identity_0cd35e4d: OpenAPI spec generation: multiple framework.Path instances generated the same path; last processed wins: path=/mfa/method/duo
[WARN]  secrets.identity.identity_0cd35e4d: OpenAPI spec generation: multiple framework.Path instances generated the same path; last processed wins: path=/mfa/method/pingid
```

I will submit a further PR to fix the issue - this one is just to add
the diagnostic.
2023-06-23 13:36:11 -04:00
Max Bowsher
43ae739971 Refactor identity/mfa/method/* endpoints to fix bad OpenAPI (#20879)
* Refactor `identity/mfa/method/*` endpoints to fix bad OpenAPI

There is a problem with how the `identity/mfa/method/*` endpoints are
defined, resulting in incorrect OpenAPI generation.

I raised hashicorp/vault-client-go#180 to track a consequence, and
opened #20873 which explains the problem and adds a log message to
detect it.

This PR is now the fix.

It's actually quite an interesting problem, that has come about through
some particular implementation choices, in Vault's first/only case where
REST API objects are created by writing to the collection URL, and have
their ID allocated by the server, instead of the client.

The triggering cause of the malfunction was trying to have a single
framework.Path struct instance which optionally includes or excludes the
method_id path parameter, and also another framework.Path struct
instance handling list operations.

The fix is to simplify the path regexes, and have one framework.Path
which handles the method_id being present, and one that handles it being
absent.

The diff is somewhat large, because the affected code had been
copy/pasted four times (TOTP, Okta, Duo, PingID) - so I took the
opportunity to fix the duplication, creating appropriate helper methods
so that the quadruplicated code could be re-unified.

* Revise documentation

This update refactors how the documentation presents these endpoints to
users, both for clarity, and to align with the new structure of the
code.

From a user perspective, it clears up some unclear presentation of when
the `method_id` parameter should and should not be present, adds
a missing description of the response to create requests, and changes
the `method_id` parameter name to be used consistently (rather than `id`
in some cases, unlike the actual code/OpenAPI).

* Fix incorrect acronym (review fix)

* Accept suggestion of tweaked grammar in documentation

Co-authored-by: Anton Averchenkov <84287187+averche@users.noreply.github.com>

* Add changelog

---------

Co-authored-by: Anton Averchenkov <84287187+averche@users.noreply.github.com>
2023-06-23 13:32:41 -04:00
Jason O'Donnell
a71cdb6165 Add known issue about update_primary_addrs panic (#21443)
* add known issue about update_primary_addrs panic

* Fix partial

* Fix render
2023-06-23 11:51:35 -04:00
Meggie
b24a048a1a Fix some changelog bullet formatting (#21431) 2023-06-22 19:25:14 -04:00
Ryan Cragun
5de6af6076 enos: use linux/amd64 for consul storage backend (#21436)
We seem to hit occasional capacity issues when attempting to launch spot
fleets with arm64 instance types. After checking pricing in the regions
that we use, it appears that current and older generation amd64 t2 and
t3 instance types are running at quite a discount whereas t4 arm64
instances are barely under on-demand price, suggesting limited capacity
for arm64 spot instances at this time. We'll change our default backend
instance architecture to amd64 to bid for the cheaper t2 and t3
instances and increase our `max_price` globally to that of a RHEL
machine running on-demand with a t3.medium.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-06-22 22:28:52 +00:00
Shubham P
e3dad5b6da add loopback4-vault in node.js client libraries (#21008) 2023-06-22 13:23:01 -07:00
Doug Knight
5d13092b03 docs: clarify external auth method considerations (#21301)
Signed-off-by: Doug Knight <doug.knight@karmix.org>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2023-06-22 19:31:20 +00:00
Ryan Cragun
8d22142a3e [QT-572][VAULT-17391] enos: use ec2 fleets for consul storage scenarios (#21400)
Begin the process of migrating away from the "strongly encouraged not to
use"[0] Ec2 spot fleet API to the more modern `ec2:CreateFleet`.
Unfortuantely the `instant` type fleet does not guarantee fulfillment
with either on-demand or spot types. We'll need to add a feature similar
to `wait_for_fulfillment` on the `spot_fleet_request` resource[1] to
`ec2_fleet` before we can rely on it.

We also update the existing target fleets to support provisioning generic
targets. This has allowed us to remove our usage of `terraform-enos-aws-consul`
and replace it with a smaller `backend_consul` module in-repo.

We also remove `terraform-enos-aws-infra` and replace it with two smaller
in-repo modules `ec2_info` and `create_vpc`. This has allowed us to simplify
the vpc resources we use for each scneario, which in turn allows us to
not rely on flaky resources.

As part of this refactor we've also made it possible to provision
targets using different distro versions.

[0] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use
[1] https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/spot_fleet_request#wait_for_fulfillment

* enos/consul: add `backend_consul` module that accepts target hosts.
* enos/target_ec2_spot_fleet: add support for consul networking.
* enos/target_ec2_spot_fleet: add support for customizing cluster tag
  key.
* enos/scenarios: create `target_ec2_fleet` which uses a more modern
  `ec2_fleet` API.
* enos/create_vpc: replace `terraform-enos-aws-infra` with smaller and
  simplified version. Flatten the networking to a single route on the
  default route table and a single subnet.
* enos/ec2_info: add a new module to give us useful ec2 information
  including AMI id's for various arch/distro/version combinations.
* enos/ci: update service user role to allow for managing ec2 fleets.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-06-22 12:42:21 -06:00
Rowan Smith
c7db2d61b0 [Docs] ldap auth add VAULT_LDAP_PASSWORD environment variable (#21407)
Add VAULT_LDAP_PASSWORD environment variable
2023-06-22 11:31:26 -07:00
Rowan Smith
21bd774c67 Fix incorrect ordering in api-docs-nav-data.json (#21404)
https://github.com/hashicorp/vault/pull/20595/files#diff-9c9c146a6465b0deafac528d60a94bee5f609ac37c203005bd3b5cda6c190882 was a contrib which added a new endpoint, however the ref to the page in api-docs-nav-data.json was incorrectly added and thus appears out of order in the left sidebar, i.e. https://developer.hashicorp.com/vault/api-docs/system/decode-token
2023-06-22 11:05:26 -07:00