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

Private App registration #471

Closed
arodindev opened this issue May 27, 2024 · 2 comments
Closed

Private App registration #471

arodindev opened this issue May 27, 2024 · 2 comments

Comments

@arodindev
Copy link

arodindev commented May 27, 2024

We want to authenticate to an Amazon EKS cluster using Azure Entra ID. For that we have created an Azure app that issues an ID token containing the Entra ID groups information of the user. For getting started we used this guide https://aws.amazon.com/blogs/containers/using-azure-active-directory-to-authenticate-to-amazon-eks/

This works fine when the "Allow public client flow" is enabled. However, due to internal security regulations we are forced to set the app to private. There is a community version of kubelogin that allows to provide a --oidc-client-secret flag. Do we have something similar with the Azure kubelogin and can someone guide me on how to set this up?

Thanks!

@weinong
Copy link
Contributor

weinong commented Jun 4, 2024

I think https://azure.github.io/kubelogin/topics/k8s-oidc-aad.html should work for you

@arodindev
Copy link
Author

This config indeed worked for me

kubectl config set-credentials "azure-user" \
  --exec-api-version=client.authentication.k8s.io/v1beta1 \
  --exec-command=kubelogin \
  --exec-arg=get-token \
  --exec-arg=--environment \
  --exec-arg=AzurePublicCloud \
  --exec-arg=--server-id \
  --exec-arg=$AAD_CLIENT_ID \
  --exec-arg=--client-id \
  --exec-arg=$AAD_CLIENT_ID \
  --exec-arg=--tenant-id \
  --exec-arg=$AAD_TENANT_ID \
  --exec-arg=--login \
  --exec-arg=interactive

thank you @weinong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants