-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add token scope field to gateway authenticate requests
- Loading branch information
Showing
3 changed files
with
237 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// 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.auth.provider.v1beta1; | ||
|
||
option csharp_namespace = "Cs3.Auth.Provider.V1Beta1"; | ||
option go_package = "providerv1beta1"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "ResourcesProto"; | ||
option java_package = "com.cs3.auth.provider.v1beta1"; | ||
option objc_class_prefix = "CAP"; | ||
option php_namespace = "Cs3\\Auth\\Provider\\V1Beta1"; | ||
|
||
import "cs3/types/v1beta1/types.proto"; | ||
|
||
// Scope defines role-based permissions for various resources. | ||
message Scope { | ||
// REQUIRED. | ||
// The resource embedded in the request of a particular method. It depends on | ||
// the method, hence is left as opaque. | ||
cs3.types.v1beta1.OpaqueEntry resource = 1; | ||
// REQUIRED. | ||
// The role associated with the resource. | ||
Role role = 2; | ||
} | ||
|
||
// The role associated with the scope. | ||
enum Role { | ||
// Used for invalid roles | ||
ROLE_INVALID = 0; | ||
// Grants owner permissions on a resource | ||
ROLE_OWNER = 1; | ||
// Provides backwards compatibility | ||
ROLE_LEGACY = 2; | ||
// Grants non-editor role on a resource | ||
ROLE_VIEWER = 3; | ||
// Grants editor permission on a resource, including folders | ||
ROLE_EDITOR = 4; | ||
// Grants editor permission on a single file | ||
ROLE_FILE_EDITOR = 5; | ||
// Grants co-owner permissions on a resource | ||
ROLE_COOWNER = 6; | ||
// Role with only write permission can use InitiateFileUpload, nothing else | ||
ROLE_UPLOADER = 7; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters