Author: owulff
Date: Sat Aug 31 21:20:37 2013
New Revision: 1519227
URL: http://svn.apache.org/r1519227
Log:
[FEDIZ-15] Support the publish of the WS-Federation Metadata document
Modified:
cxf/fediz/trunk/services/idp/pom.xml
cxf/fediz/trunk/services/idp/src/main/filters/realm-a/env.properties
cxf/fediz/trunk/services/idp/src/main/filters/realm-b/env.properties
cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/idp-config-realma.xml
cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/idp-config-realmb.xml
cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/security-config.xml
cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/web.xml
Modified: cxf/fediz/trunk/services/idp/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/pom.xml?rev=1519227&r1=1519226&r2=1519227&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/pom.xml (original)
+++ cxf/fediz/trunk/services/idp/pom.xml Sat Aug 31 21:20:37 2013
@@ -39,16 +39,17 @@
</properties>
<dependencies>
<dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
-<!-- <dependency> -->
-<!-- <groupId>org.springframework</groupId> -->
-<!-- <artifactId>spring-web</artifactId> -->
-<!-- <version>${spring.version}</version> -->
-<!-- </dependency> -->
<dependency>
<groupId>org.apache.cxf.fediz</groupId>
<artifactId>fediz-core</artifactId>
@@ -113,6 +114,7 @@
<filtering>true</filtering>
<includes>
<include>**/realm.properties</include>
+ <include>**/web.xml</include>
</includes>
</resource>
<resource>
@@ -120,6 +122,7 @@
<filtering>false</filtering>
<excludes>
<exclude>**/realm.properties</exclude>
+ <exclude>**/web.xml</exclude>
</excludes>
</resource>
</resources>
@@ -145,6 +148,7 @@
<filtering>true</filtering>
<includes>
<include>**/applicationContext.xml</include>
+
<include>**/web.xml</include>
</includes>
</resource>
<resource>
@@ -152,6 +156,7 @@
<filtering>false</filtering>
<excludes>
<exclude>**/applicationContext.xml</exclude>
+
<exclude>**/web.xml</exclude>
</excludes>
</resource>
</webResources>
Modified: cxf/fediz/trunk/services/idp/src/main/filters/realm-a/env.properties
URL:
http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/filters/realm-a/env.properties?rev=1519227&r1=1519226&r2=1519227&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/filters/realm-a/env.properties
(original)
+++ cxf/fediz/trunk/services/idp/src/main/filters/realm-a/env.properties Sat
Aug 31 21:20:37 2013
@@ -1,4 +1,5 @@
realm.STS_URI=REALMA
realmA.port=9443
realmB.port=12443
-idp-config=idp-config-realma.xml
\ No newline at end of file
+idp-config=idp-config-realma.xml
+realm-uri=urn:org:apache:cxf:fediz:idp:realm-A
\ No newline at end of file
Modified: cxf/fediz/trunk/services/idp/src/main/filters/realm-b/env.properties
URL:
http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/filters/realm-b/env.properties?rev=1519227&r1=1519226&r2=1519227&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/filters/realm-b/env.properties
(original)
+++ cxf/fediz/trunk/services/idp/src/main/filters/realm-b/env.properties Sat
Aug 31 21:20:37 2013
@@ -1,4 +1,5 @@
realm.STS_URI=REALMB
realmA.port=9443
realmB.port=12443
-idp-config=idp-config-realmb.xml
\ No newline at end of file
+idp-config=idp-config-realmb.xml
+realm-uri=urn:org:apache:cxf:fediz:idp:realm-B
\ No newline at end of file
Modified:
cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
URL:
http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java?rev=1519227&r1=1519226&r2=1519227&view=diff
==============================================================================
---
cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
(original)
+++
cxf/fediz/trunk/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
Sat Aug 31 21:20:37 2013
@@ -60,6 +60,9 @@ public class IDPConfig implements Serial
//md:KeyDescriptor, use="signing"
private String certificate;
+ //Password to read the private key to sign metadata document
+ private String certificatePassword;
+
//fed:SecurityTokenSerivceEndpoint
private String stsUrl;
@@ -147,6 +150,14 @@ public class IDPConfig implements Serial
public void setCertificate(String certificate) {
this.certificate = certificate;
}
+
+ public String getCertificatePassword() {
+ return certificatePassword;
+ }
+
+ public void setCertificatePassword(String password) {
+ this.certificatePassword = password;
+ }
public String getStsUrl() {
return stsUrl;
Modified:
cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/idp-config-realma.xml
URL:
http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/idp-config-realma.xml?rev=1519227&r1=1519226&r2=1519227&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/idp-config-realma.xml
(original)
+++ cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/idp-config-realma.xml
Sat Aug 31 21:20:37 2013
@@ -42,7 +42,8 @@
<!--<property name="hrds" value="" />--> <!-- TBD, not defined,
provide list if enabled -->
<property name="provideIDPList" value="true" />
<property name="useCurrentIDP" value="true" />
- <!--<property name="certificate" value="" />--> <!-- STS will sign
it -->
+ <property name="certificate" value="stsKeystoreA.properties" />
+ <property name="certificatePassword" value="realma" />
<property name="stsUrl"
value="https://localhost:0/fediz-idp-sts/REALMA" />
<property name="idpUrl"
value="https://localhost:${realmA.port}/fediz-idp/federation" />
<property name="supportedProtocols">
Modified:
cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/idp-config-realmb.xml
URL:
http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/idp-config-realmb.xml?rev=1519227&r1=1519226&r2=1519227&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/idp-config-realmb.xml
(original)
+++ cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/idp-config-realmb.xml
Sat Aug 31 21:20:37 2013
@@ -42,7 +42,8 @@
<!--<property name="hrds" value="" />--> <!-- TBD, not defined,
provide list if enabled -->
<property name="provideIDPList" value="false" />
<property name="useCurrentIDP" value="true" />
- <!--<property name="certificate" value="" />--> <!-- STS will sign
it -->
+ <property name="certificate" value="stsKeystoreB.properties" />
+ <property name="certificatePassword" value="realmb" />
<property name="stsUrl"
value="https://localhost:0/fediz-idp-sts-remote/REALMB" />
<property name="idpUrl"
value="https://localhost:${realmB.port}/fediz-idp-remote/federation" />
<property name="supportedProtocols">
Modified:
cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/security-config.xml
URL:
http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/security-config.xml?rev=1519227&r1=1519226&r2=1519227&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/security-config.xml
(original)
+++ cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/security-config.xml
Sat Aug 31 21:20:37 2013
@@ -27,6 +27,7 @@
<security:intercept-url pattern="/federation"
access="isAuthenticated()"/>
-->
<!-- MUST be http-basic thus systests run fine -->
+ <security:intercept-url
pattern="/FederationMetadata/2007-06/FederationMetadata.xml"
access="isAnonymous()" />
<security:http-basic />
<!--<security:form-login />-->
</security:http>
Modified: cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/web.xml
URL:
http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/web.xml?rev=1519227&r1=1519226&r2=1519227&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/web.xml (original)
+++ cxf/fediz/trunk/services/idp/src/main/webapp/WEB-INF/web.xml Sat Aug 31
21:20:37 2013
@@ -34,10 +34,27 @@
<load-on-startup>1</load-on-startup>
</servlet>
+ <servlet>
+ <servlet-name>metadata</servlet-name>
+ <servlet-class>
+ org.apache.cxf.fediz.service.idp.MetadataServlet
+ </servlet-class>
+ <init-param>
+ <param-name>realm</param-name>
+ <param-value>${realm-uri}</param-value>
+ </init-param>
+ </servlet>
+
+
<servlet-mapping>
<servlet-name>idp</servlet-name>
<url-pattern>/federation</url-pattern>
</servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>metadata</servlet-name>
+
<url-pattern>/FederationMetadata/2007-06/FederationMetadata.xml</url-pattern>
+ </servlet-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>