camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ranx <brad.john...@mediadriver.com>
Subject Cross cutting concern for microservices
Date Fri, 29 Jan 2016 15:00:47 GMT
The current design I use for services is to create an OSGi bundle for each
API interface and then aggregate them in a gateway bundle for exposure via
CXF.  During testing I have separate test blueprint files that bootstrap
each bundle with its specific interface and test them via REST and SOAP. 
There are two concerns I have about moving to a true uService architecture
which would eliminate the gateway altogether.  Because CXF now allows using
an interface for both REST and SOAP that's convenient.

If I have a 100 microservices I wouldn't want to have to set security up for
every bundle though being able to override it would be nice. If I have one
bundle for security tied to the port I assume that would apply then to all
the uServices exposed on that port? 

Also, how much overhead is there in starting up a a CXF server/service
endpoint?  While they are called servers they are really REST/SOAP endpoints
so I'm not sure how much overhead that entails.  But being able to keep the
API with the bundle, deploy it as a unit, and then move it at will would be
quite a boon in creating true modular microservices.


<httpj:engine-factory bus="cxf">
		<httpj:engine port="${proxy.port}">
			<httpj:tlsServerParameters>
				<sec:keyManagers keyPassword="${password}">
					<sec:keyStore type="JKS" password="${password}" file="${the.keystore}"
/>
				</sec:keyManagers>
				<sec:trustManagers>
					<sec:keyStore type="JKS" password="${password}"
file="${the.truststore}" />
				</sec:trustManagers>
				<sec:cipherSuitesFilter>
					<sec:include>.*_WITH_3DES_.*</sec:include>
					<sec:include>.*_WITH_DES_.*</sec:include>
					<sec:exclude>.*_WITH_NULL_.*</sec:exclude>
					<sec:exclude>.*_DH_anon_.*</sec:exclude>
				</sec:cipherSuitesFilter>
				<sec:clientAuthentication want="true" required="false" />
			</httpj:tlsServerParameters>

		</httpj:engine>
	</httpj:engine-factory>



	<bean id="authenticationInterceptor"
class="org.apache.cxf.interceptor.security.JAASLoginInterceptor">
		<property name="contextName" value="karaf" />
		<property name="reportFault" value="true" />
	</bean>

	<cxf:rsServer id="gatewayRESTEndpoint"
address="${CXFServer}:${proxy.port}/rest"
serviceClass="com.foo.MyGatewayService">

		<cxf:providers>
			<bean id="jsonProvider"
class="org.apache.cxf.jaxrs.provider.json.JSONProvider">
				<property name="convention" value="badgerfish" />
			</bean>
			<bean class="org.apache.cxf.jaxrs.model.wadl.WadlGenerator">
				<property name="linkJsonToXmlSchema" value="true" />
				<property name="applicationTitle" value="PaymentHubRestServices" />
			</bean>
		</cxf:providers>
		<cxf:inInterceptors>
			<ref component-id="authenticationInterceptor" />
		</cxf:inInterceptors>



--
View this message in context: http://camel.465427.n5.nabble.com/Cross-cutting-concern-for-microservices-tp5776981.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message