Allow slashes in authorize-session when using target name (#3249)

This requires specifying `**` as the selector in the proto, which will
match any segments and simply requires that the verb is the last part of
the URL, which it already is.
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2023-05-30 16:03:27 -04:00
1 parent 4d08c52afd
commit c149bc4a79
6 files changed
+154 -120

No files matched your search

@@ -75,9 +75,13 @@ service TargetService {
}
// AuthorizeSession creates authorization information from a given Target.
// Note that unlike most APIs, since we support using a target name along with
// scope ID or name to identify a target, this uses a pattern that allows the
// "id" field to have any number of segments, which works so long as the last
// part of the path is the verb, which is our normal pattern.
rpc AuthorizeSession(AuthorizeSessionRequest) returns (AuthorizeSessionResponse) {
option (google.api.http) = {
post: "/v1/targets/{id}:authorize-session"
post: "/v1/targets/{id=**}:authorize-session"
body: "*"
response_body: "item"
};