-
Notifications
You must be signed in to change notification settings - Fork 2k
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
nomad login
errors before determining the default auth method type
#16501
Comments
Hi @xkisu, thanks for pointing out the bug. You are right that the documented and expected behavior don't match the implementation, we'll be fixing it promptly. |
the default auth method. Closes #16501.
Hey @xkisu, we just merged a fix and it will be included in the next release. While fixing it, we noticed that Once again thanks for catching this! |
Thank you for merging a fix so quickly! |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Nomad version
v1.5.0
Operating system and Environment details
Ubuntu 22.04.2 LTS
Issue
The documentation for the
nomad login
command and the integration guide here state that thetype
flag is optional if an admin has configured a default, however this is not the case.Line
117
inlogin.go
explicitly rejects any calls tonomad login
that don't haveOIDC
set as the type:There is a check further down for a default auth method, at line 143 that will set the type to be the type of the default auth method, but that section of the code is never reached because the switch statement above returns an error before it can try to determine the default type.
Reproduction steps
nomad acl auth-method info vault
)nomad login
without specifying the type, you'll receive an errorUnsupported authentication type ""
Expected Result
It should be selecting the default auth method and using the type from that. These is code defined in the command to do so, but the
switch
statement further up cancels it out before it can try to determine the default.Actual Result
The text was updated successfully, but these errors were encountered: