From 85d3a9d31d43f08b3bb4f420efbbc290e6dc778f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20G=C3=B3mez=20Villamor?= Date: Wed, 5 Mar 2025 15:53:01 +0100 Subject: [PATCH] feat(okta): custom properties for okta user (#12773) --- .../datahub/ingestion/source/identity/okta.py | 22 ++ ...ta_mces_golden_custom_user_name_regex.json | 66 ++++-- .../okta/okta_mces_golden_default_config.json | 134 ++++++----- ...include_deprovisioned_suspended_users.json | 220 +++++++++++------- .../okta_mces_golden_ingest_groups_users.json | 16 +- 5 files changed, 301 insertions(+), 157 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/identity/okta.py b/metadata-ingestion/src/datahub/ingestion/source/identity/okta.py index 42a79b8694883c..d0c84d90d6e523 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/identity/okta.py +++ b/metadata-ingestion/src/datahub/ingestion/source/identity/okta.py @@ -666,6 +666,27 @@ def _map_okta_user_profile_to_username( self.config.okta_profile_to_username_regex, ) + def _map_okta_user_profile_custom_properties( + self, profile: UserProfile + ) -> Dict[str, str]: + # filter out the common fields that are already mapped to the CorpUserInfo aspect and the private ones + return { + k: str(v) + for k, v in profile.__dict__.items() + if v + and k + not in [ + "displayName", + "firstName", + "lastName", + "email", + "title", + "countryCode", + "department", + ] + and not k.startswith("_") + } + # Converts Okta User Profile into a CorpUserInfo. def _map_okta_user_profile(self, profile: UserProfile) -> CorpUserInfoClass: # TODO: Extract user's manager if provided. @@ -683,6 +704,7 @@ def _map_okta_user_profile(self, profile: UserProfile) -> CorpUserInfoClass: title=profile.title, countryCode=profile.countryCode, departmentName=profile.department, + customProperties=self._map_okta_user_profile_custom_properties(profile), ) def _make_corp_group_urn(self, name: str) -> str: diff --git a/metadata-ingestion/tests/integration/okta/okta_mces_golden_custom_user_name_regex.json b/metadata-ingestion/tests/integration/okta/okta_mces_golden_custom_user_name_regex.json index 784d79ff5b31c9..a731b2957a4391 100644 --- a/metadata-ingestion/tests/integration/okta/okta_mces_golden_custom_user_name_regex.json +++ b/metadata-ingestion/tests/integration/okta/okta_mces_golden_custom_user_name_regex.json @@ -18,7 +18,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -34,7 +35,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -49,7 +51,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -71,7 +74,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -87,7 +91,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -102,7 +107,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -112,12 +118,17 @@ "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { + "customProperties": { + "login": "john.doe@test.com", + "mobilePhone": "555-415-1337" + }, "active": true, "displayName": "JDoe", "email": "john.doe@test.com", "firstName": "John", "lastName": "Doe", - "fullName": "John Doe" + "fullName": "John Doe", + "system": false } }, { @@ -133,7 +144,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -149,7 +161,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -164,7 +177,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -174,6 +188,10 @@ "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { + "customProperties": { + "login": "mary.jane@test.com", + "mobilePhone": "666-415-1337" + }, "active": true, "displayName": "Mary Jane", "email": "mary.jane@test.com", @@ -182,7 +200,8 @@ "firstName": "Mary", "lastName": "Jane", "fullName": "Mary Jane", - "countryCode": "us" + "countryCode": "us", + "system": false } }, { @@ -200,7 +219,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -216,7 +236,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -231,7 +252,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -241,6 +263,10 @@ "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { + "customProperties": { + "login": "good.test@test.com", + "mobilePhone": "666-415-1337" + }, "active": true, "displayName": "Good Test", "email": "good.test@test.com", @@ -249,7 +275,8 @@ "firstName": "Good", "lastName": "Test", "fullName": "Good Test", - "countryCode": "eu" + "countryCode": "eu", + "system": false } }, { @@ -262,7 +289,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -278,7 +306,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -293,7 +322,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } } ] \ No newline at end of file diff --git a/metadata-ingestion/tests/integration/okta/okta_mces_golden_default_config.json b/metadata-ingestion/tests/integration/okta/okta_mces_golden_default_config.json index d871550689c5be..ba161d8a2e7932 100644 --- a/metadata-ingestion/tests/integration/okta/okta_mces_golden_default_config.json +++ b/metadata-ingestion/tests/integration/okta/okta_mces_golden_default_config.json @@ -18,7 +18,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -34,7 +35,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -49,7 +51,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -71,7 +74,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -87,7 +91,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -102,28 +107,39 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "proposedSnapshot": { "com.linkedin.pegasus2avro.metadata.snapshot.CorpUserSnapshot": { - "urn": "urn:li:corpuser:john.doe", + "urn": "urn:li:corpuser:mary.jane", "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { + "customProperties": { + "login": "mary.jane@test.com", + "mobilePhone": "666-415-1337" + }, "active": true, - "displayName": "JDoe", - "email": "john.doe@test.com", - "firstName": "John", - "lastName": "Doe", - "fullName": "John Doe" + "displayName": "Mary Jane", + "email": "mary.jane@test.com", + "title": "Software Engineer", + "departmentName": "Engineering", + "firstName": "Mary", + "lastName": "Jane", + "fullName": "Mary Jane", + "countryCode": "us", + "system": false } }, { "com.linkedin.pegasus2avro.identity.GroupMembership": { "groups": [ "urn:li:corpGroup:All%20Employees", + "urn:li:corpGroup:All%20Employees", + "urn:li:corpGroup:Engineering", "urn:li:corpGroup:Engineering" ] } @@ -133,12 +149,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:john.doe", + "entityUrn": "urn:li:corpuser:mary.jane", "changeType": "UPSERT", "aspectName": "origin", "aspect": { @@ -149,12 +166,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:john.doe", + "entityUrn": "urn:li:corpuser:mary.jane", "changeType": "UPSERT", "aspectName": "status", "aspect": { @@ -164,35 +182,36 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "proposedSnapshot": { "com.linkedin.pegasus2avro.metadata.snapshot.CorpUserSnapshot": { - "urn": "urn:li:corpuser:mary.jane", + "urn": "urn:li:corpuser:good.test", "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { + "customProperties": { + "login": "good.test@test.com", + "mobilePhone": "666-415-1337" + }, "active": true, - "displayName": "Mary Jane", - "email": "mary.jane@test.com", - "title": "Software Engineer", - "departmentName": "Engineering", - "firstName": "Mary", - "lastName": "Jane", - "fullName": "Mary Jane", - "countryCode": "us" + "displayName": "Good Test", + "email": "good.test@test.com", + "title": "Manager", + "departmentName": "Marketing", + "firstName": "Good", + "lastName": "Test", + "fullName": "Good Test", + "countryCode": "eu", + "system": false } }, { "com.linkedin.pegasus2avro.identity.GroupMembership": { - "groups": [ - "urn:li:corpGroup:All%20Employees", - "urn:li:corpGroup:All%20Employees", - "urn:li:corpGroup:Engineering", - "urn:li:corpGroup:Engineering" - ] + "groups": [] } } ] @@ -200,12 +219,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:mary.jane", + "entityUrn": "urn:li:corpuser:good.test", "changeType": "UPSERT", "aspectName": "origin", "aspect": { @@ -216,12 +236,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:mary.jane", + "entityUrn": "urn:li:corpuser:good.test", "changeType": "UPSERT", "aspectName": "status", "aspect": { @@ -231,30 +252,36 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "proposedSnapshot": { "com.linkedin.pegasus2avro.metadata.snapshot.CorpUserSnapshot": { - "urn": "urn:li:corpuser:good.test", + "urn": "urn:li:corpuser:john.doe", "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { + "customProperties": { + "login": "john.doe@test.com", + "mobilePhone": "555-415-1337" + }, "active": true, - "displayName": "Good Test", - "email": "good.test@test.com", - "title": "Manager", - "departmentName": "Marketing", - "firstName": "Good", - "lastName": "Test", - "fullName": "Good Test", - "countryCode": "eu" + "displayName": "JDoe", + "email": "john.doe@test.com", + "firstName": "John", + "lastName": "Doe", + "fullName": "John Doe", + "system": false } }, { "com.linkedin.pegasus2avro.identity.GroupMembership": { - "groups": [] + "groups": [ + "urn:li:corpGroup:All%20Employees", + "urn:li:corpGroup:Engineering" + ] } } ] @@ -262,12 +289,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:good.test", + "entityUrn": "urn:li:corpuser:john.doe", "changeType": "UPSERT", "aspectName": "origin", "aspect": { @@ -278,12 +306,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:good.test", + "entityUrn": "urn:li:corpuser:john.doe", "changeType": "UPSERT", "aspectName": "status", "aspect": { @@ -293,7 +322,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } } ] \ No newline at end of file diff --git a/metadata-ingestion/tests/integration/okta/okta_mces_golden_include_deprovisioned_suspended_users.json b/metadata-ingestion/tests/integration/okta/okta_mces_golden_include_deprovisioned_suspended_users.json index 0107d8c2a152f3..dc77a2d9665670 100644 --- a/metadata-ingestion/tests/integration/okta/okta_mces_golden_include_deprovisioned_suspended_users.json +++ b/metadata-ingestion/tests/integration/okta/okta_mces_golden_include_deprovisioned_suspended_users.json @@ -18,7 +18,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -34,7 +35,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -49,7 +51,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -71,7 +74,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -87,7 +91,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -102,28 +107,39 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "proposedSnapshot": { "com.linkedin.pegasus2avro.metadata.snapshot.CorpUserSnapshot": { - "urn": "urn:li:corpuser:john.doe", + "urn": "urn:li:corpuser:mary.jane", "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { + "customProperties": { + "login": "mary.jane@test.com", + "mobilePhone": "666-415-1337" + }, "active": true, - "displayName": "JDoe", - "email": "john.doe@test.com", - "firstName": "John", - "lastName": "Doe", - "fullName": "John Doe" + "displayName": "Mary Jane", + "email": "mary.jane@test.com", + "title": "Software Engineer", + "departmentName": "Engineering", + "firstName": "Mary", + "lastName": "Jane", + "fullName": "Mary Jane", + "countryCode": "us", + "system": false } }, { "com.linkedin.pegasus2avro.identity.GroupMembership": { "groups": [ "urn:li:corpGroup:All%20Employees", + "urn:li:corpGroup:All%20Employees", + "urn:li:corpGroup:Engineering", "urn:li:corpGroup:Engineering" ] } @@ -133,12 +149,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:john.doe", + "entityUrn": "urn:li:corpuser:mary.jane", "changeType": "UPSERT", "aspectName": "origin", "aspect": { @@ -149,12 +166,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:john.doe", + "entityUrn": "urn:li:corpuser:mary.jane", "changeType": "UPSERT", "aspectName": "status", "aspect": { @@ -164,35 +182,36 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "proposedSnapshot": { "com.linkedin.pegasus2avro.metadata.snapshot.CorpUserSnapshot": { - "urn": "urn:li:corpuser:mary.jane", + "urn": "urn:li:corpuser:good.test", "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { + "customProperties": { + "login": "good.test@test.com", + "mobilePhone": "666-415-1337" + }, "active": true, - "displayName": "Mary Jane", - "email": "mary.jane@test.com", - "title": "Software Engineer", - "departmentName": "Engineering", - "firstName": "Mary", - "lastName": "Jane", - "fullName": "Mary Jane", - "countryCode": "us" + "displayName": "Good Test", + "email": "good.test@test.com", + "title": "Manager", + "departmentName": "Marketing", + "firstName": "Good", + "lastName": "Test", + "fullName": "Good Test", + "countryCode": "eu", + "system": false } }, { "com.linkedin.pegasus2avro.identity.GroupMembership": { - "groups": [ - "urn:li:corpGroup:All%20Employees", - "urn:li:corpGroup:All%20Employees", - "urn:li:corpGroup:Engineering", - "urn:li:corpGroup:Engineering" - ] + "groups": [] } } ] @@ -200,12 +219,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:mary.jane", + "entityUrn": "urn:li:corpuser:good.test", "changeType": "UPSERT", "aspectName": "origin", "aspect": { @@ -216,12 +236,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:mary.jane", + "entityUrn": "urn:li:corpuser:good.test", "changeType": "UPSERT", "aspectName": "status", "aspect": { @@ -231,30 +252,41 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "proposedSnapshot": { "com.linkedin.pegasus2avro.metadata.snapshot.CorpUserSnapshot": { - "urn": "urn:li:corpuser:good.test", + "urn": "urn:li:corpuser:mary.jane", "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { + "customProperties": { + "login": "mary.jane@test.com", + "mobilePhone": "666-415-1337" + }, "active": true, - "displayName": "Good Test", - "email": "good.test@test.com", - "title": "Manager", - "departmentName": "Marketing", - "firstName": "Good", - "lastName": "Test", - "fullName": "Good Test", - "countryCode": "eu" + "displayName": "Mary Jane", + "email": "mary.jane@test.com", + "title": "Software Engineer II", + "departmentName": "Engineering", + "firstName": "Mary", + "lastName": "Jane", + "fullName": "Mary Jane", + "countryCode": "as", + "system": false } }, { "com.linkedin.pegasus2avro.identity.GroupMembership": { - "groups": [] + "groups": [ + "urn:li:corpGroup:All%20Employees", + "urn:li:corpGroup:All%20Employees", + "urn:li:corpGroup:Engineering", + "urn:li:corpGroup:Engineering" + ] } } ] @@ -262,12 +294,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:good.test", + "entityUrn": "urn:li:corpuser:mary.jane", "changeType": "UPSERT", "aspectName": "origin", "aspect": { @@ -278,12 +311,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:good.test", + "entityUrn": "urn:li:corpuser:mary.jane", "changeType": "UPSERT", "aspectName": "status", "aspect": { @@ -293,33 +327,34 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "proposedSnapshot": { "com.linkedin.pegasus2avro.metadata.snapshot.CorpUserSnapshot": { - "urn": "urn:li:corpuser:mary.jane", + "urn": "urn:li:corpuser:bad.boyjones", "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { + "customProperties": { + "login": "bad.boyjones@test.com", + "mobilePhone": "666-415-1337" + }, "active": true, - "displayName": "Mary Jane", - "email": "mary.jane@test.com", - "title": "Software Engineer II", - "departmentName": "Engineering", - "firstName": "Mary", - "lastName": "Jane", - "fullName": "Mary Jane", - "countryCode": "as" + "displayName": "Bad Boy Jones", + "email": "bad.boyjones@test.com", + "firstName": "Bad", + "lastName": "Boy Jones", + "fullName": "Bad Boy Jones", + "system": false } }, { "com.linkedin.pegasus2avro.identity.GroupMembership": { "groups": [ "urn:li:corpGroup:All%20Employees", - "urn:li:corpGroup:All%20Employees", - "urn:li:corpGroup:Engineering", "urn:li:corpGroup:Engineering" ] } @@ -329,12 +364,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:mary.jane", + "entityUrn": "urn:li:corpuser:bad.boyjones", "changeType": "UPSERT", "aspectName": "origin", "aspect": { @@ -345,12 +381,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:mary.jane", + "entityUrn": "urn:li:corpuser:bad.boyjones", "changeType": "UPSERT", "aspectName": "status", "aspect": { @@ -360,22 +397,28 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "proposedSnapshot": { "com.linkedin.pegasus2avro.metadata.snapshot.CorpUserSnapshot": { - "urn": "urn:li:corpuser:bad.boyjones", + "urn": "urn:li:corpuser:john.doe", "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { + "customProperties": { + "login": "john.doe@test.com", + "mobilePhone": "555-415-1337" + }, "active": true, - "displayName": "Bad Boy Jones", - "email": "bad.boyjones@test.com", - "firstName": "Bad", - "lastName": "Boy Jones", - "fullName": "Bad Boy Jones" + "displayName": "JDoe", + "email": "john.doe@test.com", + "firstName": "John", + "lastName": "Doe", + "fullName": "John Doe", + "system": false } }, { @@ -391,12 +434,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:bad.boyjones", + "entityUrn": "urn:li:corpuser:john.doe", "changeType": "UPSERT", "aspectName": "origin", "aspect": { @@ -407,12 +451,13 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { "entityType": "corpuser", - "entityUrn": "urn:li:corpuser:bad.boyjones", + "entityUrn": "urn:li:corpuser:john.doe", "changeType": "UPSERT", "aspectName": "status", "aspect": { @@ -422,7 +467,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -432,6 +478,10 @@ "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { + "customProperties": { + "login": "bad.girlriri@test.com", + "mobilePhone": "666-415-1337" + }, "active": true, "displayName": "Bad Girl Riri", "email": "bad.girlriri@test.com", @@ -440,7 +490,8 @@ "firstName": "Bad", "lastName": "Girl Riri", "fullName": "Bad Girl Riri", - "countryCode": "eu" + "countryCode": "eu", + "system": false } }, { @@ -458,7 +509,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -474,7 +526,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } }, { @@ -489,7 +542,8 @@ }, "systemMetadata": { "lastObserved": 1586847600000, - "runId": "test-okta-usage" + "runId": "test-okta-usage", + "lastRunId": "no-run-id-provided" } } ] \ No newline at end of file diff --git a/metadata-ingestion/tests/integration/okta/okta_mces_golden_ingest_groups_users.json b/metadata-ingestion/tests/integration/okta/okta_mces_golden_ingest_groups_users.json index fad38cb3398fc3..917e4798e12a2a 100644 --- a/metadata-ingestion/tests/integration/okta/okta_mces_golden_ingest_groups_users.json +++ b/metadata-ingestion/tests/integration/okta/okta_mces_golden_ingest_groups_users.json @@ -118,7 +118,10 @@ "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { - "customProperties": {}, + "customProperties": { + "login": "mary.jane@test.com", + "mobilePhone": "666-415-1337" + }, "active": true, "displayName": "Mary Jane", "email": "mary.jane@test.com", @@ -127,7 +130,8 @@ "firstName": "Mary", "lastName": "Jane", "fullName": "Mary Jane", - "countryCode": "us" + "countryCode": "us", + "system": false } }, { @@ -189,13 +193,17 @@ "aspects": [ { "com.linkedin.pegasus2avro.identity.CorpUserInfo": { - "customProperties": {}, + "customProperties": { + "login": "john.doe@test.com", + "mobilePhone": "555-415-1337" + }, "active": true, "displayName": "JDoe", "email": "john.doe@test.com", "firstName": "John", "lastName": "Doe", - "fullName": "John Doe" + "fullName": "John Doe", + "system": false } }, {