Skip to content

Commit

Permalink
fix url
Browse files Browse the repository at this point in the history
  • Loading branch information
tigrato committed Oct 28, 2024
1 parent 37e9dee commit 8f04e0d
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tool/tctl/common/plugin/entraid.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (p *PluginsCommand) InstallEntra(ctx context.Context, args installPluginArg
}

saml, err := types.NewSAMLConnector(inputs.entraID.authConnectorName, types.SAMLConnectorSpecV2{
AssertionConsumerService: proxyPublicAddr + "/v1/webapi/saml/acs/" + inputs.entraID.authConnectorName,
AssertionConsumerService: strings.TrimRight(proxyPublicAddr, "/") + "/v1/webapi/saml/acs/" + inputs.entraID.authConnectorName,
AllowIDPInitiated: true,
// AttributesToRoles is required, but Entra ID does not have a default group (like Okta's "Everyone"),
// so we add a dummy claim that will never be fulfilled with the default configuration instead,
Expand Down Expand Up @@ -315,15 +315,10 @@ func (p *PluginsCommand) InstallEntra(ctx context.Context, args installPluginArg
}

func buildScript(proxyPublicAddr string, authConnectorName string, accessGraph, skipOIDCSetup bool) (string, error) {
oidcIssuer, err := oidc.IssuerFromPublicAddress(proxyPublicAddr, "")
if err != nil {
return "", trace.Wrap(err)
}

// The script must execute the following command:
argsList := []string{
"integration", "configure", "azure-oidc",
fmt.Sprintf("--proxy-public-addr=%s", shsprintf.EscapeDefaultContext(oidcIssuer)),
fmt.Sprintf("--proxy-public-addr=%s", shsprintf.EscapeDefaultContext(proxyPublicAddr)),
fmt.Sprintf("--auth-connector-name=%s", shsprintf.EscapeDefaultContext(authConnectorName)),
}

Expand Down Expand Up @@ -351,7 +346,8 @@ func getProxyPublicAddr(ctx context.Context, authClient authClient) (string, err
return "", trace.Wrap(err, "failed fetching cluster info")
}
proxyPublicAddr := pingResp.GetProxyPublicAddr()
return proxyPublicAddr, nil
oidcIssuer, err := oidc.IssuerFromPublicAddress(proxyPublicAddr, "")
return oidcIssuer, trace.Wrap(err)
}

func readTAGCache(fileLoc string) (*azureoidc.TAGInfoCache, error) {
Expand Down

0 comments on commit 8f04e0d

Please sign in to comment.