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

Add ACL Policy for Debug service. This will enable the support of #244

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 157 additions & 19 deletions debug/debug.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions debug/debug.proto
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,20 @@ message DebugStatus {
// A list of messages that carry the error details.
repeated google.protobuf.Any details = 3;
}

// Policy defines a set of commands a list of users are allowed to execute
Copy link
Contributor

Choose a reason for hiding this comment

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

How is this provided to the device?

It seems a little odd that we don't have this in gNSI -- is there some opportunity to express this there akin to pathz?

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 can move it into gnsi as far as providing the gnsi.Debug.Rotate it just kinda feels a bit odd if that is really going to be a pattern we follow for all services

Copy link
Contributor Author

Choose a reason for hiding this comment

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

are you also suggesting trying to make pathz support other services? I am not sure it is worth trying to fit that - "role based access control" generally is tailored to the service implementation conversely the definition of Authz is generic only to grpc itself

// on the device.
// There can only be a single policy defined for the service.
message Policy {
repeated Term terms = 1;
}

// Term defines a term in the policy for allowing access to commands by users.
message Term {
// Users are the allowed spiffe id's allowed to use the particular debug
// requests.
repeated string users = 1;
// The only fields in the request that are matched is mode / command
// role_account.
repeated DebugRequest requests = 2;
}
Loading