-
Notifications
You must be signed in to change notification settings - Fork 19
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 support for profiles in Get and Probe RPC. #213
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,6 @@ option go_package = "github.com/openconfig/gnsi/authz"; | |
// all other RPCs is implementation dependent. | ||
|
||
service Authz { | ||
|
||
// Rotate will replace an existing gRPC-level Authorization Policy on the | ||
// target. | ||
// | ||
|
@@ -117,8 +116,7 @@ service Authz { | |
// Step 4: Final commit. | ||
// Client ---> FinalizeRequest ----> Target | ||
// | ||
rpc Rotate(stream RotateAuthzRequest) | ||
returns (stream RotateAuthzResponse); | ||
rpc Rotate(stream RotateAuthzRequest) returns (stream RotateAuthzResponse); | ||
|
||
// Probe allows for evaluation of the gRPC-level Authorization Policy engine | ||
// response to a gRPC call performed by a user. | ||
|
@@ -230,6 +228,16 @@ message ProbeRequest { | |
// It has to be a fully qualified name, like: | ||
// "/gnsi.ssh.Ssh/MutateHostCredentials" | ||
string rpc = 2; | ||
|
||
// The profile for which the authz policy is being probed. In the case that | ||
// this field is not specified, the default authz policy which applies to all | ||
// gRPC endpoints run by the target is assumed. Where non-default policies | ||
// are to supported by an endpoint, the value of the profile determines which | ||
// set of policies are to be probed. | ||
// | ||
// Note that the authz profile is considered independent from a SSL profile | ||
// ID (as referenced by gnsi.Certz). | ||
string authz_profile_id = 3; | ||
} | ||
|
||
// ProbeResponse returns the ACK/NACK for a single user request | ||
|
@@ -247,10 +255,20 @@ message ProbeResponse { | |
|
||
Action action = 1; | ||
string version = 2; | ||
string authz_profile_id = 3; | ||
} | ||
|
||
// GetRequest used to request the gRPC-level Authorization Policy. | ||
message GetRequest { | ||
// The profile for which the authz policy is being requested. In the case that | ||
// this field is not specified, the default authz policy which applies to all | ||
// gRPC endpoints run by the target is assumed. Where non-default policies | ||
// are to supported by an endpoint, the value of the profile determines which | ||
// set of policies are returned. | ||
// | ||
// Note that the authz profile is considered independent from a SSL profile | ||
// ID (as referenced by gnsi.Certz). | ||
string authz_profile_id = 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this really 'ssl_profile_id'? or are there now new profiles inside profiles? wait: "Note that the authz profile is considered..." Why is that? are these tied back to the ssl profile in some way? how would I know that I'm using the a vs b profile here? |
||
} | ||
|
||
// GetResponse returns the requested instance of the gRPC-level Authorization | ||
|
@@ -282,4 +300,5 @@ message GetResponse { | |
// It is provided as a JSON formatted string whose structure is defined by | ||
// gRPC. | ||
string policy = 3; | ||
string authz_profile_id = 4; | ||
} |
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.
I discussed with Marcus too. I think this makes sense to have here so that you can know exactly what authz policy you're probing.
However, can we add a clarification that says that you can only have one rotate operation in progress at once, to avoid the complexity of the state machine having to handle "what happens if you start multiple operations and then probe another one".
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.
I made a similar change for Certz here: #201
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.
+1