Skip to content
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

Add permissions input to narrow down access on a given token request. #174

Open
gagoar opened this issue Dec 15, 2022 · 0 comments
Open

Comments

@gagoar
Copy link
Owner

gagoar commented Dec 15, 2022

When a token is generated, if we don't pass a permissions input during the request, that token comes with all the allowed permissions available in the App.

Sometimes we want to narrow down those permissions in a given token generation.

https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app

@gagoar gagoar changed the title Add permissions input to narrow down permissions on a given token request. Add permissions input to narrow down access on a given token request. Dec 15, 2022
gagoar added a commit that referenced this issue Jan 19, 2023
Adds a "repo" option which can be used to restrict the token scope to
only a subset of the repositories that the installed application has
been granted. If the option is not given, a token with the maximum scope
is returned.

```
> github-app-installation-token --appId x --installationId y --privateKeyLocation z --repo repo1 --repo repo2
```

It relates to #174

Co-authored-by: Gago <xeroice@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant