Skip to content

Adding automatic migration path for existing static host users#46804

Merged
eriktate merged 1 commit intomasterfrom
eriktate/add-static-host-user-migration
Sep 20, 2024
Merged

Adding automatic migration path for existing static host users#46804
eriktate merged 1 commit intomasterfrom
eriktate/add-static-host-user-migration

Conversation

@eriktate
Copy link
Copy Markdown
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.

Shell string
// TakeOwnership determines whether or not an existing user should be
// taken over by teleport
TakeOwnership bool
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Shell string
// TakeOwnership determines whether or not an existing user should be
// taken over by teleport
TakeOwnership bool
Copy link
Copy Markdown
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 ed73366 to 8095db5 Compare September 20, 2024 16:59
@rosstimothy rosstimothy requested a review from atburke September 20, 2024 17:25
@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 enabled auto-merge September 20, 2024 18:52
@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
@eriktate eriktate deleted the eriktate/add-static-host-user-migration branch September 20, 2024 19:27
@public-teleport-github-review-bot
Copy link
Copy Markdown

@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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatic migration of existing static host users

3 participants