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

Validating Token Capabilities and Permissions against GitHub #144

Open
UlisesGascon opened this issue Dec 14, 2024 · 0 comments
Open

Validating Token Capabilities and Permissions against GitHub #144

UlisesGascon opened this issue Dec 14, 2024 · 0 comments

Comments

@UlisesGascon
Copy link
Member

We want to create a new function to help us validate token capabilities.

The idea is to check that we have the right level of permissions for a given entity (for example, verifying permissions against specific organizations during checks). As an example:

curl -I -H "Authorization: token TOKEN" https://api.github.com/user/memberships/orgs/expressjs

This request can return 200 (with the detail level shown in the X-OAuth-Scopes header) or 404 if the token lacks access.

Additionally, we need to extend the configuration (index.js) to list the permission levels required by VisionBoard. This will ensure:

  • Our documentation aligns with the permission requirements for these checks.
  • Users can verify whether their current token has sufficient permissions to perform the necessary checks.

This new function will replace the current use of ensureGithubToken within the providers file (index.js).

Instead, ensureGithubToken will be called internally as part of the execution of this new function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant