Comments (7)
@sleterrier did you try -l interactive
?
from kubelogin.
@sleterrier You are good now, right? please reopen for follow up
from kubelogin.
Just to confirm, are you using device code authentication in this case?
from kubelogin.
That is correct. Using distinct --server-id
and client-id
if that also matters (with clientApp granted user_impersonation
permission on serverApp).
from kubelogin.
I guess the culprit is kube-login is using adal SDK here:
kubelogin/pkg/token/devicecode.go
Lines 39 to 44 in e5dd891
We might need to update the SDK to make it support the v2 endpoint. But not sure the back compatibility here. Will discuss more with my team mate on this.
from kubelogin.
Thank you for looking into this @bcho, much appreciated ❤️
from kubelogin.
@weinong I had not, but confirm it allows azure-kubelogin to get tokens from the v2 endpoint! Thank you 🎉
Here are some details others might find useful:
-
kubelogin get-token \ --environment AzureUSGovernmentCloud \ --server-id <server-app-id> \ --client-id <client-app-id> \ --tenant-id <tenant-id> \ --login interactive
-
Despite successful in-browser authentication, my initial attempts were failing with:
Error: failed to get token: expected an empty error but received: InteractiveBrowserCredential authentication failed POST https://login.microsoftonline.us/<tenant-id>/oauth2/v2.0/token -------------------------------------------------------------------------------- RESPONSE 401 Unauthorized -------------------------------------------------------------------------------- { "error": "invalid_client", "error_description": "AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.", "error_codes": [ 7000218 ], "timestamp": "2023-08-29 02:59:54Z", "trace_id": "obfuscated", "correlation_id": "obfuscated", "error_uri": "https://login.microsoftonline.us/error?code=7000218", "claims": "{\"access_token\":{\"capolids\":{\"essential\":true,\"values\":[\"obfuscated\"]}}}"
-
Which was due to an incorrect platform configuration on
<client-app-id>
. See MicrosoftDocs/azure-docs#61446 for details, TLDR:Mobile and Desktop applications
is needed, notWeb
.
from kubelogin.
Related Issues (20)
- Accessing AKS kubeconfig file from Azure DevOps artifact HOT 2
- kubectl not finding kubelogin from Path VAR HOT 2
- Support for alternative AzureAD authentication endpoints HOT 1
- Why kubectl in conjunction with kubelogin sends complete string instead of only user (upn) HOT 4
- Variable overrides parameter value inside kubeconfig HOT 1
- legacy flag does not work from version v0.0.30 when the login method is spn HOT 7
- Add linux-arm build
- Subject Name Issuer based Auth for SPN Login Mode for Kubelogin HOT 2
- Support OIDC request url & token HOT 2
- `get-token --login azurecli` should be fast when a local token exists HOT 2
- kubelogin is vulnerable to CVE-2023-39323 HOT 2
- Proposal: kubelogin library usage HOT 3
- No possibility to use Service Principal when Workload Identity is enabled in the Pod HOT 7
- Rename `master` to `main` branch for this repo.
- Expose kubelogin cli flags in library mode HOT 1
- Query Regarding Autorest Library Usage HOT 2
- weird authorization error when authenticating via service principal HOT 6
- Azure AD v2 endpoints doesn't work HOT 2
- Issues when using Azure DevOps federated identity token HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubelogin.