You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Christopher Hunt (JIRA)" <ji...@apache.org> on 2009/04/28 10:38:38 UTC

[jira] Created: (CAMEL-1570) Jetty component is unable to be configured for security

Jetty component is unable to be configured for security
-------------------------------------------------------

                 Key: CAMEL-1570
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-jetty
    Affects Versions: 2.0-M1, 1.6.0
         Environment: NA
            Reporter: Christopher Hunt


The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:

||Name||Default Value||Description||
|handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). This instances are added to the Jetty servlet context|

Here is an example URI:

{code}
jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
{code}

This could refer to something like the following Spring configuration:

{code}
	<!-- Jetty Security handling -->
	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
		<property name="name" value="tracker-users" />
		<property name="loginModuleName" value="ldaploginmodule" />
	</bean>
	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
		<property name="name" value="BASIC" />
		<property name="roles" value="tracker-users" />
		<property name="authenticate" value="true" />
	</bean>
	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
		<property name="constraint" ref="constraint" />
		<property name="pathSpec" value="/*" />
	</bean>
	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
		<property name="userRealm" ref="userRealm" />
		<property name="constraintMappings" ref="constraintMapping" />
	</bean>
{code}

I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51592#action_51592 ] 

Claus Ibsen commented on CAMEL-1570:
------------------------------------

Applied patch to 2.0: 772891

>> See method setReferenceProperties in DefaultComponent in Camel 2.0.
> I'm going to need your help on this one I think.

I had a look at this and the problem is that its a List we want to set of a given type, and that we loose the generic type in the list: List<Handler> so we dont know the type of the list what it was supposed to contain. 

So I did it manually in the component.

Maybe later we can use a convention that the type should be the setXXX name and add list support for URI notations.
But if this is the only component benefit from it, it might not be worth the trouble.

> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>         Attachments: jetty-handlers-test.txt, jetty-handlers.txt
>
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Christopher Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51553#action_51553 ] 

Christopher Hunt commented on CAMEL-1570:
-----------------------------------------

Hi Claus,

1.x patches attached. I have not addressed 2.0. With regards to:

_In Camel 2.0 however I was wondering if we should endorse the # notation lookup that is used in the URI to refer to a bean in the registry with this id._

I think so.

_And if we just added the type on the endpoint as: List<Handler> handlers with getter/setter then we can improve the DefaultComponent to support lists for its automatic # lookup._

Do you mean List<String> not List<Handler>? Or do you think that the DefaultComponent could resolve the type from the bean's name?

_Today it only supports a single # property. If so we get a general solution. So I would like that we took the time to look into this in Camel 2.0._

How would a list be expressed in the URI? The same way as for 1.x i.e. using a comma?

_See method setReferenceProperties in DefaultComponent in Camel 2.0._

I'm going to need your help on this one I think.

> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>         Attachments: jetty-handlers-test.txt, jetty-handlers.txt
>
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Christopher Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Hunt updated CAMEL-1570:
------------------------------------

    Description: 
The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:

||Name||Default Value||Description||
|handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|

Here is an example URI:

{code}
jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
{code}

This could refer to something like the following Spring configuration:

{code}
	<!-- Jetty Security handling -->
	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
		<property name="name" value="tracker-users" />
		<property name="loginModuleName" value="ldaploginmodule" />
	</bean>
	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
		<property name="name" value="BASIC" />
		<property name="roles" value="tracker-users" />
		<property name="authenticate" value="true" />
	</bean>
	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
		<property name="constraint" ref="constraint" />
		<property name="pathSpec" value="/*" />
	</bean>
	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
		<property name="userRealm" ref="userRealm" />
		<property name="constraintMappings" ref="constraintMapping" />
	</bean>
{code}

I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

  was:
The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:

||Name||Default Value||Description||
|handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). This instances are added to the Jetty servlet context|

Here is an example URI:

{code}
jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
{code}

This could refer to something like the following Spring configuration:

{code}
	<!-- Jetty Security handling -->
	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
		<property name="name" value="tracker-users" />
		<property name="loginModuleName" value="ldaploginmodule" />
	</bean>
	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
		<property name="name" value="BASIC" />
		<property name="roles" value="tracker-users" />
		<property name="authenticate" value="true" />
	</bean>
	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
		<property name="constraint" ref="constraint" />
		<property name="pathSpec" value="/*" />
	</bean>
	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
		<property name="userRealm" ref="userRealm" />
		<property name="constraintMappings" ref="constraintMapping" />
	</bean>
{code}

I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.


> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Christopher Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Hunt updated CAMEL-1570:
------------------------------------

    Attachment: jetty-handlers-test.txt
                jetty-handlers.txt

1.x changes.

I have deleted the previous patches given that there was an error. Previously I attached the handlers to the first context that the server could provide (as is done for the session - is that a bug also?). What is now done is that the handlers are attached to the context created at the time the servlet is created.

I have included a new unit test to test out the handler functionality. I use a Jetty supplied statistics handler to ensure that it counts my requests coming through. Naturally if the handler was not added to the context then no requests would be counted.

In addition the unit test exercises multiple handlers being included for a different context. This tests that multiple handlers are catered for and that one context's handlers are not invoked for another's.

I have also tidied up the test cases so that they are able to:

(i) execute on a file system that has spaces in the path name; and
(ii) execute on a system that is not running postgres.

On the latter I noticed that port 5432 was being used for some of the tests. This port is used by postgres. Given that I had postgres running on my machine the tests could not complete. All tests now use a port number around 9080.

> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>         Attachments: jetty-handlers-test.txt, jetty-handlers.txt
>
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Christopher Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Hunt updated CAMEL-1570:
------------------------------------

    Attachment: JettyHttpEndpoint.java.diff
                JettyHttpComponent.java.diff

Patches for the 1.6 source. I have tested these fixes in my own application. However I have not managed to create a test case as yet.

> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>         Attachments: JettyHttpComponent.java.diff, JettyHttpEndpoint.java.diff
>
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51448#action_51448 ] 

Claus Ibsen commented on CAMEL-1570:
------------------------------------

Chris, we need at least an unit test before we can add the patch to the code base.

> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>         Attachments: JettyHttpComponent.java.diff, JettyHttpEndpoint.java.diff
>
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Christopher Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51449#action_51449 ] 

Christopher Hunt commented on CAMEL-1570:
-----------------------------------------

Hi Claus,

I'm happy develop a unit test for this of course. In the first  
instance, can you please review my proposal and code submission? If it  
looks good then I'll proceed with the unit test and update the wiki  
once committed.

Kind regards,
Christopher


> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>         Attachments: JettyHttpComponent.java.diff, JettyHttpEndpoint.java.diff
>
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Christopher Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Hunt updated CAMEL-1570:
------------------------------------

    Attachment:     (was: JettyHttpEndpoint.java.diff)

> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51450#action_51450 ] 

Claus Ibsen commented on CAMEL-1570:
------------------------------------

Chris

Can you take a look at CAMEL-1176 as it looks related to this ticket.

The patch looks good.

In Camel 2.0 however I was wondering if we should endorse the # notation lookup that is used in the URI to refer to a bean in the registry with this id.

And if we just added the type on the endpoint as: List<Handler> handlers with getter/setter then we can improve the DefaultComponent to support lists for its automatic # lookup.
Today it only supports a single # property. If so we get a general solution. So I would like that we took the time to look into this in Camel 2.0.

See method setReferenceProperties in DefaultComponent in Camel 2.0.

> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>         Attachments: JettyHttpComponent.java.diff, JettyHttpEndpoint.java.diff
>
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1570.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
                   1.6.1

Thanks Christopher. I have updated the Jetty wiki page also.

> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>             Fix For: 1.6.1, 2.0.0
>
>         Attachments: jetty-handlers-test.txt, jetty-handlers.txt
>
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51591#action_51591 ] 

Claus Ibsen commented on CAMEL-1570:
------------------------------------

Applied patch to 1.x: 772883.

Thanks Christopher for the patch.

> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>         Attachments: jetty-handlers-test.txt, jetty-handlers.txt
>
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Christopher Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Hunt updated CAMEL-1570:
------------------------------------

    Attachment:     (was: JettyHttpComponent.java.diff)

> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CAMEL-1570) Jetty component is unable to be configured for security

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-1570:
----------------------------------

    Assignee: Claus Ibsen

> Jetty component is unable to be configured for security
> -------------------------------------------------------
>
>                 Key: CAMEL-1570
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1570
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jetty
>    Affects Versions: 1.6.0, 2.0-M1
>         Environment: NA
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>         Attachments: jetty-handlers-test.txt, jetty-handlers.txt
>
>
> The Jetty component is presently unable to be configured for security. A general purpose mechanism so that the Jetty component can be configured would be useful. The following URI based option is proposed:
> ||Name||Default Value||Description||
> |handlers|null| Specifies a comma delimited set of instances in your Registry (such as your Spring ApplicationContext). These instances are added to the Jetty servlet context|
> Here is an example URI:
> {code}
> jetty:http://0.0.0.0:9080/MyService?handlers=securityHandler
> {code}
> This could refer to something like the following Spring configuration:
> {code}
> 	<!-- Jetty Security handling -->
> 	<bean id="userRealm" class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
> 		<property name="name" value="tracker-users" />
> 		<property name="loginModuleName" value="ldaploginmodule" />
> 	</bean>
> 	<bean id="constraint" class="org.mortbay.jetty.security.Constraint">
> 		<property name="name" value="BASIC" />
> 		<property name="roles" value="tracker-users" />
> 		<property name="authenticate" value="true" />
> 	</bean>
> 	<bean id="constraintMapping" class="org.mortbay.jetty.security.ConstraintMapping">
> 		<property name="constraint" ref="constraint" />
> 		<property name="pathSpec" value="/*" />
> 	</bean>
> 	<bean id="securityHandler" class="org.mortbay.jetty.security.SecurityHandler">
> 		<property name="userRealm" ref="userRealm" />
> 		<property name="constraintMappings" ref="constraintMapping" />
> 	</bean>
> {code}
> I have attached proposed changes to the 1.6 branch. I imagine that 2.0 should be quite similar.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.