CAMEL-22351: camel-main - mark required options on vault configurations#24944
Conversation
Mark required = true on the vault configuration options that every authentication path of the corresponding properties function mandates: AWS region; GCP projectId; Azure vaultName; Hashicorp token, host, port and scheme; IBM Secrets Manager token and serviceUrl; CyberArk Conjur url and account. Options that only belong to one of several alternative authentication paths (access keys, client secrets, profiles) stay optional, and the Kubernetes and Spring Cloud Config configurations have workable defaults so nothing is marked there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
gnodet
left a comment
There was a problem hiding this comment.
Clean metadata-only change — adds @Metadata(required = true) to vault configuration options that are mandatory regardless of authentication path.
Verified each marking against the PR's ground-truth table:
| Vault | Required options | Rationale |
|---|---|---|
| AWS | region |
needed by all 3 auth paths |
| GCP | projectId |
needed by both auth paths |
| Azure | vaultName |
needed by both auth paths |
| Hashicorp | token, host, port, scheme |
all 4 required per validation logic |
| IBM SM | token, serviceUrl |
both required per function |
| CyberArk Conjur | url, account |
both required per validation logic |
Good scoping decisions:
- Auth-path-specific options (accessKey, secretKey, clientId, serviceAccountKey, etc.) correctly left optional since they belong to one of several alternative paths.
- Kubernetes and Spring Cloud Config configs untouched — correct, as they rely on in-cluster/spring defaults.
- Existing
security = "secret"annotations preserved where present (Hashicorp token, IBM token).
No runtime behavior change — purely catalog/tooling metadata. Generated files consistent with source annotations.
LGTM ✅
Claude Code on behalf of gnodet — AI-generated review
davsclaus
left a comment
There was a problem hiding this comment.
Clean, well-scoped metadata-only change. All required = true markings verified against the actual runtime validation logic in each vault's PropertiesFunction.doStart():
| Vault | Required options | Verified in |
|---|---|---|
| AWS | region |
SecretsManagerPropertiesFunction — used in all 3 auth paths |
| GCP | projectId |
GoogleSecretManagerPropertiesFunction — used in both paths |
| Azure | vaultName |
KeyVaultPropertiesFunction — used to build vault URL in both paths |
| Hashicorp | token, host, port, scheme |
HashicorpVaultPropertiesFunction — single auth path requires all 4 |
| IBM SM | token, serviceUrl |
IBMSecretsManagerPropertiesFunction — both needed for IAM + client |
| CyberArk | url, account |
CyberArkVaultPropertiesFunction — outer condition requires both |
Auth-path-specific options (accessKey, secretKey, clientId, etc.) correctly left optional. Kubernetes and Spring Cloud Config correctly untouched. Generated JSON files consistent with source annotations.
Minor note for future reference: Hashicorp token is required only because Camel currently supports only TokenAuthentication. If alternative auth methods (AppRole, Kubernetes auth, etc.) are added later, token would need to change to optional.
LGTM ✅
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of davsclaus
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 554 tested, 28 compile-only — current: 553 all testedMaveniverse Scalpel detected 582 affected modules (current approach: 553).
|
Motivation
CAMEL-22351: the vault configuration classes in
camel-apidid not indicate which options are mandatory, so tooling and docs could not tell users what a working vault configuration minimally needs.Changes
required = trueis set on exactly the options that every authentication path of the corresponding vault properties function mandates (verified against each function's client-construction/validation logic):regionprojectIdvaultNametoken,host,port,schemetoken,serviceUrlurl,accountOptions belonging to only one of several alternative auth paths (accessKey/secretKey, clientId/clientSecret/tenantId, serviceAccountKey, profileName, authToken/apiKey/username/password) intentionally stay optional. Kubernetes and Spring Cloud Config configurations are untouched (in-cluster/spring defaults, nothing hard-enforced).
Metadata-only change (flows into
camel-main-configuration-metadata.json, catalog and tooling hints) — no runtime behavior change. No backport planned (metadata improvement).Testing
mvn clean installforcore/camel-main(tests pass) and regen verified (camel.vault.aws.region→"required": true).mvn clean install -DskipTestsfrom root: success, regenerated files committed.Claude Code on behalf of Andrea Cosentino (@oscerd).
🤖 Generated with Claude Code