OIDC Test
This repo is just a test repo to test the OIDC Token authentication from github.
Run
The HTTP server must be available on the internet. One solution is to use a service like ngrok.
ngrok http 8084
You must then change TOKEN_URL
in the workflow file.
Example output
The HTTP server will just print audience and claims.
The following example is the result of a run from this repository.
Audience: [https://github.com/suffiks]
(*main.ghClaims)(0xc00021e000)({
Ref: (string) (len=15) "refs/heads/main",
Repository: (string) (len=17) "suffiks/oidc-test",
RepositoryID: (string) (len=9) "488728455",
RepositoryOwner: (string) (len=7) "suffiks",
RepositoryOwnerID: (string) (len=8) "46501047",
RunID: (string) (len=10) "2272112428",
RunNumber: (string) (len=1) "8",
RunAttempt: (string) (len=1) "1",
Actor: (string) (len=6) "thokra",
ActorID: (string) (len=6) "222386",
Workflow: (string) (len=27) ".github/workflows/test.yaml",
HeadRef: (string) "",
BaseRef: (string) "",
EventName: (string) (len=17) "workflow_dispatch",
RefType: (string) (len=6) "branch",
Environment: (string) "",
JobWorkflowRef: (string) (len=61) "suffiks/oidc-test/.github/workflows/test.yaml@refs/heads/main"
})