@@ -84,53 +84,6 @@ func TestWorkflowPrincipalFromIDToken(t *testing.T) {
8484 },
8585 WantErr : false ,
8686 },
87- `Valid token, custom base url authenticates with correct claims` : {
88- Claims : map [string ]interface {}{
89- "aud" : "sigstore" ,
90- "event_name" : "push" ,
91- "exp" : 0 ,
92- "iss" : "https://token.actions.githubusercontent.com" ,
93- "job_workflow_ref" : "sigstore/fulcio/.github/workflows/foo.yaml@refs/heads/main" ,
94- "job_workflow_sha" : "example-sha" ,
95- "ref" : "refs/heads/main" ,
96- "repository" : "sigstore/fulcio" ,
97- "repository_id" : "12345" ,
98- "repository_owner" : "username" ,
99- "repository_owner_id" : "345" ,
100- "repository_visibility" : "public" ,
101- "run_attempt" : "1" ,
102- "run_id" : "42" ,
103- "runner_environment" : "cloud-hosted" ,
104- "sha" : "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ,
105- "sub" : "repo:sigstore/fulcio:ref:refs/heads/main" ,
106- "workflow" : "foo" ,
107- "workflow_ref" : "sigstore/other/.github/workflows/foo.yaml@refs/heads/main" ,
108- "workflow_sha" : "example-sha-other" ,
109- "enterprise" : "test" ,
110- },
111- ExpectPrincipal : workflowPrincipal {
112- issuer : "https://token.actions.githubusercontent.com" ,
113- subject : "repo:sigstore/fulcio:ref:refs/heads/main" ,
114- url : "https://test.ghe.com/" ,
115- jobWorkflowRef : "sigstore/fulcio/.github/workflows/foo.yaml@refs/heads/main" ,
116- sha : "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ,
117- eventName : "push" ,
118- repository : "sigstore/fulcio" ,
119- workflow : "foo" ,
120- ref : "refs/heads/main" ,
121- jobWorkflowSha : "example-sha" ,
122- runnerEnvironment : "cloud-hosted" ,
123- repositoryID : "12345" ,
124- repositoryOwner : "username" ,
125- repositoryOwnerID : "345" ,
126- repositoryVisibility : "public" ,
127- workflowRef : "sigstore/other/.github/workflows/foo.yaml@refs/heads/main" ,
128- workflowSha : "example-sha-other" ,
129- runID : "42" ,
130- runAttempt : "1" ,
131- },
132- WantErr : false ,
133- },
13487 `Token missing job_workflow_ref claim should be rejected` : {
13588 Claims : map [string ]interface {}{
13689 "aud" : "sigstore" ,
0 commit comments