daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Aug 10th, 2018 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. REMOTE_USER not being set by Apache2?
  2. <Location />
  3.     AuthBasicProvider ldap
  4.     AuthLDAPURL ldap://mainframe/ou=People,dc=dtch,dc=com?uid?sub
  5.     AuthzLDAPAuthoritative off
  6.     AuthType Basic
  7.     AuthName "LDAP"
  8.     require valid-user
  9.  
  10.     Options Indexes FollowSymLinks MultiViews +Includes
  11. </Location>
  12.    
  13. JKWorersFile  /path/to/workers.properties
  14. JkShmFile     /path/to/mod_jk.shm
  15. JkLogFile     /path/to/mod_jk.log
  16. JkLogLevel    info
  17. JkOptions     +ForwardKeySize +ForwardURICompat -ForwardDirectories
  18.    
  19. worker.list=worker1
  20.  
  21. worker.worker1.port=8009
  22. worker.worker1.host=127.0.0.1
  23. worker.worker1.type=ajp13
  24.    
  25. ...
  26.  
  27. JkMount /*.jsp worker1
  28. JkMount /sng/* worker1
  29.    
  30. <filter>
  31.     <filter-name>RemoteUser</filter-name>
  32.     <filter-class>path.to.RemoteUser</filter-class>
  33. </filter>
  34. <filter-mapping>
  35.     <filter-name>RemoteUser</filter-name>
  36.     <url-pattern>/*</url-pattern>
  37.     <dispatcher>REQUEST</dispatcher>
  38. </filter-mapping>
  39.    
  40. //...
  41.  
  42. public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain )
  43.     throws IOException, ServletException
  44. {
  45.     if( request instanceof HttpServletRequest )
  46.     {
  47.         HttpServletRequest httpServletRequest = ( HttpServletRequest )request;
  48.         String username = httpServletRequest.getHeader( "REMOTE_USER" );
  49.  
  50.         if( username == null )
  51.         {
  52.             // enter here every time
  53.         }
  54.  
  55.         // ...
  56.     }
  57.  
  58.     //...
  59. }
  60.    
  61. Basic XXXX:YYYY
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top