Hi Steffi
It fails here:
org.apache.catalina.startup.ContextConfig:
...
// Identify the class name of the Valve we should configure
String authenticatorName = null;
authenticatorName =
authenticators.getProperty(loginConfig.getAuthMethod());
if (authenticatorName == null) {
log.error(sm.getString("contextConfig.authenticatorMissing",
loginConfig.getAuthMethod()));
ok = false;
return;
}
...
WSFED is not one of the default ones. Tomcat 7 is more tolerant there. I've to
look for a proper solution based on the customAuthenticators also in this class:
/*
* First check to see if there is a custom mapping for the login
* method. If so, use it. Otherwise, check if there is a mapping in
* org/apache/catalina/startup/Authenticators.properties.
*/
Valve authenticator = null;
if (customAuthenticators != null) {
authenticator = (Valve)
customAuthenticators.get(loginConfig.getAuthMethod());
}
As a workaround, could you configure "BASIC" in the login-config element of the
web.xml of fedizhelloworld?
Thanks
Oli
------
Oliver Wulff
Blog: http://owulff.blogspot.com
Solution Architect
http://coders.talend.com
Talend Application Integration Division http://www.talend.com
________________________________________
From: Stephanie Stroka [[email protected]]
Sent: 10 May 2012 16:44
To: [email protected]
Subject: Re: Apache fediz with tomcat 6
Sure, it is attached.
I did not see anything interesting in the log though.
Thanks for your help!
Steffi
On 05/10/12 15:43, Oliver Wulff wrote:
> Hi Steffi
>
> Could you increase the log level for tomcat and attach the zipped log file?
>
> Thanks
> Oli
>
>
> ------
>
> Oliver Wulff
>
> Blog: http://owulff.blogspot.com
> Solution Architect
> http://coders.talend.com
>
> Talend Application Integration Division http://www.talend.com
>
> ________________________________________
> From: Stephanie Stroka [[email protected]]
> Sent: 10 May 2012 13:51
> To: [email protected]
> Subject: Re: Apache fediz with tomcat 6
>
> Hey Oli,
>
> thanks for replying!
>
> I deleted context.xml from the META-INF directory and configured the
> custom valve in server.xml inside of the<Host> element:
>
> <Host name="localhost" appBase="webapps"
> unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
> <Context path="">
> <Valve
> className="org.apache.cxf.fediz.tomcat.FederationAuthenticator"
> issuerURL="https://zfs-wsfed-dev.zh.adnovum.ch/rpidp/"
> truststoreFile="conf/stsstore.jks"
> truststorePassword="stsspass"
> trustedIssuer=".*CN=www.sts.com.*" />
> </Context>
> </Host>
>
>
> But now I'm getting the following errors:
>
> May 10, 2012 1:26:25 PM org.apache.catalina.startup.ContextConfig
> authenticatorConfig
> SEVERE: Cannot configure an authenticator for method WSFED
> May 10, 2012 1:26:25 PM org.apache.catalina.startup.ContextConfig start
> SEVERE: Marking this application unavailable due to previous error(s)
> May 10, 2012 1:26:25 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error getConfigured
> May 10, 2012 1:26:25 PM org.apache.catalina.core.StandardContext start
> SEVERE: Context [/fedizhelloworld] startup failed due to previous errors
>
> What do I miss?
>
> thanks and best wishes,
> Steffi
>
>
> On 05/09/12 18:09, Oliver Wulff wrote:
>> Hi Steffi
>>
>> As far as I remember, Tomcat 6 doesn't support to configure a custom Valve
>> in META-INF/context.xml. If you configure the context in the server.xml it
>> should get picked up. Have you tried this already?
>>
>> Thanks
>> Oli
>>
>>
>> ------
>>
>> Oliver Wulff
>>
>> Blog: http://owulff.blogspot.com
>> Solution Architect
>> http://coders.talend.com
>>
>> Talend Application Integration Division http://www.talend.com
>>
>> ________________________________________
>> From: Stephanie Stroka [[email protected]]
>> Sent: 09 May 2012 15:46
>> To: [email protected]
>> Subject: Apache fediz with tomcat 6
>>
>> Hello!
>>
>> I tried to deploy the Apache fediz SimpleWebApp on Tomcat 6, but I got
>> the following exception:
>>
>> INFO: Server startup in 1411 ms
>> May 9, 2012 3:29:30 PM
>> org.apache.catalina.authenticator.FormAuthenticator forwardToLoginPage
>> WARNING: Unexpected error forwarding to login page
>> java.lang.NullPointerException
>> at
>> org.apache.catalina.authenticator.FormAuthenticator.forwardToLoginPage(FormAuthenticator.java:333)
>> at
>> org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:245)
>> at
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
>> at
>> org.apache.cxf.fediz.tomcat.FederationAuthenticator.invoke(FederationAuthenticator.java:241)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
>> at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
>> at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
>> at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>> at java.lang.Thread.run(Thread.java:679)
>>
>>
>> I checked the code and I'm curious about this error:
>> AuthenticatorBase.invoke() should call
>> FederationAuthenticator.authenticate(), not
>> FormAuthenticator.authenticate(), right?
>>
>> With tomcat 7, the redirect to the login page works just fine. The
>> methods of FederationAuthenticator, not FormAuthenticator are used.
>>
>> Does anybody know how to fix the issue with tomcat 6?
>>
>> Thanks!
>> Steffi
--
AdNovum Informatik AG
Stephanie Stroka
Dipl. Informatik-Ing. FH
Roentgenstrasse 22, CH-8005 Zurich
mailto:[email protected]
phone: +41 44 272 6111, fax: +41 44 272 6312
http://www.adnovum.ch AdNovum Offices: Bern, Budapest, Singapore,
Zurich (HQ)