Skip to content
New issue

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

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

Already on GitHub? # to your account

Azure provider - Add Support for US Gov L4 #211

Merged
merged 4 commits into from
Jul 28, 2022
Merged
Changes from 2 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
7 changes: 6 additions & 1 deletion provider_azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ import (

const (
// Deprecated: The host of the Azure Active Directory (AAD) graph API
azureADGraphHost = "graph.windows.net"
azureADGraphHost = "graph.windows.net"
azureADGraphUShost = "graph.microsoftazure.us"

// The host and version of the Microsoft Graph API
microsoftGraphHost = "graph.microsoft.com"
microsoftGraphUSHost = "graph.microsoft.us"
microsoftGraphAPIVersion = "/v1.0"

// Distributed claim fields
Expand Down Expand Up @@ -117,6 +119,9 @@ func (a *AzureProvider) getClaimSource(logger log.Logger, allClaims map[string]i
if urlParsed.Host == azureADGraphHost {
MarkDordoy marked this conversation as resolved.
Show resolved Hide resolved
urlParsed.Host = microsoftGraphHost
urlParsed.Path = microsoftGraphAPIVersion + urlParsed.Path
} else if urlParsed.Host == azureADGraphUShost {
urlParsed.Host = microsoftGraphUSHost
urlParsed.Path = microsoftGraphAPIVersion + urlParsed.Path
}

logger.Debug(fmt.Sprintf("found Azure Graph API endpoint for group membership: %v", urlParsed.String()))
Expand Down