Claus Ibsen created CAMEL-27750:
-----------------------------------

             Summary: Mask the Azure tenantId as a sensitive key for all 
components
                 Key: CAMEL-27750
                 URL: https://issues.apache.org/jira/browse/CAMEL-27750
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: Claus Ibsen
             Fix For: 4.25.0


The Azure tenant ID (the ID of the Microsoft Entra directory) is sensitive 
information and should be masked everywhere Camel masks sensitive keys, for 
every component and not only for {{camel.vault.azure.tenantId}}.

*Today*
* {{tenantId}} is on purpose not a sensitive key by name. CAMEL-27049 made it 
secret only as the whole key {{camel.vault.azure.tenantId}} 
({{SENSITIVE_WHOLE_KEYS}} in {{SensitiveUtils}}), and 
{{SensitiveUtilsTest.componentOptionsWithTheNameOfASecretMainOptionAreNotSensitive}}
 checks that {{camel.component.azure-storage-datalake.tenantId}} and 
{{azure-storage-datalake:myaccount?tenantId=mytenant}} are not masked.
* The {{tenantId}} option of azure-functions, azure-storage-datalake and (since 
CAMEL-27732) azure-key-vault is not flagged secret, so it is shown in clear 
text in endpoint URIs, the startup summary of Camel Main, the properties dev 
console, {{camel get properties}} and the MCP output.

*What to keep in mind*
The sensitive keys drive both the masking and the plain-text secrets policy of 
the prod profile: {{BaseMainSupport.detectSecurityViolations}} uses 
{{MainHelper.containsSensitive}}. Adding {{tenantid}} to the sensitive keys 
would therefore also make the prod profile refuse (or warn about) a plain-text 
{{camel.component.azure-functions.tenantId=...}}. See 
{{MainSecurityPolicyTest.testComponentOptionWithTheNameOfASecretVaultOption}}.

*Options*
# Make {{tenantid}} a sensitive key by name (an extra key in 
{{UpdateSensitizeHelper}}) and flag the {{tenantId}} options of the Azure 
components secret. Simple and consistent, but users of the prod profile with a 
plain-text tenant ID must move it to a placeholder or vault, which needs an 
upgrade-guide entry.
# Add a list of keys that are masked but are not counted as plain-text secrets, 
so the tenant ID is hidden in the output without changing the prod profile.

Also check the other Azure ID options with the same kind of value ({{clientId}} 
is already a sensitive key), and other clouds with a similar directory or 
account ID.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to