Skip to main content

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

felix_gitlab_oidc_application-0.2.2.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

felix_gitlab_oidc_application-0.2.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file felix_gitlab_oidc_application-0.2.2.tar.gz.

File metadata

File hashes

Hashes for felix_gitlab_oidc_application-0.2.2.tar.gz
Algorithm Hash digest
SHA256 f69dca088d08c117db92f62815a4d959ae14d247acc120bff83c60108b8fa28a
MD5 abe70c4ecf7300af05ad3452211b251c
BLAKE2b-256 607ba5a222de5e1d7cec4cd38c9260098501172dcbd4bbd93b409941bb9ac249

See more details on using hashes here.

File details

Details for the file felix_gitlab_oidc_application-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for felix_gitlab_oidc_application-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b1dd5bf1b63cf5ef2e2d13f04530cfe0b2714c74a52ca9bf93e0a905c44f37f
MD5 7a5b603bf19f1cfab1923bab524db9a3
BLAKE2b-256 ea7c3503b11cf4f35ee4607069c85c0f911fa5d3b9f316d6dd782dae75fe10b2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page