Add the ability to prevent the masking of clientId - #634
Open
Waiariki Koia (the-coding-cuzzy) wants to merge 1 commit into
Open
Add the ability to prevent the masking of clientId#634Waiariki Koia (the-coding-cuzzy) wants to merge 1 commit into
Waiariki Koia (the-coding-cuzzy) wants to merge 1 commit into
Conversation
Author
|
@microsoft-github-policy-service agree company="Global Dairy Trade" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
mask-client-id, a new optional boolean input defaulting to true:
action.yml- declares the input withdefault: truesrc/common/LoginConfig.ts-LoginConfiggains amaskClientIdfield and the existingthis.mask(this.servicePrincipalId)call is now gated on it.README.md- input table row, amask-client-idsection, and the existingclient-idmasking note now points at the opt-out.__tests__/LoginConfig.test.ts- three cases covering the input set totrue, set tofalse, and absent.Scope and default behaviour
Existing workflows are unaffected. The input defaults to
trueand every current caller keeps masking the client ID.Only the client ID/service principal ID is in scope. servicePrincipalSecret and the OIDC federated token are still masked unconditionally.
The gate applies to the client ID from either source - the
client-idinput orclientIdinsidecreds- since both land in the same field.A value passed from
${{ secrets.* }}is still masked by Actions itself regardless of this input. Opting out only has a visible effect for values that are not repository secrets, which is the case this is aimed at.Note for reviewers
The input is parsed as "anything other than an explicit
falsemeans mask":The other boolean inputs in
LoginConfiguse=== "true",which resolves to false when the input is absent. That is fine forenable-AzPSSessionandallow-no-subscriptions, but for a masking flag it fails in the unsafe direction - a missing input would silently stop masking. Inverting the comparison keeps a missing or malformed value on the masked path.Happy to switch to
core.getBooleanInputor to match the surrounding style instead if you would prefer consistency here.