| /* |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You 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. |
| */ |
| |
| syntax = "proto3"; |
| |
| option java_multiple_files = true; |
| package org.apache.airavata.mft.secret.service; |
| |
| import "google/api/annotations.proto"; |
| import "google/protobuf/empty.proto"; |
| |
| message AuthToken { |
| string token = 1; |
| } |
| |
| message SCPSecret { |
| string secretId = 1; |
| string privateKey = 2; |
| string publicKey = 3; |
| string passphrase = 4; |
| } |
| |
| message SCPSecretGetRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| message SCPSecretCreateRequest { |
| string privateKey = 1; |
| string publicKey = 2; |
| string passphrase = 3; |
| AuthToken authzToken = 5; |
| } |
| |
| message SCPSecretUpdateRequest { |
| string secretId = 1; |
| string privateKey = 2; |
| string publicKey = 3; |
| string passphrase = 4; |
| AuthToken authzToken = 6; |
| } |
| |
| message SCPSecretDeleteRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| message S3Secret { |
| string secretId = 1; |
| string accessKey = 2; |
| string secretKey = 3; |
| } |
| |
| message S3SecretGetRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| message S3SecretCreateRequest { |
| string accessKey = 1; |
| string secretKey = 2; |
| AuthToken authzToken = 3; |
| } |
| |
| message S3SecretUpdateRequest { |
| string secretId = 1; |
| string accessKey = 2; |
| string secretKey = 3; |
| AuthToken authzToken = 4; |
| } |
| |
| message S3SecretDeleteRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| // Azure |
| |
| message AzureSecret { |
| string secretId = 1; |
| string connectionString = 2; |
| } |
| |
| message AzureSecretGetRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| message AzureSecretCreateRequest { |
| string connectionString = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| message AzureSecretUpdateRequest { |
| string secretId = 1; |
| string connectionString = 2; |
| AuthToken authzToken = 3; |
| } |
| |
| message AzureSecretDeleteRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| // GCS |
| |
| message GCSSecret { |
| string secretId = 1; |
| string credentialsJson = 2; |
| } |
| |
| message GCSSecretGetRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| message GCSSecretCreateRequest { |
| string credentialsJson = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| message GCSSecretUpdateRequest { |
| string secretId = 1; |
| string credentialsJson = 2; |
| AuthToken authzToken = 3; |
| } |
| |
| message GCSSecretDeleteRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| // Box |
| |
| message BoxSecret { |
| string secretId = 1; |
| string accessToken = 2; |
| } |
| |
| message BoxSecretGetRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| message BoxSecretCreateRequest { |
| string accessToken = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| message BoxSecretUpdateRequest { |
| string secretId = 1; |
| string accessToken = 2; |
| AuthToken authzToken = 3; |
| } |
| |
| message BoxSecretDeleteRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| // DropBox |
| |
| message DropboxSecret { |
| string secretId = 1; |
| string accessToken = 2; |
| } |
| |
| message DropboxSecretGetRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| message DropboxSecretCreateRequest { |
| string accessToken = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| message DropboxSecretUpdateRequest { |
| string secretId = 1; |
| string accessToken = 2; |
| AuthToken authzToken = 3; |
| } |
| |
| message DropboxSecretDeleteRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| // FTP |
| message FTPSecret { |
| string secretId = 1; |
| string userId = 2; |
| string password = 3; |
| } |
| |
| message FTPSecretGetRequest { |
| string secretId = 1; |
| AuthToken authzToken = 2; |
| } |
| |
| message FTPSecretCreateRequest { |
| string userId = 1; |
| string password = 2; |
| AuthToken authzToken = 3; |
| } |
| |
| message FTPSecretUpdateRequest { |
| string secretId = 1; |
| string userId = 2; |
| string password = 3; |
| AuthToken authzToken = 4; |
| } |
| |
| message FTPSecretDeleteRequest { |
| string secretId = 1; |
| AuthToken authzToken = 4; |
| } |
| |
| service SecretService { |
| rpc getSCPSecret (SCPSecretGetRequest) returns (SCPSecret) { |
| option (google.api.http) = { |
| get: "/v1.0/secret/scp" |
| }; |
| } |
| |
| rpc createSCPSecret (SCPSecretCreateRequest) returns (SCPSecret) { |
| option (google.api.http) = { |
| post: "/v1.0/secret/scp" |
| }; |
| } |
| |
| rpc updateSCPSecret (SCPSecretUpdateRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| put: "/v1.0/secret/scp" |
| }; |
| } |
| |
| rpc deleteSCPSecret (SCPSecretDeleteRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| delete: "/v1.0/secret/scp" |
| }; |
| } |
| |
| rpc getS3Secret (S3SecretGetRequest) returns (S3Secret) { |
| option (google.api.http) = { |
| get: "/v1.0/secret/s3" |
| }; |
| } |
| |
| rpc createS3Secret (S3SecretCreateRequest) returns (S3Secret) { |
| option (google.api.http) = { |
| post: "/v1.0/secret/s3" |
| }; |
| } |
| |
| rpc updateS3Secret (S3SecretUpdateRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| put: "/v1.0/secret/s3" |
| }; |
| } |
| |
| rpc deleteS3Secret (S3SecretDeleteRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| delete: "/v1.0/secret/s3" |
| }; |
| } |
| |
| rpc getBoxSecret (BoxSecretGetRequest) returns (BoxSecret) { |
| option (google.api.http) = { |
| get: "/v1.0/secret/box" |
| }; |
| } |
| |
| rpc createBoxSecret (BoxSecretCreateRequest) returns (BoxSecret) { |
| option (google.api.http) = { |
| post: "/v1.0/secret/box" |
| }; |
| } |
| |
| rpc updateBoxSecret (BoxSecretUpdateRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| put: "/v1.0/secret/box" |
| }; |
| } |
| |
| rpc deleteBoxSecret (BoxSecretDeleteRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| delete: "/v1.0/secret/box" |
| }; |
| } |
| |
| // Azure |
| |
| rpc getAzureSecret (AzureSecretGetRequest) returns (AzureSecret) { |
| option (google.api.http) = { |
| get: "/v1.0/secret/azure" |
| }; |
| } |
| |
| rpc createAzureSecret (AzureSecretCreateRequest) returns (AzureSecret) { |
| option (google.api.http) = { |
| post: "/v1.0/secret/azure" |
| }; |
| } |
| |
| rpc updateAzureSecret (AzureSecretUpdateRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| put: "/v1.0/secret/azure" |
| }; |
| } |
| |
| rpc deleteAzureSecret (AzureSecretDeleteRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| delete: "/v1.0/secret/azure" |
| }; |
| } |
| |
| // GCS |
| |
| rpc getGCSSecret (GCSSecretGetRequest) returns (GCSSecret) { |
| option (google.api.http) = { |
| get: "/v1.0/secret/gcs" |
| }; |
| } |
| |
| rpc createGCSSecret (GCSSecretCreateRequest) returns (GCSSecret) { |
| option (google.api.http) = { |
| post: "/v1.0/secret/gcs" |
| }; |
| } |
| |
| rpc updateGCSSecret (GCSSecretUpdateRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| put: "/v1.0/secret/gcs" |
| }; |
| } |
| |
| rpc deleteGCSSecret (GCSSecretDeleteRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| delete: "/v1.0/secret/gcs" |
| }; |
| } |
| |
| // Dropbox |
| |
| rpc getDropboxSecret (DropboxSecretGetRequest) returns (DropboxSecret) { |
| option (google.api.http) = { |
| get: "/v1.0/secret/dropbox" |
| }; |
| } |
| |
| rpc createDropboxSecret (DropboxSecretCreateRequest) returns (DropboxSecret) { |
| option (google.api.http) = { |
| post: "/v1.0/secret/dropbox" |
| }; |
| } |
| |
| rpc updateDropboxSecret (DropboxSecretUpdateRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| put: "/v1.0/secret/dropbox" |
| }; |
| } |
| |
| rpc deleteDropboxSecret (DropboxSecretDeleteRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| delete: "/v1.0/secret/dropbox" |
| }; |
| } |
| |
| // FTP |
| |
| rpc getFTPSecret (FTPSecretGetRequest) returns (FTPSecret) { |
| option (google.api.http) = { |
| get: "/v1.0/secret/ftp" |
| }; |
| } |
| |
| rpc createFTPSecret (FTPSecretCreateRequest) returns (FTPSecret) { |
| option (google.api.http) = { |
| post: "/v1.0/secret/ftp" |
| }; |
| } |
| |
| rpc updateFTPSecret (FTPSecretUpdateRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| put: "/v1.0/secret/ftp" |
| }; |
| } |
| |
| rpc deleteFTPSecret (FTPSecretDeleteRequest) returns (google.protobuf.Empty) { |
| option (google.api.http) = { |
| delete: "/v1.0/secret/ftp" |
| }; |
| } |
| |
| } |