Skip to content

Commit

Permalink
Merge pull request #215 from grafana/andreas/allow-authproxy
Browse files Browse the repository at this point in the history
Allow authproxy users to use current-user auth
  • Loading branch information
aangelisc authored Jan 16, 2025
2 parents 6b762bf + 5a64d07 commit b63f91a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aztokenprovider/token_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func isAzureUser(currentUser azusercontext.CurrentUserContext) (azusercontext.Cu
if err != nil {
return currentUser, fmt.Errorf("failed to decode user jwt: %s", err)
}
if claims["authenticatedBy"] != "oauth_azuread" {
if claims["authenticatedBy"] != "oauth_azuread" && claims["authenticatedBy"] != "authproxy" {
return currentUser, fmt.Errorf("user is not authenticated with Azure AD")
}

Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module github.com/grafana/grafana-azure-sdk-go/v2

go 1.21
go 1.22.7

toolchain go1.22.10

require (
Expand Down

0 comments on commit b63f91a

Please sign in to comment.