Skip to content
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

Adding automatic migration path for existing static host users #46804

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

eriktate
Copy link
Contributor

@eriktate eriktate commented Sep 20, 2024

Closes #46803

Adding take_ownership_if_user_exists flag to static host user resource to allow for automatic migration/import of unmanaged users with colliding names. When set to true, host user creation will add the teleport-static group to the existing user along with any groups defined on the SHU resource.

changelog: Added a new flag to static host users spec that allows teleport to automatically take ownership across matching hosts of any users with the same name as the static host user.

@@ -1009,6 +1009,9 @@ type HostUsersInfo struct {
GID string
// Shell is the default login shell for a host user
Shell string
// TakeOwnership determines whether or not an existing user should be
// taken over by teleport
TakeOwnership bool
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should eventually support this on the role spec as well and consider removing the implicit migration when teleport-keep is present in a role's host_groups.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the moment does this only apply to static host users? If so, let's note that in the comment for this field to set expectations.

@eriktate eriktate force-pushed the eriktate/add-static-host-user-migration branch from de90e7d to ed73366 Compare September 20, 2024 15:17
@gravitational gravitational deleted a comment from github-actions bot Sep 20, 2024
Copy link
Contributor

@rosstimothy rosstimothy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remember to follow up with a docs PR so that this feature is discoverable by users.

@@ -1009,6 +1009,9 @@ type HostUsersInfo struct {
GID string
// Shell is the default login shell for a host user
Shell string
// TakeOwnership determines whether or not an existing user should be
// taken over by teleport
TakeOwnership bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the moment does this only apply to static host users? If so, let's note that in the comment for this field to set expectations.

@eriktate eriktate added this pull request to the merge queue Sep 20, 2024
@eriktate eriktate removed this pull request from the merge queue due to a manual request Sep 20, 2024
@eriktate eriktate force-pushed the eriktate/add-static-host-user-migration branch from 8095db5 to b99fa8e Compare September 20, 2024 18:51
@eriktate eriktate added this pull request to the merge queue Sep 20, 2024
Merged via the queue into master with commit b5a9806 Sep 20, 2024
42 checks passed
@eriktate eriktate deleted the eriktate/add-static-host-user-migration branch September 20, 2024 19:27
@public-teleport-github-review-bot

@eriktate See the table below for backport results.

Branch Result
branch/v16 Failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatic migration of existing static host users
3 participants