user_saml icon indicating copy to clipboard operation
user_saml copied to clipboard

Allow rewrite of UID for SSO

Open digitalshow opened this issue 5 years ago • 4 comments

Allow for rewrite of UIDs using preg_replace.

An administrator can provide a pattern and a replacement parameter that get passed to PHP's preg_replace function before the UID is used to sign in to NextCloud. I use it to extract the username from a kerberos principal (pattern: /^(.*)@REALM$/, replacement: $1).

digitalshow avatar Mar 01 '19 19:03 digitalshow

thanks for your contribution! :+1: Sounds like a good idea but I don't have a Kerberos setup to test it at the moment... @icewind1991 do you have a chance to review/test it?

schiessle avatar Apr 25 '19 07:04 schiessle

It is not limited to Kerberos, you can use it in other places where the username has to be rewritten (e.g. when the SSO mechanism passes an e-mail address or a full path from LDAP).

digitalshow avatar Apr 27 '19 12:04 digitalshow

Any news here?

digitalshow avatar Dec 30 '19 21:12 digitalshow

@digitalshow thanks for this pr! Could you rebase please? :)

skjnldsv avatar Jan 29 '20 07:01 skjnldsv