-
Notifications
You must be signed in to change notification settings - Fork 1.7k
(GHA) Update the auth action to accept an allowlist #12181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sdwheeler
merged 1 commit into
MicrosoftDocs:main
from
michaeltlombardi:maint/main/update-auth-action
Jun 26, 2025
Merged
(GHA) Update the auth action to accept an allowlist #12181
sdwheeler
merged 1 commit into
MicrosoftDocs:main
from
michaeltlombardi:maint/main/update-auth-action
Jun 26, 2025
Conversation
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
Prior to this change, the verification/`authorization` GitHub Action only supported checking the assigned permissions for a user. This worked for normal accounts. However, the managed bot account for the Learn platform doesn't have permissions for this repository. This change adds a new (backwards-compatible) `authorized_accounts` parameter to the GHA. Repository maintainers can now define an allowlist to use for authorization in addition to the permissions to check. If a user is explicitly in the allowlist, the action skips checking their permissions. If a user isn't in the allowlist, they can still pass authorization if they have matching permissions.
Learn Build status updates of commit 88f7c5c: ✅ Validation status: passed
For more details, please refer to the build report. |
sdwheeler
approved these changes
Jun 26, 2025
michaeltlombardi
added a commit
to michaeltlombardi/PowerShellDocs
that referenced
this pull request
Jul 31, 2025
Prior to this change, the authorization workflow used the PowerShell script parameter names and casing for the action parameter names. This worked for all previous parameters because PowerShell is case insensitive and the parameters were only one word. However, in MicrosoftDocs#12181, we added the `authorized_accounts` parameter to the workflow. For GitHub Actions, we use `snake_case` for parameter names, where PowerShell best practice is to use `PascalCase`. PowerShell's case insensitivity meant that we were able to handle the prior parameters, which the workflow sends to the handler scripts as the `INPUT_<ParameterName>` environment variables. When we added `authorized_accounts`, the handler scripts were looking for `INPUT_AuthorizedAccounts`, which doesn't exist. This change updates the `Name` key for every defined parameter in the `verification/authorization/v1` workflow to match the actual workflow parameter name and casing.
4 tasks
michaeltlombardi
added a commit
to michaeltlombardi/PowerShellDocs
that referenced
this pull request
Jul 31, 2025
Prior to this change, the authorization workflow used the PowerShell script parameter names and casing for the action parameter names. This worked for all previous parameters because PowerShell is case insensitive and the parameters were only one word. However, in MicrosoftDocs#12181, we added the `authorized_accounts` parameter to the workflow. For GitHub Actions, we use `snake_case` for parameter names, where PowerShell best practice is to use `PascalCase`. PowerShell's case insensitivity meant that we were able to handle the prior parameters, which the workflow sends to the handler scripts as the `INPUT_<ParameterName>` environment variables. When we added `authorized_accounts`, the handler scripts were looking for `INPUT_AuthorizedAccounts`, which doesn't exist. This change updates the `Name` key for every defined parameter in the `verification/authorization/v1` workflow to match the actual workflow parameter name and casing.
sdwheeler
pushed a commit
that referenced
this pull request
Jul 31, 2025
Prior to this change, the authorization workflow used the PowerShell script parameter names and casing for the action parameter names. This worked for all previous parameters because PowerShell is case insensitive and the parameters were only one word. However, in #12181, we added the `authorized_accounts` parameter to the workflow. For GitHub Actions, we use `snake_case` for parameter names, where PowerShell best practice is to use `PascalCase`. PowerShell's case insensitivity meant that we were able to handle the prior parameters, which the workflow sends to the handler scripts as the `INPUT_<ParameterName>` environment variables. When we added `authorized_accounts`, the handler scripts were looking for `INPUT_AuthorizedAccounts`, which doesn't exist. This change updates the `Name` key for every defined parameter in the `verification/authorization/v1` workflow to match the actual workflow parameter name and casing.
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.
PR Summary
Prior to this change, the verification/
authorization
GitHub Action only supported checking the assigned permissions for a user. This worked for normal accounts. However, the managed bot account for the Learn platform doesn't have permissions for this repository.This change adds a new (backwards-compatible)
authorized_accounts
parameter to the GHA. Repository maintainers can now define an allowlist to use for authorization in addition to the permissions to check. If a user is explicitly in the allowlist, the action skips checking their permissions. If a user isn't in the allowlist, they can still pass authorization if they have matching permissions.PR Checklist