Skip to content

Display available allowed logins for leaf resources in root web ui#39579

Merged
rosstimothy merged 1 commit intomasterfrom
tross/web_ui_logins
Mar 25, 2024
Merged

Display available allowed logins for leaf resources in root web ui#39579
rosstimothy merged 1 commit intomasterfrom
tross/web_ui_logins

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

The Proxy web api now requests that Auth include allowed logins per resource instead of guessing logins per resource based on the information it has cached. However, due to the way SSH sessions are authorized, the logins are not provide to users verbatim.

Any sessions created via the root web ui to a leaf resource will use the SSH certificate created for that user in the root cluster. New certificates are not minted per leaf cluster. This is important because the nodes only allow os logins for a session if they are present in the valid prinicpals of the SSH certificate. So even though we are now capabale of displaying all allowed logins for leaf SSH servers in the root web ui, the user is only able to use a subset of them. To avoid any odd UX, the Proxy will filter out any allowed logins which do not exist in the principals of the root SSH certificate.

The above only holds for SSH, windows desktops are not as strict and any allowed login from a leaf cluster is now visible in the root web ui.

Fixes #5041

Changelog: Correctly display available allowed logins of leaf resources in the root cluster web ui

@rosstimothy rosstimothy force-pushed the tross/web_ui_logins branch 3 times, most recently from acbf6b9 to 16ef6f5 Compare March 19, 2024 19:39
The Proxy web api now requests that Auth include allowed logins
per resource instead of guessing logins per resource based on the
information it has cached. However, due to the way SSH sessions
are authorized, the logins are not provide to users verbatim.

Any sessions created via the root web ui to a leaf resource will use
the SSH certificate created for that user in the root cluster. New
certificates are not minted per leaf cluster. This is important
because the nodes only allow os logins for a session if they are
present in the valid prinicpals of the SSH certificate. So even
though we are now capabale of displaying all allowed logins for
leaf SSH servers in the root web ui, the user is only able to use
a subset of them. To avoid any odd UX, the Proxy will filter out
any allowed logins which do not exist in the principals of the
root SSH certificate.

The above only holds for SSH, windows desktops are not as strict
and any allowed login from a leaf cluster is now visible in the
root web ui.

Fixes #5041
@rosstimothy rosstimothy force-pushed the tross/web_ui_logins branch from 16ef6f5 to f9a8cbf Compare March 19, 2024 19:47
@rosstimothy rosstimothy marked this pull request as ready for review March 19, 2024 20:19
@github-actions github-actions Bot added size/md tctl tctl - Teleport admin tool labels Mar 19, 2024
@rosstimothy
Copy link
Copy Markdown
Contributor Author

PTAL @fspmarshall @gabrielcorado

@rosstimothy rosstimothy added this pull request to the merge queue Mar 25, 2024
Merged via the queue into master with commit 10da1b3 Mar 25, 2024
@rosstimothy rosstimothy deleted the tross/web_ui_logins branch March 25, 2024 16:52
rosstimothy added a commit that referenced this pull request Mar 27, 2024
…39579)

The Proxy web api now requests that Auth include allowed logins
per resource instead of guessing logins per resource based on the
information it has cached. However, due to the way SSH sessions
are authorized, the logins are not provide to users verbatim.

Any sessions created via the root web ui to a leaf resource will use
the SSH certificate created for that user in the root cluster. New
certificates are not minted per leaf cluster. This is important
because the nodes only allow os logins for a session if they are
present in the valid prinicpals of the SSH certificate. So even
though we are now capabale of displaying all allowed logins for
leaf SSH servers in the root web ui, the user is only able to use
a subset of them. To avoid any odd UX, the Proxy will filter out
any allowed logins which do not exist in the principals of the
root SSH certificate.

The above only holds for SSH, windows desktops are not as strict
and any allowed login from a leaf cluster is now visible in the
root web ui.

Fixes #5041
github-merge-queue Bot pushed a commit that referenced this pull request Mar 27, 2024
…39887)

* Enrich resources with additional metadata (#38827)

Updates ListResources and ListUnifiedResources to optionally allow
responses to include the allowed logins per returned resource that
requesting user has access to given there roles. Logins are only
currently populated for SSH and WindowsDesktop resources. The new
types.EnrichedResource was added to facilitate transporting the
underlying resource and the additional user specific information to consumers.

* Display available allowed logins for leaf resources in root web ui (#39579)

The Proxy web api now requests that Auth include allowed logins
per resource instead of guessing logins per resource based on the
information it has cached. However, due to the way SSH sessions
are authorized, the logins are not provide to users verbatim.

Any sessions created via the root web ui to a leaf resource will use
the SSH certificate created for that user in the root cluster. New
certificates are not minted per leaf cluster. This is important
because the nodes only allow os logins for a session if they are
present in the valid prinicpals of the SSH certificate. So even
though we are now capabale of displaying all allowed logins for
leaf SSH servers in the root web ui, the user is only able to use
a subset of them. To avoid any odd UX, the Proxy will filter out
any allowed logins which do not exist in the principals of the
root SSH certificate.

The above only holds for SSH, windows desktops are not as strict
and any allowed login from a leaf cluster is now visible in the
root web ui.

Fixes #5041
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/md tctl tctl - Teleport admin tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow logins specified on a leaf role when accessing from root cluster

3 participants