Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab
GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 23,561
    • Issues 23,561
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 820
    • Merge Requests 820
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • Container Registry
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #24510

Closed
Open
Opened Oct 03, 2018 by Mike Rennie@mrennie
  • Report abuse
  • New issue
Report abuse New issue

"logout_url" does not seem to be respected from omniauth provider

Summary

With omniauth enabled, and with a given logout_url, the proper redirection does not take place on sign-out

Steps to reproduce

Configure Gitlab to use a CAS omniauth provider that specifies a logout_url. Sign out. Notice you are not redirected to the URL you specified.

Configuration used

Here is our values config:

omniauth:
  enabled: true
  autoSignInWithProvider: cas3
  syncProfileFromProvider: ['cas3']
  syncProfileAttributes: ['cas3']
  allowSingleSignOn: ['cas3']
  blockAutoCreatedUsers: false
  autoLinkLdapUser: false
  autoLinkSamlUser: false
  externalProviders: []
  providers:
  - secret: gitlab-cas-secret
    name: provider

And here is the CAS json (that is set in the gitlab-cas-secret):

{
  "name": "cas3",
  "label": "My CAS",
  "args": {
      "url": "https://cas.provider.net",
      "login_url": "/cas/login",
      "service_validate_url": "/cas/serviceValidate",
      "logout_url": "/cas/logout",
      "nickname_key": "username"
  }
}

I also tried creating the secret with yaml to see if that made a difference (it didn't):

---
name: cas3
label: My CAS
args:
  url: https://cas.provider.net
  login_url: "/cas/login"
  service_validate_url: "/cas/serviceValidate"
  logout_url: "/cas/logout"
  nickname_key: username

Current behavior

All of the sign-in feature of the provider work perfectly (auto sign-in, the login redirect, etc, are all fine) - but if a user tries to sign out they are automatically signed back in - because the logout url is not redirected to /cas/logout as expected, instead it is just going to /users/sign_in.

Expected behavior

The URL redirection would work as expected. FWIW this same configuration works fine in our omnibus deployment.

Versions

  • Chart: latest
  • Platform:
    • Self-hosted: IBM Cloud
  • Kubernetes: (kubectl version)
    • Client: 1.10
    • Server: 1.11
  • Helm: (helm version)
    • Client: 2.8.2
    • Server: 2.8.2

Relevant logs

Here is a kubetail capture of the unicorn log when a user tries to sign out:

[gitlab-unicorn-5d7f59d7c5-wqmgr unicorn] ==> /var/log/gitlab/production.log <== 
[gitlab-unicorn-5d7f59d7c5-wqmgr unicorn] Started GET "/users/sign_out" for xxx.xxx.xxx.xxx at 2018-10-03 16:53:01 +0000 
[gitlab-unicorn-5d7f59d7c5-wqmgr unicorn] Processing by SessionsController#destroy as HTML 
[gitlab-unicorn-5d7f59d7c5-wqmgr unicorn] Redirected to https://gitlab-test.net/users/sign_in 
[gitlab-unicorn-5d7f59d7c5-wqmgr unicorn] Completed 302 Found in 95ms (ActiveRecord: 21.0ms) 

Related issues

  • Discussion
  • Designs
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
6
Labels
External Authorization Manage [DEPRECATED] P3 S3 bug devops::manage
Assign labels
  • View project labels
Reference: gitlab-org/gitlab#24510