fix(mgmt_api) : role deletion/update fails when role key contains a slash (#9958)

# Which Problems Are Solved

- Role deletion or update API returns `404 Not Found` when the role key
contains a slash (`/`), even if URL encoded.
- This breaks management of hierarchical role keys like
`admin/org/reader`.

# How the Problems Are Solved

- Updated the HTTP binding in the protobuf definition for the affected
endpoints to use `{role_key=**}` instead of `{role_key}`.
- This change enables proper decoding and handling of slashes in role
keys as a single path variable.

# Additional Changes
None

# Additional Context
- Closes https://github.com/zitadel/zitadel/issues/9948

Co-authored-by: Masum Patel <patelmasum98@gmail.com>
Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
This commit is contained in:
masum-msphere
2025-07-16 17:38:06 +05:30
committed by GitHub
parent 870fefe3dc
commit 1a24b10702

View File

@@ -3101,7 +3101,7 @@ service ManagementService {
rpc UpdateProjectRole(UpdateProjectRoleRequest) returns (UpdateProjectRoleResponse) { rpc UpdateProjectRole(UpdateProjectRoleRequest) returns (UpdateProjectRoleResponse) {
option (google.api.http) = { option (google.api.http) = {
put: "/projects/{project_id}/roles/{role_key}" put: "/projects/{project_id}/roles/{role_key=**}"
body: "*" body: "*"
}; };
@@ -3127,7 +3127,7 @@ service ManagementService {
rpc RemoveProjectRole(RemoveProjectRoleRequest) returns (RemoveProjectRoleResponse) { rpc RemoveProjectRole(RemoveProjectRoleRequest) returns (RemoveProjectRoleResponse) {
option (google.api.http) = { option (google.api.http) = {
delete: "/projects/{project_id}/roles/{role_key}" delete: "/projects/{project_id}/roles/{role_key=**}"
}; };
option (zitadel.v1.auth_option) = { option (zitadel.v1.auth_option) = {