mirror of
https://github.com/paralus/paralus.git
synced 2026-05-18 06:17:28 +00:00
* added api keys as headers for all grpc messages Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io> * changes to have multiple api keys for auth in partner swagger docs Signed-off-by: niravparikh05 <nir.parikh05@gmail.com> --------- Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io> Signed-off-by: niravparikh05 <nir.parikh05@gmail.com> Co-authored-by: niravparikh05 <nir.parikh05@gmail.com>
117 lines
3.2 KiB
Protocol Buffer
117 lines
3.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
package paralus.dev.rpc.user.v3;
|
|
|
|
import "google/api/annotations.proto";
|
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
|
import "proto/types/userpb/v3/group.proto";
|
|
import "proto/types/commonpb/v3/common.proto";
|
|
|
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
|
info : {
|
|
title : "Group management Service"
|
|
version : "2.0"
|
|
contact : {name : "Paralus Dev"}
|
|
}
|
|
schemes : HTTPS
|
|
consumes : "application/json"
|
|
consumes : "application/yaml"
|
|
produces : "application/json"
|
|
produces : "application/yaml"
|
|
security_definitions : {
|
|
security : {
|
|
key : "BasicAuth"
|
|
value : {type : TYPE_BASIC}
|
|
}
|
|
security : {
|
|
key : "ApiKeyAuth"
|
|
value : {type : TYPE_API_KEY in : IN_HEADER name : "X-API-KEYID"}
|
|
}
|
|
security : {
|
|
key : "ApiTokenAuth"
|
|
value : {
|
|
type : TYPE_API_KEY in : IN_HEADER name : "X-API-TOKEN"
|
|
}
|
|
}
|
|
}
|
|
security : {
|
|
security_requirement : {
|
|
key : "BasicAuth"
|
|
value : {}
|
|
}
|
|
security_requirement : {
|
|
key : "ApiKeyAuth"
|
|
value : {}
|
|
}
|
|
security_requirement : {
|
|
key : "ApiTokenAuth"
|
|
value : {}
|
|
}
|
|
}
|
|
responses : {
|
|
key : "403"
|
|
value : {
|
|
description : "Returned when the group does not have permission to "
|
|
"access "
|
|
"the resource."
|
|
}
|
|
}
|
|
responses : {
|
|
key : "404"
|
|
value : {
|
|
description : "Returned when the resource does not exist."
|
|
schema : {json_schema : {type : STRING}}
|
|
}
|
|
}
|
|
};
|
|
|
|
service GroupService {
|
|
rpc CreateGroup(paralus.dev.types.user.v3.Group)
|
|
returns (paralus.dev.types.user.v3.Group) {
|
|
option (google.api.http) = {
|
|
post : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/groups"
|
|
body : "*"
|
|
};
|
|
|
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
responses : {
|
|
key : "201"
|
|
value : {description : "Returned when group is created successfully."}
|
|
}
|
|
};
|
|
};
|
|
|
|
rpc GetGroups(paralus.dev.types.common.v3.QueryOptions) returns (paralus.dev.types.user.v3.GroupList) {
|
|
option (google.api.http) = {
|
|
get : "/auth/v3/partner/{partner}/organization/{organization}/groups"
|
|
};
|
|
};
|
|
|
|
rpc GetGroup(paralus.dev.types.user.v3.Group) returns (paralus.dev.types.user.v3.Group) {
|
|
option (google.api.http) = {
|
|
get : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}"
|
|
};
|
|
};
|
|
|
|
rpc UpdateGroup(paralus.dev.types.user.v3.Group) returns (paralus.dev.types.user.v3.Group) {
|
|
option (google.api.http) = {
|
|
put : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}"
|
|
body : "*"
|
|
};
|
|
};
|
|
|
|
rpc DeleteGroup(paralus.dev.types.user.v3.Group) returns (paralus.dev.types.user.v3.Group) {
|
|
option (google.api.http) = {
|
|
delete : "/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/group/{metadata.name}"
|
|
};
|
|
|
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
|
responses : {
|
|
key : "204"
|
|
value : {
|
|
description : "Returned when group is deleted successfully."
|
|
}
|
|
}
|
|
};
|
|
};
|
|
}
|