apache.tomcat.eeror.log (123.2 KB)
Hello, Colleagues!
I will be glad of any help and hint.
Problem with the Cmdbuild application configuration using the HeaderAuthenticator parameter
I use Apache + Kerberos to redirect requests to TomCat
Apache Settings:
<VirtualHost *:80>
LogLevel debug
....
ErrorLog /var/log/httpd/tomcat.error.log
CustomLog /var/log/httpd/tomcat.log combined
...........
ServerName localhost
ServerAlias localhost
<Location /cmdbuild/>
AuthType Kerberos
AuthName 'Acme Corporation'
KrbServiceName HTTP/seername.dev.local
KrbMethodNegotiate on
KrbMethodK5Passwd off
Krb5Keytab /etc/cmdbdev.keytab
Require valid-user
</Location>
ProxyRequests Off
ProxyPreserveHost On
RequestHeader set X-Forwarded-User %{REMOTE_USER}s
Redirect permanent /cmdbuild http://servername:8092/cmdbuild
#ProxyPass /cmdbuild http://servername:8092/cmdbuild
#ProxyPassReverse /cmdbuild http://servername:8092/cmdbuild
ProxyPass /cmdbuild ajp://servername:8009/cmdbuild
ProxyPassReverse /cmdbuild ajp://servername:8009/cmdbuild
#ProxyPassReverseCookiePath /cmdbuild /cmdbuild
</VirtualHost>
Cmdbuild:
auth.methods=HeaderAuthenticator,DBAuthenticator
header.attribute.name=X-Forwarded-User
The user exists in cmdb.
Kerberos is configured and running.
But the app doesn’t want to authenticate me.
Cmdbuil.log:
> 2020-09-24T13:12:24.227+03:00 [req:v4t0gd] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.241+03:00 [req:n1gl19] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.242+03:00 [req:n1gl19] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:24.242+03:00 [req:n1gl19] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:24.282+03:00 [req:wfsed8] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.282+03:00 [req:wfsed8] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:24.282+03:00 [req:wfsed8] DEBUG org.cmdbuild.webapp.filters.UiFilter - ui filter doFilter BEGIN
> 2020-09-24T13:12:24.283+03:00 [req:wfsed8] DEBUG org.cmdbuild.webapp.filters.UiFilter - return ui config = window.cmdbuildConfig={"baseUrl":"http://SERVERNAME/cmdbuild_pretest_32/services/rest/v3","geoserverBaseUrl":"http://SERVERNAME/cmdbuild_pretest_32/services/geoserver","bimserverBaseUrl":"http://SERVERNAME/cmdbuild_pretest_32/services/bimserver","socketUrl":"ws://SERVERNAME/cmdbuild_pretest_32/services/websocket/v1/main","manifest":"ready2use"};
> 2020-09-24T13:12:24.283+03:00 [req:wfsed8] DEBUG org.cmdbuild.webapp.filters.UiFilter - ui filter doFilter END
> 2020-09-24T13:12:24.283+03:00 [req:wfsed8] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:24.283+03:00 [req:nxsfmu] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.284+03:00 [req:nxsfmu] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:24.288+03:00 [req:8ackvg] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.289+03:00 [req:8ackvg] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:24.291+03:00 [req:8ackvg] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:24.293+03:00 [req:11dykz] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.293+03:00 [req:dfp8pd] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.294+03:00 [req:11dykz] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:24.294+03:00 [req:dfp8pd] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:24.295+03:00 [req:dfp8pd] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:24.296+03:00 [req:11dykz] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:24.296+03:00 [req:nxsfmu] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:24.314+03:00 [req:lrn94r] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.315+03:00 [req:lrn94r] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:24.315+03:00 [req:dxyxb1] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.316+03:00 [req:dxyxb1] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:24.316+03:00 [req:c18zae] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.316+03:00 [req:c18zae] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:24.317+03:00 [req:lrn94r] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:24.317+03:00 [req:dxyxb1] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:24.318+03:00 [req:c18zae] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:24.354+03:00 [req:617emw] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.355+03:00 [req:617emw] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:24.364+03:00 [req:y1e1mg] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.364+03:00 [req:y1e1mg] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:24.367+03:00 [req:y1e1mg] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:24.386+03:00 [req:617emw] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:24.560+03:00 [req:xvwy1a] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:24.561+03:00 [req:xvwy1a] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:24.563+03:00 [req:xvwy1a] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:25.725+03:00 [req:gy93or] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:25.726+03:00 [req:gy93or] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:25.727+03:00 [req:gy93or] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:25.887+03:00 [req:dx5s39] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:25.887+03:00 [req:n1ltzv] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:25.887+03:00 [req:dx5s39] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:25.887+03:00 [req:n1ltzv] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:25.888+03:00 [req:dx5s39] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:25.888+03:00 [req:n1ltzv] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:25.897+03:00 [req:2c0d20] DEBUG o.c.w.f.LanguageFilter$$EnhancerBySpringCGLIB$$4fee5447 - set request language = ru
> 2020-09-24T13:12:25.907+03:00 [req:a1ed01] DEBUG o.c.w.s.SecurityConfiguration$$EnhancerBySpringCGLIB$$80ec20cc - enable cors for this request
> 2020-09-24T13:12:25.907+03:00 [req:a1ed01] DEBUG o.c.w.s.SecurityConfiguration$$EnhancerBySpringCGLIB$$80ec20cc - set cors allowed origins = [http://SERVERNAME]
> 2020-09-24T13:12:25.908+03:00 [req:a1ed01] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:25.908+03:00 [req:a1ed01] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:25.909+03:00 [req:a1ed01] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:25.920+03:00 [req:7yi91o] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:25.920+03:00 [req:7yi91o] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:25.921+03:00 [req:7yi91o] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:25.922+03:00 [req:417e61] DEBUG o.c.w.f.LanguageFilter$$EnhancerBySpringCGLIB$$4fee5447 - set request language = ru
> 2020-09-24T13:12:25.923+03:00 [req:417e61] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:25.924+03:00 [req:417e61] WARN o.c.a.s.inner.SessionDataServiceImpl - no session available, using dummy session data
> 2020-09-24T13:12:25.942+03:00 [req:53746f] DEBUG o.c.w.f.LanguageFilter$$EnhancerBySpringCGLIB$$4fee5447 - set request language = ru
> 2020-09-24T13:12:25.943+03:00 [req:53746f] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:25.954+03:00 [req:pnmywv] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:26.105+03:00 [req:cdbe9a] DEBUG o.c.w.f.LanguageFilter$$EnhancerBySpringCGLIB$$4fee5447 - set request language = ru
> 2020-09-24T13:12:26.106+03:00 [req:fbovio] DEBUG o.c.w.s.SecurityConfiguration$$EnhancerBySpringCGLIB$$80ec20cc - enable cors for this request
> 2020-09-24T13:12:26.106+03:00 [req:g1ll03] DEBUG o.c.w.s.SecurityConfiguration$$EnhancerBySpringCGLIB$$80ec20cc - enable cors for this request
> 2020-09-24T13:12:26.106+03:00 [req:cdbe9a] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:26.106+03:00 [req:fbovio] DEBUG o.c.w.s.SecurityConfiguration$$EnhancerBySpringCGLIB$$80ec20cc - set cors allowed origins = [http://SERVERNAME]
> 2020-09-24T13:12:26.106+03:00 [req:g1ll03] DEBUG o.c.w.s.SecurityConfiguration$$EnhancerBySpringCGLIB$$80ec20cc - set cors allowed origins = [http://SERVERNAME]
> 2020-09-24T13:12:26.107+03:00 [req:g1ll03] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:26.107+03:00 [req:fbovio] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:26.107+03:00 [req:g1ll03] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:26.107+03:00 [req:fbovio] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:26.107+03:00 [req:g1ll03] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:26.108+03:00 [req:fbovio] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
> 2020-09-24T13:12:26.110+03:00 [req:nq76es] DEBUG o.c.w.s.SecurityConfiguration$$EnhancerBySpringCGLIB$$80ec20cc - enable cors for this request
> 2020-09-24T13:12:26.110+03:00 [req:nq76es] DEBUG o.c.w.s.SecurityConfiguration$$EnhancerBySpringCGLIB$$80ec20cc - set cors allowed origins = [http://SERVERNAME]
> 2020-09-24T13:12:26.110+03:00 [req:nq76es] DEBUG o.c.a.l.AuthenticationServiceImpl - try to validate request with authenticator = HeaderAuthenticator
> 2020-09-24T13:12:26.111+03:00 [req:nq76es] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter BEGIN
> 2020-09-24T13:12:26.112+03:00 [req:nq76es] DEBUG o.c.w.filters.UiCacheControlFilter - ui cache control filter doFilter END
the headers seem to work, and I get a response from the server:
Request URL: http://servername/cmdbuild/services/rest/v3/sessions/current?_dc=1600942543993&ext=true&if_exists=true
Can you tell me if this functionality is supported? or is it already disabled?