Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
/ nomad-deployer Public archive

Access control, Gitlab JWT check with Nomad Deployer

Notifications You must be signed in to change notification settings

Toliak/nomad-deployer

Repository files navigation

Config examples (and API docs)

PUT /config/

{
    "jwks_url": "https://gitlab.com/-/jwks",
    "bound_issuer": "gitlab.com"
}

GET /role/

Returns list of roles

GET /role/{role-name}

Returns role data

PUT or POST /role/{role-name}

Nomad claims validates via regexp

{
    "bound_claims": {
        "project_id": "77",
        "ref": "master"
    },
    "nomad_claims": {
        "Name": "^nomad-service$",
        "Type": "^service$",
        "TaskGroups": [
            {
                "Name": "^nomad-service$",
                "Tasks": [
                    {
                        "Name": "^nomad-service$",
                        "Driver": "^docker$",
                        "Config": {
                            "image": "^nomad-service",
                            "network_mode": "^custom-bridge$",
                            "network_aliases": [
                                "^nomad-service$"
                            ],
                            "port_map": [
                                {
                                    "http": 8080
                                }
                            ],
                            "volumes": [
                                "^NONE$"
                            ]
                        },
                        "Vault": {
                            "Policies": [
                                "^nomad-server$"
                            ]
                        }
                    }
                ]
            }
        ]
    }
}

POST /run/

{
   "role":"{role-name}",
   "job_hcl":"{job-hcl}",
   "jwt":"${CI_JOB_JWT}"
}

Ok some meme here

Meme

About

Access control, Gitlab JWT check with Nomad Deployer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages