diff --git a/cmd/provisionFixtures.go b/cmd/provisionFixtures.go index b152e28a25..fd8c956212 100644 --- a/cmd/provisionFixtures.go +++ b/cmd/provisionFixtures.go @@ -48,7 +48,7 @@ You can clear/recycle your database with 'docker-compose down' and 'docker-compo dbI := fixtures.NewDBInterface(*cfg) f := fixtures.NewFixture(dbI) - fixtures.LoadFixtureData("./internal/fixtures/fixtures.yaml") + fixtures.LoadFixtureData("./internal/fixtures/policy_fixtures.yaml") f.Provision() fmt.Print("fixtures provision fully applied") diff --git a/docs/grpc/index.html b/docs/grpc/index.html index 0633240ff8..5137277121 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -755,10 +755,6 @@

Table of Contents

MMatchSubjectMappingsResponse -
  • - MSubject -
  • -
  • MSubjectConditionSet
  • @@ -771,6 +767,10 @@

    Table of Contents

    MSubjectMapping +
  • + MSubjectProperty +
  • +
  • MSubjectSet
  • @@ -5297,7 +5297,7 @@

    ListSubjectMappingsRe

    MatchSubjectMappingsRequest

    -

    +

    MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned

    if there is any single condition found among the structures that matches for one of the provided properties:

    1. The external field, external value, and an IN operator

    2. The external field, _no_ external value, and a NOT_IN operator

    Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping

    in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no

    logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum

    initial filter.

    NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned.

    @@ -5307,10 +5307,10 @@

    MatchSubjectMappingsR

    - - - - + + + + @@ -5344,30 +5344,6 @@

    MatchSubjectMappings -

    Subject

    -

    A Representation of a subject as attribute->value pairs. This would mirror user attributes retrieved

    from an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc.

    - - -
    subjectSubject

    Required

    subject_propertiesSubjectPropertyrepeated

    - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    attributesgoogle.protobuf.Struct

    - - - - -

    SubjectConditionSet

    A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet

    are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple

    Subject Mappings / Attribute Values and is an independent unit.

    @@ -5490,6 +5466,37 @@

    SubjectMapping

    +

    SubjectProperty

    +

    A property of a Subject/Entity as a field->value pair. This would mirror external user attributes retrieved

    from an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc.

    For now, a valid property must contain both field & value.

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    external_fieldstring

    external_valuestring

    + + + + +

    SubjectSet

    A collection of Condition Groups

    @@ -5834,7 +5841,7 @@

    Methods with HTTP bindings

    MatchSubjectMappings POST /subject-mappings/match - subject + subject_properties diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index 87a464b2af..615c544995 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -252,12 +252,15 @@ }, "parameters": [ { - "name": "subject", - "description": "Required", + "name": "subjectProperties", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/subjectmappingSubject" + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/subjectmappingSubjectProperty" + } } } ], @@ -615,14 +618,6 @@ "additionalProperties": {}, "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, - "protobufNullValue": { - "type": "string", - "enum": [ - "NULL_VALUE" - ], - "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." - }, "rpcStatus": { "type": "object", "properties": { @@ -822,15 +817,6 @@ } } }, - "subjectmappingSubject": { - "type": "object", - "properties": { - "attributes": { - "type": "object" - } - }, - "description": "A Representation of a subject as attribute-\u003evalue pairs. This would mirror user attributes retrieved\nfrom an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc." - }, "subjectmappingSubjectConditionSet": { "type": "object", "properties": { @@ -906,6 +892,18 @@ "default": "SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED", "title": "buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package" }, + "subjectmappingSubjectProperty": { + "type": "object", + "properties": { + "externalField": { + "type": "string" + }, + "externalValue": { + "type": "string" + } + }, + "description": "A property of a Subject/Entity as a field-\u003evalue pair. This would mirror external user attributes retrieved\nfrom an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc.\nFor now, a valid property must contain both field \u0026 value." + }, "subjectmappingSubjectSet": { "type": "object", "properties": { diff --git a/integration/main_test.go b/integration/main_test.go index 607bc380ff..74e0af009b 100644 --- a/integration/main_test.go +++ b/integration/main_test.go @@ -122,7 +122,7 @@ func TestMain(m *testing.M) { slog.Info("🚚 applied migrations", slog.Int("count", applied)) slog.Info("🏠 loading fixtures") - fixtures.LoadFixtureData("../internal/fixtures/fixtures.yaml") + fixtures.LoadFixtureData("../internal/fixtures/policy_fixtures.yaml") slog.Info("📚 indexing FQNs for test fixtures") db.PolicyClient.AttrFqnReindex() diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index a998825191..9990986833 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -557,7 +557,7 @@ func (s *SubjectMappingsSuite) TestListSubjectConditionSet() { found2 := false fixture3 := s.f.GetSubjectConditionSetKey("subject_condition_set3") found3 := false - fixture4 := s.f.GetSubjectConditionSetKey("subject_condition_omitted_optional_name") + fixture4 := s.f.GetSubjectConditionSetKey("subject_condition_simple_in") found4 := false assert.GreaterOrEqual(s.T(), len(list), 3) @@ -722,6 +722,215 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NonExistentId_Fails assert.ErrorIs(s.T(), err, db.ErrNotFound) } +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_InOne() { + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set1") + externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + externalValues := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues + + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: externalField, + ExternalValue: externalValues[0], + }, + } + + sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), sm) + assert.Equal(s.T(), fixtureScs.Id, sm[0].SubjectConditionSet.Id) +} + +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_DoesNotReturnNotInWhenMatches() { + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_not_in") + externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + externalValues := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues + + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: externalField, + ExternalValue: externalValues[0], + }, + } + + smList, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), smList) + assert.Equal(s.T(), 0, len(smList)) +} + +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_NotInOneMatch() { + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_not_in") + externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + + expectedMappedFixture := s.f.GetSubjectMappingKey("subject_mapping_subject_simple_not_in") + + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: externalField, + ExternalValue: "random_value", + }, + } + + smList, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), smList) + assert.Equal(s.T(), 1, len(smList)) + assert.Equal(s.T(), fixtureScs.Id, smList[0].SubjectConditionSet.Id) + assert.Equal(s.T(), expectedMappedFixture.Id, smList[0].Id) +} + +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_MissingFieldInProperty_Fails() { + props := []*subjectmapping.SubjectProperty{ + { + ExternalValue: "some_value", + }, + } + + sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) + assert.ErrorIs(s.T(), err, db.ErrMissingValue) + assert.Zero(s.T(), sm) +} + +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_MissingValueInProperty_Fails() { + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: "some_field", + }, + } + + sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) + assert.ErrorIs(s.T(), err, db.ErrMissingValue) + assert.Zero(s.T(), sm) +} + +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_NoPropertiesProvided_Fails() { + props := []*subjectmapping.SubjectProperty{} + + sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) + assert.ErrorIs(s.T(), err, db.ErrMissingValue) + assert.Zero(s.T(), sm) +} + +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_InMultiple() { + simpleScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_in") + simpleExternalField := simpleScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + simpleExternalValues := simpleScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues + + otherScs := s.f.GetSubjectConditionSetKey("subject_condition_set1") + otherExternalField := otherScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + otherExternalValues := otherScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues + + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: simpleExternalField, + ExternalValue: simpleExternalValues[0], + }, + { + ExternalField: otherExternalField, + ExternalValue: otherExternalValues[0], + }, + } + + gotEntitlements, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), gotEntitlements) + assert.GreaterOrEqual(s.T(), len(gotEntitlements), 2) + + mappedSimple := s.f.GetSubjectMappingKey("subject_mapping_subject_simple_in") + foundMappedSimple := false + mappedSubjectConditionSet1 := s.f.GetSubjectMappingKey("subject_mapping_subject_attribute1") + foundMappedSubjectConditionSet1 := false + + for _, sm := range gotEntitlements { + if sm.SubjectConditionSet.Id == mappedSimple.SubjectConditionSetId { + foundMappedSimple = true + } else if sm.SubjectConditionSet.Id == mappedSubjectConditionSet1.SubjectConditionSetId { + foundMappedSubjectConditionSet1 = true + } + } + assert.True(s.T(), foundMappedSimple) + assert.True(s.T(), foundMappedSubjectConditionSet1) +} + +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_NotInMultiple() { + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_not_in") + externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + expectedMappedFixture := s.f.GetSubjectMappingKey("subject_mapping_subject_simple_not_in") + + otherFixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set3") + otherExternalField1 := otherFixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[1].SubjectExternalField + otherExpectedMatchedFixture := s.f.GetSubjectMappingKey("subject_mapping_subject_attribute3") + + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: externalField, + ExternalValue: "random_value_definitely_not_in_fixtures", + }, + { + ExternalField: otherExternalField1, + ExternalValue: "random_value_definitely_not_in_fixtures", + }, + } + + smList, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), smList) + assert.Equal(s.T(), 2, len(smList)) + for _, sm := range smList { + if sm.SubjectConditionSet.Id == fixtureScs.Id { + assert.Equal(s.T(), expectedMappedFixture.Id, sm.Id) + } else if sm.SubjectConditionSet.Id == otherFixtureScs.Id { + assert.Equal(s.T(), otherExpectedMatchedFixture.Id, sm.Id) + } + } +} + +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_InOneAndNotInASecond() { + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_in") + externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + externalValues := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues + expectedMappedFixture := s.f.GetSubjectMappingKey("subject_mapping_subject_simple_in") + + otherFixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_not_in") + otherExternalField := otherFixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + expectedMappedOtherFixture := s.f.GetSubjectMappingKey("subject_mapping_subject_simple_not_in") + + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: externalField, + ExternalValue: externalValues[0], + }, + { + ExternalField: otherExternalField, + ExternalValue: "random_value_987654321", + }, + } + + smList, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), smList) + for _, sm := range smList { + if sm.SubjectConditionSet.Id == fixtureScs.Id { + assert.Equal(s.T(), expectedMappedFixture.Id, sm.Id) + } else if sm.SubjectConditionSet.Id == otherFixtureScs.Id { + assert.Equal(s.T(), expectedMappedOtherFixture.Id, sm.Id) + } + } +} + +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_NonExistentField_ReturnsNoMappings() { + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: "non_existent_field", + ExternalValue: "non_existent_value", + }, + } + sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), sm) + assert.Equal(s.T(), 0, len(sm)) +} + func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_MetadataVariations() { fixedLabel := "fixed label" updateLabel := "update label" diff --git a/internal/fixtures/fixtures.go b/internal/fixtures/fixtures.go index eabd523db9..d2d1f13a97 100644 --- a/internal/fixtures/fixtures.go +++ b/internal/fixtures/fixtures.go @@ -3,7 +3,6 @@ package fixtures import ( "context" "encoding/json" - "fmt" "log/slog" "os" @@ -11,7 +10,7 @@ import ( ) var ( - fixtureFilename = "fixtures.yaml" + fixtureFilename = "policy_fixtures.yaml" fixtureData FixtureData ) @@ -137,7 +136,7 @@ func LoadFixtureData(file string) { slog.Error("could not unmarshal "+fixtureFilename, slog.String("error", err.Error())) panic(err) } - fmt.Println(fixtureData) + slog.Info("Fully loaded fixtures", slog.Any("fixtureData", fixtureData)) } type Fixtures struct { @@ -311,7 +310,7 @@ func (f *Fixtures) provisionSubjectConditionSet() int64 { var conditionJSON []byte conditionJSON, err := json.Marshal(d.Condition.SubjectSets) if err != nil { - slog.Error("⛔️ 📦 issue with subject condition set JSON - check fixtures.yaml for issues") + slog.Error("⛔️ 📦 issue with subject condition set JSON - check policy_fixtures.yaml for issues") panic("issue with subject condition set JSON") } @@ -329,7 +328,7 @@ func (f *Fixtures) provisionSubjectMappings() int64 { var actionsJSON []byte actionsJSON, err := json.Marshal(d.Actions) if err != nil { - slog.Error("⛔️ 📦 issue with subject mapping actions JSON - check fixtures.yaml for issues") + slog.Error("⛔️ 📦 issue with subject mapping actions JSON - check policy_fixtures.yaml for issues") panic("issue with subject mapping actions JSON") } @@ -364,7 +363,7 @@ func (f *Fixtures) provisionKasRegistry() int64 { } if pubKeyJSON, err := json.Marshal(d.PubKey); err != nil { - slog.Error("⛔️ 📦 issue with KAS registry public key JSON - check fixtures.yaml for issues") + slog.Error("⛔️ 📦 issue with KAS registry public key JSON - check policy_fixtures.yaml for issues") panic("issue with KAS registry public key JSON") } else { v = append(v, f.db.StringWrap(string(pubKeyJSON))) @@ -399,15 +398,15 @@ func (f *Fixtures) provisionAttributeValueKeyAccessServer() int64 { func (f *Fixtures) provision(t string, c []string, v [][]string) int64 { rows, err := f.db.ExecInsert(t, c, v...) if err != nil { - slog.Error("⛔️ 📦 issue with insert into table - check fixtures.yaml for issues", slog.String("table", t), slog.Any("err", err)) + slog.Error("⛔️ 📦 issue with insert into table - check policy_fixtures.yaml for issues", slog.String("table", t), slog.Any("err", err)) panic("issue with insert into table") } if rows == 0 { - slog.Error("⛔️ 📦 no rows provisioned - check fixtures.yaml for issues", slog.String("table", t), slog.Int("expected", len(v))) + slog.Error("⛔️ 📦 no rows provisioned - check policy_fixtures.yaml for issues", slog.String("table", t), slog.Int("expected", len(v))) panic("no rows provisioned") } if rows != int64(len(v)) { - slog.Error("⛔️ 📦 incorrect number of rows provisioned - check fixtures.yaml for issues", slog.String("table", t), slog.Int("expected", len(v)), slog.Int64("actual", rows)) + slog.Error("⛔️ 📦 incorrect number of rows provisioned - check policy_fixtures.yaml for issues", slog.String("table", t), slog.Int("expected", len(v)), slog.Int64("actual", rows)) panic("incorrect number of rows provisioned") } return rows diff --git a/internal/fixtures/fixtures.yaml b/internal/fixtures/policy_fixtures.yaml similarity index 80% rename from internal/fixtures/fixtures.yaml rename to internal/fixtures/policy_fixtures.yaml index 62467dac27..f6c881ed5a 100644 --- a/internal/fixtures/fixtures.yaml +++ b/internal/fixtures/policy_fixtures.yaml @@ -21,12 +21,15 @@ attribute_namespaces: id: 0d94e00a-7bd3-4482-afe3-f1e4b03c1353 name: example.org active: true + scenario.com: + id: 87ba60e1-da12-4889-95fd-267968bf0896 + name: scenario.com + active: true # deactivated state deactivated_ns: id: 40790395-88b1-4adc-8bf5-1900491a79ba name: deactivated.io active: false - ## # Attributes # @@ -93,6 +96,13 @@ attributes: rule: HIERARCHY active: true + scenario.com/attr/working_group: + id: 6181b7f3-c7ed-4050-b654-315016a65563 + namespace_id: 87ba60e1-da12-4889-95fd-267968bf0896 + name: working_group + rule: ALL_OF + active: true + # deactivated state deactivated.io/attr/attr1: id: 3e3e3e3e-3e3e-3e3e-3e3e-3e3e3e3e3e3e @@ -158,6 +168,12 @@ attribute_values: value: value2 active: true + scenario.com/attr/working_group/value/blue: + id: c2140825-0969-44c9-8dd6-5d7e0a856b9c + attribute_definition_id: 6181b7f3-c7ed-4050-b654-315016a65563 + value: blue + active: true + # deactivated state deactivated.io/attr/attr1/value/deactivated_value: id: 06fa035b-8205-4000-86ad-2439cc1325ec @@ -209,6 +225,30 @@ subject_mappings: - standard: STANDARD_ACTION_TRANSMIT - custom: custom_action_1 + subject_mapping_subject_simple_in: + id: 3c623ede-df88-4906-8a78-ebdfacadcd57 + attribute_value_id: 74babca6-016f-4f3e-a99b-4e46ea8d0fd8 + # subject_condition_simple_in + subject_condition_set_id: 3c623ede-df88-4906-8a78-ebdfacadcd57 + actions: + - standard: STANDARD_ACTION_DECRYPT + + subject_mapping_subject_simple_not_in: + id: 1b9508a7-746a-4705-a1f1-4b6e676377ce + attribute_value_id: 532e5957-28f7-466d-91e2-493e9431cd83 + # subject_condition_simple_not_in + subject_condition_set_id: cf17ec4c-d206-4b74-b3db-5ce07d6995cc + actions: + - standard: STANDARD_ACTION_DECRYPT + + subject_mapping_scenario_blue: + id: 1748761a-bd8c-4b23-8560-16ba7a181f19 + attribute_value_id: c2140825-0969-44c9-8dd6-5d7e0a856b9c + # subject_condition_working_group_blue_scenario + subject_condition_set_id: 10d03422-7eae-43b9-ac3b-d10400171858 + actions: + - standard: STANDARD_ACTION_DECRYPT + subject_condition_set: metadata: table_name: subject_condition_set @@ -278,7 +318,7 @@ subject_condition_set: - manager - director - vice_president - subject_condition_omitted_optional_name: + subject_condition_simple_in: id: 3c623ede-df88-4906-8a78-ebdfacadcd57 condition: subject_sets: @@ -289,6 +329,34 @@ subject_condition_set: operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN subject_external_values: - some_value + subject_condition_simple_not_in: + id: cf17ec4c-d206-4b74-b3db-5ce07d6995cc + condition: + subject_sets: + - condition_groups: + - boolean_operator: CONDITION_BOOLEAN_TYPE_ENUM_OR + conditions: + - subject_external_field: some_other_field123 + operator: SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN + subject_external_values: + - some_other_value_123 + subject_condition_working_group_blue_scenario: + id: 10d03422-7eae-43b9-ac3b-d10400171858 + condition: + subject_sets: + - condition_groups: + - boolean_operator: CONDITION_BOOLEAN_TYPE_ENUM_AND + conditions: + - subject_external_field: team_name + operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN + subject_external_values: + - CoolTool + - RadService + - ShinyThing + - subject_external_field: org_name + operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN + subject_external_values: + - marketing ## # Resource Mappings diff --git a/migrations/20240305000000_add_subject_condition_sets.sql b/migrations/20240305000000_add_subject_condition_sets.sql index b5e7ff4e77..4f881cdc84 100644 --- a/migrations/20240305000000_add_subject_condition_sets.sql +++ b/migrations/20240305000000_add_subject_condition_sets.sql @@ -18,19 +18,19 @@ ALTER TABLE IF EXISTS subject_mappings ADD COLUMN subject_condition_set_id UUID, WITH subject_mappings_migration_data AS ( SELECT - JSON_BUILD_OBJECT( - 'created_at', metadata::json->'created_at', - 'updated_at', metadata::json->'updated_at' + JSONB_BUILD_OBJECT( + 'created_at', metadata::jsonb->'created_at', + 'updated_at', metadata::jsonb->'updated_at' ) AS metadata, - JSON_BUILD_OBJECT( + JSONB_BUILD_OBJECT( 'subject_sets', - JSON_BUILD_ARRAY( - JSON_BUILD_OBJECT( - 'condition_groups', JSON_BUILD_ARRAY( - JSON_BUILD_OBJECT( + JSONB_BUILD_ARRAY( + JSONB_BUILD_OBJECT( + 'condition_groups', JSONB_BUILD_ARRAY( + JSONB_BUILD_OBJECT( 'boolean_operator', 'AND', - 'conditions', JSON_BUILD_ARRAY( - JSON_BUILD_OBJECT( + 'conditions', JSONB_BUILD_ARRAY( + JSONB_BUILD_OBJECT( 'operator', operator, 'subject_external_field', subject_attribute, 'subject_external_values', subject_attribute_values diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index 3d8cbca900..36c1ac5421 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -14,7 +14,6 @@ import ( _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" reflect "reflect" sync "sync" ) @@ -472,18 +471,20 @@ func (x *SubjectMapping) GetMetadata() *common.Metadata { return nil } -// A Representation of a subject as attribute->value pairs. This would mirror user attributes retrieved +// A property of a Subject/Entity as a field->value pair. This would mirror external user attributes retrieved // from an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc. -type Subject struct { +// For now, a valid property must contain both field & value. +type SubjectProperty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Attributes *structpb.Struct `protobuf:"bytes,1,opt,name=attributes,proto3" json:"attributes,omitempty"` + ExternalField string `protobuf:"bytes,1,opt,name=external_field,json=externalField,proto3" json:"external_field,omitempty"` + ExternalValue string `protobuf:"bytes,2,opt,name=external_value,json=externalValue,proto3" json:"external_value,omitempty"` } -func (x *Subject) Reset() { - *x = Subject{} +func (x *SubjectProperty) Reset() { + *x = SubjectProperty{} if protoimpl.UnsafeEnabled { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -491,13 +492,13 @@ func (x *Subject) Reset() { } } -func (x *Subject) String() string { +func (x *SubjectProperty) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Subject) ProtoMessage() {} +func (*SubjectProperty) ProtoMessage() {} -func (x *Subject) ProtoReflect() protoreflect.Message { +func (x *SubjectProperty) ProtoReflect() protoreflect.Message { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -509,25 +510,42 @@ func (x *Subject) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Subject.ProtoReflect.Descriptor instead. -func (*Subject) Descriptor() ([]byte, []int) { +// Deprecated: Use SubjectProperty.ProtoReflect.Descriptor instead. +func (*SubjectProperty) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{5} } -func (x *Subject) GetAttributes() *structpb.Struct { +func (x *SubjectProperty) GetExternalField() string { if x != nil { - return x.Attributes + return x.ExternalField } - return nil + return "" +} + +func (x *SubjectProperty) GetExternalValue() string { + if x != nil { + return x.ExternalValue + } + return "" } +// MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned +// if there is any single condition found among the structures that matches for one of the provided properties: +// 1. The external field, external value, and an IN operator +// 2. The external field, _no_ external value, and a NOT_IN operator +// +// Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping +// in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no +// logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum +// initial filter. +// +// NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned. type MatchSubjectMappingsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Required - Subject *Subject `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + SubjectProperties []*SubjectProperty `protobuf:"bytes,1,rep,name=subject_properties,json=subjectProperties,proto3" json:"subject_properties,omitempty"` } func (x *MatchSubjectMappingsRequest) Reset() { @@ -562,9 +580,9 @@ func (*MatchSubjectMappingsRequest) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{6} } -func (x *MatchSubjectMappingsRequest) GetSubject() *Subject { +func (x *MatchSubjectMappingsRequest) GetSubjectProperties() []*SubjectProperty { if x != nil { - return x.Subject + return x.SubjectProperties } return nil } @@ -1727,224 +1745,252 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x01, 0x0a, 0x09, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x5a, 0x0a, - 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x31, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, - 0x75, 0x6d, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x4a, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, - 0x01, 0x02, 0x08, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x67, 0x0a, 0x10, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x70, 0x6f, 0x6c, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x01, 0x0a, 0x09, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, + 0x5a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x31, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x4a, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, - 0x65, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0b, 0xba, 0x48, 0x08, - 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, - 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x68, 0x0a, 0x0a, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x12, 0x5a, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x6e, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xba, 0x48, + 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x67, 0x0a, 0x10, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, + 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0b, 0xba, + 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x62, 0x6f, 0x6f, 0x6c, + 0x65, 0x61, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x68, 0x0a, 0x0a, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x12, 0x5a, 0x0a, 0x10, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, + 0x01, 0x02, 0x08, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4e, 0x0a, + 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, 0x2c, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa2, 0x02, 0x0a, 0x0e, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, + 0x0a, 0x0f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, + 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, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x6f, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x12, 0x2d, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x74, 0x0a, 0x1b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x55, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x52, 0x11, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x70, 0x0a, 0x1c, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, - 0x08, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4e, 0x0a, 0x0c, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x53, 0x65, 0x74, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xa2, 0x02, 0x0a, 0x0e, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x0f, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x0e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, - 0x2f, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 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, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x42, - 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x22, 0x57, 0x0a, 0x1b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x70, 0x0a, 0x1c, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x10, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x32, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x6b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, - 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0e, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x1c, - 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6f, 0x0a, 0x1b, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x10, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xfa, 0x02, - 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, - 0x12, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, - 0x01, 0x52, 0x10, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x03, 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, 0x42, 0x08, 0xba, 0x48, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x48, - 0x0a, 0x21, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x65, 0x78, 0x69, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x6b, 0x0a, 0x19, 0x6e, 0x65, 0x77, 0x5f, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x16, 0x6e, - 0x65, 0x77, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6e, 0x0a, 0x1c, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x32, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6b, 0x0a, + 0x19, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0xaa, 0x02, 0x0a, 0x1b, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 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, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x08, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x54, 0x0a, 0x18, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x65, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, - 0x16, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, - 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x22, 0x6e, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x35, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6e, - 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, - 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0e, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x37, - 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, - 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0xe7, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, + 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x1c, 0x0a, 0x1a, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6f, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xfa, 0x02, 0x0a, 0x1b, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x12, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x10, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x12, + 0x39, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x48, 0x0a, 0x21, 0x65, 0x78, + 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x65, 0x0a, 0x1b, 0x61, 0x73, - 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x65, 0x74, 0x49, 0x64, 0x12, 0x6b, 0x0a, 0x19, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x16, 0x6e, 0x65, 0x77, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x6e, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x19, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, - 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, - 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x19, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0xaa, 0x02, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x37, + 0x0a, 0x18, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 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, + 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x75, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x54, 0x0a, + 0x18, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x16, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x65, 0x68, 0x61, 0x76, + 0x69, 0x6f, 0x72, 0x22, 0x6e, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x22, 0x35, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6e, 0x0a, 0x1c, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0f, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x37, 0x0a, 0x1d, 0x47, 0x65, + 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x02, 0x69, 0x64, 0x22, 0xe7, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x65, 0x0a, 0x1b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x52, 0x19, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x21, 0x0a, + 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x84, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x42, 0x08, + 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x88, 0x01, 0x0a, 0x20, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, + 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0c, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, - 0x65, 0x74, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x75, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x88, - 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x8b, 0x02, 0x0a, 0x20, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x44, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, + 0x74, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, 0x33, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x54, 0x0a, 0x18, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, + 0x65, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x75, + 0x6d, 0x52, 0x16, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, @@ -1952,197 +1998,172 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, - 0x8b, 0x02, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x44, 0x0a, 0x0c, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x53, 0x65, 0x74, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, - 0x74, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x54, 0x0a, 0x18, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, - 0x69, 0x6f, 0x72, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x16, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x22, 0x83, 0x01, - 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x83, 0x01, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x2a, 0x9b, 0x01, 0x0a, 0x1a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x2d, 0x0a, 0x29, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, - 0x4d, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, - 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d, - 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, - 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x28, 0x0a, 0x24, 0x53, 0x55, 0x42, - 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x50, 0x45, - 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, - 0x4e, 0x10, 0x02, 0x2a, 0x90, 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, - 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, - 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, - 0x1f, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x45, - 0x41, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x41, 0x4e, 0x44, - 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, - 0x4d, 0x5f, 0x4f, 0x52, 0x10, 0x02, 0x32, 0xe0, 0x0e, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0xa9, 0x01, 0x0a, 0x14, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, + 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x21, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x2a, 0x9b, 0x01, 0x0a, 0x1a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x2d, 0x0a, 0x29, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x50, 0x50, + 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x55, + 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x24, 0x0a, 0x20, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x50, 0x50, 0x49, + 0x4e, 0x47, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x55, 0x4d, + 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x28, 0x0a, 0x24, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, + 0x5f, 0x4d, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, + 0x52, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x10, 0x02, 0x2a, + 0x90, 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, + 0x6c, 0x65, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x27, + 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, + 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x4f, 0x4e, + 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x41, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x22, + 0x0a, 0x1e, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, + 0x45, 0x41, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4f, 0x52, + 0x10, 0x02, 0x32, 0xeb, 0x0e, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb4, 0x01, 0x0a, + 0x14, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x12, 0x97, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x31, 0x2e, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, + 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x07, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x97, 0x01, 0x0a, - 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x73, 0x12, 0x31, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x96, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x2e, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, - 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 0x16, 0x2f, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x33, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x96, 0x01, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, + 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, + 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, + 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, + 0x3a, 0x01, 0x2a, 0x32, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x14, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xac, 0x01, + 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 0x2e, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x73, 0x12, 0x36, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, + 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, + 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, + 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x12, 0x34, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x12, 0x37, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x38, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, - 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, + 0xb7, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 0x2e, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x38, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x21, 0x3a, 0x01, 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x12, 0x37, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, + 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x38, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, - 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xf4, 0x01, 0x0a, 0x29, 0x69, 0x6f, - 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x42, 0x13, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, - 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, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xa2, 0x02, 0x03, - 0x50, 0x53, 0x58, 0xaa, 0x02, 0x15, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x15, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x5c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x21, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5c, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x3a, 0x3a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x42, 0xf4, 0x01, 0x0a, 0x29, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2e, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x42, 0x13, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 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, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0xa2, 0x02, 0x03, 0x50, 0x53, 0x58, 0xaa, 0x02, 0x15, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0xca, 0x02, 0x15, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5c, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x21, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x5c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x16, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x3a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2167,7 +2188,7 @@ var file_policy_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ (*SubjectSet)(nil), // 4: policy.subjectmapping.SubjectSet (*SubjectConditionSet)(nil), // 5: policy.subjectmapping.SubjectConditionSet (*SubjectMapping)(nil), // 6: policy.subjectmapping.SubjectMapping - (*Subject)(nil), // 7: policy.subjectmapping.Subject + (*SubjectProperty)(nil), // 7: policy.subjectmapping.SubjectProperty (*MatchSubjectMappingsRequest)(nil), // 8: policy.subjectmapping.MatchSubjectMappingsRequest (*MatchSubjectMappingsResponse)(nil), // 9: policy.subjectmapping.MatchSubjectMappingsResponse (*GetSubjectMappingRequest)(nil), // 10: policy.subjectmapping.GetSubjectMappingRequest @@ -2194,9 +2215,8 @@ var file_policy_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ (*common.Metadata)(nil), // 31: common.Metadata (*attributes.Value)(nil), // 32: policy.attributes.Value (*authorization.Action)(nil), // 33: authorization.Action - (*structpb.Struct)(nil), // 34: google.protobuf.Struct - (*common.MetadataMutable)(nil), // 35: common.MetadataMutable - (common.MetadataUpdateEnum)(0), // 36: common.MetadataUpdateEnum + (*common.MetadataMutable)(nil), // 34: common.MetadataMutable + (common.MetadataUpdateEnum)(0), // 35: common.MetadataUpdateEnum } var file_policy_subjectmapping_subject_mapping_proto_depIdxs = []int32{ 0, // 0: policy.subjectmapping.Condition.operator:type_name -> policy.subjectmapping.SubjectMappingOperatorEnum @@ -2209,59 +2229,58 @@ var file_policy_subjectmapping_subject_mapping_proto_depIdxs = []int32{ 5, // 7: policy.subjectmapping.SubjectMapping.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet 33, // 8: policy.subjectmapping.SubjectMapping.actions:type_name -> authorization.Action 31, // 9: policy.subjectmapping.SubjectMapping.metadata:type_name -> common.Metadata - 34, // 10: policy.subjectmapping.Subject.attributes:type_name -> google.protobuf.Struct - 7, // 11: policy.subjectmapping.MatchSubjectMappingsRequest.subject:type_name -> policy.subjectmapping.Subject - 6, // 12: policy.subjectmapping.MatchSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 6, // 13: policy.subjectmapping.GetSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 6, // 14: policy.subjectmapping.ListSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 33, // 15: policy.subjectmapping.CreateSubjectMappingRequest.actions:type_name -> authorization.Action - 24, // 16: policy.subjectmapping.CreateSubjectMappingRequest.new_subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate - 35, // 17: policy.subjectmapping.CreateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable - 6, // 18: policy.subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 33, // 19: policy.subjectmapping.UpdateSubjectMappingRequest.actions:type_name -> authorization.Action - 35, // 20: policy.subjectmapping.UpdateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable - 36, // 21: policy.subjectmapping.UpdateSubjectMappingRequest.metadata_update_behavior:type_name -> common.MetadataUpdateEnum - 6, // 22: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 6, // 23: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 5, // 24: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 6, // 25: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 5, // 26: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet - 4, // 27: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet - 35, // 28: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable - 24, // 29: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate - 5, // 30: policy.subjectmapping.CreateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 4, // 31: policy.subjectmapping.UpdateSubjectConditionSetRequest.subject_sets:type_name -> policy.subjectmapping.SubjectSet - 35, // 32: policy.subjectmapping.UpdateSubjectConditionSetRequest.metadata:type_name -> common.MetadataMutable - 36, // 33: policy.subjectmapping.UpdateSubjectConditionSetRequest.metadata_update_behavior:type_name -> common.MetadataUpdateEnum - 5, // 34: policy.subjectmapping.UpdateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 5, // 35: policy.subjectmapping.DeleteSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 8, // 36: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest - 12, // 37: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest - 10, // 38: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest - 14, // 39: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest - 16, // 40: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest - 18, // 41: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest - 22, // 42: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest - 20, // 43: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest - 25, // 44: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest - 27, // 45: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest - 29, // 46: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest - 9, // 47: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse - 13, // 48: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse - 11, // 49: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse - 15, // 50: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse - 17, // 51: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse - 19, // 52: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse - 23, // 53: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse - 21, // 54: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse - 26, // 55: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse - 28, // 56: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse - 30, // 57: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse - 47, // [47:58] is the sub-list for method output_type - 36, // [36:47] is the sub-list for method input_type - 36, // [36:36] is the sub-list for extension type_name - 36, // [36:36] is the sub-list for extension extendee - 0, // [0:36] is the sub-list for field type_name + 7, // 10: policy.subjectmapping.MatchSubjectMappingsRequest.subject_properties:type_name -> policy.subjectmapping.SubjectProperty + 6, // 11: policy.subjectmapping.MatchSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 6, // 12: policy.subjectmapping.GetSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 6, // 13: policy.subjectmapping.ListSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 33, // 14: policy.subjectmapping.CreateSubjectMappingRequest.actions:type_name -> authorization.Action + 24, // 15: policy.subjectmapping.CreateSubjectMappingRequest.new_subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate + 34, // 16: policy.subjectmapping.CreateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable + 6, // 17: policy.subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 33, // 18: policy.subjectmapping.UpdateSubjectMappingRequest.actions:type_name -> authorization.Action + 34, // 19: policy.subjectmapping.UpdateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable + 35, // 20: policy.subjectmapping.UpdateSubjectMappingRequest.metadata_update_behavior:type_name -> common.MetadataUpdateEnum + 6, // 21: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 6, // 22: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 5, // 23: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 6, // 24: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 5, // 25: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet + 4, // 26: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet + 34, // 27: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable + 24, // 28: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate + 5, // 29: policy.subjectmapping.CreateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 4, // 30: policy.subjectmapping.UpdateSubjectConditionSetRequest.subject_sets:type_name -> policy.subjectmapping.SubjectSet + 34, // 31: policy.subjectmapping.UpdateSubjectConditionSetRequest.metadata:type_name -> common.MetadataMutable + 35, // 32: policy.subjectmapping.UpdateSubjectConditionSetRequest.metadata_update_behavior:type_name -> common.MetadataUpdateEnum + 5, // 33: policy.subjectmapping.UpdateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 5, // 34: policy.subjectmapping.DeleteSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 8, // 35: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest + 12, // 36: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest + 10, // 37: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest + 14, // 38: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest + 16, // 39: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest + 18, // 40: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest + 22, // 41: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest + 20, // 42: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest + 25, // 43: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest + 27, // 44: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest + 29, // 45: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest + 9, // 46: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse + 13, // 47: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse + 11, // 48: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse + 15, // 49: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse + 17, // 50: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse + 19, // 51: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse + 23, // 52: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse + 21, // 53: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse + 26, // 54: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse + 28, // 55: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse + 30, // 56: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse + 46, // [46:57] is the sub-list for method output_type + 35, // [35:46] is the sub-list for method input_type + 35, // [35:35] is the sub-list for extension type_name + 35, // [35:35] is the sub-list for extension extendee + 0, // [0:35] is the sub-list for field type_name } func init() { file_policy_subjectmapping_subject_mapping_proto_init() } @@ -2331,7 +2350,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Subject); i { + switch v := v.(*SubjectProperty); i { case 0: return &v.state case 1: diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go index 686a2d8b89..e3c38dd373 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go @@ -39,7 +39,7 @@ func request_SubjectMappingService_MatchSubjectMappings_0(ctx context.Context, m if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Subject); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SubjectProperties); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -56,7 +56,7 @@ func local_request_SubjectMappingService_MatchSubjectMappings_0(ctx context.Cont if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Subject); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SubjectProperties); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java index 4e1e4abdcf..96a6adcb3e 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java @@ -5,6 +5,20 @@ package io.opentdf.platform.policy.subjectmapping; /** + *
    + * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned
    + * if there is any single condition found among the structures that matches for one of the provided properties:
    + * 1. The external field, external value, and an IN operator
    + * 2. The external field, _no_ external value, and a NOT_IN operator
    + *
    + * Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping
    + * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no
    + * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum
    + * initial filter.
    + *
    + * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned.
    + * 
    + * * Protobuf type {@code policy.subjectmapping.MatchSubjectMappingsRequest} */ public final class MatchSubjectMappingsRequest extends @@ -17,6 +31,7 @@ private MatchSubjectMappingsRequest(com.google.protobuf.GeneratedMessageV3.Build super(builder); } private MatchSubjectMappingsRequest() { + subjectProperties_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -39,43 +54,45 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.class, io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.Builder.class); } - private int bitField0_; - public static final int SUBJECT_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.Subject subject_; + public static final int SUBJECT_PROPERTIES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List subjectProperties_; /** - *
    -   * Required
    -   * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; - * @return Whether the subject field is set. + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ @java.lang.Override - public boolean hasSubject() { - return ((bitField0_ & 0x00000001) != 0); + public java.util.List getSubjectPropertiesList() { + return subjectProperties_; } /** - *
    -   * Required
    -   * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; - * @return The subject. + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.Subject getSubject() { - return subject_ == null ? io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance() : subject_; + public java.util.List + getSubjectPropertiesOrBuilderList() { + return subjectProperties_; } /** - *
    -   * Required
    -   * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + @java.lang.Override + public int getSubjectPropertiesCount() { + return subjectProperties_.size(); + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectProperty getSubjectProperties(int index) { + return subjectProperties_.get(index); + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder getSubjectOrBuilder() { - return subject_ == null ? io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance() : subject_; + public io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder getSubjectPropertiesOrBuilder( + int index) { + return subjectProperties_.get(index); } private byte memoizedIsInitialized = -1; @@ -92,8 +109,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubject()); + for (int i = 0; i < subjectProperties_.size(); i++) { + output.writeMessage(1, subjectProperties_.get(i)); } getUnknownFields().writeTo(output); } @@ -104,9 +121,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { + for (int i = 0; i < subjectProperties_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubject()); + .computeMessageSize(1, subjectProperties_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -123,11 +140,8 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest other = (io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest) obj; - if (hasSubject() != other.hasSubject()) return false; - if (hasSubject()) { - if (!getSubject() - .equals(other.getSubject())) return false; - } + if (!getSubjectPropertiesList() + .equals(other.getSubjectPropertiesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -139,9 +153,9 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubject()) { - hash = (37 * hash) + SUBJECT_FIELD_NUMBER; - hash = (53 * hash) + getSubject().hashCode(); + if (getSubjectPropertiesCount() > 0) { + hash = (37 * hash) + SUBJECT_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getSubjectPropertiesList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -241,6 +255,20 @@ protected Builder newBuilderForType( return builder; } /** + *
    +   * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned
    +   * if there is any single condition found among the structures that matches for one of the provided properties:
    +   * 1. The external field, external value, and an IN operator
    +   * 2. The external field, _no_ external value, and a NOT_IN operator
    +   *
    +   * Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping
    +   * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no
    +   * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum
    +   * initial filter.
    +   *
    +   * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned.
    +   * 
    + * * Protobuf type {@code policy.subjectmapping.MatchSubjectMappingsRequest} */ public static final class Builder extends @@ -262,29 +290,25 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - subject_ = null; - if (subjectBuilder_ != null) { - subjectBuilder_.dispose(); - subjectBuilder_ = null; + if (subjectPropertiesBuilder_ == null) { + subjectProperties_ = java.util.Collections.emptyList(); + } else { + subjectProperties_ = null; + subjectPropertiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -311,21 +335,26 @@ public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest bui @java.lang.Override public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest buildPartial() { io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result = new io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result) { + if (subjectPropertiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subjectProperties_ = java.util.Collections.unmodifiableList(subjectProperties_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subjectProperties_ = subjectProperties_; + } else { + result.subjectProperties_ = subjectPropertiesBuilder_.build(); + } + } + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subject_ = subjectBuilder_ == null - ? subject_ - : subjectBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -372,8 +401,31 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest other) { if (other == io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.getDefaultInstance()) return this; - if (other.hasSubject()) { - mergeSubject(other.getSubject()); + if (subjectPropertiesBuilder_ == null) { + if (!other.subjectProperties_.isEmpty()) { + if (subjectProperties_.isEmpty()) { + subjectProperties_ = other.subjectProperties_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.addAll(other.subjectProperties_); + } + onChanged(); + } + } else { + if (!other.subjectProperties_.isEmpty()) { + if (subjectPropertiesBuilder_.isEmpty()) { + subjectPropertiesBuilder_.dispose(); + subjectPropertiesBuilder_ = null; + subjectProperties_ = other.subjectProperties_; + bitField0_ = (bitField0_ & ~0x00000001); + subjectPropertiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectPropertiesFieldBuilder() : null; + } else { + subjectPropertiesBuilder_.addAllMessages(other.subjectProperties_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -402,10 +454,16 @@ public Builder mergeFrom( done = true; break; case 10: { - input.readMessage( - getSubjectFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; + io.opentdf.platform.policy.subjectmapping.SubjectProperty m = + input.readMessage( + io.opentdf.platform.policy.subjectmapping.SubjectProperty.parser(), + extensionRegistry); + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(m); + } else { + subjectPropertiesBuilder_.addMessage(m); + } break; } // case 10 default: { @@ -425,161 +483,244 @@ public Builder mergeFrom( } private int bitField0_; - private io.opentdf.platform.policy.subjectmapping.Subject subject_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.Subject, io.opentdf.platform.policy.subjectmapping.Subject.Builder, io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder> subjectBuilder_; + private java.util.List subjectProperties_ = + java.util.Collections.emptyList(); + private void ensureSubjectPropertiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subjectProperties_ = new java.util.ArrayList(subjectProperties_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectProperty, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder, io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder> subjectPropertiesBuilder_; + /** - *
    -     * Required
    -     * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; - * @return Whether the subject field is set. + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public boolean hasSubject() { - return ((bitField0_ & 0x00000001) != 0); + public java.util.List getSubjectPropertiesList() { + if (subjectPropertiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectProperties_); + } else { + return subjectPropertiesBuilder_.getMessageList(); + } } /** - *
    -     * Required
    -     * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; - * @return The subject. + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public io.opentdf.platform.policy.subjectmapping.Subject getSubject() { - if (subjectBuilder_ == null) { - return subject_ == null ? io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance() : subject_; + public int getSubjectPropertiesCount() { + if (subjectPropertiesBuilder_ == null) { + return subjectProperties_.size(); } else { - return subjectBuilder_.getMessage(); + return subjectPropertiesBuilder_.getCount(); } } /** - *
    -     * Required
    -     * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public Builder setSubject(io.opentdf.platform.policy.subjectmapping.Subject value) { - if (subjectBuilder_ == null) { + public io.opentdf.platform.policy.subjectmapping.SubjectProperty getSubjectProperties(int index) { + if (subjectPropertiesBuilder_ == null) { + return subjectProperties_.get(index); + } else { + return subjectPropertiesBuilder_.getMessage(index); + } + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder setSubjectProperties( + int index, io.opentdf.platform.policy.subjectmapping.SubjectProperty value) { + if (subjectPropertiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - subject_ = value; + ensureSubjectPropertiesIsMutable(); + subjectProperties_.set(index, value); + onChanged(); } else { - subjectBuilder_.setMessage(value); + subjectPropertiesBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000001; - onChanged(); return this; } /** - *
    -     * Required
    -     * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public Builder setSubject( - io.opentdf.platform.policy.subjectmapping.Subject.Builder builderForValue) { - if (subjectBuilder_ == null) { - subject_ = builderForValue.build(); + public Builder setSubjectProperties( + int index, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder builderForValue) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.set(index, builderForValue.build()); + onChanged(); } else { - subjectBuilder_.setMessage(builderForValue.build()); + subjectPropertiesBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000001; - onChanged(); return this; } /** - *
    -     * Required
    -     * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public Builder mergeSubject(io.opentdf.platform.policy.subjectmapping.Subject value) { - if (subjectBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subject_ != null && - subject_ != io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance()) { - getSubjectBuilder().mergeFrom(value); - } else { - subject_ = value; + public Builder addSubjectProperties(io.opentdf.platform.policy.subjectmapping.SubjectProperty value) { + if (subjectPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(value); + onChanged(); } else { - subjectBuilder_.mergeFrom(value); + subjectPropertiesBuilder_.addMessage(value); } - if (subject_ != null) { - bitField0_ |= 0x00000001; + return this; + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder addSubjectProperties( + int index, io.opentdf.platform.policy.subjectmapping.SubjectProperty value) { + if (subjectPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(index, value); onChanged(); + } else { + subjectPropertiesBuilder_.addMessage(index, value); } return this; } /** - *
    -     * Required
    -     * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public Builder clearSubject() { - bitField0_ = (bitField0_ & ~0x00000001); - subject_ = null; - if (subjectBuilder_ != null) { - subjectBuilder_.dispose(); - subjectBuilder_ = null; + public Builder addSubjectProperties( + io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder builderForValue) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(builderForValue.build()); + onChanged(); + } else { + subjectPropertiesBuilder_.addMessage(builderForValue.build()); } - onChanged(); return this; } /** - *
    -     * Required
    -     * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public io.opentdf.platform.policy.subjectmapping.Subject.Builder getSubjectBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectFieldBuilder().getBuilder(); + public Builder addSubjectProperties( + int index, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder builderForValue) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectPropertiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder addAllSubjectProperties( + java.lang.Iterable values) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectProperties_); + onChanged(); + } else { + subjectPropertiesBuilder_.addAllMessages(values); + } + return this; } /** - *
    -     * Required
    -     * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder getSubjectOrBuilder() { - if (subjectBuilder_ != null) { - return subjectBuilder_.getMessageOrBuilder(); + public Builder clearSubjectProperties() { + if (subjectPropertiesBuilder_ == null) { + subjectProperties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subjectPropertiesBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder removeSubjectProperties(int index) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.remove(index); + onChanged(); } else { - return subject_ == null ? - io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance() : subject_; + subjectPropertiesBuilder_.remove(index); } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder getSubjectPropertiesBuilder( + int index) { + return getSubjectPropertiesFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder getSubjectPropertiesOrBuilder( + int index) { + if (subjectPropertiesBuilder_ == null) { + return subjectProperties_.get(index); } else { + return subjectPropertiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public java.util.List + getSubjectPropertiesOrBuilderList() { + if (subjectPropertiesBuilder_ != null) { + return subjectPropertiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectProperties_); + } + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder addSubjectPropertiesBuilder() { + return getSubjectPropertiesFieldBuilder().addBuilder( + io.opentdf.platform.policy.subjectmapping.SubjectProperty.getDefaultInstance()); + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder addSubjectPropertiesBuilder( + int index) { + return getSubjectPropertiesFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.subjectmapping.SubjectProperty.getDefaultInstance()); } /** - *
    -     * Required
    -     * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.Subject, io.opentdf.platform.policy.subjectmapping.Subject.Builder, io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder> - getSubjectFieldBuilder() { - if (subjectBuilder_ == null) { - subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.Subject, io.opentdf.platform.policy.subjectmapping.Subject.Builder, io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder>( - getSubject(), + public java.util.List + getSubjectPropertiesBuilderList() { + return getSubjectPropertiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectProperty, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder, io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder> + getSubjectPropertiesFieldBuilder() { + if (subjectPropertiesBuilder_ == null) { + subjectPropertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectProperty, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder, io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder>( + subjectProperties_, + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - subject_ = null; + subjectProperties_ = null; } - return subjectBuilder_; + return subjectPropertiesBuilder_; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java index b6fc529b65..2ac0dadd64 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java @@ -9,29 +9,26 @@ public interface MatchSubjectMappingsRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - *
    -   * Required
    -   * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; - * @return Whether the subject field is set. + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - boolean hasSubject(); + java.util.List + getSubjectPropertiesList(); /** - *
    -   * Required
    -   * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; - * @return The subject. + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - io.opentdf.platform.policy.subjectmapping.Subject getSubject(); + io.opentdf.platform.policy.subjectmapping.SubjectProperty getSubjectProperties(int index); /** - *
    -   * Required
    -   * 
    - * - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder getSubjectOrBuilder(); + int getSubjectPropertiesCount(); + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + java.util.List + getSubjectPropertiesOrBuilderList(); + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder getSubjectPropertiesOrBuilder( + int index); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java index 91e0a5301b..c5dbeebec9 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java @@ -41,10 +41,10 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_subjectmapping_SubjectMapping_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_Subject_descriptor; + internal_static_policy_subjectmapping_SubjectProperty_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_Subject_fieldAccessorTable; + internal_static_policy_subjectmapping_SubjectProperty_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor; static final @@ -173,173 +173,174 @@ public static void registerAllExtensions( "proto\022\025policy.subjectmapping\032!authorizat" + "ion/authorization.proto\032\033buf/validate/va" + "lidate.proto\032\023common/common.proto\032\034googl" + - "e/api/annotations.proto\032\034google/protobuf" + - "/struct.proto\032\"policy/attributes/attribu" + - "tes.proto\"\325\001\n\tCondition\0224\n\026subject_exter" + - "nal_field\030\001 \001(\tR\024subjectExternalField\022Z\n" + - "\010operator\030\002 \001(\01621.policy.subjectmapping." + - "SubjectMappingOperatorEnumB\013\272H\010\202\001\002\020\001\310\001\001R" + - "\010operator\0226\n\027subject_external_values\030\003 \003" + - "(\tR\025subjectExternalValues\"\305\001\n\016ConditionG" + - "roup\022J\n\nconditions\030\001 \003(\0132 .policy.subjec" + - "tmapping.ConditionB\010\272H\005\222\001\002\010\001R\nconditions" + - "\022g\n\020boolean_operator\030\002 \001(\0162/.policy.subj" + - "ectmapping.ConditionBooleanTypeEnumB\013\272H\010" + - "\202\001\002\020\001\310\001\001R\017booleanOperator\"h\n\nSubjectSet\022" + - "Z\n\020condition_groups\030\001 \003(\0132%.policy.subje" + - "ctmapping.ConditionGroupB\010\272H\005\222\001\002\010\001R\017cond" + - "itionGroups\"\243\001\n\023SubjectConditionSet\022\016\n\002i" + - "d\030\001 \001(\tR\002id\022N\n\014subject_sets\030\003 \003(\0132!.poli" + - "cy.subjectmapping.SubjectSetB\010\272H\005\222\001\002\010\001R\013" + - "subjectSets\022,\n\010metadata\030d \001(\0132\020.common.M" + - "etadataR\010metadata\"\242\002\n\016SubjectMapping\022\016\n\002" + - "id\030\001 \001(\tR\002id\022A\n\017attribute_value\030\002 \001(\0132\030." + - "policy.attributes.ValueR\016attributeValue\022" + - "^\n\025subject_condition_set\030\003 \001(\0132*.policy." + - "subjectmapping.SubjectConditionSetR\023subj" + - "ectConditionSet\022/\n\007actions\030\004 \003(\0132\025.autho" + - "rization.ActionR\007actions\022,\n\010metadata\030d \001" + - "(\0132\020.common.MetadataR\010metadata\"B\n\007Subjec" + - "t\0227\n\nattributes\030\001 \001(\0132\027.google.protobuf." + - "StructR\nattributes\"W\n\033MatchSubjectMappin" + - "gsRequest\0228\n\007subject\030\001 \001(\0132\036.policy.subj" + - "ectmapping.SubjectR\007subject\"p\n\034MatchSubj" + - "ectMappingsResponse\022P\n\020subject_mappings\030" + - "\001 \003(\0132%.policy.subjectmapping.SubjectMap" + - "pingR\017subjectMappings\"2\n\030GetSubjectMappi" + - "ngRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"k\n\031Get" + + "e/api/annotations.proto\032\"policy/attribut" + + "es/attributes.proto\"\325\001\n\tCondition\0224\n\026sub" + + "ject_external_field\030\001 \001(\tR\024subjectExtern" + + "alField\022Z\n\010operator\030\002 \001(\01621.policy.subje" + + "ctmapping.SubjectMappingOperatorEnumB\013\272H" + + "\010\202\001\002\020\001\310\001\001R\010operator\0226\n\027subject_external_" + + "values\030\003 \003(\tR\025subjectExternalValues\"\305\001\n\016" + + "ConditionGroup\022J\n\nconditions\030\001 \003(\0132 .pol" + + "icy.subjectmapping.ConditionB\010\272H\005\222\001\002\010\001R\n" + + "conditions\022g\n\020boolean_operator\030\002 \001(\0162/.p" + + "olicy.subjectmapping.ConditionBooleanTyp" + + "eEnumB\013\272H\010\202\001\002\020\001\310\001\001R\017booleanOperator\"h\n\nS" + + "ubjectSet\022Z\n\020condition_groups\030\001 \003(\0132%.po" + + "licy.subjectmapping.ConditionGroupB\010\272H\005\222" + + "\001\002\010\001R\017conditionGroups\"\243\001\n\023SubjectConditi" + + "onSet\022\016\n\002id\030\001 \001(\tR\002id\022N\n\014subject_sets\030\003 " + + "\003(\0132!.policy.subjectmapping.SubjectSetB\010" + + "\272H\005\222\001\002\010\001R\013subjectSets\022,\n\010metadata\030d \001(\0132" + + "\020.common.MetadataR\010metadata\"\242\002\n\016SubjectM" + + "apping\022\016\n\002id\030\001 \001(\tR\002id\022A\n\017attribute_valu" + + "e\030\002 \001(\0132\030.policy.attributes.ValueR\016attri" + + "buteValue\022^\n\025subject_condition_set\030\003 \001(\013" + + "2*.policy.subjectmapping.SubjectConditio" + + "nSetR\023subjectConditionSet\022/\n\007actions\030\004 \003" + + "(\0132\025.authorization.ActionR\007actions\022,\n\010me" + + "tadata\030d \001(\0132\020.common.MetadataR\010metadata" + + "\"o\n\017SubjectProperty\022-\n\016external_field\030\001 " + + "\001(\tB\006\272H\003\310\001\001R\rexternalField\022-\n\016external_v" + + "alue\030\002 \001(\tB\006\272H\003\310\001\001R\rexternalValue\"t\n\033Mat" + + "chSubjectMappingsRequest\022U\n\022subject_prop" + + "erties\030\001 \003(\0132&.policy.subjectmapping.Sub" + + "jectPropertyR\021subjectProperties\"p\n\034Match" + + "SubjectMappingsResponse\022P\n\020subject_mappi" + + "ngs\030\001 \003(\0132%.policy.subjectmapping.Subjec" + + "tMappingR\017subjectMappings\"2\n\030GetSubjectM" + + "appingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"k\n" + + "\031GetSubjectMappingResponse\022N\n\017subject_ma" + + "pping\030\001 \001(\0132%.policy.subjectmapping.Subj" + + "ectMappingR\016subjectMapping\"\034\n\032ListSubjec" + + "tMappingsRequest\"o\n\033ListSubjectMappingsR" + + "esponse\022P\n\020subject_mappings\030\001 \003(\0132%.poli" + + "cy.subjectmapping.SubjectMappingR\017subjec" + + "tMappings\"\372\002\n\033CreateSubjectMappingReques" + + "t\0224\n\022attribute_value_id\030\001 \001(\tB\006\272H\003\310\001\001R\020a" + + "ttributeValueId\0229\n\007actions\030\002 \003(\0132\025.autho" + + "rization.ActionB\010\272H\005\222\001\002\010\001R\007actions\022H\n!ex" + + "isting_subject_condition_set_id\030\003 \001(\tR\035e" + + "xistingSubjectConditionSetId\022k\n\031new_subj" + + "ect_condition_set\030\004 \001(\01320.policy.subject" + + "mapping.SubjectConditionSetCreateR\026newSu" + + "bjectConditionSet\0223\n\010metadata\030d \001(\0132\027.co" + + "mmon.MetadataMutableR\010metadata\"n\n\034Create" + "SubjectMappingResponse\022N\n\017subject_mappin" + "g\030\001 \001(\0132%.policy.subjectmapping.SubjectM" + - "appingR\016subjectMapping\"\034\n\032ListSubjectMap" + - "pingsRequest\"o\n\033ListSubjectMappingsRespo" + - "nse\022P\n\020subject_mappings\030\001 \003(\0132%.policy.s" + - "ubjectmapping.SubjectMappingR\017subjectMap" + - "pings\"\372\002\n\033CreateSubjectMappingRequest\0224\n" + - "\022attribute_value_id\030\001 \001(\tB\006\272H\003\310\001\001R\020attri" + - "buteValueId\0229\n\007actions\030\002 \003(\0132\025.authoriza" + - "tion.ActionB\010\272H\005\222\001\002\010\001R\007actions\022H\n!existi" + - "ng_subject_condition_set_id\030\003 \001(\tR\035exist" + - "ingSubjectConditionSetId\022k\n\031new_subject_" + - "condition_set\030\004 \001(\01320.policy.subjectmapp" + - "ing.SubjectConditionSetCreateR\026newSubjec" + - "tConditionSet\0223\n\010metadata\030d \001(\0132\027.common" + - ".MetadataMutableR\010metadata\"n\n\034CreateSubj" + - "ectMappingResponse\022N\n\017subject_mapping\030\001 " + - "\001(\0132%.policy.subjectmapping.SubjectMappi" + - "ngR\016subjectMapping\"\252\002\n\033UpdateSubjectMapp" + - "ingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\0227\n\030su" + - "bject_condition_set_id\030\002 \001(\tR\025subjectCon" + - "ditionSetId\022/\n\007actions\030\003 \003(\0132\025.authoriza" + - "tion.ActionR\007actions\0223\n\010metadata\030d \001(\0132\027" + - ".common.MetadataMutableR\010metadata\022T\n\030met" + - "adata_update_behavior\030e \001(\0162\032.common.Met" + - "adataUpdateEnumR\026metadataUpdateBehavior\"" + - "n\n\034UpdateSubjectMappingResponse\022N\n\017subje" + - "ct_mapping\030\001 \001(\0132%.policy.subjectmapping" + - ".SubjectMappingR\016subjectMapping\"5\n\033Delet" + - "eSubjectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310" + - "\001\001R\002id\"n\n\034DeleteSubjectMappingResponse\022N" + - "\n\017subject_mapping\030\001 \001(\0132%.policy.subject" + - "mapping.SubjectMappingR\016subjectMapping\"7" + - "\n\035GetSubjectConditionSetRequest\022\026\n\002id\030\001 " + - "\001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n\036GetSubjectConditionS" + - "etResponse\022^\n\025subject_condition_set\030\001 \001(" + - "\0132*.policy.subjectmapping.SubjectConditi" + - "onSetR\023subjectConditionSet\022e\n\033associated" + - "_subject_mappings\030\002 \003(\0132%.policy.subject" + - "mapping.SubjectMappingR\031associatedSubjec" + - "tMappings\"!\n\037ListSubjectConditionSetsReq" + - "uest\"\204\001\n ListSubjectConditionSetsRespons" + - "e\022`\n\026subject_condition_sets\030\001 \003(\0132*.poli" + - "cy.subjectmapping.SubjectConditionSetR\024s" + - "ubjectConditionSets\"\240\001\n\031SubjectCondition" + - "SetCreate\022N\n\014subject_sets\030\001 \003(\0132!.policy" + - ".subjectmapping.SubjectSetB\010\272H\005\222\001\002\010\001R\013su" + - "bjectSets\0223\n\010metadata\030d \001(\0132\027.common.Met" + - "adataMutableR\010metadata\"\210\001\n CreateSubject" + - "ConditionSetRequest\022d\n\025subject_condition" + - "_set\030\001 \001(\01320.policy.subjectmapping.Subje" + - "ctConditionSetCreateR\023subjectConditionSe" + - "t\"\203\001\n!CreateSubjectConditionSetResponse\022" + - "^\n\025subject_condition_set\030\001 \001(\0132*.policy." + - "subjectmapping.SubjectConditionSetR\023subj" + - "ectConditionSet\"\213\002\n UpdateSubjectConditi" + - "onSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022D\n\014" + - "subject_sets\030\002 \003(\0132!.policy.subjectmappi" + - "ng.SubjectSetR\013subjectSets\0223\n\010metadata\030d" + - " \001(\0132\027.common.MetadataMutableR\010metadata\022" + - "T\n\030metadata_update_behavior\030e \001(\0162\032.comm" + - "on.MetadataUpdateEnumR\026metadataUpdateBeh" + - "avior\"\203\001\n!UpdateSubjectConditionSetRespo" + + "appingR\016subjectMapping\"\252\002\n\033UpdateSubject" + + "MappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\0227" + + "\n\030subject_condition_set_id\030\002 \001(\tR\025subjec" + + "tConditionSetId\022/\n\007actions\030\003 \003(\0132\025.autho" + + "rization.ActionR\007actions\0223\n\010metadata\030d \001" + + "(\0132\027.common.MetadataMutableR\010metadata\022T\n" + + "\030metadata_update_behavior\030e \001(\0162\032.common" + + ".MetadataUpdateEnumR\026metadataUpdateBehav" + + "ior\"n\n\034UpdateSubjectMappingResponse\022N\n\017s" + + "ubject_mapping\030\001 \001(\0132%.policy.subjectmap" + + "ping.SubjectMappingR\016subjectMapping\"5\n\033D" + + "eleteSubjectMappingRequest\022\026\n\002id\030\001 \001(\tB\006" + + "\272H\003\310\001\001R\002id\"n\n\034DeleteSubjectMappingRespon" + + "se\022N\n\017subject_mapping\030\001 \001(\0132%.policy.sub" + + "jectmapping.SubjectMappingR\016subjectMappi" + + "ng\"7\n\035GetSubjectConditionSetRequest\022\026\n\002i" + + "d\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n\036GetSubjectCondit" + + "ionSetResponse\022^\n\025subject_condition_set\030" + + "\001 \001(\0132*.policy.subjectmapping.SubjectCon" + + "ditionSetR\023subjectConditionSet\022e\n\033associ" + + "ated_subject_mappings\030\002 \003(\0132%.policy.sub" + + "jectmapping.SubjectMappingR\031associatedSu" + + "bjectMappings\"!\n\037ListSubjectConditionSet" + + "sRequest\"\204\001\n ListSubjectConditionSetsRes" + + "ponse\022`\n\026subject_condition_sets\030\001 \003(\0132*." + + "policy.subjectmapping.SubjectConditionSe" + + "tR\024subjectConditionSets\"\240\001\n\031SubjectCondi" + + "tionSetCreate\022N\n\014subject_sets\030\001 \003(\0132!.po" + + "licy.subjectmapping.SubjectSetB\010\272H\005\222\001\002\010\001" + + "R\013subjectSets\0223\n\010metadata\030d \001(\0132\027.common" + + ".MetadataMutableR\010metadata\"\210\001\n CreateSub" + + "jectConditionSetRequest\022d\n\025subject_condi" + + "tion_set\030\001 \001(\01320.policy.subjectmapping.S" + + "ubjectConditionSetCreateR\023subjectConditi" + + "onSet\"\203\001\n!CreateSubjectConditionSetRespo" + "nse\022^\n\025subject_condition_set\030\001 \001(\0132*.pol" + "icy.subjectmapping.SubjectConditionSetR\023" + - "subjectConditionSet\":\n DeleteSubjectCond" + - "itionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"" + - "\203\001\n!DeleteSubjectConditionSetResponse\022^\n" + - "\025subject_condition_set\030\001 \001(\0132*.policy.su" + - "bjectmapping.SubjectConditionSetR\023subjec" + - "tConditionSet*\233\001\n\032SubjectMappingOperator" + - "Enum\022-\n)SUBJECT_MAPPING_OPERATOR_ENUM_UN" + - "SPECIFIED\020\000\022$\n SUBJECT_MAPPING_OPERATOR_" + - "ENUM_IN\020\001\022(\n$SUBJECT_MAPPING_OPERATOR_EN" + - "UM_NOT_IN\020\002*\220\001\n\030ConditionBooleanTypeEnum" + - "\022+\n\'CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIF" + - "IED\020\000\022#\n\037CONDITION_BOOLEAN_TYPE_ENUM_AND" + - "\020\001\022\"\n\036CONDITION_BOOLEAN_TYPE_ENUM_OR\020\0022\340" + - "\016\n\025SubjectMappingService\022\251\001\n\024MatchSubjec" + - "tMappings\0222.policy.subjectmapping.MatchS" + - "ubjectMappingsRequest\0323.policy.subjectma" + - "pping.MatchSubjectMappingsResponse\"(\202\323\344\223" + - "\002\"\"\027/subject-mappings/match:\007subject\022\227\001\n" + - "\023ListSubjectMappings\0221.policy.subjectmap" + - "ping.ListSubjectMappingsRequest\0322.policy" + - ".subjectmapping.ListSubjectMappingsRespo" + - "nse\"\031\202\323\344\223\002\023\022\021/subject-mappings\022\226\001\n\021GetSu" + - "bjectMapping\022/.policy.subjectmapping.Get" + - "SubjectMappingRequest\0320.policy.subjectma" + - "pping.GetSubjectMappingResponse\"\036\202\323\344\223\002\030\022" + - "\026/subject-mappings/{id}\022\235\001\n\024CreateSubjec" + - "tMapping\0222.policy.subjectmapping.CreateS" + - "ubjectMappingRequest\0323.policy.subjectmap" + - "ping.CreateSubjectMappingResponse\"\034\202\323\344\223\002" + - "\026\"\021/subject-mappings:\001*\022\242\001\n\024UpdateSubjec" + - "tMapping\0222.policy.subjectmapping.UpdateS" + - "ubjectMappingRequest\0323.policy.subjectmap" + - "ping.UpdateSubjectMappingResponse\"!\202\323\344\223\002" + - "\0332\026/subject-mappings/{id}:\001*\022\237\001\n\024DeleteS" + - "ubjectMapping\0222.policy.subjectmapping.De" + - "leteSubjectMappingRequest\0323.policy.subje" + - "ctmapping.DeleteSubjectMappingResponse\"\036" + - "\202\323\344\223\002\030*\026/subject-mappings/{id}\022\254\001\n\030ListS" + - "ubjectConditionSets\0226.policy.subjectmapp" + - "ing.ListSubjectConditionSetsRequest\0327.po" + - "licy.subjectmapping.ListSubjectCondition" + - "SetsResponse\"\037\202\323\344\223\002\031\022\027/subject-condition" + - "-sets\022\253\001\n\026GetSubjectConditionSet\0224.polic" + - "y.subjectmapping.GetSubjectConditionSetR" + - "equest\0325.policy.subjectmapping.GetSubjec" + - "tConditionSetResponse\"$\202\323\344\223\002\036\022\034/subject-" + - "condition-sets/{id}\022\262\001\n\031CreateSubjectCon" + - "ditionSet\0227.policy.subjectmapping.Create" + - "SubjectConditionSetRequest\0328.policy.subj" + - "ectmapping.CreateSubjectConditionSetResp" + - "onse\"\"\202\323\344\223\002\034\"\027/subject-condition-sets:\001*" + - "\022\267\001\n\031UpdateSubjectConditionSet\0227.policy." + - "subjectmapping.UpdateSubjectConditionSet" + - "Request\0328.policy.subjectmapping.UpdateSu" + - "bjectConditionSetResponse\"\'\202\323\344\223\002!2\034/subj" + - "ect-condition-sets/{id}:\001*\022\264\001\n\031DeleteSub" + - "jectConditionSet\0227.policy.subjectmapping" + - ".DeleteSubjectConditionSetRequest\0328.poli" + - "cy.subjectmapping.DeleteSubjectCondition" + - "SetResponse\"$\202\323\344\223\002\036*\034/subject-condition-" + - "sets/{id}B\364\001\n)io.opentdf.platform.policy" + - ".subjectmappingB\023SubjectMappingProtoP\001Z=" + - "github.com/opentdf/platform/protocol/go/" + - "policy/subjectmapping\242\002\003PSX\252\002\025Policy.Sub" + - "jectmapping\312\002\025Policy\\Subjectmapping\342\002!Po" + - "licy\\Subjectmapping\\GPBMetadata\352\002\026Policy" + - "::Subjectmappingb\006proto3" + "subjectConditionSet\"\213\002\n UpdateSubjectCon" + + "ditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id" + + "\022D\n\014subject_sets\030\002 \003(\0132!.policy.subjectm" + + "apping.SubjectSetR\013subjectSets\0223\n\010metada" + + "ta\030d \001(\0132\027.common.MetadataMutableR\010metad" + + "ata\022T\n\030metadata_update_behavior\030e \001(\0162\032." + + "common.MetadataUpdateEnumR\026metadataUpdat" + + "eBehavior\"\203\001\n!UpdateSubjectConditionSetR" + + "esponse\022^\n\025subject_condition_set\030\001 \001(\0132*" + + ".policy.subjectmapping.SubjectConditionS" + + "etR\023subjectConditionSet\":\n DeleteSubject" + + "ConditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R" + + "\002id\"\203\001\n!DeleteSubjectConditionSetRespons" + + "e\022^\n\025subject_condition_set\030\001 \001(\0132*.polic" + + "y.subjectmapping.SubjectConditionSetR\023su" + + "bjectConditionSet*\233\001\n\032SubjectMappingOper" + + "atorEnum\022-\n)SUBJECT_MAPPING_OPERATOR_ENU" + + "M_UNSPECIFIED\020\000\022$\n SUBJECT_MAPPING_OPERA" + + "TOR_ENUM_IN\020\001\022(\n$SUBJECT_MAPPING_OPERATO" + + "R_ENUM_NOT_IN\020\002*\220\001\n\030ConditionBooleanType" + + "Enum\022+\n\'CONDITION_BOOLEAN_TYPE_ENUM_UNSP" + + "ECIFIED\020\000\022#\n\037CONDITION_BOOLEAN_TYPE_ENUM" + + "_AND\020\001\022\"\n\036CONDITION_BOOLEAN_TYPE_ENUM_OR" + + "\020\0022\353\016\n\025SubjectMappingService\022\264\001\n\024MatchSu" + + "bjectMappings\0222.policy.subjectmapping.Ma" + + "tchSubjectMappingsRequest\0323.policy.subje" + + "ctmapping.MatchSubjectMappingsResponse\"3" + + "\202\323\344\223\002-\"\027/subject-mappings/match:\022subject" + + "_properties\022\227\001\n\023ListSubjectMappings\0221.po" + + "licy.subjectmapping.ListSubjectMappingsR" + + "equest\0322.policy.subjectmapping.ListSubje" + + "ctMappingsResponse\"\031\202\323\344\223\002\023\022\021/subject-map" + + "pings\022\226\001\n\021GetSubjectMapping\022/.policy.sub" + + "jectmapping.GetSubjectMappingRequest\0320.p" + + "olicy.subjectmapping.GetSubjectMappingRe" + + "sponse\"\036\202\323\344\223\002\030\022\026/subject-mappings/{id}\022\235" + + "\001\n\024CreateSubjectMapping\0222.policy.subject" + + "mapping.CreateSubjectMappingRequest\0323.po" + + "licy.subjectmapping.CreateSubjectMapping" + + "Response\"\034\202\323\344\223\002\026\"\021/subject-mappings:\001*\022\242" + + "\001\n\024UpdateSubjectMapping\0222.policy.subject" + + "mapping.UpdateSubjectMappingRequest\0323.po" + + "licy.subjectmapping.UpdateSubjectMapping" + + "Response\"!\202\323\344\223\002\0332\026/subject-mappings/{id}" + + ":\001*\022\237\001\n\024DeleteSubjectMapping\0222.policy.su" + + "bjectmapping.DeleteSubjectMappingRequest" + + "\0323.policy.subjectmapping.DeleteSubjectMa" + + "ppingResponse\"\036\202\323\344\223\002\030*\026/subject-mappings" + + "/{id}\022\254\001\n\030ListSubjectConditionSets\0226.pol" + + "icy.subjectmapping.ListSubjectConditionS" + + "etsRequest\0327.policy.subjectmapping.ListS" + + "ubjectConditionSetsResponse\"\037\202\323\344\223\002\031\022\027/su" + + "bject-condition-sets\022\253\001\n\026GetSubjectCondi" + + "tionSet\0224.policy.subjectmapping.GetSubje" + + "ctConditionSetRequest\0325.policy.subjectma" + + "pping.GetSubjectConditionSetResponse\"$\202\323" + + "\344\223\002\036\022\034/subject-condition-sets/{id}\022\262\001\n\031C" + + "reateSubjectConditionSet\0227.policy.subjec" + + "tmapping.CreateSubjectConditionSetReques" + + "t\0328.policy.subjectmapping.CreateSubjectC" + + "onditionSetResponse\"\"\202\323\344\223\002\034\"\027/subject-co" + + "ndition-sets:\001*\022\267\001\n\031UpdateSubjectConditi" + + "onSet\0227.policy.subjectmapping.UpdateSubj" + + "ectConditionSetRequest\0328.policy.subjectm" + + "apping.UpdateSubjectConditionSetResponse" + + "\"\'\202\323\344\223\002!2\034/subject-condition-sets/{id}:\001" + + "*\022\264\001\n\031DeleteSubjectConditionSet\0227.policy" + + ".subjectmapping.DeleteSubjectConditionSe" + + "tRequest\0328.policy.subjectmapping.DeleteS" + + "ubjectConditionSetResponse\"$\202\323\344\223\002\036*\034/sub" + + "ject-condition-sets/{id}B\364\001\n)io.opentdf." + + "platform.policy.subjectmappingB\023SubjectM" + + "appingProtoP\001Z=github.com/opentdf/platfo" + + "rm/protocol/go/policy/subjectmapping\242\002\003P" + + "SX\252\002\025Policy.Subjectmapping\312\002\025Policy\\Subj" + + "ectmapping\342\002!Policy\\Subjectmapping\\GPBMe" + + "tadata\352\002\026Policy::Subjectmappingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -348,7 +349,6 @@ public static void registerAllExtensions( build.buf.validate.ValidateProto.getDescriptor(), io.opentdf.platform.common.CommonProto.getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), io.opentdf.platform.policy.attributes.AttributesProto.getDescriptor(), }); internal_static_policy_subjectmapping_Condition_descriptor = @@ -381,18 +381,18 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_SubjectMapping_descriptor, new java.lang.String[] { "Id", "AttributeValue", "SubjectConditionSet", "Actions", "Metadata", }); - internal_static_policy_subjectmapping_Subject_descriptor = + internal_static_policy_subjectmapping_SubjectProperty_descriptor = getDescriptor().getMessageTypes().get(5); - internal_static_policy_subjectmapping_Subject_fieldAccessorTable = new + internal_static_policy_subjectmapping_SubjectProperty_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_Subject_descriptor, - new java.lang.String[] { "Attributes", }); + internal_static_policy_subjectmapping_SubjectProperty_descriptor, + new java.lang.String[] { "ExternalField", "ExternalValue", }); internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor, - new java.lang.String[] { "Subject", }); + new java.lang.String[] { "SubjectProperties", }); internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_fieldAccessorTable = new @@ -535,7 +535,6 @@ public static void registerAllExtensions( build.buf.validate.ValidateProto.getDescriptor(); io.opentdf.platform.common.CommonProto.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); io.opentdf.platform.policy.attributes.AttributesProto.getDescriptor(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectOrBuilder.java deleted file mode 100644 index 7c0894735f..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface SubjectOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.Subject) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - * @return Whether the attributes field is set. - */ - boolean hasAttributes(); - /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - * @return The attributes. - */ - com.google.protobuf.Struct getAttributes(); - /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - */ - com.google.protobuf.StructOrBuilder getAttributesOrBuilder(); -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/Subject.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectProperty.java similarity index 52% rename from sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/Subject.java rename to sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectProperty.java index fbeb479819..465a2d1ffb 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/Subject.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectProperty.java @@ -6,69 +6,123 @@ /** *
    - * A Representation of a subject as attribute->value pairs.  This would mirror user attributes retrieved
    + * A property of a Subject/Entity as a field->value pair.  This would mirror external user attributes retrieved
      * from an authoritative source such as an IDP (Identity Provider) or User Store.  Examples include such ADFS/LDAP, OKTA, etc.
    + * For now, a valid property must contain both field & value. 
      * 
    * - * Protobuf type {@code policy.subjectmapping.Subject} + * Protobuf type {@code policy.subjectmapping.SubjectProperty} */ -public final class Subject extends +public final class SubjectProperty extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.Subject) - SubjectOrBuilder { + // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectProperty) + SubjectPropertyOrBuilder { private static final long serialVersionUID = 0L; - // Use Subject.newBuilder() to construct. - private Subject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use SubjectProperty.newBuilder() to construct. + private SubjectProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Subject() { + private SubjectProperty() { + externalField_ = ""; + externalValue_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new Subject(); + return new SubjectProperty(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_Subject_descriptor; + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectProperty_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_Subject_fieldAccessorTable + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectProperty_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.Subject.class, io.opentdf.platform.policy.subjectmapping.Subject.Builder.class); + io.opentdf.platform.policy.subjectmapping.SubjectProperty.class, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder.class); } - private int bitField0_; - public static final int ATTRIBUTES_FIELD_NUMBER = 1; - private com.google.protobuf.Struct attributes_; + public static final int EXTERNAL_FIELD_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object externalField_ = ""; /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - * @return Whether the attributes field is set. + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The externalField. */ @java.lang.Override - public boolean hasAttributes() { - return ((bitField0_ & 0x00000001) != 0); + public java.lang.String getExternalField() { + java.lang.Object ref = externalField_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalField_ = s; + return s; + } } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - * @return The attributes. + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The bytes for externalField. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExternalFieldBytes() { + java.lang.Object ref = externalField_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_VALUE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object externalValue_ = ""; + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The externalValue. */ @java.lang.Override - public com.google.protobuf.Struct getAttributes() { - return attributes_ == null ? com.google.protobuf.Struct.getDefaultInstance() : attributes_; + public java.lang.String getExternalValue() { + java.lang.Object ref = externalValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalValue_ = s; + return s; + } } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The bytes for externalValue. */ @java.lang.Override - public com.google.protobuf.StructOrBuilder getAttributesOrBuilder() { - return attributes_ == null ? com.google.protobuf.Struct.getDefaultInstance() : attributes_; + public com.google.protobuf.ByteString + getExternalValueBytes() { + java.lang.Object ref = externalValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -85,8 +139,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAttributes()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalField_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, externalField_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, externalValue_); } getUnknownFields().writeTo(output); } @@ -97,9 +154,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAttributes()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalField_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, externalField_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, externalValue_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -111,16 +170,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.Subject)) { + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.SubjectProperty)) { return super.equals(obj); } - io.opentdf.platform.policy.subjectmapping.Subject other = (io.opentdf.platform.policy.subjectmapping.Subject) obj; + io.opentdf.platform.policy.subjectmapping.SubjectProperty other = (io.opentdf.platform.policy.subjectmapping.SubjectProperty) obj; - if (hasAttributes() != other.hasAttributes()) return false; - if (hasAttributes()) { - if (!getAttributes() - .equals(other.getAttributes())) return false; - } + if (!getExternalField() + .equals(other.getExternalField())) return false; + if (!getExternalValue() + .equals(other.getExternalValue())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -132,53 +190,53 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttributes()) { - hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + getAttributes().hashCode(); - } + hash = (37 * hash) + EXTERNAL_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getExternalField().hashCode(); + hash = (37 * hash) + EXTERNAL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getExternalValue().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty 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.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty 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.policy.subjectmapping.Subject parseFrom(byte[] data) + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom(java.io.InputStream input) + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -186,26 +244,26 @@ public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseDelimitedFrom(java.io.InputStream input) + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseDelimitedFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty 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.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -218,7 +276,7 @@ public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.Subject prototype) { + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.SubjectProperty prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -235,71 +293,63 @@ protected Builder newBuilderForType( } /** *
    -   * A Representation of a subject as attribute->value pairs.  This would mirror user attributes retrieved
    +   * A property of a Subject/Entity as a field->value pair.  This would mirror external user attributes retrieved
        * from an authoritative source such as an IDP (Identity Provider) or User Store.  Examples include such ADFS/LDAP, OKTA, etc.
    +   * For now, a valid property must contain both field & value. 
        * 
    * - * Protobuf type {@code policy.subjectmapping.Subject} + * Protobuf type {@code policy.subjectmapping.SubjectProperty} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.Subject) - io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder { + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectProperty) + io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_Subject_descriptor; + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectProperty_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_Subject_fieldAccessorTable + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectProperty_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.Subject.class, io.opentdf.platform.policy.subjectmapping.Subject.Builder.class); + io.opentdf.platform.policy.subjectmapping.SubjectProperty.class, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder.class); } - // Construct using io.opentdf.platform.policy.subjectmapping.Subject.newBuilder() + // Construct using io.opentdf.platform.policy.subjectmapping.SubjectProperty.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributesFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - attributes_ = null; - if (attributesBuilder_ != null) { - attributesBuilder_.dispose(); - attributesBuilder_ = null; - } + externalField_ = ""; + externalValue_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_Subject_descriptor; + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectProperty_descriptor; } @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.Subject getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance(); + public io.opentdf.platform.policy.subjectmapping.SubjectProperty getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectProperty.getDefaultInstance(); } @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.Subject build() { - io.opentdf.platform.policy.subjectmapping.Subject result = buildPartial(); + public io.opentdf.platform.policy.subjectmapping.SubjectProperty build() { + io.opentdf.platform.policy.subjectmapping.SubjectProperty result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -307,23 +357,21 @@ public io.opentdf.platform.policy.subjectmapping.Subject build() { } @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.Subject buildPartial() { - io.opentdf.platform.policy.subjectmapping.Subject result = new io.opentdf.platform.policy.subjectmapping.Subject(this); + public io.opentdf.platform.policy.subjectmapping.SubjectProperty buildPartial() { + io.opentdf.platform.policy.subjectmapping.SubjectProperty result = new io.opentdf.platform.policy.subjectmapping.SubjectProperty(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.Subject result) { + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectProperty result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.attributes_ = attributesBuilder_ == null - ? attributes_ - : attributesBuilder_.build(); - to_bitField0_ |= 0x00000001; + result.externalField_ = externalField_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.externalValue_ = externalValue_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -360,18 +408,25 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.Subject) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.Subject)other); + if (other instanceof io.opentdf.platform.policy.subjectmapping.SubjectProperty) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectProperty)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.Subject other) { - if (other == io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance()) return this; - if (other.hasAttributes()) { - mergeAttributes(other.getAttributes()); + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectProperty other) { + if (other == io.opentdf.platform.policy.subjectmapping.SubjectProperty.getDefaultInstance()) return this; + if (!other.getExternalField().isEmpty()) { + externalField_ = other.externalField_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getExternalValue().isEmpty()) { + externalValue_ = other.externalValue_; + bitField0_ |= 0x00000002; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -400,12 +455,15 @@ public Builder mergeFrom( done = true; break; case 10: { - input.readMessage( - getAttributesFieldBuilder().getBuilder(), - extensionRegistry); + externalField_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 + case 18: { + externalValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -423,125 +481,148 @@ public Builder mergeFrom( } private int bitField0_; - private com.google.protobuf.Struct attributes_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> attributesBuilder_; + private java.lang.Object externalField_ = ""; /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - * @return Whether the attributes field is set. + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The externalField. */ - public boolean hasAttributes() { - return ((bitField0_ & 0x00000001) != 0); + public java.lang.String getExternalField() { + java.lang.Object ref = externalField_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalField_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - * @return The attributes. + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The bytes for externalField. */ - public com.google.protobuf.Struct getAttributes() { - if (attributesBuilder_ == null) { - return attributes_ == null ? com.google.protobuf.Struct.getDefaultInstance() : attributes_; + public com.google.protobuf.ByteString + getExternalFieldBytes() { + java.lang.Object ref = externalField_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalField_ = b; + return b; } else { - return attributesBuilder_.getMessage(); + return (com.google.protobuf.ByteString) ref; } } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @param value The externalField to set. + * @return This builder for chaining. */ - public Builder setAttributes(com.google.protobuf.Struct value) { - if (attributesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attributes_ = value; - } else { - attributesBuilder_.setMessage(value); - } + public Builder setExternalField( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + externalField_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return This builder for chaining. */ - public Builder setAttributes( - com.google.protobuf.Struct.Builder builderForValue) { - if (attributesBuilder_ == null) { - attributes_ = builderForValue.build(); - } else { - attributesBuilder_.setMessage(builderForValue.build()); - } + public Builder clearExternalField() { + externalField_ = getDefaultInstance().getExternalField(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @param value The bytes for externalField to set. + * @return This builder for chaining. + */ + public Builder setExternalFieldBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + externalField_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } + + private java.lang.Object externalValue_ = ""; /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The externalValue. */ - public Builder mergeAttributes(com.google.protobuf.Struct value) { - if (attributesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - attributes_ != null && - attributes_ != com.google.protobuf.Struct.getDefaultInstance()) { - getAttributesBuilder().mergeFrom(value); - } else { - attributes_ = value; - } + public java.lang.String getExternalValue() { + java.lang.Object ref = externalValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalValue_ = s; + return s; } else { - attributesBuilder_.mergeFrom(value); - } - if (attributes_ != null) { - bitField0_ |= 0x00000001; - onChanged(); + return (java.lang.String) ref; } - return this; } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The bytes for externalValue. */ - public Builder clearAttributes() { - bitField0_ = (bitField0_ & ~0x00000001); - attributes_ = null; - if (attributesBuilder_ != null) { - attributesBuilder_.dispose(); - attributesBuilder_ = null; + public com.google.protobuf.ByteString + getExternalValueBytes() { + java.lang.Object ref = externalValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - onChanged(); - return this; } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @param value The externalValue to set. + * @return This builder for chaining. */ - public com.google.protobuf.Struct.Builder getAttributesBuilder() { - bitField0_ |= 0x00000001; + public Builder setExternalValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + externalValue_ = value; + bitField0_ |= 0x00000002; onChanged(); - return getAttributesFieldBuilder().getBuilder(); + return this; } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return This builder for chaining. */ - public com.google.protobuf.StructOrBuilder getAttributesOrBuilder() { - if (attributesBuilder_ != null) { - return attributesBuilder_.getMessageOrBuilder(); - } else { - return attributes_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : attributes_; - } + public Builder clearExternalValue() { + externalValue_ = getDefaultInstance().getExternalValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @param value The bytes for externalValue to set. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getAttributesFieldBuilder() { - if (attributesBuilder_ == null) { - attributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getAttributes(), - getParentForChildren(), - isClean()); - attributes_ = null; - } - return attributesBuilder_; + public Builder setExternalValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + externalValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } @java.lang.Override public final Builder setUnknownFields( @@ -556,23 +637,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.Subject) + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.SubjectProperty) } - // @@protoc_insertion_point(class_scope:policy.subjectmapping.Subject) - private static final io.opentdf.platform.policy.subjectmapping.Subject DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectProperty) + private static final io.opentdf.platform.policy.subjectmapping.SubjectProperty DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.Subject(); + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectProperty(); } - public static io.opentdf.platform.policy.subjectmapping.Subject getDefaultInstance() { + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public Subject parsePartialFrom( + public SubjectProperty parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -591,17 +672,17 @@ public Subject parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.Subject getDefaultInstanceForType() { + public io.opentdf.platform.policy.subjectmapping.SubjectProperty getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectPropertyOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectPropertyOrBuilder.java new file mode 100644 index 0000000000..b464a4c11f --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectPropertyOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: policy/subjectmapping/subject_mapping.proto + +// Protobuf Java Version: 3.25.3 +package io.opentdf.platform.policy.subjectmapping; + +public interface SubjectPropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectProperty) + com.google.protobuf.MessageOrBuilder { + + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The externalField. + */ + java.lang.String getExternalField(); + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The bytes for externalField. + */ + com.google.protobuf.ByteString + getExternalFieldBytes(); + + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The externalValue. + */ + java.lang.String getExternalValue(); + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The bytes for externalValue. + */ + com.google.protobuf.ByteString + getExternalValueBytes(); +} diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index c4b3bf5c6d..8c46300e1c 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -187,6 +187,15 @@ func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, err &scsJSON, &attributeValueJSON, ) + slog.Debug( + "subjectMappingHydrateItem", + slog.Any("row", row), + slog.String("id", id), + slog.String("actionsJSON", string(actionsJSON)), + slog.String("metadataJSON", string(metadataJSON)), + slog.String("scsJSON", string(scsJSON)), + slog.String("attributeValueJSON", string(attributeValueJSON)), + ) if err != nil { return nil, db.WrapIfKnownInvalidQueryErr(err) } @@ -645,3 +654,100 @@ func (c PolicyDbClient) DeleteSubjectMapping(ctx context.Context, id string) (*s Id: id, }, nil } + +// This function generates a SQL select statement for SubjectMappings that based on external Subject property fields & values. This relationship +// is sometimes called Entitlements or Subject Entitlements. +// +// There is complexity in the SQL generation due to the external fields/values being stored in a JSONB column on the subject_condition_set table +// and the JSON structure being SubjectSets -> ConditionGroups -> Conditions. +// +// Unfortunately we must do some slight filtering at the SQL level to avoid extreme and potentially non-rare edge cases. Subject Mappings will +// be returned if there is any condition found among the structures that matches: +// 1. The external field, external value, and an IN operator +// 2. The external field, _no_ external value, and a NOT_IN operator +// +// Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping +// in some way or another. This could theoretically be every attribute in the DB if a policy admin has relied heavily on that field. +// +// NOTE: if you have any issues, set the log level to 'debug' for more comprehensive context. +func selectMatchedSubjectMappingsSql(subjectProperties []*subjectmapping.SubjectProperty) (string, []interface{}, error) { + var err error + if len(subjectProperties) == 0 { + err = errors.Join(db.ErrMissingValue, errors.New("one or more subject properties is required")) + slog.Error("subject property missing required value", slog.Any("properties provided", subjectProperties), slog.String("error", err.Error())) + return "", nil, err + } + where := "(" + for i, sp := range subjectProperties { + if sp.ExternalField == "" || sp.ExternalValue == "" { + err = errors.Join(db.ErrMissingValue, errors.New("all subject properties must include defined external field and value")) + slog.Error("subject property missing required value", slog.Any("properties provided", subjectProperties), slog.String("error", err.Error())) + return "", nil, err + } + if i > 0 { + where += " OR " + } + + hasField := "each_condition->>'subject_external_field' = '" + sp.ExternalField + "'" + hasValue := "(each_condition->>'subject_external_values')::jsonb @> '[\"" + sp.ExternalValue + "\"]'::jsonb" + hasInOperator := "each_condition->>'operator' = 'SUBJECT_MAPPING_OPERATOR_ENUM_IN'" + hasNotInOperator := "each_condition->>'operator' = 'SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN'" + // Parses the json and matches the row if either of the following conditions are met: + where += "((" + hasField + " AND " + hasValue + " AND " + hasInOperator + ")" + + " OR " + + "(" + hasField + " AND NOT " + hasValue + " AND " + hasNotInOperator + "))" + slog.Debug("current condition filter WHERE clause", slog.String("subject_external_field", sp.ExternalField), slog.String("subject_external_value", sp.ExternalValue), slog.String("where", where)) + } + where += ")" + + t := Tables.SubjectConditionSet + smT := Tables.SubjectMappings + + whereSubQ, _, err := db.NewStatementBuilder(). + // SELECT 1 is consumed by EXISTS clause, not true selection of data + Select("1"). + From("jsonb_array_elements(" + t.Field("condition") + ") AS ss" + + ", jsonb_array_elements(ss->'condition_groups') AS cg" + + ", jsonb_array_elements(cg->'conditions') AS each_condition"). + Where(where). + ToSql() + if err != nil { + slog.Error("could not generate SQL for subject entitlements", slog.String("error", err.Error())) + return "", nil, err + } + slog.Debug("checking for existence of any condition in the SubjectSets > ConditionGroups > Conditions that matches the provided subject properties", slog.String("where", whereSubQ)) + + return subjectMappingSelect(). + From(smT.Name()). + Where("EXISTS (" + whereSubQ + ")"). + ToSql() +} + +// GetMatchedSubjectMappings liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned +// if there is any single condition found among the structures that matches: +// 1. The external field, external value, and an IN operator +// 2. The external field, _no_ external value, and a NOT_IN operator +// +// Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping +// in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no +// logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum +// initial filter. +// +// NOTE: This relationship is sometimes called Entitlements or Subject Entitlements. +// NOTE: if you have any issues, set the log level to 'debug' for more comprehensive context. +func (c PolicyDbClient) GetMatchedSubjectMappings(ctx context.Context, properties []*subjectmapping.SubjectProperty) ([]*subjectmapping.SubjectMapping, error) { + sql, args, err := selectMatchedSubjectMappingsSql(properties) + slog.Debug("generated SQL for subject entitlements", slog.Any("properties", properties), slog.String("sql", sql), slog.Any("args", args)) + if err != nil { + return nil, err + } + + rows, err := c.Query(ctx, sql, args, err) + slog.Debug("executed SQL for subject entitlements", slog.Any("properties", properties), slog.String("sql", sql), slog.Any("args", args), slog.Any("rows", rows), slog.Any("error", err)) + if err != nil { + return nil, err + } + defer rows.Close() + + return subjectMappingHydrateList(rows) +} diff --git a/services/policy/subjectmapping/subject_mapping.go b/services/policy/subjectmapping/subject_mapping.go index 0289ea3714..83df3a49b2 100644 --- a/services/policy/subjectmapping/subject_mapping.go +++ b/services/policy/subjectmapping/subject_mapping.go @@ -108,6 +108,21 @@ func (s SubjectMappingService) DeleteSubjectMapping(ctx context.Context, return rsp, nil } +func (s SubjectMappingService) MatchSubjectMappings(ctx context.Context, + req *sm.MatchSubjectMappingsRequest, +) (*sm.MatchSubjectMappingsResponse, error) { + rsp := &sm.MatchSubjectMappingsResponse{} + slog.Debug("matching subject mappings", slog.Any("subjectProperties", req.SubjectProperties)) + + smList, err := s.dbClient.GetMatchedSubjectMappings(ctx, req.SubjectProperties) + if err != nil { + return nil, services.HandleError(err, services.ErrGetRetrievalFailed, slog.Any("subjectProperties", req.SubjectProperties)) + } + + rsp.SubjectMappings = smList + return rsp, nil +} + /* -------------------------------------------------------- * ----------------- SubjectConditionSets ----------------- * -------------------------------------------------------*/ @@ -148,12 +163,12 @@ func (s SubjectMappingService) CreateSubjectConditionSet(ctx context.Context, rsp := &sm.CreateSubjectConditionSetResponse{} slog.Debug("creating subject condition set", slog.String("subjectConditionSet", req.String())) - conditionSet, err := s.dbClient.CreateSubjectConditionSet(context.Background(), req.SubjectConditionSet) + scs, err := s.dbClient.CreateSubjectConditionSet(context.Background(), req.SubjectConditionSet) if err != nil { return nil, services.HandleError(err, services.ErrCreationFailed, slog.String("subjectConditionSet", req.String())) } - rsp.SubjectConditionSet = conditionSet + rsp.SubjectConditionSet.Id = scs.Id return rsp, nil } diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index f22c6c676f..9e6fe28864 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -6,7 +6,6 @@ import "authorization/authorization.proto"; import "buf/validate/validate.proto"; import "common/common.proto"; import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; import "policy/attributes/attributes.proto"; /* @@ -117,15 +116,27 @@ message SubjectMapping { Match Subject Mappings */ -// A Representation of a subject as attribute->value pairs. This would mirror user attributes retrieved +// A property of a Subject/Entity as a field->value pair. This would mirror external user attributes retrieved // from an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc. -message Subject { - google.protobuf.Struct attributes = 1; +// For now, a valid property must contain both field & value. +message SubjectProperty { + string external_field = 1 [(buf.validate.field).required = true]; + string external_value = 2 [(buf.validate.field).required = true]; } +// MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned +// if there is any single condition found among the structures that matches for one of the provided properties: +// 1. The external field, external value, and an IN operator +// 2. The external field, _no_ external value, and a NOT_IN operator +// +// Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping +// in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no +// logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum +// initial filter. +// +// NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned. message MatchSubjectMappingsRequest { - // Required - Subject subject = 1; + repeated SubjectProperty subject_properties = 1; } message MatchSubjectMappingsResponse { @@ -260,7 +271,7 @@ service SubjectMappingService { rpc MatchSubjectMappings(MatchSubjectMappingsRequest) returns (MatchSubjectMappingsResponse) { option (google.api.http) = { post: "/subject-mappings/match" - body: "subject" + body: "subject_properties" }; }