You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by barisa42 <ba...@gmail.com> on 2012/05/23 13:24:34 UTC
How to enable jetty http authorization in 3.3.2
Hi.
I would like to enable http authorization for every service request. It
seems that jetty could be configured for such feature. Jetty is oly
mentioned in the following folder:
In the configuration folder "servicemix/conf", there is file
component.properties with content:
servicemix-http.authenticationServiceName=java\:comp/env/smx/AuthenticationService
servicemix-http.jettyManagement=false
servicemix-http.streamingEnabled=false
servicemix-http.connectorMaxIdleTime=65000
servicemix-http.jettyConnectorClassName=org.mortbay.jetty.nio.SelectChannelConnector
servicemix-http.maxTotalConnections=65536
servicemix-http.jettyThreadPoolSize=255
servicemix-http.keystoreManagerName=java\:comp/env/smx/KeystoreManager
servicemix-http.consumerProcessorSuspendTime=70000
servicemix-http.maxConnectionsPerHost=65536
In attempt to understand how these parameters are used, I've tried searching
for mentioned strings in the source code. The string "jettyManagement" is
mention only in the component.properties file, but not anywhere in the code.
I'm not quite sure that I'm going in the right direction. I would appreciate
any guidance.
--
View this message in context: http://servicemix.396122.n5.nabble.com/How-to-enable-jetty-http-authorization-in-3-3-2-tp5713337.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: How to enable jetty http authorization in 3.3.2
Posted by barisa42 <ba...@gmail.com>.
Thanks, configuring each endpoint to use http authentication is sufficient.
You have been great help.
--
View this message in context: http://servicemix.396122.n5.nabble.com/How-to-enable-jetty-http-authorization-in-3-3-2-tp5713337p5713360.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: How to enable jetty http authorization in 3.3.2
Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,
You don't necessarily have to code your own authentication service -
ServiceMix 3.x ships with an implementation that uses the
conf/users-*.properties and conf/groups.properties files to define the
credentials. If you want to leverage that, it should suffice to set the
authMethod attribute on the HTTP endpoint you're defining (e.g.
authMethod="basic").
If you want to implement you own authentication service, all you need to is
implement the interface, package it and add the jar to the lib folder and
then reconfigure the conf/component.properties file to point to your new
implemenation instead. On the endpoint itself, nothing really has to
change.
All that being said, on ServiceMix 3.x as well you have the option to use
the corresponding camel-jetty component instead - there's more info on
using this component in http://camel.apache.org/jetty.html
Regards,
Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
On Thu, May 24, 2012 at 11:20 AM, barisa42 <ba...@gmail.com>wrote:
> Thanks Gert,
> I was able to look through the HttpConfiguration.java.
> If I understand it well, the AuthenticationService interface is used to
> authenticate the given user. But I wasn't able to find a way to implement
> given interface.
>
> So, to conclude, to enable http authentication, I need somehow to implement
> AuthenticationService, but I don't know how.
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/How-to-enable-jetty-http-authorization-in-3-3-2-tp5713337p5713351.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
Re: How to enable jetty http authorization in 3.3.2
Posted by barisa42 <ba...@gmail.com>.
Thanks Gert,
I was able to look through the HttpConfiguration.java.
If I understand it well, the AuthenticationService interface is used to
authenticate the given user. But I wasn't able to find a way to implement
given interface.
So, to conclude, to enable http authentication, I need somehow to implement
AuthenticationService, but I don't know how.
--
View this message in context: http://servicemix.396122.n5.nabble.com/How-to-enable-jetty-http-authorization-in-3-3-2-tp5713337p5713351.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: How to enable jetty http authorization in 3.3.2
Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,
The location you're looking at contains the code for the JBI container
itself, but the assembly you're downloading also contains the JBI
components and some other modules and those are all separate subprojects
that are being released/SCM'ed independently. The code you're looking for
is part of the 2010.01 servicemix-http components set and can be found at
http://svn.apache.org/repos/asf/servicemix/components/tags/servicemix-http-2010.01/
Regards,
Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
On Thu, May 24, 2012 at 8:45 AM, barisa42 <ba...@gmail.com>wrote:
> Thanks for the help, but I'm unable to find those Strings or
> HttpConfiguration.java in version 3.3.2
> http://svn.apache.org/repos/asf/servicemix/smx3/tags/servicemix-3.3.2/
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/How-to-enable-jetty-http-authorization-in-3-3-2-tp5713337p5713349.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
Re: How to enable jetty http authorization in 3.3.2
Posted by barisa42 <ba...@gmail.com>.
Thanks for the help, but I'm unable to find those Strings or
HttpConfiguration.java in version 3.3.2
http://svn.apache.org/repos/asf/servicemix/smx3/tags/servicemix-3.3.2/
--
View this message in context: http://servicemix.396122.n5.nabble.com/How-to-enable-jetty-http-authorization-in-3-3-2-tp5713337p5713349.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: How to enable jetty http authorization in 3.3.2
Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,
You were probably looking for these string in the ServiceMix 3 container
codebase, but this configuration is being read by the servicemix-http JBI
component - you can find these bits of code in
https://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java?view=markup
Regards,
Gert Vanthienen
------------------------
FuseSource
Web: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
On Wed, May 23, 2012 at 1:24 PM, barisa42 <ba...@gmail.com>wrote:
> Hi.
> I would like to enable http authorization for every service request. It
> seems that jetty could be configured for such feature. Jetty is oly
> mentioned in the following folder:
>
> In the configuration folder "servicemix/conf", there is file
> component.properties with content:
>
>
> servicemix-http.authenticationServiceName=java\:comp/env/smx/AuthenticationService
> servicemix-http.jettyManagement=false
> servicemix-http.streamingEnabled=false
> servicemix-http.connectorMaxIdleTime=65000
>
> servicemix-http.jettyConnectorClassName=org.mortbay.jetty.nio.SelectChannelConnector
> servicemix-http.maxTotalConnections=65536
> servicemix-http.jettyThreadPoolSize=255
> servicemix-http.keystoreManagerName=java\:comp/env/smx/KeystoreManager
> servicemix-http.consumerProcessorSuspendTime=70000
> servicemix-http.maxConnectionsPerHost=65536
>
>
> In attempt to understand how these parameters are used, I've tried
> searching
> for mentioned strings in the source code. The string "jettyManagement" is
> mention only in the component.properties file, but not anywhere in the
> code.
>
>
> I'm not quite sure that I'm going in the right direction. I would
> appreciate
> any guidance.
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/How-to-enable-jetty-http-authorization-in-3-3-2-tp5713337.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>