OAuth Shibboleth validation of email on Sign Up account creation

Summerize

When using OAuth (Shibboleth) and user have multiple emails (in my case LDAP is backend , and mail attribute may have more then one value) , OAuth return follow message :

January 04, 2019 12:39: (OAuth) Error saving user pero@srce.rh (Pero.Peric@srce.rh;pero@srce.rh): ["Email is invalid"]

and return page

Screenshot_from_2019-01-04_12.39.07

How ever authentication goes smoothly once account is created with message :

January 04, 2019 12:40: (OAuth) saving user Pero.Peric@srce.rh;pero@srce.rh from login with extern_uid => pero@srce.rh

Server use white listing for Sign Up

Steps to reproduce

Using OAuth with shibboleth authentication engine, and user with multiple email address

What is the expected correct behavior?

Simple solutions create account with first email address.

Complete solutions, store all email address separately on time of creating account.

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Current User: git Using RVM: no Ruby Version: 2.5.3p105 Gem Version: 2.7.6 Bundler Version:1.16.6 Rake Version: 12.3.1 Redis Version: 3.2.12 Git Version: 2.18.1 Sidekiq Version:5.2.3 Go Version: unknown

GitLab information Version: 11.6.2 Revision: 4d0c547 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql Using LDAP: no Using Omniauth: yes Omniauth Providers: shibboleth

GitLab Shell Version: 8.4.3 Repository storage paths:

  • default: /data/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 8.4.3 ? ... OK (8.4.3) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ...

Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.5.3) Git version >= 2.18.0 ? ... yes (2.18.1) Git user has default SSH configuration? ... yes Active users: ... 127

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Possible fixes

Not for now

Edited by 🤖 GitLab Bot 🤖