feat: adding per-secret credential and namespace overrides along with… #355
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add multi-credential and multi-namespace support per-secret
Previously, the plugin supported a single Vault credential and a single namespace per job, applied to all secret retrievals. This update introduces per-secret overrides, enabling jobs to authenticate to Vault using different AppRole credentials and namespaces for each secret.
vaultCredentialIdto VaultSecret to select a credential per secret.vaultNamespaceto VaultSecret to select a namespace per secret.Backward compatible: existing jobs continue to use the job-level credential and namespace unless per-secret overrides are configured.
Summary of Changes
Per-secret AppRole override
vaultCredentialIdto VaultSecret to select a credential per secret.VaultSecret.DescriptorImpl#doFillVaultCredentialIdItems(...)Per-secret Namespace override
vaultNamespaceto VaultSecret to override namespace per secret.Core logic updates
vaultCredentialIdis set.VaultConfigwhenvaultNamespaceis provided (copy address, engine version, skip-SSL, prefix).VaultSecret.vaultCredentialId→ VaultConfiguration.getVaultCredential() → VaultConfiguration.getVaultCredentialId() → else error.Verbose logging toggle
verboseLoggingon VaultConfiguration with UI checkbox.VaultAccessor.java:L189-L191) so they print only whenverboseLoggingis true.Improved error handling
Tests
Run/Jobin test helper.Build notes
mvn clean resources:resources hpi:hpimvn -q -DskipTests clean packageTesting done
Added unit tests to test the newly added override code
Testing existing jobs to continue to use the job-level credential and namespace unless per-secret overrides are configured.
Running the parallel jobs with enabled overrides to make to there is no issues
Submitter checklist