-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
implement ssh access decision method prototype #52542
base: master
Are you sure you want to change the base?
Conversation
7006482
to
07b9a43
Compare
decisionpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/decision/v1alpha1" | ||
headerv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1" | ||
workloadidentityv1pb "github.com/gravitational/teleport/api/gen/proto/go/teleport/workloadidentity/v1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
decisionpb
, headerv1
, workloadidentityv1pb
🫠
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... not ideal, but until we coalesce on a standard I'm going to leave as-is. IMO more important than consistency across packages is consistency in the aliasing of any given package, to ensure that types of that package are easy to grep for.
ce70bb6
to
2c1c6a8
Compare
2c1c6a8
to
ff401cf
Compare
ff401cf
to
dd64674
Compare
c.command.Flag("username", "The username to evaluate access for.").StringVar(&c.sshDetails.username) | ||
c.command.Flag("login", "The os login to evaluate access for.").StringVar(&c.sshDetails.login) | ||
c.command.Flag("server-id", "The host id of the target server.").StringVar(&c.sshDetails.serverID) | ||
c.command.Flag("username", "The username to evaluate access for.").StringVar(&c.Username) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to make this required at the parser level, or is there some advantage to the empty check in Run()
?
c.command.Flag("username", "The username to evaluate access for.").StringVar(&c.Username) | |
c.command.Flag("username", "The username to evaluate access for.").Required().StringVar(&c.Username) |
The PR implements a prototype of the
EvaluateSSHAccess
decision service RPC implementation. Almost everything here is either a placeholder, or a WIP subset of the intended final logic.In addition to the core functionality of
EvaluateSSHAccess
, this PR also introduces supporting functionality around generation of fake identities for dry run queries withtctl
. This allows the decision service to approximate what the parameters of a users certificate identity would likely be given only their username, and use that approximation in making its decisions.The identity generation logic in this PR supersedes two previous design iterations that were proposed but never merged: #50559 and #50482. The logic here tries to strike a balance between the two previous strategies by preserving a mostly isolated set of types and codepaths for identity generation, but eliminating the need for an extra round-trip.
Part of ongoing work related to the PDP proposal (https://github.com/gravitational/teleport.e/pull/5736).