Let’s say a user joins an organization. Then, this user will have access to their private repos as well as the organization’s size.
When this user creates a PAT (personal access token), it can click the “Authorize” button to authorize the PAT to access the org’s repo.
If I am the org’s admin, can I limit this step and approve the authorization on a case-by-case basic?
1 Like
byrneh
March 2, 2022, 1:20am
#2
Hi @jzhang-brex welcome to the community.
There is no authorize a token or SSH key for a specific repository at the moment, there is an authorize a token/SSH key for a SAML enabled organization.
There is no feature for an organization admin to further limit/approve a user authorizing their credential for access to the organization.
Additionally to this, while at this time we don’t have a way of scoping PATs to specific repository access, it is on our roadmap for future implementation along with some other PAT improvements if you’d like to follow progress there:
opened 02:35PM - 07 Apr 21 UTC
ga
all
ecosystem
in design
#### Summary
Personal Access Tokens, or PATs, provide users a quick way to cre… ate OAuth access tokens with they can use to make API calls. The tokens allow users to specify [scopes](https://docs.github.com/en/developers/apps/scopes-for-oauth-apps) to determine what the token can access. This is a typical way of getting API keys in other SaaS products. However, PATs only have broad scopes (e.g. repos or orgs), which grant access to anything the user can access (i.e. specific repos or orgs cannot be specified). This improvement will introduce a new version of PATs which provide users with the ability to scope access to specific repos and orgs, set fine-grained permissions across specific features, and set expiration dates for each token.
#### Intended Outcome
Allow users to create PATs with improved security and access controls.
#### How will it work?
Once introduced, GitHub will provide UI and tools for creating new PATS and migrating existing PATs to the new version. This new version of PATs will support the following:
- Scoping access to specific repos and orgs
- Fine-grained permissions across specific features
- Expiration dates for each token
2 Likes
Setting org policies for PAT issuance is big deal.