[jira] Created: (CAMEL-1176) Add support for jetty user security realms

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-1176) Add support for jetty user security realms

JIRA jira@apache.org
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 | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1176) Add support for jetty user security realms

JIRA jira@apache.org

    [ 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1176) Add support for jetty user security realms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Claus Ibsen commented on CAMEL-1176:
------------------------------------

Ramon, very nice.

In Camel 2.0 we have the # support for URI notation. So you can just refer to any bean in the registry using #key as the value.
{code}
useRealm=#myUserReal
{code}

Yeah I think that there is one jetty server.

> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1176) Add support for jetty user security realms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

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

Christopher Hunt commented on CAMEL-1176:
-----------------------------------------

Hi Ramon,

Can you please look at [CAMEL-1570|https://issues.apache.org/activemq/browse/CAMEL-1570] as I think it'll solve this problem and much more.

Kind regards,
Christopher

> 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 | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-1176) Add support for jetty user security realms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1176.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0

Resolved by Chrstophers Patch

> 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
>             Fix For: 2.0.0
>
>
> 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.