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

ADX-1017 attempt to refresh user profile data using silent authentica… #283

Conversation

A-Souhei
Copy link
Contributor

Description

Use Auth0 silent Authentication to update user profile data

Checklist

Put an x in the boxes that apply to this pull request (you can also fill these out after opening the pull request).
You may not need to check all boxes.

  • The Jira ticket for this issue has been updated to "Ready to Review" or equivalent.
  • I have developed these changes in discussion with the appropriate project manager.
  • My code follows the general Fjelltopp documentation (see Confluence).
  • I have made corresponding changes to the Fjelltopp documentation (see Confluence).
  • I have rebased this branch with master.
  • New dependency changes have been committed.
  • I have added automated tests that prove my fix is effective or that my feature works.
  • New and existing tests pass locally with my changes.
  • My changes generate no new warnings.
  • I have performed a self-review of my own code.
  • I have assigned at least one reviewer.

@A-Souhei A-Souhei requested a review from kforenc July 11, 2023 14:28

# return redirect('http://adr.local/user/edit/admin')
# return jsonify({"message": "Silent authentication initiated.", "args": request.args, "silent_response": silent_response.text})
return redirect(auth_url)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use here 'Auth0 Management API'.

Please use https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id endpoint. Include only following fields: email,user_metadata. To get user_id please run action user_show with parameter include_plugin_extras set to true for current user. This way you'll get plugin_extras, where for saml2auth you'll get saml_id which is user_id in Auth0.

You can copy code I used in APE to get management_token and access Management API.

Domain is same as for APE. I'll send you client_id, and client_secret via slack. They should be added as new variables to adx_config (as before).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a great solution, we need to :
Configure Auth0 to send user_id as a SAML attribute
Configure adx_config.ini to map saml_id in ADR
We are running out of time so I'll ask Tomek tomorrow

@kforenc kforenc force-pushed the ADX-1009_seamless_integration_with_adr branch from 473cb69 to d744b08 Compare July 17, 2023 08:54
Base automatically changed from ADX-1009_seamless_integration_with_adr to development August 7, 2023 11:45
@kforenc
Copy link
Contributor

kforenc commented Aug 16, 2023

Since this is a lot of work, we decided not to do it. Instead we did #291

@kforenc kforenc closed this Aug 16, 2023
@kforenc kforenc deleted the ADX-1017-updating-adr-fields-to-reflect-latest-ape-profile-data branch August 16, 2023 07:23
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