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

Auto-fill from other creds: Created email accounts with first letter capitalised #4

Closed
benthompsonhx opened this issue Apr 22, 2022 · 6 comments

Comments

@benthompsonhx
Copy link

Problem:
Trying to move from SAML to OAuth, have used admin power pack to create email accounts for SAML only users. On a previous attempt, Google OAuth merge did not work without the email_credentials field.

Email accounts have been created for these users via admin power pack, but with the names are capitalised. Looker shows the email as Firstname.Lastname@foo.com

On testing the OAuth merge, Looker warns that the email address does not match, so I have not applied it but this was the same problem we had before.

Solution:
Force to lower-case all the parameters used for generating the email address, seeing as no-one enters their email addresses with upper case first. Email doesn't care about case, Looker's OAuth pattern matching does seem to.

app_profile

app_ua

app_users++

@davidtamaki
Copy link
Owner

Hi @benthompsonhx just to confirm, was the email in SAML originally Firstname.Lastname@foo.com, which was then replicated when generating the email address?

If so, we can add a feature to lower-case the emails on the auto-fill function

@benthompsonhx
Copy link
Author

benthompsonhx commented Apr 22, 2022

Hi @davidtamaki - It seems so, yes. The caps are inconsistent in the SAML emails, so I don't know what we're doing there.

When users have caps in their SAML email address, they get caps in the email address generated by admin power pack. So sounds like that feature would work for us.

Really super tool, thank you.

benthompsonhx added a commit to benthompsonhx/admin_power_pack that referenced this issue Apr 22, 2022
…o account for occasions where email addresses contain capitals. Fails to match the OAuth merge.
@benthompsonhx
Copy link
Author

benthompsonhx commented Apr 22, 2022

I've not put in a PR for my hack of adding email:t.email.toLowerCase() (above) as it has not worked. There seems to be an order of precedence, pulling whatever Looker remembers from a previous email value rather than going back to SAML.

Sequence

  • Install GitHub fork with t.email.toLowerCase()
  • Email has initial capitals
  • Functions: Delete Email
  • Check Looker User Admin: Email is greyed out, still with initial capitals
  • Functions: Auto-fill from other creds
  • Newly created email still with capitals
  • OAuth merge test still sees emails as different

Also, editing the Profile email address has no effect on the User attribute (name: email, label: Email), have tried that.

benthompsonhx added a commit to benthompsonhx/admin_power_pack that referenced this issue Apr 22, 2022
@davidtamaki
Copy link
Owner

Thanks for the context! I've pushed an update to have a checkbox for the option to convert email addresses to lowercase on the 'Auto-fill from other creds' function. Can you let me know if this works for you?

Also we're in the process of fully open-sourcing the unbundled source code so contributions will be much easier & welcome in the future!

@benthompsonhx
Copy link
Author

Thanks David. I'll install it and get back to you.

I think on further investigation with Looker our problem is that the Looker accounts created via LDAP where their email has init capitals have a top level email in Looker of Firstname.Lastname@domain.com - and the admin power pack does not edit the top level email field. I don't believe the Looker API exposes that. I believe we need an update to set email = lower(email) on the users table for our OAuth merge to work, we don't host Looker so access is restricted.

@benthompsonhx
Copy link
Author

@davidtamaki - confirming that clicking the checkbox correctly created a lower case credentials_email.email

Many thanks

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

No branches or pull requests

2 participants