Add github_organization_credential_authorization table#552
Open
Kanthi-Hegde wants to merge 2 commits into
Open
Add github_organization_credential_authorization table#552Kanthi-Hegde wants to merge 2 commits into
Kanthi-Hegde wants to merge 2 commits into
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
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.
Description
The plugin currently has no way to query classic personal access tokens (PATs) that members have authorized against an organization. This PR adds a new
github_organization_credential_authorizationtable to close that gap.It wraps GitHub's List SAML SSO authorizations for an organization REST API (
GET /orgs/{org}/credential-authorizations), which is the only API GitHub exposes for classic PATs at the org level. The same endpoint also returns authorized SSH keys, distinguishable via thecredential_typecolumn.What's included
github_organization_credential_authorizationplugin.goColumns
login,credential_id,token_last_eight,scopes,credential_type,credential_authorized_at,credential_accessed_at,authorized_credential_id,authorized_credential_note,authorized_credential_expires_at,authorized_credential_title,fingerprint.Notes
organizationqualifier is required.admin:org) and is only available for organizations on GitHub Enterprise Cloud with SAML SSO enabled; other orgs return no rows. A403/404is treated as an empty result, consistent with other org-scoped tables in this plugin.