-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Remove expirations for managed users #47774
Conversation
@@ -195,6 +195,63 @@ func GetAllUsers() ([]string, int, error) { | |||
return users, -1, nil | |||
} | |||
|
|||
func UserHasExpirations(username string) (bool bool, exitCode int, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this is following the pattern of other functions in this file of returning an exit code when shelling out to an external binary. However, I wonder if that makes sense from an API perspective. These functions don't expose to users which binaries were being invoked, and are instead meant to abstract away the fact that some other binary is being used. By returning the exit code, we leak that information to callers, without giving them much insight into what the values of the exit codes might mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree that the exit codes aren't especially useful for any of these functions. I'll submit a separate PR updating utils/host/hostusers.go
that removes exit codes from the return types
This pull request is automatically being deployed by Amplify Hosting (learn more). |
8f1db91
to
47df5bb
Compare
@Joerger @strideynet friendly bump 😄 |
@Joerger @strideynet Sending another nudge |
…s or password locks for managed teleport users
47df5bb
to
d435e8a
Compare
This PR attempts to remove any password or account expirations from host users managed by Teleport. This will happen during new user creation and when resolving updates against existing managed users. It will not remove expirations from unmanaged users (test coverage for this coming soon). These changes are meant to prevent password expiration warnings, and eventual account disabling, caused by local password policies on some hosts.
changelog: Updated host user creation to prevent local password expiration policies from affecting Teleport managed users.