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

RFD 0193 - Stable UNIX user UIDs #50414

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

espadolini
Copy link
Contributor

RFD for #50292

This is the RFD for a new feature that will allow autoprovisioned unix users to be created with the same UID and primary GID across all SSH servers in a cluster.

@espadolini espadolini added no-changelog Indicates that a PR does not require a changelog entry c-mzz Internal Customer Reference labels Dec 19, 2024
@github-actions github-actions bot added rfd Request for Discussion size/sm labels Dec 19, 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.

Overall looks good, though could you add some of the missing sections(Security, Backwards Compatibility, etc.) from the RFD template and expand on them a bit?

@espadolini espadolini requested a review from rosstimothy January 8, 2025 15:48
rfd/0193-stable-unix-user.md Outdated Show resolved Hide resolved
}
```

In the initial implementation there will be no way to read or manage the list of users and no tunables other than the range of UIDs available for use and the `enabled` flag. It is not planned to ever allow for deleting a UID after it's been assigned, but in the future we could add the ability to clear the assigned username for a given UID while still leaving it occupied.
Copy link
Contributor

Choose a reason for hiding this comment

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

I could see an admin having the desire to lookup the uid of a particular host login. While this is achievable by said admin logging into the host and manually retrieving the id, due to the migration process they may get an id not provisioned by Teleport.

I think we should provide a means for querying by username/uid, whether that be by listing or a specific query RPC.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Defined a list operation - we could extend it to also support point reads in the future, but until we see a customer with hundreds of thousands of stable UIDs I think we're ok with requiring a full listing to do searches.


## Goal

After the appropriate setting is enabled in the control plane, all compliant (i.e. up to date) Teleport SSH nodes will query the control plane to know which UID to use when attempting to provision a host user if a Teleport user logs into the machine over SSH with a username that doesn't currently exist as a host user on the machine, with a roleset that allows for host user creation in "keep" mode for the specified machine and username, and with no `host_user_uid` trait. Using the returned UID will be a requirement for both the user and for its primary group: if another host user has the same UID, or a group has the same GID - and thus user creation will fail - the login will also fail. If the host user already exists on the machine, just like the current behavior, the login will just proceed with the existing user. The `host_user_uid` trait, if set, will take priority over the stable UID.
Copy link
Contributor

Choose a reason for hiding this comment

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

if another host user has the same UID, or a group has the same GID - and thus user creation will fail - the login will also fail

What is the means to resolving this state? Should there be an event or notification emitted to alert admins that manual intervention is needed?

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'm honestly not sure of the extent of how detailed we can make our errors through SSH, but surely the user that can't log in will ask someone for help?

Copy link
Contributor

Choose a reason for hiding this comment

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

At minimum we should make sure that the ssh service logs are very clear about the problem to reduce support load

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
@espadolini espadolini requested review from eriktate and removed request for probakowski and capnspacehook January 8, 2025 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-mzz Internal Customer Reference no-changelog Indicates that a PR does not require a changelog entry rfd Request for Discussion size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants