oscerd opened a new pull request, #29237:
URL: https://github.com/apache/camel/pull/29237

   **Depends on #29229** (CAMEL-26615), which adds the Floci AZ container to 
the Azure test-infra: until #29229 is merged,
   this PR also shows its commit. It stays a draft until then.
   
   ## Description
   
   The integration test of the camel-azure-key-vault producer 
(`KeyVaultOperationsTest`, in the integration package) ran
   only against a real vault and service principal (`vaultName`, `clientId`, 
`clientSecret`, `tenantId`).
   
   [Floci AZ](https://github.com/floci-io/floci-az) emulates the Key Vault 
secrets API. This PR:
   
   - adds a `camel-test-infra-azure-key-vault` module: a local Key Vault 
service on Floci AZ (`camel infra run azure key-vault`,
     which prints the vault name and address), a remote one for a real vault, 
and `AzureKeyVaultClientUtils`, which builds a
     `SecretClient` for either. The Key Vault SDK sends its token only to an 
https address and checks that the resource of
     the 401 challenge matches the vault host, while Floci AZ serves http and 
names the resource `https://vault.azure.net`.
     The local client is therefore built for the https address of the vault, 
with a static token and without the resource
     check, and a policy sends its requests over http;
   - renames `KeyVaultOperationsTest` to `KeyVaultOperationsIT`, since it needs 
a container, and runs it against Floci AZ by
     default through the `secretClient` option, and against a real vault, as 
before, when the four system properties are
     given. It now covers createSecret, getSecret, updateSecretProperties, 
deleteSecret and purgeDeletedSecret, and checks
     the bodies they return. It uses a secret name of its own per run: a real 
vault keeps a deleted secret, and refuses
     its name, for days, so the fixed name `Test2` could not be used again 
within the retention period. The test purges
     the secret it deletes, so a real vault must not have purge protection and 
the service principal must be allowed to
     purge;
   - skips the integration tests on ppc64le and s390x, where the Floci AZ image 
is not available.
   
   `KeyVaultPropertiesSourceNoEnvTestIT` stays remote only: the `azure:` 
properties function always builds
   `https://<vaultName>.vault.azure.net`.
   
   ## Testing
   
   - `KeyVaultOperationsIT` passes against Floci AZ 0.16.0.
   - The remote wiring was checked with a vault that does not exist: no 
container starts, and the endpoints take the
     service principal from their URI.
   - Full reactor build; the test-infra metadata is regenerated.
   
   _Claude Code on behalf of Andrea Cosentino_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to