Return logins from the unified resources endpoint for scoped nodes - #69617
Open
bl-nero wants to merge 1 commit into
Open
Return logins from the unified resources endpoint for scoped nodes#69617bl-nero wants to merge 1 commit into
bl-nero wants to merge 1 commit into
Conversation
zmb3
reviewed
Aug 12, 2026
| GetImmutableLabels() map[string]string | ||
| } | ||
|
|
||
| type serverOpt func(*ServerV2) |
Collaborator
There was a problem hiding this comment.
Suggested change
| type serverOpt func(*ServerV2) | |
| type ServerOpt func(*ServerV2) |
|
|
||
| type serverOpt func(*ServerV2) | ||
|
|
||
| func ServerWithScope(scope string) serverOpt { |
Collaborator
There was a problem hiding this comment.
Suggested change
| func ServerWithScope(scope string) serverOpt { | |
| func WithScope(scope string) serverOpt { |
Comment on lines
+1990
to
+1994
| resourceLister := &unifiedResourceLister{} | ||
| resourceLister.accessChecker = &scopedResourceChecker{ | ||
| ctx: ctx, | ||
| scopedContext: *a.scopedContext, | ||
| } |
Collaborator
There was a problem hiding this comment.
Suggested change
| resourceLister := &unifiedResourceLister{} | |
| resourceLister.accessChecker = &scopedResourceChecker{ | |
| ctx: ctx, | |
| scopedContext: *a.scopedContext, | |
| } | |
| resourceLister := &unifiedResourceLister{ | |
| accessChecker: &scopedResourceChecker{ | |
| ctx: ctx, | |
| scopedContext: *a.scopedContext, | |
| }, | |
| } |
Comment on lines
+2701
to
+2704
| serverScope := scopes.Root | ||
| if server.Scope != "" { | ||
| serverScope = server.Scope | ||
| } |
Collaborator
There was a problem hiding this comment.
Here and below:
Suggested change
| serverScope := scopes.Root | |
| if server.Scope != "" { | |
| serverScope = server.Scope | |
| } | |
| serverScope := cmp.Or(server.Scope, scopes.Root) |
| // NewServer creates an instance of Server. | ||
| func NewServer(name, kind string, spec ServerSpecV2) (Server, error) { | ||
| return NewServerWithLabels(name, kind, spec, map[string]string{}) | ||
| func NewServer(name, kind string, spec ServerSpecV2, opts ...serverOpt) (Server, error) { |
Contributor
There was a problem hiding this comment.
We could also consider scope ...string instead of serverOpt here if the intent is to limit the blast radius in this PR, then just follow up and update all call sites to either pass in the scope or empty string later.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change returns allowed SSH server logins for scoped nodes to the Web UI. As a result, the user is able to connect to a scoped SSH node using a Web terminal.
Updates https://github.com/gravitational/core/issues/77
Manual Test Plan
Test Environment
Any cluster and a user with a scoped role that allows access to at least one server.
Turn on Scopes globally using TELEPORT_UNSTABLE_SCOPES=yes in the environment.
Using Chrome dev tools, add grv_teleport_use_login_scope_picker=true to the application's local storage.
Test Cases