[ 
https://issues.apache.org/activemq/browse/CAMEL-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48143#action_48143
 ] 

Ramon Buckland commented on CAMEL-1176:
---------------------------------------

I have investigate what needs to be done and have the following notes.

For Jetty to support authentication, we need to provide (inject) the a 
UserRealm into the Server that is created.

For example: 

 {code}
// server is Jetty Server

HashUserRealm myrealm = new 
HashUserRealm("MyRealm",System.getProperty("jetty.home")+"/etc/realm.properties");
server.setUserRealms(new UserRealm[]{myrealm});
{code}

It seems to me that we just need to make that in  
{code}
components/camel-jetty/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
{code}

we make a change to 
{code}
 protected Server createServer() throws Exception {
  ..
 }
{code}

to 
(a) see if a "UserRealm(s)" has been supplied by the configuration.
(b) locate the relevant been via 
          CamelContextHelper.mandatoryLookup(getCamelContext(), ref, 
UserRealm.class);
(c) set the realm located into the server object as above.

The following is the UserRealm interface.
{code}
http://jetty.mortbay.org/jetty/jetty-6/apidocs/org/mortbay/jetty/security/UserRealm.html
{code}

Am I on the  right track ? (my questions ...)
- is using userRealmRef=myUserRealm the correct way to do this ? (or do I wait 
/ hang off the potentially new bean:userRealm=myUserRealm
- With the camel-jetty component, is there ONE jetty server per exposed 
jetty:http://endpoint ? ,, is so .. I need to understand a little more how one 
userRealm gets mapped to one particular endpoint ONLY (by user choice)



> Add support for jetty user security realms
> ------------------------------------------
>
>                 Key: CAMEL-1176
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1176
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-jetty
>            Reporter: Ramon Buckland
>            Priority: Minor
>
> Add the ability to provide a user realm into jetty to configure 
> authentication, by whatever means jetty provides.
> See Jetty for details 
> http://docs.codehaus.org/display/JETTY/How+to+Configure+Security+with+Embedded+Jetty

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

Reply via email to