Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/sim/lib/credentials/google-workload-identity.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,6 @@ async function exchangeSubjectToken(
return payload.access_token
}

/**
* Copy for an IAM Credentials refusal. Signing needs a role the impersonation
* role lacks, so a refused signature always names the token-creator role.
*/
/**
* Whether Google refused the call under a VPC Service Controls perimeter: the
* error names a `vpcServiceControlsUniqueIdentifier` or a `VPC_SERVICE_CONTROLS`
Expand All @@ -394,6 +390,10 @@ function isVpcServiceControlsDenial(payload: Record<string, unknown>): boolean {
return /vpcServiceControlsUniqueIdentifier|VPC_SERVICE_CONTROLS/.test(JSON.stringify(payload))
}

/**
* Copy for an IAM Credentials refusal. Signing needs a role the impersonation
* role lacks, so a refused signature always names the token-creator role.
*/
function iamFailureMessage(
status: number,
payload: Record<string, unknown>,
Expand Down
Loading