felix-gitlab-oidc-application
CLI to simply create GitLab OIDC applications. This makes it trivial to add Gitlab as an IdP to any OpenID Connect enabled application, for example Grafana.
Usage
felix-gitlab-oidc-application \
-g git.example.com \
--redirect-url https://grafana.example.com/login/gitlab
creates an application on git.example.com (infers grafana.example.com as application name) and outputs both GITLAB_OIDC_CLIENT_ID and GITLAB_OIDC_CLIENT_SECRET
If you do use mise, you can output to .config/mise.prod.toml instead:
felix-gitlab-oidc-application \
--mise-file=.config/mise.prod.toml \
https://grafana.example.com/login/gitlab
Development
git clone https://codeberg.org/felixhummel/gitlab-oidc-application.git
cd gitlab-oidc-application
mise trust
mise i
uv sync
ln -s $(which felix-gitlab-oidc-application) ~/.local/bin/felix-gitlab-oidc-application
Explanation
This tool replaces the following manual flow:
Create application
gitlab \
-g git.example.com \
-ojson \
application create \
--name grafana.example.com \
--redirect-uri https://grafana.example.com/login/gitlab \
--scopes 'openid profile email' \
--confidential true
-->
{"id": 14, "application_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "application_name": "grafana.example.com", "callback_url": "https://grafana.example.com/login/gitlab", "confidential": true, "secret": "gloas-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
Somehow echo
GITLAB_OIDC_CLIENT_ID=...
GITLAB_OIDC_CLIENT_SECRET=...
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file felix_gitlab_oidc_application-0.2.2.tar.gz.
File metadata
- Download URL: felix_gitlab_oidc_application-0.2.2.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f69dca088d08c117db92f62815a4d959ae14d247acc120bff83c60108b8fa28a
|
|
| MD5 |
abe70c4ecf7300af05ad3452211b251c
|
|
| BLAKE2b-256 |
607ba5a222de5e1d7cec4cd38c9260098501172dcbd4bbd93b409941bb9ac249
|
File details
Details for the file felix_gitlab_oidc_application-0.2.2-py3-none-any.whl.
File metadata
- Download URL: felix_gitlab_oidc_application-0.2.2-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b1dd5bf1b63cf5ef2e2d13f04530cfe0b2714c74a52ca9bf93e0a905c44f37f
|
|
| MD5 |
7a5b603bf19f1cfab1923bab524db9a3
|
|
| BLAKE2b-256 |
ea7c3503b11cf4f35ee4607069c85c0f911fa5d3b9f316d6dd782dae75fe10b2
|