From 881d0b91e4fbb0feb0f50ed21c9369adb24ae32c Mon Sep 17 00:00:00 2001 From: Ryland Degnan Date: Tue, 24 Jul 2018 00:34:35 -0700 Subject: [PATCH] Update AccessKeyInfoService --- access-key-info-idl/build.gradle | 4 ++ .../main/proto/proteus/accesskey_info.proto | 41 ++++++++++--------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/access-key-info-idl/build.gradle b/access-key-info-idl/build.gradle index 7d07a6c..39731e3 100644 --- a/access-key-info-idl/build.gradle +++ b/access-key-info-idl/build.gradle @@ -2,6 +2,10 @@ plugins { id 'com.google.protobuf' version '0.8.5' } +dependencies { + protobuf 'com.google.protobuf:protobuf-java:3.6.0' +} + protobuf { protoc { artifact = 'com.google.protobuf:protoc:3.6.0' diff --git a/access-key-info-idl/src/main/proto/proteus/accesskey_info.proto b/access-key-info-idl/src/main/proto/proteus/accesskey_info.proto index 6a46a94..53d0032 100644 --- a/access-key-info-idl/src/main/proto/proteus/accesskey_info.proto +++ b/access-key-info-idl/src/main/proto/proteus/accesskey_info.proto @@ -1,34 +1,37 @@ syntax = "proto3"; -package io.netifi.proteus.controlcenter.accesskey.service; +package io.netifi.proteus.broker.access; -option java_package = "io.netifi.proteus.controlcenter.accesskey.service"; -option java_outer_classname = "AccessKeyServiceProto"; +import "google/protobuf/empty.proto"; + +option java_package = "io.netifi.proteus.broker.access"; +option java_outer_classname = "AccessKeyInfo"; option java_multiple_files = true; -// Service that returns AuthInfo used by the router to login -service AccessKeyInfoService { - rpc AccessKeyInfoEvents (Empty) returns (stream AccessKeyInfo) {} +message AccessKey { + int64 key = 1; } -message Empty {} +message AccessToken { + int64 key = 1; + bytes accessToken = 2; + string description = 3; +} message AccessKeyInfo { int64 key = 1; - bytes accessTokenHash = 2; - bytes accessTokenSalt = 3; - string accessKeyAlgo = 4; + string description = 5; + bool disabled = 6; +} - int64 account = 5; - - enum Type { - SEED_NEXT = 0; - SEED_COMPLETE = 1; - ADD = 2; - REMOVE = 3; - } - Type type = 6; +service AccessKeyInfoService { + rpc AddAccessKey (AccessToken) returns (AccessKeyInfo) {} + rpc RemoveAccessKey (AccessKey) returns (AccessKeyInfo) {} + rpc DisableAccessKey (AccessKey) returns (AccessKeyInfo) {} + rpc EnableAccessKey (AccessKey) returns (AccessKeyInfo) {} + rpc GetAccessKey (AccessKey) returns (AccessKeyInfo) {} + rpc GetAccessKeys (google.protobuf.Empty) returns (stream AccessKeyInfo) {} }