types icon indicating copy to clipboard operation
types copied to clipboard

feat: Vela OIDC Provider

Open ecrupper opened this issue 1 year ago • 1 comments

The majority of this code will be in the server, and there is a branch with the same name there that has the implementation if anyone is curious.

For types specifically, I don't think VELA_ID_TOKEN_REQUEST_TOKENs should be available in all steps. Users should be able to specifically invoke the injection of the token using something like:

version: "1"

steps:
  - name: request token
    image: alpine:latest
    id_request: write  # becomes a claim in token `request`
    commands:
      - apk add curl
      - 'curl -H "Authorization: Bearer $VELA_ID_TOKEN_REQUEST_TOKEN" $VELA_ID_TOKEN_REQUEST_URL'

The string value for id_request just becomes one of the claims in the eventual ID token. I figured that may be useful in some contexts.

ecrupper avatar May 03 '24 14:05 ecrupper

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.08%. Comparing base (88010b5) to head (d009d65).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #375   +/-   ##
=======================================
  Coverage   96.08%   96.08%           
=======================================
  Files          69       69           
  Lines        5361     5363    +2     
=======================================
+ Hits         5151     5153    +2     
  Misses        136      136           
  Partials       74       74           
Files Coverage Δ
pipeline/container.go 80.95% <100.00%> (+0.13%) :arrow_up:
yaml/step.go 95.55% <100.00%> (+0.10%) :arrow_up:

codecov[bot] avatar May 03 '24 14:05 codecov[bot]