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

feat(guardian): add api to list default roles while provider creation #322

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
27 changes: 27 additions & 0 deletions raystack/guardian/v1beta1/guardian.proto
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ service GuardianService {
};
}

rpc GetProviderRoles(GetProviderRolesRequest) returns (GetProviderRolesResponse) {
option (google.api.http) = {get: "/v1beta1/providers/{name}/roles"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Providers";
summary: "Get Provider Default Roles";
description: "Get Provider Roles returns a list of roles supported by a provider while creating a new provider";
};
}

rpc CreateProvider(CreateProviderRequest) returns (CreateProviderResponse) {
option (google.api.http) = {
post: "/v1beta1/providers"
Expand Down Expand Up @@ -554,6 +563,24 @@ message GetProviderTypesResponse {
repeated ProviderType provider_types = 1;
}

message GetProviderRolesRequest {
string name = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) =
{description: "Name of the provider"}
];
string resource_type = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) =
{description: "Resource type for which the roles are to be fetched"}
];
}

message GetProviderRolesResponse {
repeated string roles = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) =
{description: "List of roles supported by the provider"}
];
}

message CreateProviderRequest {
ProviderConfig config = 1;
bool dry_run = 2;
Expand Down
Loading