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
custom Azure Active Directory Authority Host #4210
custom Azure Active Directory Authority Host #4210
Conversation
Welcome @Jeremy-Boyle! |
Hi @Jeremy-Boyle. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: szuecs The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
provider/azure/config.go
Outdated
@@ -149,6 +149,17 @@ func getCloudConfiguration(name string) (cloud.Configuration, error) { | |||
return cloud.AzureGovernment, nil | |||
case "AZURECHINACLOUD": | |||
return cloud.AzureChina, nil | |||
case "AZURECUSTOMCLOUD": | |||
azureAdEndpoint := os.Getenv("AZURE_AD_ENDPOINT") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is the best way to get this. This method (getCloudConfiguration) gets called with the cloud type (e.g. "AZURECLOUD"), which comes from the config file but then we take the endpoint config from some environment variable. I think it could be better to have the endpoint config as part of the config file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jeremy-Boyle we are waiting for this one to comment or fix
please rebase the test was fixed |
Signed-off-by: Jeremy-Boyle <9406398+Jeremy-Boyle@users.noreply.github.com>
3ca267a
to
e39959d
Compare
Rebased |
@Jeremy-Boyle Wdyt of @pascalgn comment ? BTW, Would you please update the documentation about this new settings ? |
I haven't had a response back, I'm going to do the suggestion. |
Thanks for updating, I like the PR much better now. To me the PR looks good! |
@@ -58,6 +58,7 @@ The following fields are used: | |||
* `aadClientID` and `aadClientSecret` are associated with the Service Principal. This is only used with Service Principal method documented in the next section. | |||
* `useManagedIdentityExtension` - this is set to `true` if you use either AKS Kubelet Identity or AAD Pod Identities methods documented in the next section. | |||
* `userAssignedIdentityID` - this contains the client id from the Managed identitty when using the AAD Pod Identities method documented in the next setion. | |||
* `activeDirectoryAuthorityHost` - this contains the uri to overwrite the default provided AAD Endpoint. This is useful for providing additional support where the endpoint is not available in the default cloud config from the [azure-sdk-for-go](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud#pkg-variables). | |||
* `useWorkloadIdentityExtension` - this is set to `true` if you use Workload Identity method documented in the next section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really required I guess, but it would be super great if we could add documentation for the cloud
field
// If activeDirectoryAuthorityHost is provided explicitly, override existing one in config file | ||
if activeDirectoryAuthorityHost != "" { | ||
cfg.ActiveDirectoryAuthorityHost = activeDirectoryAuthorityHost | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I thought about: what happens if cloud
is set to a non-empty value (e.g. "AZURECHINACLOUD") but activeDirectoryAuthorityHost
is also set to some non-empty value. I think we should return an error in that case
/lgtm @Jeremy-Boyle @pascalgn I guess it makes sense to add the docs, but maybe we just do it in another PR to save some time. |
Is there a issue that you know of or a roadmap of when 0.14.2 will be released ? I'm assuming this would be the next release with these changes added. |
Description
This allows custom Azure Active Directory Authority Host field to be set, this allows the configuration of the value and enables externaldns to work in private Azure environments that are not apart of the Azure SDK.
Looking for feedback on how i went about adding the fix, open to suggestions / improvements if the env route is undesired.
Inspiration for the env: https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authorization#authentication-on-azure-stack
Issue in Azure Cloud ADK:
https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore@v1.9.1/cloud#pkg-variables
Fixes #4209
Checklist