Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33427

Help with configuring redirect when user is not logged in via SSO (SAML)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • saml-plugin
    • None
    • Ubuntu Linux and Apache 2.4

      We recently implemented SAML with our Jenkins instance. If a user is not yet logged in via our corporate SSO and they click on a deep link (in an email for example) they get a "Not Found" which is confusing because it fails to say anything about not being logged in. What should happen is a redirect to the corporate SSO and then upon successful log in, the redirect back to the original deeply linked content.

      I imagine that this will be an apache config thing.
      Any advice to remedy this would be greatly appreciated.

      My apache config is included.

                      1. CONFIG #########
                        ServerName myjenkins.example.com
                        ServerAdmin admin@example.com

      <VirtualHost default:80>

      1. 80 redirect to 443
        RewriteEngine on
        RewriteRule ^.*$ https://% {HTTP_HOST}

        %

        {REQUEST_URI}

        </VirtualHost>

      <VirtualHost *:443>
      ServerAlias myjenkins.example.com

      SSLEngine on
      SSLCertificateFile /masked/masked.crt
      SSLCertificateKeyFile /masked/masked.key

      ErrorLog logs/jenkins_ssl_error.log
      CustomLog logs/jenkins_ssl_access.log combined

      ProxyRequests Off
      ProxyVia Off
      ProxyPreserveHost On
      AllowEncodedSlashes NoDecode
      <Proxy *>
      Order deny,allow
      Allow from all
      </Proxy>

      ProxyPass / http://localhost:8080/ nocanon
      ProxyPassReverse / http://myjenkins.example.com

      RequestHeader set X-Forwarded-Proto "https"
      RequestHeader set X-Forwarded-Port "443"
      </VirtualHost>

            chengas123 Ben McCann
            mikelupo MICHAEL LUPO
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: