servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1170436 - in /servicemix/components/trunk/bindings/servicemix-cxf-bc/src: main/java/org/apache/servicemix/cxfbc/ main/java/org/apache/servicemix/cxfbc/interceptors/ test/resources/org/apache/servicemix/cxfbc/ws/security/
Date Wed, 14 Sep 2011 05:34:26 GMT
Author: ffang
Date: Wed Sep 14 05:34:25 2011
New Revision: 1170436

URL: http://svn.apache.org/viewvc?rev=1170436&view=rev
Log:
[SMXCOMP-902]should be able to configure jaas domain name used in JbiJAASInterceptor

Modified:
    servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
    servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiJAASInterceptor.java
    servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/login.properties
    servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/xbean-jaas.xml

Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java?rev=1170436&r1=1170435&r2=1170436&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
(original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/CxfBcConsumer.java
Wed Sep 14 05:34:25 2011
@@ -187,6 +187,8 @@ public class CxfBcConsumer extends Consu
     
     private boolean delegateToJaas = true;
     
+    private String jaasDomain = "servicemix-domain";
+    
     private Map<String, Object> properties = new ConcurrentHashMap<String, Object>();
 
     /**
@@ -498,7 +500,8 @@ public class CxfBcConsumer extends Consu
             cxfService.getInInterceptors().add(new JbiJAASInterceptor(
                     AuthenticationService.Proxy.create(
                         ((CxfBcComponent)this.getServiceUnit().getComponent())
-                            .getAuthenticationService()), isX509(), isDelegateToJaas()));
+                            .getAuthenticationService()), isX509(), isDelegateToJaas(),
+                            this.jaasDomain));
             cxfService.getInInterceptors().add(new JbiInvokerInterceptor());
             cxfService.getInInterceptors().add(new JbiPostInvokerInterceptor());
 
@@ -1291,4 +1294,18 @@ public class CxfBcConsumer extends Consu
      public Map<String, Object> getProperties() {
          return this.properties;
      }
+
+     /**
+      * Specifies the jaasDomain of this cxfbc consumer endpoint
+      *
+      * @param jaasDomain the jaasDomain as a string
+      * @org.apache.xbean.Property description="jaasDomain of this cxfbc consumer endpoint"
+      **/
+     public void setJaasDomain(String jaasDomain) {
+         this.jaasDomain = jaasDomain;
+     }
+
+     public String getJaasDomain() {
+        return jaasDomain;
+     }
 }

Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiJAASInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiJAASInterceptor.java?rev=1170436&r1=1170435&r2=1170436&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiJAASInterceptor.java
(original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiJAASInterceptor.java
Wed Sep 14 05:34:25 2011
@@ -39,14 +39,15 @@ import org.apache.ws.security.handler.WS
 
 public class JbiJAASInterceptor extends AbstractWSS4JInterceptor {
 
-    private String domain = "servicemix-domain";
+    private String domain;
     private AuthenticationService authenticationService;
     private ThreadLocal<Subject> currentSubject = new ThreadLocal<Subject>();
     private boolean x509;
     private boolean delegateToJaas;
     
     
-    public JbiJAASInterceptor(AuthenticationService authenticationService, boolean x509,
boolean delegateToJaas) {
+    public JbiJAASInterceptor(AuthenticationService authenticationService, boolean x509,
boolean delegateToJaas,
+                              String jaasDomain) {
         super();
         setPhase(Phase.PRE_PROTOCOL);
         getAfter().add(WSS4JInInterceptor.class.getName());
@@ -54,6 +55,7 @@ public class JbiJAASInterceptor extends 
         this.authenticationService = authenticationService;
         this.x509 = x509;
         this.delegateToJaas = delegateToJaas;
+        this.domain = jaasDomain;
     }
     
     

Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/login.properties
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/login.properties?rev=1170436&r1=1170435&r2=1170436&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/login.properties
(original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/login.properties
Wed Sep 14 05:34:25 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-servicemix-domain {
+karaf {
     org.apache.servicemix.jbi.security.login.PropertiesLoginModule required
         debug=true
         org.apache.servicemix.security.properties.user="users.properties"

Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/xbean-jaas.xml
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/xbean-jaas.xml?rev=1170436&r1=1170435&r2=1170436&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/xbean-jaas.xml
(original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/security/xbean-jaas.xml
Wed Sep 14 05:34:25 2011
@@ -59,7 +59,7 @@
                       endpoint="TimestampSignEncrypt"
                       targetEndpoint="TimestampSignEncrypt"
                       targetService="greeter:SOAPServiceWSSecurity"
-		              targetInterface="greeter:Greeter">
+		              targetInterface="greeter:Greeter" jaasDomain="karaf">
         <cxfbc:inInterceptors>
           <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
           <ref bean="TimestampSignEncrypt_Request"/>
@@ -84,7 +84,7 @@
                       targetService="greeter:SOAPServiceWSSecurity"
                       targetInterface="greeter:Greeter"
                       busCfg="org/apache/servicemix/cxfbc/ws/security/xbean-jaas-policy-bus-context.xml"
-                      properties="#properties">
+                      properties="#properties" jaasDomain="karaf">
         <cxfbc:inInterceptors>
           <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
         </cxfbc:inInterceptors>



Mime
View raw message