cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/2] cxf-fediz git commit: Move CXF TLS configuration to a separate file for re-use
Date Fri, 26 Feb 2016 17:03:05 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 9ac16d8f9 -> 706971b73


Move CXF TLS configuration to a separate file for re-use


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/79f93907
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/79f93907
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/79f93907

Branch: refs/heads/master
Commit: 79f939075a0a88a29abf08c29f0bf37f2412d1a5
Parents: 9ac16d8
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Feb 26 16:46:34 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Feb 26 16:46:34 2016 +0000

----------------------------------------------------------------------
 .../TrustedIdpOIDCProtocolHandler.java          |  2 +-
 services/idp/src/main/resources/cxf-tls.xml     | 50 ++++++++++++++++++++
 .../main/webapp/WEB-INF/applicationContext.xml  | 13 +----
 3 files changed, 52 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/79f93907/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
----------------------------------------------------------------------
diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
index 441b083..4cfaf47 100644
--- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
+++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/TrustedIdpOIDCProtocolHandler.java
@@ -189,7 +189,7 @@ public class TrustedIdpOIDCProtocolHandler implements TrustedIdpProtocolHandler
             providers.add(new OAuthJSONProvider());
             
             WebClient client = 
-                WebClient.create(tokenEndpoint, providers, clientId, clientSecret, null);
+                WebClient.create(tokenEndpoint, providers, clientId, clientSecret, "cxf-tls.xml");
             
             ClientConfiguration config = WebClient.getConfig(client);
 

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/79f93907/services/idp/src/main/resources/cxf-tls.xml
----------------------------------------------------------------------
diff --git a/services/idp/src/main/resources/cxf-tls.xml b/services/idp/src/main/resources/cxf-tls.xml
new file mode 100644
index 0000000..357adff
--- /dev/null
+++ b/services/idp/src/main/resources/cxf-tls.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:cxf="http://cxf.apache.org/core"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:http="http://cxf.apache.org/transports/http/configuration"
+       xmlns:sec="http://cxf.apache.org/configuration/security"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://cxf.apache.org/core
+        http://cxf.apache.org/schemas/core.xsd
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+        http://cxf.apache.org/transports/http/configuration
+        http://cxf.apache.org/schemas/configuration/http-conf.xsd
+        http://www.springframework.org/schema/context
+        http://www.springframework.org/schema/context/spring-context-3.1.xsd
+        http://cxf.apache.org/configuration/security
+        http://cxf.apache.org/schemas/configuration/security.xsd">
+
+    <http:conduit name="*.http-conduit">
+        <http:tlsClientParameters
+            disableCNCheck="true">
+            <sec:trustManagers>
+                <sec:keyStore type="jks" password="ispass" resource="idp-ssl-trust.jks"
/>
+            </sec:trustManagers>
+            <sec:keyManagers keyPassword="tompass">
+                <sec:keyStore type="jks" password="tompass" resource="idp-ssl-key.jks"/>
+            </sec:keyManagers>
+        </http:tlsClientParameters>
+    </http:conduit>
+    
+</beans>
+

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/79f93907/services/idp/src/main/webapp/WEB-INF/applicationContext.xml
----------------------------------------------------------------------
diff --git a/services/idp/src/main/webapp/WEB-INF/applicationContext.xml b/services/idp/src/main/webapp/WEB-INF/applicationContext.xml
index 14ca839..8af7497 100644
--- a/services/idp/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/services/idp/src/main/webapp/WEB-INF/applicationContext.xml
@@ -53,6 +53,7 @@
 
     <import resource="security-config.xml" />
     <import resource="${idp-config}" />
+    <import resource="classpath:cxf-tls.xml" />
     <import resource="classpath:persistenceContext.xml" />
     <import resource="classpath:restContext.xml" />
 
@@ -61,18 +62,6 @@
             <cxf:logging />
         </cxf:features>
     </cxf:bus-->
-
-    <http:conduit name="*.http-conduit">
-        <http:tlsClientParameters
-            disableCNCheck="true">
-            <sec:trustManagers>
-                <sec:keyStore type="jks" password="ispass" resource="idp-ssl-trust.jks"
/>
-            </sec:trustManagers>
-            <sec:keyManagers keyPassword="tompass">
-                <sec:keyStore type="jks" password="tompass" resource="idp-ssl-key.jks"/>
-            </sec:keyManagers>
-        </http:tlsClientParameters>
-    </http:conduit>
     
 </beans>
 


Mime
View raw message