Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(okta): custom properties for okta user #12773

Merged

Conversation

sgomezvillamor
Copy link
Contributor

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@sgomezvillamor sgomezvillamor marked this pull request as ready for review March 4, 2025 15:38
@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Mar 4, 2025
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Mar 4, 2025
Copy link

codecov bot commented Mar 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@hsheth2 hsheth2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good

@@ -671,6 +671,21 @@ def _map_okta_user_profile(self, profile: UserProfile) -> CorpUserInfoClass:
# TODO: Extract user's manager if provided.
# Source: https://developer.okta.com/docs/reference/api/users/#default-profile-properties
full_name = f"{profile.firstName} {profile.lastName}"
custom_properties = {
k: v
for k, v in profile.__dict__.items()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a safe thing to do? maybe we should also check that not k.startswith('_')?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in 79a201f

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

about safety... well, it was safe for UserProfile

@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Mar 4, 2025
@sgomezvillamor sgomezvillamor merged commit 85d3a9d into master Mar 5, 2025
77 of 78 checks passed
@sgomezvillamor sgomezvillamor deleted the feature/cus-4006/feat-okta-user-cuustom-properties branch March 5, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata pending-submitter-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants