Hi 

>>>
- I added a context.xml file in
fediz/examples/springWebapp/src/main/webapp/META-INF/context.xml
with this contents
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/fedizhelloworld">
<Valve className="org.apache.cxf.fediz.tomcat.FederationAuthenticator"
         configFile="conf/Fediz_config.xml" />
</Context>
Copied all the jar files from the zip file
fediz/plugins/tomcat/targetfediz-tomcat-1.1.0-SNAPSHOT-zip-with-dependencies.zip
>>>
You don't have to deploy the plugins for tomcat as you use spring security to 
enforce authentication.

>>>
https://localhost:9443/fediz-idp/?wa=wsignin1.0&wreply=https%3A%2F%2Flocalhost%3A8443%2Ffedizhelloworld%2Fj_spring_fediz_security_check&wtrealm=urn%3Aorg%3Aapache%3Acxf%3Afediz%3Afedizhelloworld&wct=2013-07-12T19%3A07%3A24.682Z
>>>
Please update the issuer url to the following (WEB-INF/fediz_config.xml, I'll 
delete the one in src/main/config)
https://localhost:9443/fediz-idp/federation


Thanks
Oli


------

Oliver Wulff

Blog: http://owulff.blogspot.com
Solution Architect
http://coders.talend.com

Talend Application Integration Division http://www.talend.com

________________________________________
From: Federico Tello Gentile [fgent...@lifia.info.unlp.edu.ar]
Sent: 12 July 2013 21:29
To: users@cxf.apache.org
Subject: Running Fediz Spring example webapp

Hi.
I've been trying to run the Fediz Spring example webapp. I want to
trigger a login when accessing

https://localhost:8443/fedizhelloworld/secure/test.html

I all I get is a NullPointerException. *I'd appreciate any help you can
give me.*

Here's what I've done:
- Checked out the code from https://svn.apache.org/repos/asf/cxf/fediz/trunk
- Installed a fresh Tomcat 7.0.42 in /home/user/apache-tomcat-7.0.42
- Copied tomcat-idp.jks inside /home/user/apache-tomcat-7.0.42
- Edited server.xml

<Connector port="9443" protocol="HTTP/1.1" SSLEnabled="true"
    maxThreads="150" scheme="https" secure="true"
    keystoreFile="/home/user/apache-tomcat-7.0.42/tomcat-idp.jks"
    keystorePass="tompass"
    clientAuth="false" sslProtocol="TLS" />

- Deployed fediz-idp and fediz-idp-sts wars there.

I see "Hello world" when accessing
https://localhost:9443/fediz-idp/
and accessing
https://localhost:9443/fediz-idp/federation
triggers a basic authentication user and password prompt.

I have a different Tomcat for the webapp "Fediz Example: SpringWebapp"

CATALINA_HOME is /home/user/apache-tomcat-7.0.34
CATALINA_BASE is /home/user/.netbeans/7.3/apache-tomcat-7.0.34.0_base

- I copied tomcat-rp.jks to /home/user/apache-tomcat-7.0.34
- Set up ssl

  <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
      maxThreads="150" scheme="https" secure="true"
      clientAuth="false" sslProtocol="TLS"
      keystoreFile="/home/user/apache-tomcat-7.0.34/tomcat-rp.jks"
      keystorePass="tompass" />

- I copied the file
fediz/examples/springWebapp/src/main/config/fediz_config.xml to
/home/user/.netbeans/7.3/apache-tomcat-7.0.34.0_base/conf

(Renaming it to Fediz_config.xml)

There's also a similarly named file
fediz/examples/springWebapp/src/main/webapp/WEB-INF/fediz_config.xml
which has different contents, but I did not copy as I guessed it is used
by the application and not the tomcat's valve.

- I added a context.xml file in

fediz/examples/springWebapp/src/main/webapp/META-INF/context.xml

with this contents

<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/fedizhelloworld">
<Valve className="org.apache.cxf.fediz.tomcat.FederationAuthenticator"
         configFile="conf/Fediz_config.xml" />
</Context>

Copied all the jar files from the zip file

fediz/plugins/tomcat/targetfediz-tomcat-1.1.0-SNAPSHOT-zip-with-dependencies.zip

in /home/user/apache-tomcat-7.0.34/lib

- deployed the Fediz Example: SpringWebapp war

When I go to https://localhost:8443/fedizhelloworld/ I see the hello
world message. But If I try to access anything under /secure I don't get
any login attempt.

https://localhost:8443/fedizhelloworld/secure/manager/

redirects me to

https://localhost:9443/fediz-idp/?wa=wsignin1.0&wreply=https%3A%2F%2Flocalhost%3A8443%2Ffedizhelloworld%2Fj_spring_fediz_security_check&wtrealm=urn%3Aorg%3Aapache%3Acxf%3Afediz%3Afedizhelloworld&wct=2013-07-12T19%3A07%3A24.682Z

And I see a hello world there, but no log in prompt.

https://localhost:8443/fedizhelloworld/secure/
gives me no redirection and a NullPointerException
java.lang.NullPointerException
org.apache.cxf.fediz.core.servlet.FederationFilter.doFilter(FederationFilter.java:57)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)

Reply via email to