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

GitHub org membership check does not handle paginated response #6768

Closed
boonware opened this issue Nov 23, 2022 · 3 comments
Closed

GitHub org membership check does not handle paginated response #6768

boonware opened this issue Nov 23, 2022 · 3 comments

Comments

@boonware
Copy link

Issue Summary:

GitHub org membership check does not support paginated responses from GitHub API.

Environment:

Spinnaker 1.29.0

Feature Area:

GitHub OAuth

Description:

Spin Gate supports a GitHub organization membership check: if the authenticated user is not a member of the target GitHub organization then access is denied. The API call to GItHub that checks user organization memberships does not handle a paginated response from GitHub. If the user is a member of more than the default page size number of orgs (30) then GitHub paginates the response, attaching a Link header with the URL to the next page. Currently, the membership check fails if the user is a member of more than 30 orgs and the target org is not contained in the first page.

Steps to Reproduce:

  1. Enable the org membership check.
  2. Ensure that the user is a member of more than 30 orgs.
  3. Ensure that the target org is not returned in the first page of orgs returned by the GitHub org membership API.
  4. Authenticate with Spinnaker via GitHub OAuth.
  5. Access is denied.
@spinnakerbot
Copy link

This issue hasn't been updated in 45 days, so we are tagging it as 'stale'. If you want to remove this label, comment:

@spinnakerbot remove-label stale

@spinnakerbot
Copy link

This issue is tagged as 'stale' and hasn't been updated in 45 days, so we are tagging it as 'to-be-closed'. It will be closed in 45 days unless updates are made. If you want to remove this label, comment:

@spinnakerbot remove-label to-be-closed

@spinnakerbot
Copy link

This issue is tagged as 'to-be-closed' and hasn't been updated in 45 days, so we are closing it. You can always reopen this issue if needed.

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

3 participants