diff --git a/README.md b/README.md index c8d8f04ab7..13b6c32018 100644 --- a/README.md +++ b/README.md @@ -49,26 +49,31 @@ This should bring up a grpc server on port **9000** and http server on port **80 ```bash grpcurl -plaintext localhost:9000 list - attributes.AttributesService + authorization.AuthorizationService grpc.reflection.v1.ServerReflection grpc.reflection.v1alpha.ServerReflection kasregistry.KeyAccessServerRegistryService - namespaces.NamespaceService - resourcemapping.ResourceMappingService - subjectmapping.SubjectMappingService - - grpcurl -plaintext localhost:9000 list attributes.AttributesService - - attributes.AttributesService.CreateAttribute - attributes.AttributesService.CreateAttributeValue - attributes.AttributesService.DeleteAttribute - attributes.AttributesService.DeleteAttributeValue - attributes.AttributesService.GetAttribute - attributes.AttributesService.GetAttributeValue - attributes.AttributesService.ListAttributeValues - attributes.AttributesService.ListAttributes - attributes.AttributesService.UpdateAttribute - attributes.AttributesService.UpdateAttributeValue + policy.attributes.AttributesService + policy.namespaces.NamespaceService + policy.resourcemapping.ResourceMappingService + policy.subjectmapping.SubjectMappingService + + grpcurl -plaintext localhost:9000 list policy.attributes.AttributesService + + policy.attributes.AttributesService.AssignKeyAccessServerToAttribute + policy.attributes.AttributesService.AssignKeyAccessServerToValue + policy.attributes.AttributesService.CreateAttribute + policy.attributes.AttributesService.CreateAttributeValue + policy.attributes.AttributesService.DeactivateAttribute + policy.attributes.AttributesService.DeactivateAttributeValue + policy.attributes.AttributesService.GetAttribute + policy.attributes.AttributesService.GetAttributeValue + policy.attributes.AttributesService.ListAttributeValues + policy.attributes.AttributesService.ListAttributes + policy.attributes.AttributesService.RemoveKeyAccessServerFromAttribute + policy.attributes.AttributesService.RemoveKeyAccessServerFromValue + policy.attributes.AttributesService.UpdateAttribute + policy.attributes.AttributesService.UpdateAttributeValue ``` Create Attribute diff --git a/docs/grpc/index.html b/docs/grpc/index.html index 3f3505ba6f..d777da90e8 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -223,7 +223,7 @@

Table of Contents

  • - MResourceAttributes + MResourceAttribute
  • @@ -730,7 +730,7 @@

    Action

    DecisionRequest

    -

    Example Request Get Decisions to answer the question - Do Bob (represented by entity chain ec1)

    and Alice (represented by entity chain ec2) have TRANSMIT authorization for

    2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ?

    {

    "actions": [

    {

    "standard": "STANDARD_ACTION_TRANSMIT"

    }

    ],

    "entityChains": [

    {

    "id": "ec1",

    "entities": [

    {

    "emailAddress": "bob@example.org"

    }

    ]

    },

    {

    "id": "ec2",

    "entities": [

    {

    "userName": "alice@example.org"

    }

    ]

    }

    ],

    "resourceAttributes": [

    {

    "id": "attr-set-1",

    "attributeValueReferences": [

    {

    "attributeFqn": "http://www.example.org/attr/foo/value/bar"

    }

    ]

    },

    {

    "id": "request-set-2",

    "attributeValueReferences": [

    {

    "attributeFqn": "http://www.example.org/attr/foo/value/bar"

    },

    {

    "attributeFqn": "http://www.example.org/attr/color/value/red"

    }

    ]

    }

    ]

    }

    +

    Example Request Get Decisions to answer the question - Do Bob (represented by entity chain ec1)

    and Alice (represented by entity chain ec2) have TRANSMIT authorization for

    2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ?

    {

    "actions": [

    {

    "standard": "STANDARD_ACTION_TRANSMIT"

    }

    ],

    "entityChains": [

    {

    "id": "ec1",

    "entities": [

    {

    "emailAddress": "bob@example.org"

    }

    ]

    },

    {

    "id": "ec2",

    "entities": [

    {

    "userName": "alice@example.org"

    }

    ]

    }

    ],

    "resourceAttributes": [

    {

    "attributeValueReferences": [

    {

    "attributeFqn": "http://www.example.org/attr/foo/value/bar"

    }

    ]

    },

    {

    "attributeValueReferences": [

    {

    "attributeFqn": "http://www.example.org/attr/foo/value/bar"

    },

    {

    "attributeFqn": "http://www.example.org/attr/color/value/red"

    }

    ]

    }

    ]

    }

    @@ -755,7 +755,7 @@

    DecisionRequest

    - + @@ -1038,7 +1038,7 @@

    GetEntitlementsRequest

    - + @@ -1074,7 +1074,7 @@

    GetEntitlementsResponse

    -

    ResourceAttributes

    +

    ResourceAttribute

    A logical bucket of attributes belonging to a "Resource"

    @@ -1085,14 +1085,7 @@

    ResourceAttributes

    - - - - - - - - + diff --git a/docs/openapi/authorization/authorization.swagger.json b/docs/openapi/authorization/authorization.swagger.json index 42f3e2ec98..7a8ac21eb2 100644 --- a/docs/openapi/authorization/authorization.swagger.json +++ b/docs/openapi/authorization/authorization.swagger.json @@ -57,13 +57,7 @@ }, "parameters": [ { - "name": "scope.id", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "scope.attributeId", + "name": "scope.attributeFqns", "in": "query", "required": false, "type": "array", @@ -132,11 +126,11 @@ "type": "array", "items": { "type": "object", - "$ref": "#/definitions/authorizationResourceAttributes" + "$ref": "#/definitions/authorizationResourceAttribute" } } }, - "description": "{\n\"actions\": [\n{\n\"standard\": \"STANDARD_ACTION_TRANSMIT\"\n}\n],\n\"entityChains\": [\n{\n\"id\": \"ec1\",\n\"entities\": [\n{\n\"emailAddress\": \"bob@example.org\"\n}\n]\n},\n{\n\"id\": \"ec2\",\n\"entities\": [\n{\n\"userName\": \"alice@example.org\"\n}\n]\n}\n],\n\"resourceAttributes\": [\n{\n\"id\": \"attr-set-1\",\n\"attributeValueReferences\": [\n{\n\"attributeFqn\": \"http://www.example.org/attr/foo/value/bar\"\n}\n]\n},\n{\n\"id\": \"request-set-2\",\n\"attributeValueReferences\": [\n{\n\"attributeFqn\": \"http://www.example.org/attr/foo/value/bar\"\n},\n{\n\"attributeFqn\": \"http://www.example.org/attr/color/value/red\"\n}\n]\n}\n]\n}", + "description": "{\n\"actions\": [\n{\n\"standard\": \"STANDARD_ACTION_TRANSMIT\"\n}\n],\n\"entityChains\": [\n{\n\"id\": \"ec1\",\n\"entities\": [\n{\n\"emailAddress\": \"bob@example.org\"\n}\n]\n},\n{\n\"id\": \"ec2\",\n\"entities\": [\n{\n\"userName\": \"alice@example.org\"\n}\n]\n}\n],\n\"resourceAttributes\": [\n{\n\"attributeValueReferences\": [\n{\n\"attributeFqn\": \"http://www.example.org/attr/foo/value/bar\"\n}\n]\n},\n{\n\"attributeValueReferences\": [\n{\n\"attributeFqn\": \"http://www.example.org/attr/foo/value/bar\"\n},\n{\n\"attributeFqn\": \"http://www.example.org/attr/color/value/red\"\n}\n]\n}\n]\n}", "title": "Example Request Get Decisions to answer the question - Do Bob (represented by entity chain ec1)\nand Alice (represented by entity chain ec2) have TRANSMIT authorization for\n2 resources; resource1 (attr-set-1) defined by attributes foo:bar resource2 (attr-set-2) defined by attribute foo:bar, color:red ?" }, "authorizationDecisionResponse": { @@ -263,13 +257,10 @@ "description": "{\n\"entitlements\": [\n{\n\"entityId\": \"e1\",\n\"attributeValueReferences\": [\n{\n\"attributeFqn\": \"http://www.example.org/attr/foo/value/bar\"\n}\n]\n},\n{\n\"entityId\": \"e2\",\n\"attributeValueReferences\": [\n{\n\"attributeFqn\": \"http://www.example.org/attr/color/value/red\"\n}\n]\n}\n]\n}", "title": "Example Response for a request of : Get entitlements for bob and alice (both represented using an email address" }, - "authorizationResourceAttributes": { + "authorizationResourceAttribute": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "attributeId": { + "attributeFqns": { "type": "array", "items": { "type": "string" diff --git a/examples/cmd/authorization.go b/examples/cmd/authorization.go index 96e35bef8e..706841d6bd 100644 --- a/examples/cmd/authorization.go +++ b/examples/cmd/authorization.go @@ -43,8 +43,8 @@ func authorizationExamples(examplesConfig *ExampleConfig) error { }} // TODO Get attribute value ids - tradeSecretAttributeValueId := "replaceme" - openAttributeValueId := "Open" + tradeSecretAttributeValueFqn := "https://namespace.com/attr/attr_name/val/replaceme" + openAttributeValueFqn := "https://open.io/attr/attr_name/val/open" slog.Info("Getting decision for bob and alice for transmit action on resource set with trade secret and resource" + " set with trade secret + open attribute values") @@ -53,10 +53,9 @@ func authorizationExamples(examplesConfig *ExampleConfig) error { drs = append(drs, &authorization.DecisionRequest{ Actions: actions, EntityChains: entityChains, - ResourceAttributes: []*authorization.ResourceAttributes{ - {Id: "request-set-1", AttributeId: []string{tradeSecretAttributeValueId}}, // request-set-1 is arbitrary tracking id - {Id: "request-set-2", AttributeId: []string{tradeSecretAttributeValueId, openAttributeValueId}}, - }, // request-set-2 is arbitrary tracking id + ResourceAttributes: []*authorization.ResourceAttribute{ + {AttributeFqns: []string{tradeSecretAttributeValueFqn, openAttributeValueFqn}}, + }, }) decisionRequest := &authorization.GetDecisionsRequest{DecisionRequests: drs} diff --git a/protocol/go/authorization/authorization.pb.go b/protocol/go/authorization/authorization.pb.go index ea51d71d94..3b0c9cd1fc 100644 --- a/protocol/go/authorization/authorization.pb.go +++ b/protocol/go/authorization/authorization.pb.go @@ -485,7 +485,6 @@ func (*Action_Custom) isAction_Value() {} // ], // "resourceAttributes": [ // { -// "id": "attr-set-1", // "attributeValueReferences": [ // { // "attributeFqn": "http://www.example.org/attr/foo/value/bar" @@ -493,7 +492,6 @@ func (*Action_Custom) isAction_Value() {} // ] // }, // { -// "id": "request-set-2", // "attributeValueReferences": [ // { // "attributeFqn": "http://www.example.org/attr/foo/value/bar" @@ -510,9 +508,9 @@ type DecisionRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Actions []*Action `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` - EntityChains []*EntityChain `protobuf:"bytes,2,rep,name=entity_chains,json=entityChains,proto3" json:"entity_chains,omitempty"` - ResourceAttributes []*ResourceAttributes `protobuf:"bytes,3,rep,name=resource_attributes,json=resourceAttributes,proto3" json:"resource_attributes,omitempty"` + Actions []*Action `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` + EntityChains []*EntityChain `protobuf:"bytes,2,rep,name=entity_chains,json=entityChains,proto3" json:"entity_chains,omitempty"` + ResourceAttributes []*ResourceAttribute `protobuf:"bytes,3,rep,name=resource_attributes,json=resourceAttributes,proto3" json:"resource_attributes,omitempty"` } func (x *DecisionRequest) Reset() { @@ -561,7 +559,7 @@ func (x *DecisionRequest) GetEntityChains() []*EntityChain { return nil } -func (x *DecisionRequest) GetResourceAttributes() []*ResourceAttributes { +func (x *DecisionRequest) GetResourceAttributes() []*ResourceAttribute { if x != nil { return x.ResourceAttributes } @@ -795,8 +793,8 @@ type GetEntitlementsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Entities []*Entity `protobuf:"bytes,1,rep,name=entities,proto3" json:"entities,omitempty"` // list of requested entities - Scope *ResourceAttributes `protobuf:"bytes,2,opt,name=scope,proto3,oneof" json:"scope,omitempty"` //optional attribute fqn as a scope + Entities []*Entity `protobuf:"bytes,1,rep,name=entities,proto3" json:"entities,omitempty"` // list of requested entities + Scope *ResourceAttribute `protobuf:"bytes,2,opt,name=scope,proto3,oneof" json:"scope,omitempty"` //optional attribute fqn as a scope } func (x *GetEntitlementsRequest) Reset() { @@ -838,7 +836,7 @@ func (x *GetEntitlementsRequest) GetEntities() []*Entity { return nil } -func (x *GetEntitlementsRequest) GetScope() *ResourceAttributes { +func (x *GetEntitlementsRequest) GetScope() *ResourceAttribute { if x != nil { return x.Scope } @@ -901,17 +899,16 @@ func (x *EntityEntitlements) GetAttributeId() []string { } // A logical bucket of attributes belonging to a "Resource" -type ResourceAttributes struct { +type ResourceAttribute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - AttributeId []string `protobuf:"bytes,2,rep,name=attribute_id,json=attributeId,proto3" json:"attribute_id,omitempty"` + AttributeFqns []string `protobuf:"bytes,2,rep,name=attribute_fqns,json=attributeFqns,proto3" json:"attribute_fqns,omitempty"` } -func (x *ResourceAttributes) Reset() { - *x = ResourceAttributes{} +func (x *ResourceAttribute) Reset() { + *x = ResourceAttribute{} if protoimpl.UnsafeEnabled { mi := &file_authorization_authorization_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -919,13 +916,13 @@ func (x *ResourceAttributes) Reset() { } } -func (x *ResourceAttributes) String() string { +func (x *ResourceAttribute) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ResourceAttributes) ProtoMessage() {} +func (*ResourceAttribute) ProtoMessage() {} -func (x *ResourceAttributes) ProtoReflect() protoreflect.Message { +func (x *ResourceAttribute) ProtoReflect() protoreflect.Message { mi := &file_authorization_authorization_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -937,21 +934,14 @@ func (x *ResourceAttributes) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ResourceAttributes.ProtoReflect.Descriptor instead. -func (*ResourceAttributes) Descriptor() ([]byte, []int) { +// Deprecated: Use ResourceAttribute.ProtoReflect.Descriptor instead. +func (*ResourceAttribute) Descriptor() ([]byte, []int) { return file_authorization_authorization_proto_rawDescGZIP(), []int{10} } -func (x *ResourceAttributes) GetId() string { +func (x *ResourceAttribute) GetAttributeFqns() []string { if x != nil { - return x.Id - } - return "" -} - -func (x *ResourceAttributes) GetAttributeId() []string { - if x != nil { - return x.AttributeId + return x.AttributeFqns } return nil } @@ -1075,7 +1065,7 @@ var file_authorization_authorization_proto_rawDesc = []byte{ 0x52, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x4d, 0x49, 0x54, 0x10, - 0x02, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x0f, 0x44, + 0x02, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd6, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, @@ -1084,101 +1074,100 @@ var file_authorization_authorization_proto_rawDesc = []byte{ 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, - 0x12, 0x52, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x12, 0x51, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x22, 0xd5, 0x02, 0x0a, 0x10, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, - 0x64, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, - 0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0b, 0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4c, - 0x0a, 0x08, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x45, - 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x45, 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, - 0x5f, 0x44, 0x45, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x45, 0x43, 0x49, 0x53, - 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x22, 0x62, 0x0a, 0x13, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x11, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x10, - 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, - 0x22, 0x66, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x12, 0x64, 0x65, 0x63, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x11, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, - 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x08, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, - 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x54, - 0x0a, 0x12, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, - 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x49, 0x64, 0x22, 0x60, 0x0a, - 0x17, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x32, - 0x86, 0x02, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x44, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7a, 0x0a, 0x0f, - 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, - 0x25, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x21, 0x69, 0x6f, 0x2e, - 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x12, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x41, 0x58, - 0x58, 0xaa, 0x02, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0xca, 0x02, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0xe2, 0x02, 0x19, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, + 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x22, 0xd5, 0x02, 0x0a, 0x10, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, + 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6f, + 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0b, 0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4c, 0x0a, + 0x08, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x45, 0x43, + 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x45, 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x5f, + 0x44, 0x45, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x45, 0x43, 0x49, 0x53, 0x49, + 0x4f, 0x4e, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x22, 0x62, 0x0a, 0x13, 0x47, + 0x65, 0x74, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x11, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, + 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x10, 0x64, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, + 0x66, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x12, 0x64, 0x65, 0x63, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x11, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x08, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x88, + 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x54, 0x0a, 0x12, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, + 0x21, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x5f, 0x66, 0x71, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0d, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x46, 0x71, 0x6e, 0x73, 0x22, 0x60, + 0x0a, 0x17, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x32, 0x86, 0x02, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, + 0x74, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7a, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x25, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x21, 0x69, 0x6f, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x12, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x6f, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x41, + 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0xca, 0x02, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0xe2, 0x02, 0x19, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1208,7 +1197,7 @@ var file_authorization_authorization_proto_goTypes = []interface{}{ (*GetDecisionsResponse)(nil), // 9: authorization.GetDecisionsResponse (*GetEntitlementsRequest)(nil), // 10: authorization.GetEntitlementsRequest (*EntityEntitlements)(nil), // 11: authorization.EntityEntitlements - (*ResourceAttributes)(nil), // 12: authorization.ResourceAttributes + (*ResourceAttribute)(nil), // 12: authorization.ResourceAttribute (*GetEntitlementsResponse)(nil), // 13: authorization.GetEntitlementsResponse (*anypb.Any)(nil), // 14: google.protobuf.Any } @@ -1220,13 +1209,13 @@ var file_authorization_authorization_proto_depIdxs = []int32{ 0, // 4: authorization.Action.standard:type_name -> authorization.Action.StandardAction 5, // 5: authorization.DecisionRequest.actions:type_name -> authorization.Action 4, // 6: authorization.DecisionRequest.entity_chains:type_name -> authorization.EntityChain - 12, // 7: authorization.DecisionRequest.resource_attributes:type_name -> authorization.ResourceAttributes + 12, // 7: authorization.DecisionRequest.resource_attributes:type_name -> authorization.ResourceAttribute 5, // 8: authorization.DecisionResponse.action:type_name -> authorization.Action 1, // 9: authorization.DecisionResponse.decision:type_name -> authorization.DecisionResponse.Decision 6, // 10: authorization.GetDecisionsRequest.decision_requests:type_name -> authorization.DecisionRequest 7, // 11: authorization.GetDecisionsResponse.decision_responses:type_name -> authorization.DecisionResponse 2, // 12: authorization.GetEntitlementsRequest.entities:type_name -> authorization.Entity - 12, // 13: authorization.GetEntitlementsRequest.scope:type_name -> authorization.ResourceAttributes + 12, // 13: authorization.GetEntitlementsRequest.scope:type_name -> authorization.ResourceAttribute 11, // 14: authorization.GetEntitlementsResponse.entitlements:type_name -> authorization.EntityEntitlements 8, // 15: authorization.AuthorizationService.GetDecisions:input_type -> authorization.GetDecisionsRequest 10, // 16: authorization.AuthorizationService.GetEntitlements:input_type -> authorization.GetEntitlementsRequest @@ -1366,7 +1355,7 @@ func file_authorization_authorization_proto_init() { } } file_authorization_authorization_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceAttributes); i { + switch v := v.(*ResourceAttribute); i { case 0: return &v.state case 1: diff --git a/sdkjava/io/opentdf/platform/authorization/AuthorizationProto.java b/sdkjava/io/opentdf/platform/authorization/AuthorizationProto.java index 0548b539be..32c207da38 100644 --- a/sdkjava/io/opentdf/platform/authorization/AuthorizationProto.java +++ b/sdkjava/io/opentdf/platform/authorization/AuthorizationProto.java @@ -66,10 +66,10 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authorization_EntityEntitlements_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor - internal_static_authorization_ResourceAttributes_descriptor; + internal_static_authorization_ResourceAttribute_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_authorization_ResourceAttributes_fieldAccessorTable; + internal_static_authorization_ResourceAttribute_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_authorization_GetEntitlementsResponse_descriptor; static final @@ -103,48 +103,47 @@ public static void registerAllExtensions( "tom\"l\n\016StandardAction\022\037\n\033STANDARD_ACTION" + "_UNSPECIFIED\020\000\022\033\n\027STANDARD_ACTION_DECRYP" + "T\020\001\022\034\n\030STANDARD_ACTION_TRANSMIT\020\002B\007\n\005val" + - "ue\"\327\001\n\017DecisionRequest\022/\n\007actions\030\001 \003(\0132" + + "ue\"\326\001\n\017DecisionRequest\022/\n\007actions\030\001 \003(\0132" + "\025.authorization.ActionR\007actions\022?\n\rentit" + "y_chains\030\002 \003(\0132\032.authorization.EntityCha" + - "inR\014entityChains\022R\n\023resource_attributes\030" + - "\003 \003(\0132!.authorization.ResourceAttributes" + - "R\022resourceAttributes\"\325\002\n\020DecisionRespons" + - "e\022&\n\017entity_chain_id\030\001 \001(\tR\rentityChainI" + - "d\0224\n\026resource_attributes_id\030\002 \001(\tR\024resou" + - "rceAttributesId\022-\n\006action\030\003 \001(\0132\025.author" + - "ization.ActionR\006action\022D\n\010decision\030\004 \001(\016" + - "2(.authorization.DecisionResponse.Decisi" + - "onR\010decision\022 \n\013obligations\030\005 \003(\tR\013oblig" + - "ations\"L\n\010Decision\022\030\n\024DECISION_UNSPECIFI" + - "ED\020\000\022\021\n\rDECISION_DENY\020\001\022\023\n\017DECISION_PERM" + - "IT\020\002\"b\n\023GetDecisionsRequest\022K\n\021decision_" + - "requests\030\001 \003(\0132\036.authorization.DecisionR" + - "equestR\020decisionRequests\"f\n\024GetDecisions" + - "Response\022N\n\022decision_responses\030\001 \003(\0132\037.a" + - "uthorization.DecisionResponseR\021decisionR" + - "esponses\"\223\001\n\026GetEntitlementsRequest\0221\n\010e" + - "ntities\030\001 \003(\0132\025.authorization.EntityR\010en" + - "tities\022<\n\005scope\030\002 \001(\0132!.authorization.Re" + - "sourceAttributesH\000R\005scope\210\001\001B\010\n\006_scope\"T" + - "\n\022EntityEntitlements\022\033\n\tentity_id\030\001 \001(\tR" + - "\010entityId\022!\n\014attribute_id\030\002 \003(\tR\013attribu" + - "teId\"G\n\022ResourceAttributes\022\016\n\002id\030\001 \001(\tR\002" + - "id\022!\n\014attribute_id\030\002 \003(\tR\013attributeId\"`\n" + - "\027GetEntitlementsResponse\022E\n\014entitlements" + - "\030\001 \003(\0132!.authorization.EntityEntitlement" + - "sR\014entitlements2\206\002\n\024AuthorizationService" + - "\022r\n\014GetDecisions\022\".authorization.GetDeci" + - "sionsRequest\032#.authorization.GetDecision" + - "sResponse\"\031\202\323\344\223\002\023\"\021/v1/authorization\022z\n\017" + - "GetEntitlements\022%.authorization.GetEntit" + - "lementsRequest\032&.authorization.GetEntitl" + - "ementsResponse\"\030\202\323\344\223\002\022\"\020/v1/entitlements" + - "B\302\001\n!io.opentdf.platform.authorizationB\022" + - "AuthorizationProtoP\001Z5github.com/opentdf" + - "/platform/protocol/go/authorization\242\002\003AX" + - "X\252\002\rAuthorization\312\002\rAuthorization\342\002\031Auth" + - "orization\\GPBMetadata\352\002\rAuthorizationb\006p" + - "roto3" + "inR\014entityChains\022Q\n\023resource_attributes\030" + + "\003 \003(\0132 .authorization.ResourceAttributeR" + + "\022resourceAttributes\"\325\002\n\020DecisionResponse" + + "\022&\n\017entity_chain_id\030\001 \001(\tR\rentityChainId" + + "\0224\n\026resource_attributes_id\030\002 \001(\tR\024resour" + + "ceAttributesId\022-\n\006action\030\003 \001(\0132\025.authori" + + "zation.ActionR\006action\022D\n\010decision\030\004 \001(\0162" + + "(.authorization.DecisionResponse.Decisio" + + "nR\010decision\022 \n\013obligations\030\005 \003(\tR\013obliga" + + "tions\"L\n\010Decision\022\030\n\024DECISION_UNSPECIFIE" + + "D\020\000\022\021\n\rDECISION_DENY\020\001\022\023\n\017DECISION_PERMI" + + "T\020\002\"b\n\023GetDecisionsRequest\022K\n\021decision_r" + + "equests\030\001 \003(\0132\036.authorization.DecisionRe" + + "questR\020decisionRequests\"f\n\024GetDecisionsR" + + "esponse\022N\n\022decision_responses\030\001 \003(\0132\037.au" + + "thorization.DecisionResponseR\021decisionRe" + + "sponses\"\222\001\n\026GetEntitlementsRequest\0221\n\010en" + + "tities\030\001 \003(\0132\025.authorization.EntityR\010ent" + + "ities\022;\n\005scope\030\002 \001(\0132 .authorization.Res" + + "ourceAttributeH\000R\005scope\210\001\001B\010\n\006_scope\"T\n\022" + + "EntityEntitlements\022\033\n\tentity_id\030\001 \001(\tR\010e" + + "ntityId\022!\n\014attribute_id\030\002 \003(\tR\013attribute" + + "Id\":\n\021ResourceAttribute\022%\n\016attribute_fqn" + + "s\030\002 \003(\tR\rattributeFqns\"`\n\027GetEntitlement" + + "sResponse\022E\n\014entitlements\030\001 \003(\0132!.author" + + "ization.EntityEntitlementsR\014entitlements" + + "2\206\002\n\024AuthorizationService\022r\n\014GetDecision" + + "s\022\".authorization.GetDecisionsRequest\032#." + + "authorization.GetDecisionsResponse\"\031\202\323\344\223" + + "\002\023\"\021/v1/authorization\022z\n\017GetEntitlements" + + "\022%.authorization.GetEntitlementsRequest\032" + + "&.authorization.GetEntitlementsResponse\"" + + "\030\202\323\344\223\002\022\"\020/v1/entitlementsB\302\001\n!io.opentdf" + + ".platform.authorizationB\022AuthorizationPr" + + "otoP\001Z5github.com/opentdf/platform/proto" + + "col/go/authorization\242\002\003AXX\252\002\rAuthorizati" + + "on\312\002\rAuthorization\342\002\031Authorization\\GPBMe" + + "tadata\352\002\rAuthorizationb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -212,12 +211,12 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authorization_EntityEntitlements_descriptor, new java.lang.String[] { "EntityId", "AttributeId", }); - internal_static_authorization_ResourceAttributes_descriptor = + internal_static_authorization_ResourceAttribute_descriptor = getDescriptor().getMessageTypes().get(10); - internal_static_authorization_ResourceAttributes_fieldAccessorTable = new + internal_static_authorization_ResourceAttribute_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_authorization_ResourceAttributes_descriptor, - new java.lang.String[] { "Id", "AttributeId", }); + internal_static_authorization_ResourceAttribute_descriptor, + new java.lang.String[] { "AttributeFqns", }); internal_static_authorization_GetEntitlementsResponse_descriptor = getDescriptor().getMessageTypes().get(11); internal_static_authorization_GetEntitlementsResponse_fieldAccessorTable = new diff --git a/sdkjava/io/opentdf/platform/authorization/DecisionRequest.java b/sdkjava/io/opentdf/platform/authorization/DecisionRequest.java index 492a0a767b..a441fb9508 100644 --- a/sdkjava/io/opentdf/platform/authorization/DecisionRequest.java +++ b/sdkjava/io/opentdf/platform/authorization/DecisionRequest.java @@ -37,7 +37,6 @@ *], *"resourceAttributes": [ *{ - *"id": "attr-set-1", *"attributeValueReferences": [ *{ *"attributeFqn": "http://www.example.org/attr/foo/value/bar" @@ -45,7 +44,6 @@ *] *}, *{ - *"id": "request-set-2", *"attributeValueReferences": [ *{ *"attributeFqn": "http://www.example.org/attr/foo/value/bar" @@ -180,41 +178,41 @@ public io.opentdf.platform.authorization.EntityChainOrBuilder getEntityChainsOrB public static final int RESOURCE_ATTRIBUTES_FIELD_NUMBER = 3; @SuppressWarnings("serial") - private java.util.List resourceAttributes_; + private java.util.List resourceAttributes_; /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ @java.lang.Override - public java.util.List getResourceAttributesList() { + public java.util.List getResourceAttributesList() { return resourceAttributes_; } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ @java.lang.Override - public java.util.List + public java.util.List getResourceAttributesOrBuilderList() { return resourceAttributes_; } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ @java.lang.Override public int getResourceAttributesCount() { return resourceAttributes_.size(); } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ @java.lang.Override - public io.opentdf.platform.authorization.ResourceAttributes getResourceAttributes(int index) { + public io.opentdf.platform.authorization.ResourceAttribute getResourceAttributes(int index) { return resourceAttributes_.get(index); } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ @java.lang.Override - public io.opentdf.platform.authorization.ResourceAttributesOrBuilder getResourceAttributesOrBuilder( + public io.opentdf.platform.authorization.ResourceAttributeOrBuilder getResourceAttributesOrBuilder( int index) { return resourceAttributes_.get(index); } @@ -437,7 +435,6 @@ protected Builder newBuilderForType( *], *"resourceAttributes": [ *{ - *"id": "attr-set-1", *"attributeValueReferences": [ *{ *"attributeFqn": "http://www.example.org/attr/foo/value/bar" @@ -445,7 +442,6 @@ protected Builder newBuilderForType( *] *}, *{ - *"id": "request-set-2", *"attributeValueReferences": [ *{ *"attributeFqn": "http://www.example.org/attr/foo/value/bar" @@ -754,9 +750,9 @@ public Builder mergeFrom( break; } // case 18 case 26: { - io.opentdf.platform.authorization.ResourceAttributes m = + io.opentdf.platform.authorization.ResourceAttribute m = input.readMessage( - io.opentdf.platform.authorization.ResourceAttributes.parser(), + io.opentdf.platform.authorization.ResourceAttribute.parser(), extensionRegistry); if (resourceAttributesBuilder_ == null) { ensureResourceAttributesIsMutable(); @@ -1263,22 +1259,22 @@ public io.opentdf.platform.authorization.EntityChain.Builder addEntityChainsBuil return entityChainsBuilder_; } - private java.util.List resourceAttributes_ = + private java.util.List resourceAttributes_ = java.util.Collections.emptyList(); private void ensureResourceAttributesIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { - resourceAttributes_ = new java.util.ArrayList(resourceAttributes_); + resourceAttributes_ = new java.util.ArrayList(resourceAttributes_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.ResourceAttributes, io.opentdf.platform.authorization.ResourceAttributes.Builder, io.opentdf.platform.authorization.ResourceAttributesOrBuilder> resourceAttributesBuilder_; + io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder> resourceAttributesBuilder_; /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - public java.util.List getResourceAttributesList() { + public java.util.List getResourceAttributesList() { if (resourceAttributesBuilder_ == null) { return java.util.Collections.unmodifiableList(resourceAttributes_); } else { @@ -1286,7 +1282,7 @@ public java.util.List getR } } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ public int getResourceAttributesCount() { if (resourceAttributesBuilder_ == null) { @@ -1296,9 +1292,9 @@ public int getResourceAttributesCount() { } } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - public io.opentdf.platform.authorization.ResourceAttributes getResourceAttributes(int index) { + public io.opentdf.platform.authorization.ResourceAttribute getResourceAttributes(int index) { if (resourceAttributesBuilder_ == null) { return resourceAttributes_.get(index); } else { @@ -1306,10 +1302,10 @@ public io.opentdf.platform.authorization.ResourceAttributes getResourceAttribute } } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ public Builder setResourceAttributes( - int index, io.opentdf.platform.authorization.ResourceAttributes value) { + int index, io.opentdf.platform.authorization.ResourceAttribute value) { if (resourceAttributesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1323,10 +1319,10 @@ public Builder setResourceAttributes( return this; } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ public Builder setResourceAttributes( - int index, io.opentdf.platform.authorization.ResourceAttributes.Builder builderForValue) { + int index, io.opentdf.platform.authorization.ResourceAttribute.Builder builderForValue) { if (resourceAttributesBuilder_ == null) { ensureResourceAttributesIsMutable(); resourceAttributes_.set(index, builderForValue.build()); @@ -1337,9 +1333,9 @@ public Builder setResourceAttributes( return this; } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - public Builder addResourceAttributes(io.opentdf.platform.authorization.ResourceAttributes value) { + public Builder addResourceAttributes(io.opentdf.platform.authorization.ResourceAttribute value) { if (resourceAttributesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1353,10 +1349,10 @@ public Builder addResourceAttributes(io.opentdf.platform.authorization.ResourceA return this; } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ public Builder addResourceAttributes( - int index, io.opentdf.platform.authorization.ResourceAttributes value) { + int index, io.opentdf.platform.authorization.ResourceAttribute value) { if (resourceAttributesBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1370,10 +1366,10 @@ public Builder addResourceAttributes( return this; } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ public Builder addResourceAttributes( - io.opentdf.platform.authorization.ResourceAttributes.Builder builderForValue) { + io.opentdf.platform.authorization.ResourceAttribute.Builder builderForValue) { if (resourceAttributesBuilder_ == null) { ensureResourceAttributesIsMutable(); resourceAttributes_.add(builderForValue.build()); @@ -1384,10 +1380,10 @@ public Builder addResourceAttributes( return this; } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ public Builder addResourceAttributes( - int index, io.opentdf.platform.authorization.ResourceAttributes.Builder builderForValue) { + int index, io.opentdf.platform.authorization.ResourceAttribute.Builder builderForValue) { if (resourceAttributesBuilder_ == null) { ensureResourceAttributesIsMutable(); resourceAttributes_.add(index, builderForValue.build()); @@ -1398,10 +1394,10 @@ public Builder addResourceAttributes( return this; } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ public Builder addAllResourceAttributes( - java.lang.Iterable values) { + java.lang.Iterable values) { if (resourceAttributesBuilder_ == null) { ensureResourceAttributesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( @@ -1413,7 +1409,7 @@ public Builder addAllResourceAttributes( return this; } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ public Builder clearResourceAttributes() { if (resourceAttributesBuilder_ == null) { @@ -1426,7 +1422,7 @@ public Builder clearResourceAttributes() { return this; } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ public Builder removeResourceAttributes(int index) { if (resourceAttributesBuilder_ == null) { @@ -1439,16 +1435,16 @@ public Builder removeResourceAttributes(int index) { return this; } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - public io.opentdf.platform.authorization.ResourceAttributes.Builder getResourceAttributesBuilder( + public io.opentdf.platform.authorization.ResourceAttribute.Builder getResourceAttributesBuilder( int index) { return getResourceAttributesFieldBuilder().getBuilder(index); } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - public io.opentdf.platform.authorization.ResourceAttributesOrBuilder getResourceAttributesOrBuilder( + public io.opentdf.platform.authorization.ResourceAttributeOrBuilder getResourceAttributesOrBuilder( int index) { if (resourceAttributesBuilder_ == null) { return resourceAttributes_.get(index); } else { @@ -1456,9 +1452,9 @@ public io.opentdf.platform.authorization.ResourceAttributesOrBuilder getResource } } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - public java.util.List + public java.util.List getResourceAttributesOrBuilderList() { if (resourceAttributesBuilder_ != null) { return resourceAttributesBuilder_.getMessageOrBuilderList(); @@ -1467,33 +1463,33 @@ public io.opentdf.platform.authorization.ResourceAttributesOrBuilder getResource } } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - public io.opentdf.platform.authorization.ResourceAttributes.Builder addResourceAttributesBuilder() { + public io.opentdf.platform.authorization.ResourceAttribute.Builder addResourceAttributesBuilder() { return getResourceAttributesFieldBuilder().addBuilder( - io.opentdf.platform.authorization.ResourceAttributes.getDefaultInstance()); + io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance()); } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - public io.opentdf.platform.authorization.ResourceAttributes.Builder addResourceAttributesBuilder( + public io.opentdf.platform.authorization.ResourceAttribute.Builder addResourceAttributesBuilder( int index) { return getResourceAttributesFieldBuilder().addBuilder( - index, io.opentdf.platform.authorization.ResourceAttributes.getDefaultInstance()); + index, io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance()); } /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - public java.util.List + public java.util.List getResourceAttributesBuilderList() { return getResourceAttributesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.ResourceAttributes, io.opentdf.platform.authorization.ResourceAttributes.Builder, io.opentdf.platform.authorization.ResourceAttributesOrBuilder> + io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder> getResourceAttributesFieldBuilder() { if (resourceAttributesBuilder_ == null) { resourceAttributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.ResourceAttributes, io.opentdf.platform.authorization.ResourceAttributes.Builder, io.opentdf.platform.authorization.ResourceAttributesOrBuilder>( + io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder>( resourceAttributes_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), diff --git a/sdkjava/io/opentdf/platform/authorization/DecisionRequestOrBuilder.java b/sdkjava/io/opentdf/platform/authorization/DecisionRequestOrBuilder.java index cfcfb54b85..bc15d44f56 100644 --- a/sdkjava/io/opentdf/platform/authorization/DecisionRequestOrBuilder.java +++ b/sdkjava/io/opentdf/platform/authorization/DecisionRequestOrBuilder.java @@ -57,26 +57,26 @@ io.opentdf.platform.authorization.EntityChainOrBuilder getEntityChainsOrBuilder( int index); /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - java.util.List + java.util.List getResourceAttributesList(); /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - io.opentdf.platform.authorization.ResourceAttributes getResourceAttributes(int index); + io.opentdf.platform.authorization.ResourceAttribute getResourceAttributes(int index); /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ int getResourceAttributesCount(); /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - java.util.List + java.util.List getResourceAttributesOrBuilderList(); /** - * repeated .authorization.ResourceAttributes resource_attributes = 3 [json_name = "resourceAttributes"]; + * repeated .authorization.ResourceAttribute resource_attributes = 3 [json_name = "resourceAttributes"]; */ - io.opentdf.platform.authorization.ResourceAttributesOrBuilder getResourceAttributesOrBuilder( + io.opentdf.platform.authorization.ResourceAttributeOrBuilder getResourceAttributesOrBuilder( int index); } diff --git a/sdkjava/io/opentdf/platform/authorization/GetEntitlementsRequest.java b/sdkjava/io/opentdf/platform/authorization/GetEntitlementsRequest.java index 919ebc4978..e346c4f4eb 100644 --- a/sdkjava/io/opentdf/platform/authorization/GetEntitlementsRequest.java +++ b/sdkjava/io/opentdf/platform/authorization/GetEntitlementsRequest.java @@ -123,13 +123,13 @@ public io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( } public static final int SCOPE_FIELD_NUMBER = 2; - private io.opentdf.platform.authorization.ResourceAttributes scope_; + private io.opentdf.platform.authorization.ResourceAttribute scope_; /** *
        *optional attribute fqn as a scope
        * 
    * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; * @return Whether the scope field is set. */ @java.lang.Override @@ -141,23 +141,23 @@ public boolean hasScope() { *optional attribute fqn as a scope * * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; * @return The scope. */ @java.lang.Override - public io.opentdf.platform.authorization.ResourceAttributes getScope() { - return scope_ == null ? io.opentdf.platform.authorization.ResourceAttributes.getDefaultInstance() : scope_; + public io.opentdf.platform.authorization.ResourceAttribute getScope() { + return scope_ == null ? io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance() : scope_; } /** *
        *optional attribute fqn as a scope
        * 
    * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; */ @java.lang.Override - public io.opentdf.platform.authorization.ResourceAttributesOrBuilder getScopeOrBuilder() { - return scope_ == null ? io.opentdf.platform.authorization.ResourceAttributes.getDefaultInstance() : scope_; + public io.opentdf.platform.authorization.ResourceAttributeOrBuilder getScopeOrBuilder() { + return scope_ == null ? io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance() : scope_; } private byte memoizedIsInitialized = -1; @@ -912,15 +912,15 @@ public io.opentdf.platform.authorization.Entity.Builder addEntitiesBuilder( return entitiesBuilder_; } - private io.opentdf.platform.authorization.ResourceAttributes scope_; + private io.opentdf.platform.authorization.ResourceAttribute scope_; private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.authorization.ResourceAttributes, io.opentdf.platform.authorization.ResourceAttributes.Builder, io.opentdf.platform.authorization.ResourceAttributesOrBuilder> scopeBuilder_; + io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder> scopeBuilder_; /** *
          *optional attribute fqn as a scope
          * 
    * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; * @return Whether the scope field is set. */ public boolean hasScope() { @@ -931,12 +931,12 @@ public boolean hasScope() { *optional attribute fqn as a scope * * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; * @return The scope. */ - public io.opentdf.platform.authorization.ResourceAttributes getScope() { + public io.opentdf.platform.authorization.ResourceAttribute getScope() { if (scopeBuilder_ == null) { - return scope_ == null ? io.opentdf.platform.authorization.ResourceAttributes.getDefaultInstance() : scope_; + return scope_ == null ? io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance() : scope_; } else { return scopeBuilder_.getMessage(); } @@ -946,9 +946,9 @@ public io.opentdf.platform.authorization.ResourceAttributes getScope() { *optional attribute fqn as a scope * * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; */ - public Builder setScope(io.opentdf.platform.authorization.ResourceAttributes value) { + public Builder setScope(io.opentdf.platform.authorization.ResourceAttribute value) { if (scopeBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -966,10 +966,10 @@ public Builder setScope(io.opentdf.platform.authorization.ResourceAttributes val *optional attribute fqn as a scope * * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; */ public Builder setScope( - io.opentdf.platform.authorization.ResourceAttributes.Builder builderForValue) { + io.opentdf.platform.authorization.ResourceAttribute.Builder builderForValue) { if (scopeBuilder_ == null) { scope_ = builderForValue.build(); } else { @@ -984,13 +984,13 @@ public Builder setScope( *optional attribute fqn as a scope * * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; */ - public Builder mergeScope(io.opentdf.platform.authorization.ResourceAttributes value) { + public Builder mergeScope(io.opentdf.platform.authorization.ResourceAttribute value) { if (scopeBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && scope_ != null && - scope_ != io.opentdf.platform.authorization.ResourceAttributes.getDefaultInstance()) { + scope_ != io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance()) { getScopeBuilder().mergeFrom(value); } else { scope_ = value; @@ -1009,7 +1009,7 @@ public Builder mergeScope(io.opentdf.platform.authorization.ResourceAttributes v *optional attribute fqn as a scope * * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; */ public Builder clearScope() { bitField0_ = (bitField0_ & ~0x00000002); @@ -1026,9 +1026,9 @@ public Builder clearScope() { *optional attribute fqn as a scope * * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; */ - public io.opentdf.platform.authorization.ResourceAttributes.Builder getScopeBuilder() { + public io.opentdf.platform.authorization.ResourceAttribute.Builder getScopeBuilder() { bitField0_ |= 0x00000002; onChanged(); return getScopeFieldBuilder().getBuilder(); @@ -1038,14 +1038,14 @@ public io.opentdf.platform.authorization.ResourceAttributes.Builder getScopeBuil *optional attribute fqn as a scope * * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; */ - public io.opentdf.platform.authorization.ResourceAttributesOrBuilder getScopeOrBuilder() { + public io.opentdf.platform.authorization.ResourceAttributeOrBuilder getScopeOrBuilder() { if (scopeBuilder_ != null) { return scopeBuilder_.getMessageOrBuilder(); } else { return scope_ == null ? - io.opentdf.platform.authorization.ResourceAttributes.getDefaultInstance() : scope_; + io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance() : scope_; } } /** @@ -1053,14 +1053,14 @@ public io.opentdf.platform.authorization.ResourceAttributesOrBuilder getScopeOrB *optional attribute fqn as a scope * * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; */ private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.authorization.ResourceAttributes, io.opentdf.platform.authorization.ResourceAttributes.Builder, io.opentdf.platform.authorization.ResourceAttributesOrBuilder> + io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder> getScopeFieldBuilder() { if (scopeBuilder_ == null) { scopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.authorization.ResourceAttributes, io.opentdf.platform.authorization.ResourceAttributes.Builder, io.opentdf.platform.authorization.ResourceAttributesOrBuilder>( + io.opentdf.platform.authorization.ResourceAttribute, io.opentdf.platform.authorization.ResourceAttribute.Builder, io.opentdf.platform.authorization.ResourceAttributeOrBuilder>( getScope(), getParentForChildren(), isClean()); diff --git a/sdkjava/io/opentdf/platform/authorization/GetEntitlementsRequestOrBuilder.java b/sdkjava/io/opentdf/platform/authorization/GetEntitlementsRequestOrBuilder.java index 833ff662bd..af49f7b2f1 100644 --- a/sdkjava/io/opentdf/platform/authorization/GetEntitlementsRequestOrBuilder.java +++ b/sdkjava/io/opentdf/platform/authorization/GetEntitlementsRequestOrBuilder.java @@ -57,7 +57,7 @@ io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( *optional attribute fqn as a scope * * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; * @return Whether the scope field is set. */ boolean hasScope(); @@ -66,16 +66,16 @@ io.opentdf.platform.authorization.EntityOrBuilder getEntitiesOrBuilder( *optional attribute fqn as a scope * * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; * @return The scope. */ - io.opentdf.platform.authorization.ResourceAttributes getScope(); + io.opentdf.platform.authorization.ResourceAttribute getScope(); /** *
        *optional attribute fqn as a scope
        * 
    * - * optional .authorization.ResourceAttributes scope = 2 [json_name = "scope"]; + * optional .authorization.ResourceAttribute scope = 2 [json_name = "scope"]; */ - io.opentdf.platform.authorization.ResourceAttributesOrBuilder getScopeOrBuilder(); + io.opentdf.platform.authorization.ResourceAttributeOrBuilder getScopeOrBuilder(); } diff --git a/sdkjava/io/opentdf/platform/authorization/ResourceAttribute.java b/sdkjava/io/opentdf/platform/authorization/ResourceAttribute.java new file mode 100644 index 0000000000..4d4e678449 --- /dev/null +++ b/sdkjava/io/opentdf/platform/authorization/ResourceAttribute.java @@ -0,0 +1,603 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +/** + *
    + *A logical bucket of attributes belonging to a "Resource"
    + * 
    + * + * Protobuf type {@code authorization.ResourceAttribute} + */ +public final class ResourceAttribute extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:authorization.ResourceAttribute) + ResourceAttributeOrBuilder { +private static final long serialVersionUID = 0L; + // Use ResourceAttribute.newBuilder() to construct. + private ResourceAttribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResourceAttribute() { + attributeFqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ResourceAttribute(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.ResourceAttribute.class, io.opentdf.platform.authorization.ResourceAttribute.Builder.class); + } + + public static final int ATTRIBUTE_FQNS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList attributeFqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return A list containing the attributeFqns. + */ + public com.google.protobuf.ProtocolStringList + getAttributeFqnsList() { + return attributeFqns_; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return The count of attributeFqns. + */ + public int getAttributeFqnsCount() { + return attributeFqns_.size(); + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index of the element to return. + * @return The attributeFqns at the given index. + */ + public java.lang.String getAttributeFqns(int index) { + return attributeFqns_.get(index); + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index of the value to return. + * @return The bytes of the attributeFqns at the given index. + */ + public com.google.protobuf.ByteString + getAttributeFqnsBytes(int index) { + return attributeFqns_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < attributeFqns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeFqns_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < attributeFqns_.size(); i++) { + dataSize += computeStringSizeNoTag(attributeFqns_.getRaw(i)); + } + size += dataSize; + size += 1 * getAttributeFqnsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.opentdf.platform.authorization.ResourceAttribute)) { + return super.equals(obj); + } + io.opentdf.platform.authorization.ResourceAttribute other = (io.opentdf.platform.authorization.ResourceAttribute) obj; + + if (!getAttributeFqnsList() + .equals(other.getAttributeFqnsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAttributeFqnsCount() > 0) { + hash = (37 * hash) + ATTRIBUTE_FQNS_FIELD_NUMBER; + hash = (53 * hash) + getAttributeFqnsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.opentdf.platform.authorization.ResourceAttribute parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.authorization.ResourceAttribute parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.authorization.ResourceAttribute parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.opentdf.platform.authorization.ResourceAttribute prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
    +   *A logical bucket of attributes belonging to a "Resource"
    +   * 
    + * + * Protobuf type {@code authorization.ResourceAttribute} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:authorization.ResourceAttribute) + io.opentdf.platform.authorization.ResourceAttributeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.authorization.ResourceAttribute.class, io.opentdf.platform.authorization.ResourceAttribute.Builder.class); + } + + // Construct using io.opentdf.platform.authorization.ResourceAttribute.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeFqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.authorization.AuthorizationProto.internal_static_authorization_ResourceAttribute_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.authorization.ResourceAttribute getDefaultInstanceForType() { + return io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.authorization.ResourceAttribute build() { + io.opentdf.platform.authorization.ResourceAttribute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.authorization.ResourceAttribute buildPartial() { + io.opentdf.platform.authorization.ResourceAttribute result = new io.opentdf.platform.authorization.ResourceAttribute(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.authorization.ResourceAttribute result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + attributeFqns_.makeImmutable(); + result.attributeFqns_ = attributeFqns_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.opentdf.platform.authorization.ResourceAttribute) { + return mergeFrom((io.opentdf.platform.authorization.ResourceAttribute)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.authorization.ResourceAttribute other) { + if (other == io.opentdf.platform.authorization.ResourceAttribute.getDefaultInstance()) return this; + if (!other.attributeFqns_.isEmpty()) { + if (attributeFqns_.isEmpty()) { + attributeFqns_ = other.attributeFqns_; + bitField0_ |= 0x00000001; + } else { + ensureAttributeFqnsIsMutable(); + attributeFqns_.addAll(other.attributeFqns_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureAttributeFqnsIsMutable(); + attributeFqns_.add(s); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList attributeFqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureAttributeFqnsIsMutable() { + if (!attributeFqns_.isModifiable()) { + attributeFqns_ = new com.google.protobuf.LazyStringArrayList(attributeFqns_); + } + bitField0_ |= 0x00000001; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return A list containing the attributeFqns. + */ + public com.google.protobuf.ProtocolStringList + getAttributeFqnsList() { + attributeFqns_.makeImmutable(); + return attributeFqns_; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return The count of attributeFqns. + */ + public int getAttributeFqnsCount() { + return attributeFqns_.size(); + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index of the element to return. + * @return The attributeFqns at the given index. + */ + public java.lang.String getAttributeFqns(int index) { + return attributeFqns_.get(index); + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index of the value to return. + * @return The bytes of the attributeFqns at the given index. + */ + public com.google.protobuf.ByteString + getAttributeFqnsBytes(int index) { + return attributeFqns_.getByteString(index); + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index to set the value at. + * @param value The attributeFqns to set. + * @return This builder for chaining. + */ + public Builder setAttributeFqns( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAttributeFqnsIsMutable(); + attributeFqns_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param value The attributeFqns to add. + * @return This builder for chaining. + */ + public Builder addAttributeFqns( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAttributeFqnsIsMutable(); + attributeFqns_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param values The attributeFqns to add. + * @return This builder for chaining. + */ + public Builder addAllAttributeFqns( + java.lang.Iterable values) { + ensureAttributeFqnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, attributeFqns_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return This builder for chaining. + */ + public Builder clearAttributeFqns() { + attributeFqns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param value The bytes of the attributeFqns to add. + * @return This builder for chaining. + */ + public Builder addAttributeFqnsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureAttributeFqnsIsMutable(); + attributeFqns_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:authorization.ResourceAttribute) + } + + // @@protoc_insertion_point(class_scope:authorization.ResourceAttribute) + private static final io.opentdf.platform.authorization.ResourceAttribute DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.authorization.ResourceAttribute(); + } + + public static io.opentdf.platform.authorization.ResourceAttribute getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceAttribute parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.opentdf.platform.authorization.ResourceAttribute getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/io/opentdf/platform/authorization/ResourceAttributeOrBuilder.java b/sdkjava/io/opentdf/platform/authorization/ResourceAttributeOrBuilder.java new file mode 100644 index 0000000000..739a01bf96 --- /dev/null +++ b/sdkjava/io/opentdf/platform/authorization/ResourceAttributeOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: authorization/authorization.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.authorization; + +public interface ResourceAttributeOrBuilder extends + // @@protoc_insertion_point(interface_extends:authorization.ResourceAttribute) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return A list containing the attributeFqns. + */ + java.util.List + getAttributeFqnsList(); + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @return The count of attributeFqns. + */ + int getAttributeFqnsCount(); + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index of the element to return. + * @return The attributeFqns at the given index. + */ + java.lang.String getAttributeFqns(int index); + /** + * repeated string attribute_fqns = 2 [json_name = "attributeFqns"]; + * @param index The index of the value to return. + * @return The bytes of the attributeFqns at the given index. + */ + com.google.protobuf.ByteString + getAttributeFqnsBytes(int index); +} diff --git a/services/authorization/authorization.go b/services/authorization/authorization.go index f2dc2d7506..145151fff2 100644 --- a/services/authorization/authorization.go +++ b/services/authorization/authorization.go @@ -42,7 +42,7 @@ func (as AuthorizationService) GetDecisions(ctx context.Context, req *authorizat Standard: authorization.Action_STANDARD_ACTION_TRANSMIT, }, }, - ResourceAttributesId: ra.Id, + ResourceAttributesId: "resourceAttributesId_stub" + ra.String(), } rsp.DecisionResponses = append(rsp.DecisionResponses, decision) } diff --git a/services/authorization/authorization.proto b/services/authorization/authorization.proto index 8d96585aaf..d4fa2944e2 100644 --- a/services/authorization/authorization.proto +++ b/services/authorization/authorization.proto @@ -75,7 +75,6 @@ message Action { ], "resourceAttributes": [ { - "id": "attr-set-1", "attributeValueReferences": [ { "attributeFqn": "http://www.example.org/attr/foo/value/bar" @@ -83,7 +82,6 @@ message Action { ] }, { - "id": "request-set-2", "attributeValueReferences": [ { "attributeFqn": "http://www.example.org/attr/foo/value/bar" @@ -102,7 +100,7 @@ message Action { message DecisionRequest { repeated Action actions = 1; repeated EntityChain entity_chains = 2; - repeated ResourceAttributes resource_attributes = 3; + repeated ResourceAttribute resource_attributes = 3; } /* @@ -185,7 +183,7 @@ message GetDecisionsResponse { */ message GetEntitlementsRequest { repeated Entity entities = 1; // list of requested entities - optional ResourceAttributes scope = 2; //optional attribute fqn as a scope + optional ResourceAttribute scope = 2; //optional attribute fqn as a scope } message EntityEntitlements { @@ -194,9 +192,8 @@ message EntityEntitlements { } //A logical bucket of attributes belonging to a "Resource" -message ResourceAttributes { - string id = 1; - repeated string attribute_id = 2; +message ResourceAttribute { + repeated string attribute_fqns = 2; } /*
    resource_attributesResourceAttributesResourceAttribute repeated

    scopeResourceAttributesResourceAttribute optional

    optional attribute fqn as a scope

    idstring

    attribute_idattribute_fqns string repeated