Skip to content

Commit 29656c5

Browse files
committed
feat: skip userinfo endpoint resolution for GitHub Actions tokens
1 parent b0dd81f commit 29656c5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/pkg/auth/tenant.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ func ResolveAndSetTenantFromToken(ctx context.Context, accessToken string) error
110110
return err
111111
}
112112

113+
// If the token is from GitHub Actions, then we do not
114+
// use the userinfo endpoint to resolve the tenant ID.
115+
if iss == "https://token.actions.githubusercontent.com" {
116+
return nil
117+
}
118+
113119
url := strings.TrimRight(iss, "/") + "/userinfo"
114120
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
115121
if err != nil {

0 commit comments

Comments
 (0)