OpenID Connect authentication provider for Sentry
Project description
An SSO provider for Sentry which enables OpenID Connect Apps authentication.
This is a fork of sentry-auth-google.
Why fork, instead of adapting sentry-auth-google to work with every OpenID Connect provider?
The maintainer has different ideas with sentry-auth-google. See:
Install
$ pip install sentry-auth-oidc
Example Setup for Google
Start by creating a project in the Google Developers Console.
In the Authorized redirect URIs add the SSO endpoint for your installation:
https://sentry.example.com/auth/sso/
Naturally other providers, that are supporting OpenID-Connect can also be used (like GitLab).
Finally, obtain the API keys and the well-known account URL and plug them into your sentry.conf.py:
OIDC_CLIENT_ID = ""
OIDC_CLIENT_SECRET = ""
OIDC_SCOPE = "openid email"
OIDC_DOMAIN = "https://accounts.google.com" # e.g. for Google
The OIDC_DOMAIN defines where the OIDC configuration is going to be pulled from. Basically it specifies the OIDC server and adds the path .well-known/openid-configuration to it. That’s where different endpoint paths can be found.
Detailed information can be found in the ProviderConfig specification.
You can also define OIDC_ISSUER to change the default provider name in the UI, even when the OIDC_DOMAIN is set.
If your provider doesn’t support the OIDC_DOMAIN, then you have to set these required endpoints by yourself (autorization_endpoint, token_endpoint, userinfo_endpoint, issuer).
OIDC_AUTHORIZATION_ENDPOINT = "https://accounts.google.com/o/oauth2/v2/auth" # e.g. for Google
OIDC_TOKEN_ENDPOINT = "https://www.googleapis.com/oauth2/v4/token" # e.g. for Google
OIDC_USERINFO_ENDPOINT = "https://www.googleapis.com/oauth2/v3/userinfo" # e.g. for Google
OIDC_ISSUER = "Google"
Development
FAQ
- If you are using macOS brew’s openssl and you get a psycopg build error such as:
ld: library not found for -lssl
- Please setup the following environment variables:
export LDFLAGS="-L/usr/local/opt/openssl/lib" export CPPFLAGS="-I/usr/local/opt/openssl/include"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sentry_auth_oidc-9.0.0.tar.gz
.
File metadata
- Download URL: sentry_auth_oidc-9.0.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c4902d6af63a8fbed326af704f54ca4beb5444e7bab0c5319452164d66cf998 |
|
MD5 | f3fc695d0790208daf7f44e01bfd60f0 |
|
BLAKE2b-256 | d8328bf9c2c6cea55db531040a30ae50e66778254b334fb10aeccc32de8568ed |
File details
Details for the file sentry_auth_oidc-9.0.0-py3-none-any.whl
.
File metadata
- Download URL: sentry_auth_oidc-9.0.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14ba07eb49520a18dd91909493af928c875c405178594b44aae2e37b5d579320 |
|
MD5 | f3c3a45243ff2669a4b16a73802ab008 |
|
BLAKE2b-256 | 826d3f811432bbf278ec18ca4df069143e0322c4838e866c3b417098ef23d844 |