Add a new `github` changed file group that includes everything in the
`.github` directory. Further refine the `pipeline` group to only
include scripts, workflows, and actions files in `.github`. We also move
the `CODEOWNERS` file into `.github/` to simplify `github` grouping.
As `build` logic responds to changes to the `pipeline` group this will
result in no longer building and testing everything for simple
changes in `github` that don't affect the pipeline.
Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
When determining whether to skip a backport ref we currenly we have to
consider many factors:
- Whether or not there are changed files?
- If there are changed files, are some enterprise or CE?
- Are there some changed files that ought to be backported to inactive
branches?
- Is the target branch active or not?
We had a large test suite that covered _most_ of these cases but because
the changed file set determines a lot of behavior we were missing cases
where we ought to backport normal mixed changed file sets for no other
reason other than the branch is active. After fixing and normalizing the
tests I fixed the source bug which is that we didn't strip the branch
prefix from the ref version when checking branch activeness.
Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
* make allowed and denied_parameters compare lists
* change name of env var
* add changelog
* linter fixes and unnecessary code removal
Co-authored-by: Bruno Oliveira de Souza <bruno.souza@hashicorp.com>
- Now that all branches are upgraded to Go 1.24 we no longer need
to guard against older branches from being upgraded for FIPS reasons.
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
The code that loads the trusted certificate cache for cert-based
authentication ignores any error that occurs while attempting to load
any of the certificates that it finds. Undoubtedly some deployments
have broken certificates or other non-certificate files stored in
their respective back-ends, and so this is important behavior: we
don't want to fail authentication just because `README.md` is not a
valid certificate!
In addition, because listing files and loading certificates is
expensive, the server maintains a cache of trusted certificates. This
cache is populated the first time it's needed, and then used for the
lifetime of the process. If a file fails to load as a certificate,
then it is simply not included in the cache.
These two things lead to a problem when using a backend that might be
subject to transient failures: a hiccough in the certificate loading
process can cause the server to establish a cache that is missing an
otherwise valid certificate. This can then lead to clients failing to
authenticate to the server, until such time as the server is restarted
and the cache reloaded.
This change makes the certificate cache more resilient to loading
failures, by caching partial successes. With this patch, the cache
behavior becomes:
- If the cache exists *and* is either complete or it is not yet time
to attempt to reload the certificates, then the cached results are
used without reservation.
- Otherwise we attempt to load the certificates from storage:
- If the cache does not already exist then a new, empty cache is
created.
- The storage is listed, we attempt to load everything in storage,
skipping things that we have already successfully loaded, and
skipping things that we cannot load, as usual.
- Once we have attempted to load everything from storage, if there
were any errors, we compute a deadline for retrying the load, with
an exponentially increasing delay. If there were no errors, then
the cache is considered complete, and there will be no retry.
This has the nice behavior that we recover from transient failures
eventually, while the exponential back-off ensures that we don't waste
too much time attempting to load certificates that can never be
loaded.
Co-authored-by: John Doty <john.doty@databricks.com>
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
- Instead of using a reserved oid from LetsEncrypt in our tests
and documentation (1.3.6.1.4.1.44947.1.2.4), use
1.3.6.1.4.1.32473.1.2.4, which is in the reserved space for docs
and examples based on RFC 5612
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
* Add O= restrictions in addition to OU= restrictions
* Add changelog
* Add goDoc to test
* Don't let test certificate expire.
Co-authored-by: Kit Haines <khaines@mit.edu>
[VAULT-39160] actions(hcp): add support for testing custom images on HCP (#9345)
Add support for running the `cloud` scenario with a custom image in the
int HCP environment. We support two new tags that trigger new
functionality. If the `hcp/build-image` tag is present on a PR at the
time of `build`, we'll automatically trigger a custom build for the int
environment. If the `hcp/test` tag is present, we'll trigger a custom
build and run the `cloud` scenario with the resulting image.
* Fix a bug in our custom build pattern to handle prerelease versions.
* pipeline(hcp): add `--github-output` support to `show image` and
`wait image` commands.
* enos(hcp/create_vault_cluster): use a unique identifier for HVN
and vault clusters.
* actions(enos-cloud): add workflow to execute the `cloud` enos
scenario.
* actions(build): add support for triggering a custom build and running
the `enos-cloud` scenario.
* add more debug logging and query without a status
* add shim build-hcp-image for CE workflows
Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
* adding new locks
* adding initial testing
* changelog
* Update changelog/_9336.txt
* fixing test to use proper error output
* added additional locks on pops and last push.
* fixing tests since I cant use t.Fatalf in a go func
* adding rotation window, removing lock as reached a deadlock in test
* removing locking from the OnFailure
* removing unused locks.
---------
Co-authored-by: JMGoldsmith <spartanaudio@gmail.com>
Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
* Fix unsetting sys tunable values (on ent).
* Remove commented test, add GoDoc for test.
* Handle empty slices better (PR feedback).
* Fetch Auth endpoint without listing (PR feedback).
* Fatal vs. Error
* Add GetAuth instead of ListAuth
* Fix error format error. Oops!
* One more list->get auth. Remove extra check.
* Updated TuneMountWithContextAllowNil to use a struct (with all pointers).
* Allow setting empty values for userLockoutConfig too - use new struct.
* Extra pointer.
* Remove useless functions.
* Simple test to ensure any field we can set we can update and vice-versa.
* Add json tag checks.
Co-authored-by: Kit Haines <khaines@mit.edu>
* support wide width splash page
* add enable_self_enrollment param to mfa-method config
* build and implement mfa setup-card display only component
* fix transition bug navigating away from mfa method
* rename mfa card
* WIP implement self-enrollment workflow
* wip integration tests
* convert mfa-form to typescript
* remove unused import
* show alert whenver there is a QR code
* organze mfa steps into Mfa::VerifyForm and Mfa::SelfEnroll
* WIP stretch goals of mfa redesign
* add copyright headers
* update test
* add support for multiple constraints with self-enrollment
* remove comment
* fix multi-method UX
* fix state for failed validation
* remove changing button for error states
* add error handling and validation messages
* minor cleanup for params
* first round of cleanup and reorganization
* final round of logic cleanup and organization
* touch ups after testing with live backend
* fix comment
* final test cleanup!
* Apply suggestions from code review
* improve mirage error handling to more accurately mimic real failures
* add test coverage
* make qr rendering logic easier
* address PR feedback
* submit enroll form on enter, remove code digit number from copy, reset enroll state
Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
* UI: General settings Integration and Acceptance Tests. (#9363)
* General settings integration tests
* Add page header integration tests
* Add page header test for plugin settings as a tab too
* More tests!
* Acceptance tests!
* Add more acceptnace tests
* Add copywrite headers
* Fix linting error
* Fix accessibility errors
* Remove unused vars
* Put mock secret engine back into beforeHook
* Add enterprise to key management test (#9392)
---------
Co-authored-by: Kianna <30884335+kiannaquach@users.noreply.github.com>
* Add role rotation info to create/update observations
* observatin enhancements
* observatin enhancements
* remove log
* duration strings instead of seconds
* the stringening
* more times
* credential type
* Add rotation schedule/period to root rotation
* more ttls
* updates
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
* include mount and ns in recovery message, fix state issue
* fix state issue
* show in prod and add changelog
Co-authored-by: lane-wetmore <lane.wetmore@hashicorp.com>