Skip to content

factorysh/gitlab-auth-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gitlab Auth Demo

Gitlab can provides JWT token, for delegating actions.

Docker Registry uses this token, and CI fetch sources with a token.

Tokens use asymetric RSA signature.

Check certificate

openssl x509 -text -noout -in public.pem

Test it

Get the public certificate from your Gitlab instance.

Go get a personnal access token /profile/personal_access_tokens.

Set environments variables.

export GITLAB=gitlab.example.com
export PROJECT=demo/myproject
export TOKEN=my_personal_access_token
export USER=jdoe
python3 -m venv
source ./venv/bin/activate
pip install -r requirements.txt
./demo.py

You can dump the certificate, with the python tool, installed in the venv

cat public.pem | x5092json | jq .

Licence

3 terms BSD licences. © 2019 Mathieu Lecarme.

About

Using and checking Gitlab's JWT workflow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published