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

Add support for 'azure' AAD based authentication. #193

Merged
merged 1 commit into from
Jul 19, 2018

Conversation

brendandburns
Copy link
Contributor

No description provided.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 14, 2018
@brendandburns brendandburns force-pushed the aad branch 2 times, most recently from 170774e to f739406 Compare July 14, 2018 05:27
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 14, 2018
@tg123
Copy link
Member

tg123 commented Jul 14, 2018

workaround at current version

   // Learn more at https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-aad
            var aksuri = "https://.........................azmk8s.io";

            var clientId = "............................";
            var clientSecret = ".........................";
            var tenantId = ".............................";

            IKubernetes client = new Kubernetes(new AzureCredentials(new ServicePrincipalLoginInformation
            {
                ClientId = clientId,
                ClientSecret = clientSecret
            }, tenantId, AzureEnvironment.AzureGlobalCloud))
            {
                BaseUri = new Uri(aksuri)
            };


  <ItemGroup>
      <PackageReference Include="Microsoft.Azure.Management.ResourceManager.Fluent" Version="1.11.1" />
    </ItemGroup>

I have this on my local branch, but did not push due to setting uri is not elegant

@brendandburns
Copy link
Contributor Author

@tg123 Can you clarify your comment? Do you think we should pursue that approach instead of this PR?

Thanks!

@tg123
Copy link
Member

tg123 commented Jul 17, 2018

1 auth provider should be something which can generate token automatically, like the code I post above.
2 my code need some change to Kubernetes.cs in order to be more elegant

@brendandburns
Copy link
Contributor Author

@tg123 thanks for the comment. I'm going to merge this code as is and we can iterate from there? This will work with existing kubeconfig files so I think that's an important first step...

Let me know if you have any concerns.

Thanks

@tg123
Copy link
Member

tg123 commented Jul 18, 2018

OK 👍

@brendandburns brendandburns merged commit 3551f03 into kubernetes-client:master Jul 19, 2018
JonJam pushed a commit to JonJam/csharp that referenced this pull request Sep 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants