jboss - How to setup apache redirect or custom 401 document on Kerberos SSO login failure -


i have working kerberos sso setup, use apache , jboss mod_jk. apache protecting (by kerberos) auto-login.htm page following configuration:

<location /auto-login.htm>   authtype           kerberos   authname           "kerberos active directory login"   krbmethodnegotiate on   krbmethodk5passwd  on   krbauthrealms      krb.somedomain.com   krbservicename     http/server.somedomain.com@krb.somedomain.com   krb5keytab         /etc/krb/krb5.keytab   krbverifykdc       on   krbauthoritative   on   require            valid-user   #errordocument 401  /login.htm   </location> 

this works 100% , able login kerberos/sso , read remote_user variable in java application.

now problem want redirect unprotected login.htm if user unable log in via kerberos/sso. solution had in mind set 401 errordocument, when set uncommenting #errordocument 401 in code above redirects login.htm returning 401 request user credentials inherently part of kerberos/sso authentication process. result users end @ login.htm , never completes kerberos/sso login process.

any or alternative solution appreciated.

thanks in advance
pierre

in order not interrupt kerberos/sso authentication process, use following:

errordocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=/login.htm\"></html>" 

this cause redirect occur when user clicks cancel on browser dialog box.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -