-
Notifications
You must be signed in to change notification settings - Fork 200
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
Error when storing large token in keyring on macOS #1255
Comments
I can confirm the issue to be related to kubelogin version Not working:
Error message:
Working version:
|
I'm also seeing this issue since upgrading from
I was able to workaround it by setting the Our IdP is AWS Cognito and token length is around ~1,300 characters. |
Same same :) using keycloak/microsoft entraid |
Same issue. I can confirm that jamesrwhite's workaround works for me - i.e. add the Technical info:
So, it looks like possibly an integration issue with the OS keyring on MacOS perhaps? |
In the underlying library (go-keyring) it claims the limit for the keychain is around 3,000 bytes (source) but if you look at how it's actually implemented it's the combination of the Worth noting this is also once those values have been base64 encoded and shell escaped. A potential fix could be to calculate the length in the same way before calling Catching the error and falling back to disk storage seems simpler and less likely to break if the underlying library changes it's implementation in my opinion. I'd be happy to open a PR for this. |
Hi, As already mentioned OS: Win11 WSL-Version: 2.3.26.0 |
v1.32.1 is available with the fix of #1257. I think it is difficult to cover all edge cases in the fallback mode. I tested the keyring on Linux and it causes an error if dbus is not running. I'd like to change the default mode to |
@int128 thanks for merging and releasing my hotfix, I can confirm I'm no longer getting the same issue with |
Describe the issue
kubelogin repeatedly fails with:
To reproduce
Not sure how to reproduce this, as it's probably caused by a large token from our IdP. We do have a lot of groups that are mapped in the token, which significantly increases the token size.
Your environment
Additional context
I verified that this was not happening in version 1.31.1, so I'm relatively confident this is related to #973. The description of the PR states that
However, with every kubectl command, I noticed consecutive failures and wasn't able to obtain a token* to interact with the cluster. There was no fallback to the file-based cache. For a reason I don't understand yet, the new option
--no-keyring
also doesn't seem to be available (and neither is--force-keyring
), so I can't work around this by any other means than downgrading to 1.31.1:$ kubectl oidc-login --help | grep keyring $ kubectl oidc-login --version kubelogin version 1.32.0
*in fact, I did get a token (which I could verify with the verbose logging), but kubelogin wasn't able to persist it
The text was updated successfully, but these errors were encountered: