https://github.com/skylothar/sentry-auth-gitlab
An SSO provider for Sentry which enables GitLab Login
https://github.com/skylothar/sentry-auth-gitlab
Last synced: about 2 months ago
JSON representation
An SSO provider for Sentry which enables GitLab Login
- Host: GitHub
- URL: https://github.com/skylothar/sentry-auth-gitlab
- Owner: SkyLothar
- License: apache-2.0
- Created: 2015-12-04T11:50:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-29T01:52:09.000Z (about 5 years ago)
- Last Synced: 2023-12-14T19:10:33.732Z (over 1 year ago)
- Language: Python
- Size: 11.7 KB
- Stars: 40
- Watchers: 4
- Forks: 30
- Open Issues: 9
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
GitLab Auth for Sentry
======================
v0.1.0An SSO provider for Sentry which enables GitLab Login
Changes made for Gitlab 9.x
----------
Following configuration has been changed.. code-block:: python
# You can specify scope to "api" in Gitlab's OAuth Application page
# If you failed to do that, set GITLAB_AUTH_SCOPE = "read_user"
GITLAB_AUTH_SCOPE = "api"
# If your gitlab does not support v4 api, set GITLAB_API_VERSION = 3
GITLAB_API_VERSION = 4Install
-------::
pip install sentry-auth-gitlab
Setup
-----Create a new application under your GitLab.
Enter the **Callback URL** as the prefix to your Sentry installation:::
http(s?)://sentry.example.com/auth/sso/
Once done, grab your API keys and drop them in your ``sentry.conf.py:
.. code-block:: python
GITLAB_APP_ID = "APP-ID"
GITLAB_APP_SECRET = "APP-SECRET"
GITLAB_BASE_DOMAIN = "git.example.com"Optionally you may also specify the api version, scheme, and scope:
.. code-block:: python
GITLAB_API_VERSION = 4
GITLAB_AUTH_SCOPE = "api"
GITLAB_HTTP_SCHEME = "https"Notice
------If your gitlab is deployed in a private network (probably).
You need to alter sentry's default ip black list to make oauth flow work.Put following config in your **sentry.conf.py** and delete conflit ones
.. code-block:: python
SENTRY_DISALLOWED_IPS = (
'0.0.0.0/8',
'10.0.0.0/8',
'100.64.0.0/10',
'127.0.0.0/8',
'169.254.0.0/16',
'172.16.0.0/12',
'192.0.0.0/29',
'192.0.2.0/24',
'192.88.99.0/24',
'192.168.0.0/16',
'198.18.0.0/15',
'198.51.100.0/24',
'224.0.0.0/4',
'240.0.0.0/4',
'255.255.255.255/32'
)