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

Support Github organisations with IP restrictions #4613

Open
sentry-io bot opened this issue Sep 10, 2024 · 0 comments
Open

Support Github organisations with IP restrictions #4613

sentry-io bot opened this issue Sep 10, 2024 · 0 comments
Labels
api Issue related to the REST API

Comments

@sentry-io
Copy link

sentry-io bot commented Sep 10, 2024

As per the following error in Sentry, we don't currently support GH organisations that have an IP filter on their API access. I believe the only way to solve this would be to add an internet gateway with a static IP address that we can publish for our customers.

Sentry Issue: FLAGSMITH-API-4YJ

GithubException: 403 {"message": "Although you appear to have the correct authorization credentials, the `<organisation name>` organization has an IP allow list enabled, and your IP address is not permitted to access this resource.", "documentation_url": "https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app", "status": "403"}
(23 additional frame(s) were not displayed)
...
  File "integrations/github/views.py", line 71, in wrapper
    return func(*args, **kwargs)
  File "integrations/github/views.py", line 239, in fetch_repositories
    data = fetch_github_repositories(
  File "integrations/github/client.py", line 205, in fetch_github_repositories
    headers: dict[str, str] = build_request_headers(installation_id)
  File "integrations/github/client.py", line 40, in build_request_headers
    else generate_token(
  File "integrations/github/client.py", line 62, in generate_token
    token = auth.token
@matthewelwell matthewelwell changed the title GithubException: 403 {"message": "Although you appear to have the correct authorization credentials, the kenshoo... Support Github organisations with IP restrictions Sep 27, 2024
@matthewelwell matthewelwell added the api Issue related to the REST API label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API
Projects
None yet
Development

No branches or pull requests

2 participants