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

Update User Model/Logic to include additional Cognito data in MDL #837

Conversation

nickviola
Copy link
Collaborator

@nickviola nickviola commented Apr 3, 2025

🗣 Description

Resolves CRASM-2048

Saves additional data from cognito during login process to the MDL. See new data field/types below:

MDL Field > Cognito Key Name {}>{} Data Type

cognito_username > “cognito:username” > string
cognito_use_case_description > “nickname” > text
cognito_email_verified > “email_verified” > string
cognito_groups > "cognito:groups" > json

Screenshot of new columns in User table (MDL)
Screenshot 2025-04-03 at 12 13 26 PM

💭 Motivation and context

🧪 Testing

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced
    in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release.

… and update auth.py logic to save/update date on login
@nickviola nickviola self-assigned this Apr 3, 2025
@nickviola nickviola changed the base branch from develop to DJ_API-mdl-update_WIP April 3, 2025 19:42
Copy link
Collaborator

@cduhn17 cduhn17 left a comment

Choose a reason for hiding this comment

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

LGTM pretty simple PR

@nickviola nickviola merged commit 71e657c into DJ_API-mdl-update_WIP Apr 9, 2025
5 of 6 checks passed
@nickviola nickviola deleted the NV-CRASM-2048-update-cognito-user-data-in-mdl branch April 9, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants