-
Notifications
You must be signed in to change notification settings - Fork 881
--disable-password-auth
is useless when using Coder in a headless fashion
#7657
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
Comments
Here is the code in question that blocks user administration. Lines 288 to 295 in 0999db0
|
Would a solution be to add a new coder/coderd/database/models.go Lines 403 to 408 in 0999db0
Make it something like // LoginTypeNone is used if no login method is available for this user.
// If this is set, the user has no method of logging in.
// API keys can still be created by an owner and used by the user.
// These keys would use the `LoginTypeToken` type.
LoginTypeNone LoginType = "none" When creating a user, you can specify this login type. It would prevent the We should probably clarify that existing API keys are still valid. So if you switch a user's login type to this, it does not log them. But I don't think we support that functionality yet so it's ok? @ammario thoughts? |
I wonder if there's a way we could satisfy the use case without adding another knob. Maybe we could just allow users to be created without passwords when |
The thing about if user.LoginType == database.LoginTypePassword && user.HashedSecret == "" {
// No password set
} Mainly I am thinking that if a user is created without a password, actions like "reset password" should fail. All password interactions should fail.
|
Ok. Sounds good to me. |
Oh duh, we can add a scope to the key. Nvm!! |
From szab100 in #7638 (comment)
The text was updated successfully, but these errors were encountered: