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

Write only management API for User and Group resources #119

Merged
merged 26 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
abf96b9
use resource_info instead of resource_id on CreatePublicShare
refs Sep 30, 2019
561a22a
update branch
refs Nov 8, 2019
4d7e37e
Merge branch 'master' of https://github.com/cs3org/cs3apis
refs Dec 2, 2019
6e07be3
Merge branch 'master' of https://github.com/cs3org/cs3apis
refs Apr 3, 2020
0626924
Merge branch 'master' of https://github.com/cs3org/cs3apis
refs Apr 21, 2020
744f72b
Merge branch 'master' of https://github.com/cs3org/cs3apis
refs Apr 23, 2020
2416b1f
Merge branch 'master' of https://github.com/cs3org/cs3apis
refs Jul 15, 2020
2df08ad
Merge branch 'master' of https://github.com/cs3org/cs3apis into master
refs Nov 26, 2020
410d62a
commit all
refs Feb 19, 2021
8a1de58
commit build
refs Feb 19, 2021
01f72d5
Merge branch 'master' of https://github.com/cs3org/cs3apis into master
refs Apr 14, 2021
d80dad5
first draft of management api for users and groups
refs Apr 14, 2021
b2d35af
remove build folder
refs Apr 14, 2021
52804fd
remove go-cs43 submodule
refs Apr 14, 2021
82a17f1
undo prototool changes
refs Apr 14, 2021
d890bbc
redo build
refs Apr 14, 2021
faa39de
redo build
refs Apr 14, 2021
9385b0f
fix linter
refs Apr 14, 2021
2dce1fc
fix linter UserApiProto
refs Apr 14, 2021
03281c5
add remove user from group
refs Apr 14, 2021
cbfcb69
Merge branch 'main' into write-only-admin-api
refs Apr 15, 2021
7e5c4fe
run make
refs Apr 21, 2021
cbd7409
apply review comments
refs Apr 21, 2021
568a1fc
apply review comments
refs Apr 21, 2021
87e1a03
apply review comments: userid -> user_id
refs Apr 21, 2021
5a97007
rename methods as per google guidelines
refs Apr 21, 2021
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
127 changes: 127 additions & 0 deletions cs3/admin/group/v1beta1/group_api.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
// Copyright 2018-2019 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// In applying this license, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

syntax = "proto3";

package cs3.admin.group.v1beta1;

option csharp_namespace = "Cs3.Admin.Group.V1Beta1";
option go_package = "groupv1beta1";
option java_multiple_files = true;
option java_outer_classname = "GroupApiProto";
option java_package = "com.cs3.admin.group.v1beta1";
option objc_class_prefix = "CAG";
option php_namespace = "Cs3\\Admin\\Group\\V1Beta1";

import "cs3/identity/group/v1beta1/resources.proto";
import "cs3/identity/user/v1beta1/resources.proto";
import "cs3/rpc/v1beta1/status.proto";
import "cs3/types/v1beta1/types.proto";

// Provides a write only API for managing groups.
service GroupAPI {
// Create a group.
rpc CreateGroup(CreateGroupRequest) returns (CreateGroupResponse);
// Delete a group.
rpc DeleteGroup(DeleteGroupRequest) returns (DeleteGroupResponse);
// Add a user to a group.
rpc AddUserToGroup(AddUserToGroupRequest) returns (AddUserToGroupResponse);
// Remove a user from a group.
rpc RemoveUserFromGroup(RemoveUserFromGroupRequest) returns (RemoveUserFromGroupResponse);
}

message CreateGroupRequest {
// OPTIONAL.
// Opaque information. Allow to send any arbitrary data a service might use that is outside the API boundaries
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The information of group to be created.
cs3.identity.group.v1beta1.Group group = 2;
}

message CreateGroupResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
// REQUIRED.
// The group information.
cs3.identity.group.v1beta1.Group group = 3;
}

message DeleteGroupRequest {
// OPTIONAL.
// Opaque information. Allow to send any arbitrary data a service might use that is outside the API boundaries.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The group to be deleted, given their ID.
cs3.identity.group.v1beta1.GroupId group_id = 2;
}

message DeleteGroupResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
}

message AddUserToGroupRequest {
// REQUIRED.
// ID of the user to add to the group
cs3.identity.user.v1beta1.UserId user_id = 1;
// REQUIRED.
// ID of the target group.
cs3.identity.group.v1beta1.GroupId group_id = 2;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 3;
}

message AddUserToGroupResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
}

message RemoveUserFromGroupRequest {
// REQUIRED.
// ID of the user to add to the group
cs3.identity.user.v1beta1.UserId user_id = 1;
// REQUIRED.
// ID of the target group.
cs3.identity.group.v1beta1.GroupId group_id = 2;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 3;
}

message RemoveUserFromGroupResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
}
80 changes: 80 additions & 0 deletions cs3/admin/user/v1beta1/user_api.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Copyright 2018-2019 CERN
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// In applying this license, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

syntax = "proto3";

package cs3.admin.user.v1beta1;

option csharp_namespace = "Cs3.Admin.User.V1Beta1";
option go_package = "userv1beta1";
option java_multiple_files = true;
option java_outer_classname = "UserApiProto";
option java_package = "com.cs3.admin.user.v1beta1";
option objc_class_prefix = "CAU";
option php_namespace = "Cs3\\Admin\\User\\V1Beta1";

import "cs3/identity/user/v1beta1/resources.proto";
import "cs3/rpc/v1beta1/status.proto";
import "cs3/types/v1beta1/types.proto";

// Provides a write only API for managing users.
service UserAPI {
// Create a user account.
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse);
// Delete a user account.
rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse);
}

message CreateUserRequest {
// OPTIONAL.
// Opaque information. Allow to send any arbitrary data a service might use that is outside the API boundaries
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The information of user to be created.
cs3.identity.user.v1beta1.User user = 2;
}

message CreateUserResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
// REQUIRED.
// The user information.
cs3.identity.user.v1beta1.User user = 3;
}

message DeleteUserRequest {
// OPTIONAL.
// Opaque information. Allow to send any arbitrary data a service might use that is outside the API boundaries
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The user to be deleted, given their ID.
cs3.identity.user.v1beta1.UserId user_id = 2;
}

message DeleteUserResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
}
Loading