Skip to content

Commit 8e546be

Browse files
authored
[Improvement]: Add section that describes the factors that determine what a PAT can access (#51694)
1 parent 4436831 commit 8e546be

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed

content/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-with-a-github-app-on-behalf-of-a-user.md

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Once a user has authorized your app, you can generate a user access token, which
3131

3232
Requests made with a user access token are sometimes called "user-to-server" requests.
3333

34+
{% data reusables.user-settings.token_access_capabilities %}
35+
3436
If you want to attribute app activity to the app instead of to a user, you should authenticate as an app installation instead. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation)."
3537

3638
{% note %}

content/apps/oauth-apps/using-oauth-apps/authorizing-oauth-apps.md

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ When you want to use an {% data variables.product.prodname_oauth_app %} that int
5151

5252
{% endtip %}
5353

54+
{% data reusables.user-settings.token_access_capabilities %} For example, an application can create an access token that is configured with an `admin:org` scope, but if the user of the application is not an organization owner, the application will not be granted administrative access to the organization.
55+
5456
{% data reusables.apps.oauth-token-limit %}
5557

5658
### Types of requested data

content/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens.md

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ For more information, see "[Keeping your {% data variables.product.pat_generic %
3333

3434
{% data variables.product.pat_generic_caps %}s are intended to access {% data variables.product.company_short %} resources on behalf of yourself. To access resources on behalf of an organization, or for long-lived integrations, you should use a {% data variables.product.prodname_github_app %}. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/about-creating-github-apps)."
3535

36+
{% data reusables.user-settings.token_access_capabilities %} For example, a {% data variables.product.pat_generic %} can be configured with an `admin:org` scope, but if the owner of the token is not an organization owner, the token will not give administrative access to the organization.
37+
3638
{% ifversion pat-v2 %}
3739

3840
### Types of {% data variables.product.pat_generic %}s

content/rest/authentication/keeping-your-api-credentials-secure.md

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ When creating a {% data variables.product.pat_generic %}, only select the minimu
3434

3535
{% endif %}
3636

37+
{% data reusables.user-settings.token_access_capabilities %}
38+
3739
When creating a {% data variables.product.prodname_github_app %}, select the minimum permissions that your {% data variables.product.prodname_github_app %} will need. For more information, see "[AUTOTITLE](/apps/creating-github-apps/setting-up-a-github-app/best-practices-for-creating-a-github-app)."
3840

3941
When authenticating with `GITHUB_TOKEN` in a {% data variables.product.prodname_actions %} workflow, only give the minimum amount of permissions needed. For more information, see "[AUTOTITLE](/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
A token has the same capabilities to access resources and perform actions on those resources, that the owner of the token has, and is further limited by any scopes or permissions granted to the token. A token cannot grant additional access capabilities to a user.

0 commit comments

Comments
 (0)