209 Commits

Author SHA1 Message Date
Vault Automation
bb74f8bb4e
revert cc18896f9c40c7f1cd9300a6bcb3e72561a3567d
* Revert "feat(enos): migrate vault_verify_undo_logs to vault_run_blackbox_test module (#14170)"

This reverts commit cc18896f9c40c7f1cd9300a6bcb3e72561a3567d.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2026-05-05 19:19:36 +00:00
Vault Automation
684a372589
feat(enos): migrate vault_verify_undo_logs to vault_run_blackbox_test module (#14170) (#14374)
- Migrate undo logs verification from shell script to Go blackbox test
- Add session_metrics.go and session_remote.go helpers to blackbox SDK
- Create undo_logs_test.go in vault/external_tests/blackbox/verify package
- Update autopilot scenario to use vault_run_blackbox_test module
- Remove deprecated vault_verify_undo_logs module
- Update vault_run_blackbox_test module to support test environment variables

This change improves test maintainability and consistency by using the
standardized blackbox testing framework instead of custom shell scripts.

Co-authored-by: brewgator <12831681+brewgator@users.noreply.github.com>
2026-04-29 09:25:06 -04:00
Vault Automation
3b43df47ae
VAULT-43741 (enos) Convert vault_verify_version to Use Blackbox SDK (#13950) (#14323)
* Update vault version verify to use Go BB SDK test

* Add missing env vars

* more

* formatting

* typo

* formatting

* fmt

* more-fmt

* requested changes

* formatting

* Apply suggestions from code review

Co-authored-by: brewgator <ltcarbonell@pm.me>

* formatting

* remove external test access

* remove exec mode

* formtting

* Delete sdk/helper/testcluster/blackbox/session_remote.go

Co-authored-by: brewgator <lt.carbonell@hashicorp.com>
2026-04-28 08:59:34 -04:00
Vault Automation
aca7f3740c
[VAULT-44098] containers: never attempt to run setcap when running as non-root user (#13988) (#14106)
In prior versions of the Vault container we'd set `ICP_LOCK` on the `vault`
binary at runtime via the entrypoint script. As we now run the Vault
container as an unprivileged user we have to set this capability at build time
as `setcap` cannot be run by unprivileged users.

This change updates the Alpine OCI and UBI container entrypoints
to not attempt to run `setcap` when running as non-root user.

Importantly, these changes introduce a *new requirement* whereby users of the
container must add `IPC_LOCK` capability to the container or pod or the
Vault service will fail to start. As running with locked memory is always our
guidance for Vault the containers now require this. Users that do not wish to grant
the `IPC_LOCK` capability will want to wrap the container unset the capability on
the binary during build time: `setcap cap_ipc_lock=-ep /bin/vault`.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2026-04-20 12:48:55 -06:00
Vault Automation
8c58356d5e
[VAULT-43581] sdk: Add MongoDB blackbox tests for static roles (#13746) (#14010)
* Add MongoDB blackbox tests for static roles

- Implement core static role tests (create, read credentials, manual rotation, validation)
- Add helper functions for MongoDB user creation and credential verification
- Implement basic connection config test
- Remove stub functions, add TODOs for future implementation
- All tests follow blackbox SDK patterns with parallel execution and proper cleanup

* make it work

* WIP

* mongo private/public urls

* Apply suggestion from @brewgator

* regex for readability

Co-authored-by: brewgator <lt.carbonell@hashicorp.com>
2026-04-17 09:15:38 -04:00
Vault Automation
716941e2fb
Make scenario blackbox tests output non-sensitive (#13933) (#13942)
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-04-16 07:05:40 -04:00
Vault Automation
64f9758071
Backport Add PostgreSQL Blackbox Coverage for DB Connection Management With Infra setup into ce/main (#13631)
* Add PostgreSQL Blackbox Coverage for DB Connection Management (#13313)

* Add blackbox test for PostgreSQL database config create endpoint

* Moving to postgresql folder

* Adding test case for multi-host PostgreSQL connection

* Adding DSN test case

* Adding Connection verification test

* Get Connection verification test

* Adding test cases for list/delete/reset connections

* Refactoring and adding helper

* Refactoring and adding helper

---------

Co-authored-by: Kajal Kusum <kajal.kusum@ibm.com>

* Move postgres tests to database subdirectory to match modular structure

* go mod

* go mod

* pgx

---------

Co-authored-by: KajalKusum <kajal.kusum@hashicorp.com>
Co-authored-by: Kajal Kusum <kajal.kusum@ibm.com>
Co-authored-by: LT Carbonell <ltcarbonell@pm.me>
2026-04-08 14:16:26 -07:00
Vault Automation
6b268e369c
Backport [Mongo SDK Plugin] (enos): Add MongoDB plugin test framework for Enos into ce/main (#13700)
* no-op commit

* [Mongo SDK Plugin] (enos): Add MongoDB plugin test framework for Enos (#13576)

* Add modular database infrastructure for Enos testing

Infrastructure Changes:
- Created generic database_container module supporting PostgreSQL, MongoDB, MySQL
- Consolidated database configs in enos-globals.hcl with dynamic port generation
- Refactored set_up_external_integration_target to use generic module with for_each
- Updated enos-scenario-plugin.hcl to pass database_configs from globals

Test Organization:
- Reorganized test structure: moved postgres/ and mongodb/ into database/ directory
- Maintains existing production-ready test helpers
- Structure: plugins/database/{postgres,mongodb}/ for better organization

Benefits:
- Easy to add new databases (just add to database_configs in globals)
- No code duplication across database types
- Consistent patterns for all database testing
- Supports both Docker containers and external database URLs

---------

Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-04-08 12:25:01 -04:00
Vault Automation
077234b2bc
Update Slack channel reference from #team-quality to #team-vault-automation (#13724) (#13743)
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-04-08 13:48:25 +00:00
Vault Automation
9febf4ffca
[VAULT-43377] Update semver constraints in upgrade test (#13565) (#13707)
* update semver constraints

* lint

* fix comparison

Co-authored-by: Jenny Deng <jenny.deng@hashicorp.com>
2026-04-07 18:50:47 +00:00
Vault Automation
88aa07c041
(enos) Improve Blackbox SDK Filtering and Test Organization (#13350) (#13490)
* reorganize the blackbox structure

* mend

* organize by directories

* respond to feedback:

* Formatting

* whitespace

* default testnames

* local

* nullcheck

Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-03-30 09:09:53 -07:00
Vault Automation
13c7838ab3
Backport [VAULT-42245] Add IBM license update to enos upgrade scenario into ce/main (#13165)
* [VAULT-42245] Add IBM license update to enos upgrade scenario (#12661)

* initial changes

* more changes

* test

* test changes

* Fix test

* try ignoring customer id

* clean up

* more clean up

* lint

* PR comments

* make edition a variable

* lint

* PR comments

* add default for customer id

* fix script and lint

* specify license file

* Apply suggestion from @ryancragun

Co-authored-by: Ryan Cragun <me@ryan.ec>

* always configure ibm license

* Update enos/modules/verify_log_secrets/main.tf

Co-authored-by: Ryan Cragun <me@ryan.ec>

* lint

---------

Co-authored-by: Ryan Cragun <me@ryan.ec>

* lint

---------

Co-authored-by: Jenny Deng <jenny.deng@hashicorp.com>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2026-03-25 12:04:01 -07:00
Vault Automation
a506ee6974
Verify LDAP Readiness (#12986) (#13392)
* Verify LDAP Readiness

* require eventually

* public test of ldap server

* touchups

Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-03-25 14:50:02 -04:00
Vault Automation
773f056792
Backport [VAULT-43364] pipeline: add template generation support into ce/main
* [VAULT-43364] pipeline: add template generation support

Add a new `template` to the `pipeline generate` command tree. It allows
rendering Go text templates with pipeline requests available via context
functions. The new system is now product agnostic and can be used to
generate any template we wish. This will supersede the enos specific
configuration command.

We also add support for multiple cadences when fetching the list of
release versions. Previously it was assumed that we followed a minor
version bump cadence when fetching versions with an n-minus style lower
bound. Now we can specify the major or minor cadence. To support a
migration from one cadence to another you can also specify an prior
cadence and the version at which the transition happened. This allows
the n-3 reverse traversal to drop into the prior cadence if/when
necessary.

**Template Rendering System**
- New `pipeline generate template` command renders Go templates with
  pipeline data access
- Supports stdin/stdout or file-based input/output
- Templates access version data via function calls rather than
  pre-populated context

**Version Cadence Support**
- Added `VersionCadence` type with `minor` and `major` release cadence
  tracking
- Supports cadence transitions (e.g., minor→major) with
  `TransitionVersion` and `PriorCadence` fields
- Calculates version ranges respecting different release cadences

**Template Functions**
- `VersionsNMinus` / `VersionsBounded` - List versions with explicit
  cadence parameter
- `VersionsNMinusTransition` / `VersionsBoundedTransition` - Handle
  cadence transitions
- `ParseVersion`, `CompareVersions`, `FilterVersions` - Version
  utilities
- All functions require cadence to be explicitly specified

**CLI Integration**
- `--version` and `--edition` flags expose current version/edition to
  templates
- Templates reference these via `.Version` and `.Edition` context fields

**Enos Migration**
- Converted `enos-dynamic-config.hcl` to template-based generation
- Uses `VersionsNMinusTransition` to handle Vault's minor→major cadence
  shift at 1.21.5

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2026-03-25 14:41:11 -04:00
Vault Automation
6d5e4c863b
Backport enos(ldap): always verify base DN connection before setup into ce/main
Refactor our connection checking into a new LDAP module that is capable
of running a search and waiting for success. We now call this module
while setting up the integration host and before enabling the LDAP
secrets engine.

We also fix two race conditions in the Agent and HA Seal scenarios where
we might attempt to verify and/or test LDAP before the integration host
has been set up.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: LT Carbonell <lt.carbonell@hashicorp.com>
2026-03-25 13:34:17 -04:00
Vault Automation
98a1522357
Backport Check in checkout part 2 into ce/main (#13316)
* Check in checkout part 2 (#12001)

* Check in checkout part 2

* Linter error fix

* Linter error fix

* error fix

* Error fix

* Error fix

* PR review changes

* Linter bug fix

* Linter bug fix

* Bug fix

* Bug fix

* Bug fix

* PR review changes

* Enabling audit trail

* Enabling audit trail

* Enabling audit trail

* Enabling audit trail

* Enabling audit trail

* Enabling audit trail

* Code review changes

* Code review changes

* Code review changes

* Code review changes

* Code review changes

* ci: retrigger

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* Code merge changes

* CI fix

* CI fix

* CI fix

* conflict issue

* Default for audit log

* Reverting ENOS_VAR_verify_ldap_secrets_engine to false

* Fix Merge conflict

* Upload-Issuer Compliance with Common Criteria. (#12101)

* Upload-Issuer Compliance with Common Criteria.

* Add Changelog.

* Update changelog/_12101.txt

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>

* Update builtin/logical/pki/storage_validate_imports_ent.go

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>

* PR-Review, add trap for deletion errors.

* Add test-doc referencing NIAP requirement.

---------

Co-authored-by: Steven Clark <steven.clark@hashicorp.com>

* hooks(pre-push): handle ssh protocol prefix in git URLs (#12492)

* hooks(pre-push): handle ssh protocol prefix in git URLs

Handle optional URL prefix and suffixes when checking for enterprise.

Signed-off-by: Ryan Cragun <me@ryan.ec>

* Duplicate fix

* PR feedback changes

* Code Review changes

* Code Review changes

* PR review changes

* ttl Fix

* Removing all static role code frpm PR

* Removing spaces

---------

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Kajal Kusum <kajal.kusum@ibm.com>
Co-authored-by: Kit Haines <khaines@mit.edu>
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
Co-authored-by: Ryan Cragun <me@ryan.ec>

* temporarily disable flaky enos tests (#13045)

* temporarily disable ldap enos tests

* remove smoke_sdk from samples

---------

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: KajalKusum <kajal.kusum@hashicorp.com>
Co-authored-by: Kajal Kusum <kajal.kusum@ibm.com>
Co-authored-by: Kit Haines <khaines@mit.edu>
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
Co-authored-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-03-23 20:20:59 +00:00
Vault Automation
a3bc0a3078
(enos): Add LDAP secrets engine blackbox tests to Plugin Scenario (#13072) (#13293)
* Add LDAP secrets engine blackbox tests

* Format

* format

* cleanup environment

* Install ldap-utils in CI for LDAP domain provisioning

* wrap in eventually

* debugging

* fix ip issues

Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-03-23 14:22:46 +00:00
Vault Automation
eb835a028d
Create plugin SDK scenario infrastructure (#13073) (#13111)
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-03-18 12:33:27 +00:00
Vault Automation
346e1386e9
enos: guard LDAP test connection (#12992) (#13000)
Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2026-03-13 13:38:02 -06:00
Vault Automation
2e2e50b76a
enos: poll for LDAP server readiness when populating org, groups, and users
* enos: poll for LDAP server readiness when populating org, groups, and users

The prior implementation had a hard 10 second sleep waiting for the
container to start up. That is not enough time as we see regular
failures in CI:

```
│ Error: exit status 1
│
│ Error: Execution Error
│
│   with module.set_up_external_integration_target.enos_remote_exec.populate_ldap,
│   on ../../modules/set_up_external_integration_target/main.tf line 70, in resource "enos_remote_exec" "populate_ldap":
│   70: resource "enos_remote_exec" "populate_ldap" {
│
│ failed to execute commands due to: running script:
│ [/home/runner/actions-runner/_work/vault-enterprise/vault-enterprise/enos/modules/set_up_external_integration_target/scripts/populate-ldap.sh]
│ failed, due to: 1 error occurred:
│ 	* executing script: Process exited with status 255: ldap_sasl_bind(SIMPLE):
│ Can't contact LDAP server (-1)
```

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2026-03-13 18:17:43 +00:00
Vault Automation
1a57de40bd
Backport Fill out Secret Engine Tests into ce/main (#12927)
* no-op commit

* Fill out Secret Engine Tests (#12287)

* reorg some tests

* split tests out

* fix test

* test cleanup

* make ldap work

* formatting

* whitespace

* Make KMIP work

* Activate smoke_sdk scenarios

* Add gotestsum

* tryagain

* fix go path install

* add debugging

* more debug

* shrug emoji

* Remove debug and increase timeout

* syntax

* help with polling

* disable stepdown test for now

* Update vault/external_tests/blackbox/secrets_ldap_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update sdk/helper/testcluster/blackbox/session_raft.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update enos/modules/verify_secrets_engines/modules/create/auth.tf

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update enos/modules/vault_run_blackbox_test/scripts/run-test.sh

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update enos/modules/vault_run_blackbox_test/main.tf

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* arm fix

* gotestsum

* timing

* try this

* try this

* handle when these already exist

* ---

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Cant run smoke_sdk in ce (#12931)

---------

Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-12 12:00:59 -04:00
Vault Automation
21ac80276f
enos(ldap/static-roles): always encode write bodies as JSON (#12792) (#12893)
While investigating a failure during another code review[0] I noticed
that we were using key/value pairs when when executing `vault write`.
That was a problem because we ran into a situtation where the password
started with an `@`, which `vault write` infers to be a localtion on
disk[1].

This change updates static-roles.sh fixes that issue as writes are
always written as JSON instead of key/value pairs.

As I was there I choose to improve the script in several ways:
  - All Vault command executions now capture both STDOUT and STDERR.
    When commands fail, the captured output is included in error.
  - Function-local variables are now properly scoped with the `local`
  - Some comment changes for clarity (obviously subjective for me)

[0]: https://github.com/hashicorp/vault-enterprise/actions/runs/22748142932/job/65978391382?pr=12001#step:17:159
[1]: https://developer.hashicorp.com/vault/docs/commands/write

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2026-03-10 13:24:09 -06:00
Vault Automation
4d2ccaa86e
[COMPLIANCE] Update Copyright and License Headers (#11034) (#12518)
Co-authored-by: oss-core-libraries-dashboard[bot] <206901675+oss-core-libraries-dashboard[bot]@users.noreply.github.com>
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2026-02-24 17:20:11 -07:00
Vault Automation
6ff81f5a57
Configuring Dynamic Credentials Workflows (#11791) (#12476)
* Positive Test Coverage:
Positive Tests:
- Request Dynamic Credentials
- Renew Dynamic Credentials
- Audit Trail for All Operations
- Automatic Cleanup When Lease Expires

Negative Tests:
- Default TTL to Limit Credential Lifespan
- Max TTL Enforcement - Prevent Indefinite Renewal
- Revoke Dynamic Credentials (Lease Expiration)
- Invalid OU/DN Configuration
- Rollback on Creation Failure
- LDAP Server Unreachable During Dynamic Credentials Request"

* refactored the code and updated code for detailed error logs

* fixed the lint issue

* Fix shell script formatting for lint/shfmt compliance

* refactored the code,modularised the code with focused functions

* lint fixes and added abspath of files

* lint issue fixing

* fixing lint issues

* fixing lint issues

* lint issue fixing

* added individual tf configuarations

* fixing lint

* reverted the configuration for testing ldap [ci skip]

* ENOS_VAR_verify_ldap_secrets_engine variable to true

* verify_ldap_secrets_engine set true

* reverted the configuration for testing ldap

* optimized the code with Better error handling and exit code checking

* added the audit trail test

* fixing lint

* reverted the configuration for testing ldap

* conflicts resolved

* reverted the configuration for testing ldap

* Improved error handling in LDAP verification scripts

* audit log path added

* vault audit path

* Revert "vault audit path"

This reverts commit d878e333c813e76b8ce4180bb27d00ac22d7d4e1.

* error handling improved

* increased time out

* fixing audit trail

* fixed audit trail script

* fixing lint issues

* audit path issue fixed

* revert vars hcl changes

* lint issues

* Enhanced timeout and error messages

* removed audit logs checks for revoke and renew

* fixed the review comments

* echoing error with warning

* resolved conflicts

* verify_ldap_secrets_engine set to false

* fixing lint issues

* fixing build issue

* build issues fixing

* ttl to 60s

* Revert Dynamic-roles and static-roles.sh to main branch versions

* added ldif to dyanmic roles

* fixing build issue

* fixing static role

* static-role cahgnes revert

* fixing build issue

* static role fix

* fixing  build

* fixing lint issue

* password policy change

* Fix LDAP password quality and ACL permissions

- Increase DEFAULT_MIN_CHARS from 1 to 2 to meet OpenLDAP pwdCheckQuality requirements
- Configure ACL to grant admin write access to ou=users for credential deletion
- Add fallback ACL testing to verify permissions

Fixes: LDAP Result Code 19 (Password quality constraint)
Fixes: LDAP Result Code 50 (Insufficient access rights)

* Revert "Fix LDAP password quality and ACL permissions"

This reverts commit a56ba604b465e22b62825af645ebe43810ab3922.

* fxing access issue

* revert acl changes

* fixing build

* fixing build

* fixing build

* revert static role change

* Update test-run-enos-scenario-matrix.yml reverted

---------

Co-authored-by: Naresh-Nani-byte <naresh.pentala@hashicorp.com>
Co-authored-by: Naresh Pentala <naresh.pentala@ibm.com>
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-02-24 05:00:22 +00:00
Vault Automation
e5ad193d13
Root Credential Rotation-Part 2 (#11887) (#12400)
* resolved conflicts

* Update test-run-enos-scenario-matrix.yml

* Update test-run-enos-scenario-matrix.yml reverted

* review comments changes

* review comments

* review comments

* Update test-run-enos-scenario-matrix.yml

* lint

* test

* policy name change

* changes

* Update ldap.tf

* changes

* Update test-run-enos-scenario-matrix.yml reverted

* review comments

* audit log changes

* Update test-run-enos-scenario-matrix.yml

* lint

* lint

* lint

* lint

* lint

* changes

* changes

* changes

* changes

* changes

* changes

* Update test-run-enos-scenario-matrix.yml Reverted

* review cmmnts

* lint

* lint

* Update test-run-enos-scenario-matrix.yml reverted

* Update test-run-enos-scenario-matrix.yml

* Update test-run-enos-scenario-matrix.yml reverted

* Update test-run-enos-scenario-matrix.yml

* Update ldap.tf

* Update main.tf

* Update audit-verify.sh [ci skip]

* Update ldap.tf

* Update ldap.tf

* Update enos-scenario-seal-ha.hcl

* Update enos-scenario-seal-ha.hcl

* Update enos-scenario-seal-ha.hcl

* Update test-run-enos-scenario-matrix.yml reverted

---------

Co-authored-by: pranaya092000 <pranaya.p@hashicorp.com>
Co-authored-by: Pranaya <Pranaya.P@ibm.com>
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-02-18 12:59:12 -05:00
Vault Automation
ccceb19d02
committed dynamic-roles.sh (#11833) (#12356)
* Dynamic-roles:updated with review comments

* Fix enos formatting: align variable assignments in scenario files

* Fix terraform formatting in LDAP modules

* Fix shell script formatting: add newlines and fix indentation

* Fix shellcheck warnings: quote variables to prevent globbing

* Change LDAP secrets engine verification to true

* Add variable for LDAP static role verification

* Configure SSH transport for LDAP dynamic roles

Added SSH transport configuration for LDAP dynamic roles.

* Fix formatting in ldap.tf

* Change LDAP secrets engine verification to false

---------

Co-authored-by: Amala Mathew <amala.mathew@hashicorp.com>
Co-authored-by: mathew-amala <amala.mathew1@ibm.com>
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-02-18 08:36:34 -05:00
Vault Automation
7c5d32dcc1
VAULT-41702 Added test cases for static role (#12043) (#12265)
* VAULT-41702 Added test cases for static role

* Fix lint issues

* Fix lint issues

* Fix lint issues

* Fix lint issues

* Fix lint issues

* Fix lint issues

* Fix lint issues

* Fix lint issues

* Fix lint issues

* Fix failing test cases

* Fix failing test cases

* Fix failing test cases

* Fix failing test cases

* Fix lint issue

* Commented few tests to check if the build passed in the pipeline

* Commented few tests to check if the build passed in the pipeline

* Fix failing tests

* Fix failing tests

* Fix lint issue

* Fix lint issue

* Fix lint issue

* Revered ENOS_VAR_verify_ldap_secrets_engine to false

* Fixing review comments

* Fix lint issue

* Enabled 'ENOS_VAR_verify_ldap_secrets_engine=true' to run in CI

* reverted 'ENOS_VAR_verify_ldap_secrets_engine' to false

* Fix review commments

---------

Co-authored-by: rohit-ganthade-hashicorp <rohit.ganthade@hashicorp.com>
Co-authored-by: Rohit Ganthade <rohit.ganthade@gmail.com>
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-02-10 08:57:00 -05:00
Vault Automation
bb106f1bef
Add blackbox testing SDK (#11210) (#12245)
* rough draft

* add some stuff for dynamic secrets

* add some more helpers and sample tests

* new helpers, new tests, refactoring

* Add Basic Smoke SDK Scenario (#11678)

* Add simple test for stepdown election

* Add a smoke_sdk scenario

* add script to run tests locally

* fix up a few things

* VAULT-39746 - Add Tests to Smoke SDK and Cloud Scenarios (#11795)

* Add some go verification steps in enos sdk test run script

* formatting

* Add a smoke_sdk scenario userpass secret engine create test (#11808)

* Add a smoke_sdk scenario userpass secret engine create test

* Add the some additional tests

* Add Smoke tests to Cloud Scenario (#11876)

* Add a smoke_sdk scenario userpass secret engine create test

* Add the some additional tests

* Add smoke testing to cloud

* Add test results to output and test filtering

* comment

* fix test

* fix the smoke scenario

* Address some various feedback

* missed cleanup

* remove node count dependency in the tests

* Fix test perms

* Adjust the testing and clean them up a bit

* formatting

* fmt

* fmt2

* more fmt

* formatting

* tryagain

* remove the docker/hcp divide

* use the SHA as ID

* adjust perms

* Add transit test

* skip blackbox testing in test-go

* copywrite

* Apply suggestion from @brewgator

* Add godoc

* grep cleanup

---------

Co-authored-by: Josh Black <raskchanky@gmail.com>
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-02-06 21:36:29 +00:00
Vault Automation
852ac403bb
Root Credential Rotation Workflows (#11647) (#11996)
* Verify vault can generate dynamic credentials and rotate root password

* Added new line at end of the script file

* Remove extra space in sh script

* Remove extra space in sh script

* Created modular structure and other fixes

* linting issues

* lint issues

* Linting issue in verify-secrets.sh

* Linting issue in verify-secrets.sh

* Linting issues in verify-secrets.sh and verify-rotation.sh

* Linting issues

* Linting issues

* Linting issues

* Reverted the changes made to ldap-configs.sh and ldap-verify-configs

* Fix missing newline at end of ldap-verify-configs

Add a newline at the end of the ldap-verify-configs script.

* test ldap changes

* test ldap changes

* reverted the configuration for testing ldap [ci skip]

* reverted the configuration for testing ldap [ci skip]

* Refactoring

* Update ldap.tf

* Update ldap.tf [ci skip]

* Update ldap.tf

* Adding Password policy in ldap secret engine config

* Root credential rotation workflows

* linting issues

* Update test-run-enos-scenario-matrix.yml to check ldap changes

* Update test-run-enos-scenario-matrix.yml reverted

* conflicts resolved

* changes

* Update test-run-enos-scenario-matrix.yml to test ldap changes

* Update test-run-enos-scenario-matrix.yml reverted

* added functions

* linting issues

* linting issues

* linting issues

* Update test-run-enos-scenario-matrix.yml to tst ldap

* Update test-run-enos-scenario-matrix.yml reverted

* review changes

* Update test-run-enos-scenario-matrix.yml to test ldap

* lint issue

* reverted Update test-run-enos-scenario-matrix.yml

* refactor

* Update test-run-enos-scenario-matrix.yml test ldap

* Update verify-rotation.sh

* Update verify-rotation.sh

* Update test-run-enos-scenario-matrix.yml reverted

---------

Co-authored-by: pranaya092000 <pranaya.p@hashicorp.com>
Co-authored-by: Pranaya <Pranaya.P@ibm.com>
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-01-27 13:17:18 +05:30
Vault Automation
5a54a1bb41
LDAP Check out Check in System test Cases Part-1 (#11792) (#11986)
* LDAP Check out Check in System test Cases Part-1

* Test run on pipeline

* Test run on pipeline

* Linter error fix

* Fix linter issue

* Linter error fix

* lint issue

* lint issue

* lint issue

* lint issue

* lint issue

* lint issues

* bug fix

* lint fix

* Run test on pipeline

* Remove file enos.vars.hcl from repository

* Revert "Remove file enos.vars.hcl from repository"

This reverts commit bec9bcd5e1d8b07a662756c2385ca90e035fc125.

* Restore enos.vars.hcl to repository

* CI build failure fix

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* CI bug fix

* Replace string based error detection with exit code

* Changing pipeline run variable to false

---------

Co-authored-by: KajalKusum <kajal.kusum@hashicorp.com>
Co-authored-by: Kajal Kusum <kajal.kusum@ibm.com>
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-01-27 12:31:51 +05:30
Vault Automation
6841981524
Root Credential Configuration Workflows (#11606) (#11991)
* Verify vault can generate dynamic credentials and rotate root password

* Added new line at end of the script file

* Remove extra space in sh script

* Remove extra space in sh script

* Created modular structure and other fixes

* linting issues

* lint issues

* Linting issue in verify-secrets.sh

* Linting issue in verify-secrets.sh

* Linting issues in verify-secrets.sh and verify-rotation.sh

* Linting issues

* Linting issues

* Linting issues

* Reverted the changes made to ldap-configs.sh and ldap-verify-configs

* Fix missing newline at end of ldap-verify-configs

Add a newline at the end of the ldap-verify-configs script.

* test ldap changes

* test ldap changes

* reverted the configuration for testing ldap [ci skip]

* reverted the configuration for testing ldap [ci skip]

* Refactoring

* Update ldap.tf

* Update ldap.tf [ci skip]

* Update ldap.tf

* Adding Password policy in ldap secret engine config

* Update test-run-enos-scenario-matrix.yml with ldap changes

* Reverted Update test-run-enos-scenario-matrix.yml for testing ldap changes

* conflict changes [ci skip]

* Update test-run-enos-scenario-matrix.yml for ldap testing

* Reverted Update test-run-enos-scenario-matrix.yml

* ldap chnged to MOUNT

* Update test-run-enos-scenario-matrix.yml to test ldap changes

* Update test-run-enos-scenario-matrix.yml reverted

* updated review comments

* updated review comments

* Update test-run-enos-scenario-matrix.yml to test ldap

* Update test-run-enos-scenario-matrix.yml reverted

* Update verify-secrets.sh

---------

Co-authored-by: pranaya092000 <pranaya.p@hashicorp.com>
Co-authored-by: Pranaya <Pranaya.P@ibm.com>
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-01-27 04:48:50 +00:00
Vault Automation
692246e894
enos(ui): use amd64 target machines (#11875) (#11894)
Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2026-01-22 10:59:06 -07:00
Vault Automation
812498cfc6
VAULT-41778 Added enos tests for LDAP auth. (#11773) (#11827)
* VAULT-41778 Fixing linting issues

* Fixing linting issues

* Fixing lint issues

* Fixing lint issues

* Fixing review comments

* Fixing lint issues

* Fix review comments

* Fix review comments

* Fix lint issues

* Fix lint issues

* Fix failing tests

* Fix lint issues

* Fixing failed tests

* Fix lint issues

* Fix lint issues

* Reverted ENOS_VAR_verify_ldap_secrets_engine variable to false

---------

Co-authored-by: rohit-ganthade-hashicorp <rohit.ganthade@hashicorp.com>
Co-authored-by: Rohit Ganthade <rohit.ganthade@gmail.com>
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2026-01-20 08:16:46 -05:00
Vault Automation
0e0abf8f4e
Root credential rollback workflow (#11616) (#11785)
* Add LDAP secrets engine verification with rollback functionality

- Added LDAP secrets engine read verification module
- Implemented secrets-rollback.sh script for LDAP credential rotation testing
- Updated enos configuration files for LDAP testing support
- Added vault.zip distribution file for testing

* Optimize LDAP rollback script - improve readability and reduce redundancy

* demonstated 3 case of rollback under various situations and maintain system consistancy

* modified ldap.tf file with changes needed for secret-rollback script file

* Fix LDAP secrets engine: remove unused credential_ttl_buffer variable

* Fix shell script formatting for shfmt compliance

* Refactor LDAP secrets rollback script for clarity

* Add LDAP verification configuration to ldap.tf

Added local variable for LDAP login data and configured resource for verifying Vault LDAP configurations.

* Comment out vault_revision in enos.vars.hcl

* Remove unused generate_ldif function from secrets-rollback script

* Make sleep delays configurable in secrets-rollback script

* Add LDAP secrets rollback verification scripts and update ldap.tf configuration

* Update LDAP secrets rollback test scripts

* Update LDAP secrets engine read module

* Fix formatting in ldap.tf - correct indentation

* Change LDAP secrets engine verification to true

* Refactor LDAP rollback script for clarity

Updated script to improve clarity and consistency checks after LDAP root rotation failures.

* Add copyright and license information to script

* Fix formatting in secrets-rollback-transactional.sh

* Change LDAP secrets engine verification to false(reverting to old state)

Tried running root rotation  rollback cases with ldap set true

---------

Co-authored-by: sukanya-prakash <sukanya.p@hashicorp.com>
Co-authored-by: Sukanya P <sukanyap@Sukanyas-MacBook-Pro.local>
Co-authored-by: Sukanya P <sukanyap@mac.n3d-in.ibm.com>
2026-01-16 09:01:56 -05:00
Vault Automation
8a3aa76513
VAULT-41086 Verify vault can generate dynamic credentials and rotate root password. (#11344) (#11681)
* Verify vault can generate dynamic credentials and rotate root password

* Added new line at end of the script file

* Remove extra space in sh script

* Remove extra space in sh script

* Created modular structure and other fixes

* linting issues

* lint issues

* Linting issue in verify-secrets.sh

* Linting issue in verify-secrets.sh

* Linting issues in verify-secrets.sh and verify-rotation.sh

* Linting issues

* Linting issues

* Linting issues

* Reverted the changes made to ldap-configs.sh and ldap-verify-configs

* Fix missing newline at end of ldap-verify-configs

Add a newline at the end of the ldap-verify-configs script.

* test ldap changes

* test ldap changes

* reverted the configuration for testing ldap [ci skip]

* reverted the configuration for testing ldap [ci skip]

* Refactoring

* Update ldap.tf

* Update ldap.tf [ci skip]

* Update ldap.tf

* Update test-run-enos-scenario-matrix.yml to test ldap changes

* reverted Update test-run-enos-scenario-matrix.yml to test ldap changes

---------

Co-authored-by: pranaya092000 <pranaya.p@hashicorp.com>
Co-authored-by: Pranaya <Pranaya.P@ibm.com>
2026-01-09 21:32:54 +00:00
Vault Automation
12e793039a
[UI] - migrate to pnpm for JS package management (#11651) (#11661)
* move from yarn to pnpm for package management

* remove lodash.template patch override

* remove .yarn folder

* update GHA to use pnpm

* add @babel/plugin-proposal-decorators

* remove .yarnrc.yml

* add lock file to copywrite ignore

* add @codemirror/view as a dep for its types

* use more strict setting about peerDeps

* address some peerDep issues with ember-power-select and ember-basic-dropdown

* enable TS compilation for the kubernetes engine

* enable TS compilation in kv engine

* ignore workspace file

* use new headless mode in CI

* update enos CI scenarios

* add qs and express resolutions

* run 'pnpm up glob' and 'pnpm up js-yaml' to upgrade those packages

* run 'pnpm up preact' because posthog-js had a vulnerable install. see https://github.com/advisories/GHSA-36hm-qxxp-pg3

* add work around for browser timeout errors in test

* update other references of yarn to pnpm

Co-authored-by: Matthew Irish <39469+meirish@users.noreply.github.com>
2026-01-09 11:45:14 -06:00
Vault Automation
7b470708ac
[VAULT-41521] enos(ec2_infor): update scenario base images (#11508) (#11533)
Update the base images for all scenarios:

- RHEL: upgrade base image for 10 to 10.1
- RHEL: upgrade base image for 9 to 9.7
- SLES: upgrade base image for 15 to 15.7
- SLES: add SLES 16.0 to the matrix
- OpenSUSE: remove OpenSUSE Leap from the matrix

I ended up removing OpenSUSE because the images that we were on were rarely updated and that resulted in very slow scenarios because of package upgrades. Also, despite the latest release being in October I didn't find any public cloud images produced for the new version of Leap. We can consider adding it back later but I'm comfortable just leaving SLES 15 and 16 in there for that test coverage.

I also ended up fixing a bug in our integration host setup where we'd provision three nodes instead of one. That ought to result in many fewer instance provisions per scenario. I also had to make a few small tweaks in how we detected whether or not SELinux is enabled, as the prior implementation did not work for SLES 16.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-12-22 14:17:51 -07:00
Vault Automation
cebee05e90
lint: don't check out the repository twice (#11360) (#11376)
Fix an incompatibility where we check out the repository with
checkout@v6 and then attempt to check it out again at checkout@v5 in the
set-product-version action.

* update enos directory to trigger lint

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-12-15 16:45:27 -07:00
Vault Automation
47a7482e42
Update missed variable name (#10653) (#10675)
Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
2025-11-06 21:52:27 +00:00
Vault Automation
40a70edc03
Add docker based backend to the cloud scenario (#9751) (#10626)
* Add docker based backed

* new line

* Add validation

* Add cloud_docker_vault_cluster

* Unify cloud scenario outputs

* Use min_vault_version consistently across both modules

* random network name for docker

* Add local build for docker

* Use environment instead of backend

* make use of existing modules for docker and k8s

* connect the peers

* formatting

* copyright

* Remove old duplicated code

* use enos local exec

* get version locally

* Dont use local time

* adjust bin path for docker

* use root dockerfile

* get dockerfile to work

* Build docker image from correct binary location

* Fix it... maybe

* Add docker admin token

* whitespace

* formatting and comment cleanup

* formatting

* undo

* Apply suggestion from @ryancragun



* Move build to make

* Default to local

* Revert k8s changes

* Add admint token

* Clean map

* whitespace

* whitespace

* Pull out k8 changes and vault_cluster_raft

* Some cleaning changes

* whitespace

* Naming cleanup

---------

Co-authored-by: Luis (LT) Carbonell <lt.carbonell@hashicorp.com>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-11-06 11:59:40 -07:00
Vault Automation
dbe3e0e5b5
Update perf replication checking script (#10134) (#10500)
* change what performance replication checker script is checking

* fix lint errors

* enable consul backends for ent build samples

* fix up samples

* fix linting

* update release samples

* fix linting again

* output to stderr

Co-authored-by: Josh Black <raskchanky@gmail.com>
2025-11-03 10:49:34 -08:00
Vault Automation
0c6c13dd38
license: update headers to IBM Corp. (#10229) (#10233)
* license: update headers to IBM Corp.
* `make proto`
* update offset because source file changed

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-10-21 15:20:20 -06:00
Vault Automation
3886debfa1
enos: handle upgrade from FIPS 140-2 editions for all mixed release branches (#9408) (#9472)
Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-09-23 18:36:29 +00:00
Vault Automation
cccc6f9e4c
Backport [VAULT-39160] actions(hcp): add support for testing custom images on HCP into ce/main (#9433)
[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>
2025-09-19 09:00:55 -07:00
Vault Automation
8debe72733
VAULT-39598: Fixing Enos Dev Scenario KMIP Error (#9375) (#9396)
* testing kmip enos dev fix

* updating kmip

* updating kmip

* updating kmip

* updating kmip

* updating description

Co-authored-by: Tin Vo <tintvo08@gmail.com>
2025-09-17 11:57:29 -07:00
Vault Automation
bbb6f1ea24
VAULT-39355: Fixing Enos Dev Scenario Tests (#9162) (#9177)
* VAULT-39355: Fixing Enos Dev Scenario Tests

* setting default for integration_host_state

* fixing lint

Co-authored-by: Tin Vo <tintvo08@gmail.com>
2025-09-08 13:39:10 -07:00
Vault Automation
c57faf2236
VAULT-38463: Disable ENOS LDAP test (#9059) (#9172)
* VAULT-38463: Fix ldap failure for smoke test

* VAULT-38463: Fix ldap failure for smoke test

Co-authored-by: Tin Vo <tintvo08@gmail.com>
2025-09-08 10:15:26 -07:00
Vault Automation
37bd994ea3
VAULT-38463: Fix ldap failure (#8996) (#9001)
Co-authored-by: Tin Vo <tintvo08@gmail.com>
2025-08-28 16:38:39 -07:00
Vault Automation
8d2cb89704
VAULT-38463: Addressing ldap pipeline failure (#8817) (#8911)
* VAULT-38463: Addressing ldap pipeline failure

* testing ldap tests

* testing ldap tests

* debugging ldap issue

* testing pipeline

* testing pipeline

* testing pipeline

* testing pipeline

* testing pipeline

* testing pipeline

* testing pipeline

* debugging ldap failure

* debugging ldap failure

* debugging pipeline

* adding dependency for verify secrets

* removing extra code

* undo changes

* undo changes

Co-authored-by: Tin Vo <tintvo08@gmail.com>
2025-08-26 12:46:36 -07:00
Vault Automation
8009bb93dd
[VAULT-39157] enos(cloud): add basic vault cloud scenario (#8828) (#8847)
* [VAULT-39157] enos(cloud): add basic vault cloud scenario

Add the skeleton of a Vault Cloud scenario whereby we create an HCP
network, Vault Cloud cluster, and admin token.

In subsequent PR's we'll wire up building images, waiting on builds, and
ultimately fully testing the resulting image.



* copywrite: add headers



---------

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-08-22 16:33:16 +00:00