Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(internal): fix self-signed detection with scopes #1096

Merged
merged 3 commits into from Jun 30, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/creds.go
Expand Up @@ -99,7 +99,7 @@ func credentialsFromJSON(ctx context.Context, data []byte, ds *DialSettings) (*g
}

func isSelfSignedJWTFlow(data []byte, ds *DialSettings) (bool, error) {
if (ds.EnableJwtWithScope || ds.HasCustomAudience() || len(ds.GetScopes()) == 0) &&
if ((ds.EnableJwtWithScope && len(ds.GetScopes()) > 0) || ds.HasCustomAudience()) &&
codyoss marked this conversation as resolved.
Show resolved Hide resolved
ds.ImpersonationConfig == nil {
codyoss marked this conversation as resolved.
Show resolved Hide resolved
// Check if JSON is a service account and if so create a self-signed JWT.
var f struct {
Expand Down