ApplyAuth creates or updates an authentication. This method is idempotent - if an authentication with the same external_id already exists, it will be updated.
RemoveAuth removes an authentication by its external ID. This method is idempotent - if the authentication does not exist, it will return success.
+
+
+
+
+
+
+
+
+
Scalar Value Types
+
+
+
.proto Type
Notes
C++
Java
Python
Go
C#
PHP
Ruby
+
+
+
+
+
double
+
+
double
+
double
+
float
+
float64
+
double
+
float
+
Float
+
+
+
+
float
+
+
float
+
float
+
float
+
float32
+
float
+
float
+
Float
+
+
+
+
int32
+
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.
+
int32
+
int
+
int
+
int32
+
int
+
integer
+
Bignum or Fixnum (as required)
+
+
+
+
int64
+
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.
+
int64
+
long
+
int/long
+
int64
+
long
+
integer/string
+
Bignum
+
+
+
+
uint32
+
Uses variable-length encoding.
+
uint32
+
int
+
int/long
+
uint32
+
uint
+
integer
+
Bignum or Fixnum (as required)
+
+
+
+
uint64
+
Uses variable-length encoding.
+
uint64
+
long
+
int/long
+
uint64
+
ulong
+
integer/string
+
Bignum or Fixnum (as required)
+
+
+
+
sint32
+
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.
+
int32
+
int
+
int
+
int32
+
int
+
integer
+
Bignum or Fixnum (as required)
+
+
+
+
sint64
+
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.
+
int64
+
long
+
int/long
+
int64
+
long
+
integer/string
+
Bignum
+
+
+
+
fixed32
+
Always four bytes. More efficient than uint32 if values are often greater than 2^28.
+
uint32
+
int
+
int
+
uint32
+
uint
+
integer
+
Bignum or Fixnum (as required)
+
+
+
+
fixed64
+
Always eight bytes. More efficient than uint64 if values are often greater than 2^56.
+
uint64
+
long
+
int/long
+
uint64
+
ulong
+
integer/string
+
Bignum
+
+
+
+
sfixed32
+
Always four bytes.
+
int32
+
int
+
int
+
int32
+
int
+
integer
+
Bignum or Fixnum (as required)
+
+
+
+
sfixed64
+
Always eight bytes.
+
int64
+
long
+
int/long
+
int64
+
long
+
integer/string
+
Bignum
+
+
+
+
bool
+
+
bool
+
boolean
+
boolean
+
bool
+
bool
+
boolean
+
TrueClass/FalseClass
+
+
+
+
string
+
A string must always contain UTF-8 encoded or 7-bit ASCII text.
+
string
+
String
+
str/unicode
+
string
+
string
+
string
+
String (UTF-8)
+
+
+
+
bytes
+
May contain any arbitrary sequence of bytes.
+
string
+
ByteString
+
str
+
[]byte
+
ByteString
+
string
+
String (ASCII-8BIT)
+
+
+
+
+
+
+
diff --git a/proto/kms/api/cmk/registry/auth/v1/auth.pb.go b/proto/kms/api/cmk/registry/auth/v1/auth.pb.go
index 10b7b11..e4988ff 100644
--- a/proto/kms/api/cmk/registry/auth/v1/auth.pb.go
+++ b/proto/kms/api/cmk/registry/auth/v1/auth.pb.go
@@ -21,20 +21,33 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
+// The status of an authentication.
type AuthStatus int32
const (
- AuthStatus_AUTH_STATUS_UNSPECIFIED AuthStatus = 0
- AuthStatus_AUTH_STATUS_APPLYING AuthStatus = 1
- AuthStatus_AUTH_STATUS_APPLYING_ERROR AuthStatus = 2
- AuthStatus_AUTH_STATUS_APPLIED AuthStatus = 3
- AuthStatus_AUTH_STATUS_REMOVING AuthStatus = 4
- AuthStatus_AUTH_STATUS_REMOVING_ERROR AuthStatus = 5
- AuthStatus_AUTH_STATUS_REMOVED AuthStatus = 6
- AuthStatus_AUTH_STATUS_BLOCKING AuthStatus = 7
- AuthStatus_AUTH_STATUS_BLOCKING_ERROR AuthStatus = 8
- AuthStatus_AUTH_STATUS_BLOCKED AuthStatus = 9
- AuthStatus_AUTH_STATUS_UNBLOCKING AuthStatus = 10
+ // The status is not specified.
+ AuthStatus_AUTH_STATUS_UNSPECIFIED AuthStatus = 0
+ // The authentication is being applied.
+ AuthStatus_AUTH_STATUS_APPLYING AuthStatus = 1
+ // An error occurred while applying the authentication.
+ AuthStatus_AUTH_STATUS_APPLYING_ERROR AuthStatus = 2
+ // The authentication has been applied.
+ AuthStatus_AUTH_STATUS_APPLIED AuthStatus = 3
+ // The authentication is being removed.
+ AuthStatus_AUTH_STATUS_REMOVING AuthStatus = 4
+ // An error occurred while removing the authentication.
+ AuthStatus_AUTH_STATUS_REMOVING_ERROR AuthStatus = 5
+ // The authentication has been removed.
+ AuthStatus_AUTH_STATUS_REMOVED AuthStatus = 6
+ // The authentication is being blocked.
+ AuthStatus_AUTH_STATUS_BLOCKING AuthStatus = 7
+ // An error occurred while blocking the authentication.
+ AuthStatus_AUTH_STATUS_BLOCKING_ERROR AuthStatus = 8
+ // The authentication has been blocked.
+ AuthStatus_AUTH_STATUS_BLOCKED AuthStatus = 9
+ // The authentication is being unblocked.
+ AuthStatus_AUTH_STATUS_UNBLOCKING AuthStatus = 10
+ // An error occurred while unblocking the authentication.
AuthStatus_AUTH_STATUS_UNBLOCKING_ERROR AuthStatus = 11
)
@@ -97,11 +110,15 @@ func (AuthStatus) EnumDescriptor() ([]byte, []int) {
return file_kms_api_cmk_registry_auth_v1_auth_proto_rawDescGZIP(), []int{0}
}
+// The action to perform on an authentication.
type AuthAction int32
const (
+ // The action is not specified.
AuthAction_AUTH_ACTION_UNSPECIFIED AuthAction = 0
- AuthAction_AUTH_ACTION_APPLY_AUTH AuthAction = 1
+ // Apply an authentication.
+ AuthAction_AUTH_ACTION_APPLY_AUTH AuthAction = 1
+ // Remove an authentication.
AuthAction_AUTH_ACTION_REMOVE_AUTH AuthAction = 2
)
@@ -146,16 +163,25 @@ func (AuthAction) EnumDescriptor() ([]byte, []int) {
return file_kms_api_cmk_registry_auth_v1_auth_proto_rawDescGZIP(), []int{1}
}
+// Represents an authentication.
type Auth struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- ExternalId string `protobuf:"bytes,1,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
- TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
- Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
- Properties map[string]string `protobuf:"bytes,4,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- Status AuthStatus `protobuf:"varint,5,opt,name=status,proto3,enum=kms.api.cmk.registry.auth.v1.AuthStatus" json:"status,omitempty"`
- ErrorMessage string `protobuf:"bytes,6,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
- UpdatedAt string `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
- CreatedAt string `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The external ID of the authentication.
+ ExternalId string `protobuf:"bytes,1,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
+ // The tenant ID associated with the authentication.
+ TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
+ // The type of the authentication.
+ Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
+ // A map of properties for the authentication.
+ Properties map[string]string `protobuf:"bytes,4,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ // The status of the authentication.
+ Status AuthStatus `protobuf:"varint,5,opt,name=status,proto3,enum=kms.api.cmk.registry.auth.v1.AuthStatus" json:"status,omitempty"`
+ // An error message, if any.
+ ErrorMessage string `protobuf:"bytes,6,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
+ // The timestamp of the last update.
+ UpdatedAt string `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
+ // The timestamp of creation.
+ CreatedAt string `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -246,12 +272,17 @@ func (x *Auth) GetCreatedAt() string {
return ""
}
+// Request to apply an authentication.
type ApplyAuthRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- ExternalId string `protobuf:"bytes,1,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
- TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
- Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
- Properties map[string]string `protobuf:"bytes,4,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The external ID of the authentication.
+ ExternalId string `protobuf:"bytes,1,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
+ // The tenant ID associated with the authentication.
+ TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
+ // The type of the authentication.
+ Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
+ // A map of properties for the authentication.
+ Properties map[string]string `protobuf:"bytes,4,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -314,9 +345,11 @@ func (x *ApplyAuthRequest) GetProperties() map[string]string {
return nil
}
+// Response for applying an authentication.
type ApplyAuthResponse struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Indicates whether the operation was successful.
+ Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -358,9 +391,11 @@ func (x *ApplyAuthResponse) GetSuccess() bool {
return false
}
+// Request to get an authentication.
type GetAuthRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- ExternalId string `protobuf:"bytes,1,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The external ID of the authentication to retrieve.
+ ExternalId string `protobuf:"bytes,1,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -402,9 +437,11 @@ func (x *GetAuthRequest) GetExternalId() string {
return ""
}
+// Response for getting an authentication.
type GetAuthResponse struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Auth *Auth `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The retrieved authentication.
+ Auth *Auth `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -446,11 +483,16 @@ func (x *GetAuthResponse) GetAuth() *Auth {
return nil
}
+// Request to list authentications.
type ListAuthsRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
- Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // default value is 50; max value is 1000
- NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The tenant ID to list authentications for.
+ TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
+ // The maximum number of authentications to return.
+ // Default value is 50; max value is 1000.
+ Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
+ // A token to retrieve the next page of results.
+ NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -506,10 +548,13 @@ func (x *ListAuthsRequest) GetNextPageToken() string {
return ""
}
+// Response for listing authentications.
type ListAuthsResponse struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Auth []*Auth `protobuf:"bytes,1,rep,name=auth,proto3" json:"auth,omitempty"`
- NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // A list of authentications.
+ Auth []*Auth `protobuf:"bytes,1,rep,name=auth,proto3" json:"auth,omitempty"`
+ // A token to retrieve the next page of results.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -558,9 +603,11 @@ func (x *ListAuthsResponse) GetNextPageToken() string {
return ""
}
+// Request to remove an authentication.
type RemoveAuthRequest struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- ExternalId string `protobuf:"bytes,1,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The external ID of the authentication to remove.
+ ExternalId string `protobuf:"bytes,1,opt,name=external_id,json=externalId,proto3" json:"external_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -602,9 +649,11 @@ func (x *RemoveAuthRequest) GetExternalId() string {
return ""
}
+// Response for removing an authentication.
type RemoveAuthResponse struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Indicates whether the operation was successful.
+ Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
diff --git a/proto/kms/api/cmk/registry/auth/v1/auth.proto b/proto/kms/api/cmk/registry/auth/v1/auth.proto
index 3958244..adbf430 100644
--- a/proto/kms/api/cmk/registry/auth/v1/auth.proto
+++ b/proto/kms/api/cmk/registry/auth/v1/auth.proto
@@ -2,81 +2,135 @@ syntax = "proto3";
package kms.api.cmk.registry.auth.v1;
+// Service for managing authentications in the KMS system.
service Service {
+ // ApplyAuth creates or updates an authentication. This method is idempotent - if an authentication with the same external_id already exists, it will be updated.
rpc ApplyAuth(ApplyAuthRequest) returns (ApplyAuthResponse) {}
+ // GetAuth retrieves an authentication by its external ID.
rpc GetAuth(GetAuthRequest) returns (GetAuthResponse) {}
+ // ListAuths lists all authentications for a given tenant. The results can be paginated.
rpc ListAuths(ListAuthsRequest) returns (ListAuthsResponse) {}
+ // RemoveAuth removes an authentication by its external ID. This method is idempotent - if the authentication does not exist, it will return success.
rpc RemoveAuth(RemoveAuthRequest) returns (RemoveAuthResponse) {}
}
+// Represents an authentication.
message Auth {
+ // The external ID of the authentication.
string external_id = 1;
+ // The tenant ID associated with the authentication.
string tenant_id = 2;
+ // The type of the authentication.
string type = 3;
+ // A map of properties for the authentication.
map properties = 4;
+ // The status of the authentication.
AuthStatus status = 5;
+ // An error message, if any.
string error_message = 6;
+ // The timestamp of the last update.
string updated_at = 7;
+ // The timestamp of creation.
string created_at = 8;
}
+// Request to apply an authentication.
message ApplyAuthRequest {
+ // The external ID of the authentication.
string external_id = 1;
+ // The tenant ID associated with the authentication.
string tenant_id = 2;
+ // The type of the authentication.
string type = 3;
+ // A map of properties for the authentication.
map properties = 4;
}
+// Response for applying an authentication.
message ApplyAuthResponse {
+ // Indicates whether the operation was successful.
bool success = 1;
}
+// Request to get an authentication.
message GetAuthRequest {
+ // The external ID of the authentication to retrieve.
string external_id = 1;
}
+// Response for getting an authentication.
message GetAuthResponse {
+ // The retrieved authentication.
Auth auth = 1;
}
+// Request to list authentications.
message ListAuthsRequest {
+ // The tenant ID to list authentications for.
string tenant_id = 1;
- int32 limit = 2; // default value is 50; max value is 1000
+ // The maximum number of authentications to return.
+ // Default value is 50; max value is 1000.
+ int32 limit = 2;
+ // A token to retrieve the next page of results.
string next_page_token = 3;
}
+// Response for listing authentications.
message ListAuthsResponse {
+ // A list of authentications.
repeated Auth auth = 1;
+ // A token to retrieve the next page of results.
string next_page_token = 2;
}
+// Request to remove an authentication.
message RemoveAuthRequest {
+ // The external ID of the authentication to remove.
string external_id = 1;
}
+// Response for removing an authentication.
message RemoveAuthResponse {
+ // Indicates whether the operation was successful.
bool success = 1;
}
+// The status of an authentication.
enum AuthStatus {
+ // The status is not specified.
AUTH_STATUS_UNSPECIFIED = 0;
+ // The authentication is being applied.
AUTH_STATUS_APPLYING = 1;
+ // An error occurred while applying the authentication.
AUTH_STATUS_APPLYING_ERROR = 2;
+ // The authentication has been applied.
AUTH_STATUS_APPLIED = 3;
+ // The authentication is being removed.
AUTH_STATUS_REMOVING = 4;
+ // An error occurred while removing the authentication.
AUTH_STATUS_REMOVING_ERROR = 5;
+ // The authentication has been removed.
AUTH_STATUS_REMOVED = 6;
+ // The authentication is being blocked.
AUTH_STATUS_BLOCKING = 7;
+ // An error occurred while blocking the authentication.
AUTH_STATUS_BLOCKING_ERROR = 8;
+ // The authentication has been blocked.
AUTH_STATUS_BLOCKED = 9;
+ // The authentication is being unblocked.
AUTH_STATUS_UNBLOCKING = 10;
+ // An error occurred while unblocking the authentication.
AUTH_STATUS_UNBLOCKING_ERROR = 11;
}
+// The action to perform on an authentication.
enum AuthAction {
+ // The action is not specified.
AUTH_ACTION_UNSPECIFIED = 0;
+ // Apply an authentication.
AUTH_ACTION_APPLY_AUTH = 1;
+ // Remove an authentication.
AUTH_ACTION_REMOVE_AUTH = 2;
}
diff --git a/proto/kms/api/cmk/registry/auth/v1/auth_grpc.pb.go b/proto/kms/api/cmk/registry/auth/v1/auth_grpc.pb.go
index d3fbff1..0e7e603 100644
--- a/proto/kms/api/cmk/registry/auth/v1/auth_grpc.pb.go
+++ b/proto/kms/api/cmk/registry/auth/v1/auth_grpc.pb.go
@@ -28,10 +28,16 @@ const (
// ServiceClient is the client API for Service service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+//
+// Service for managing authentications in the KMS system.
type ServiceClient interface {
+ // ApplyAuth creates or updates an authentication. This method is idempotent - if an authentication with the same external_id already exists, it will be updated.
ApplyAuth(ctx context.Context, in *ApplyAuthRequest, opts ...grpc.CallOption) (*ApplyAuthResponse, error)
+ // GetAuth retrieves an authentication by its external ID.
GetAuth(ctx context.Context, in *GetAuthRequest, opts ...grpc.CallOption) (*GetAuthResponse, error)
+ // ListAuths lists all authentications for a given tenant. The results can be paginated.
ListAuths(ctx context.Context, in *ListAuthsRequest, opts ...grpc.CallOption) (*ListAuthsResponse, error)
+ // RemoveAuth removes an authentication by its external ID. This method is idempotent - if the authentication does not exist, it will return success.
RemoveAuth(ctx context.Context, in *RemoveAuthRequest, opts ...grpc.CallOption) (*RemoveAuthResponse, error)
}
@@ -86,10 +92,16 @@ func (c *serviceClient) RemoveAuth(ctx context.Context, in *RemoveAuthRequest, o
// ServiceServer is the server API for Service service.
// All implementations must embed UnimplementedServiceServer
// for forward compatibility.
+//
+// Service for managing authentications in the KMS system.
type ServiceServer interface {
+ // ApplyAuth creates or updates an authentication. This method is idempotent - if an authentication with the same external_id already exists, it will be updated.
ApplyAuth(context.Context, *ApplyAuthRequest) (*ApplyAuthResponse, error)
+ // GetAuth retrieves an authentication by its external ID.
GetAuth(context.Context, *GetAuthRequest) (*GetAuthResponse, error)
+ // ListAuths lists all authentications for a given tenant. The results can be paginated.
ListAuths(context.Context, *ListAuthsRequest) (*ListAuthsResponse, error)
+ // RemoveAuth removes an authentication by its external ID. This method is idempotent - if the authentication does not exist, it will return success.
RemoveAuth(context.Context, *RemoveAuthRequest) (*RemoveAuthResponse, error)
mustEmbedUnimplementedServiceServer()
}