You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Trudi Ersvaer (JIRA)" <ji...@apache.org> on 2009/09/23 00:54:52 UTC

[jira] Created: (SM-1897) authorizationEntry service namespace can't be a urn

authorizationEntry service namespace can't be a urn
---------------------------------------------------

                 Key: SM-1897
                 URL: https://issues.apache.org/activemq/browse/SM-1897
             Project: ServiceMix
          Issue Type: Bug
    Affects Versions: 3.3.1
         Environment: Windows XP Pro.
Java 1.6.0_12

            Reporter: Trudi Ersvaer


In security.xml the authorizationEntry's service attribute seems not to cope with a urn namespace.

For example, I've replaced the existing authorization entry (in security.xml) with a new one:

service="{urn:/addsource.wsdl}:addsourceService" roles="superuser"

The problem with this is that I get a PatternSyntaxException because the service name is translated into (I can see this in the debugger):

{{urn}/addsource.wsdl}:addsourceService  

When I removed the braces from the service name in security.xml for example: 

service="urn:/addsource.wsdl:addsourceService" roles="superuser"

the service still doesn't match because the service name is transated into (again viewed in the debugger): 

{urn}/addsource.wsdl:addsourceService

If I change all my namespaces to:

xxx

and in security.xml changed the service name to:

xxx:addsourceService

finally the service matched and authZ works.
 
Any ideas why the authorizationEntry isn't coping with a urn namespace?




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


[jira] Updated: (SM-1897) authorizationEntry service namespace can't be a urn

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

Trudi Ersvaer updated SM-1897:
------------------------------

    Attachment: groups.properties
                security.xml
                SM-1897-sa.zip

Attached is a service assembly that I've created that should replicate this issue.

Attached is also security.xml which shows the authZ entry value.

user-passwords.properties has: trudi=password


> authorizationEntry service namespace can't be a urn
> ---------------------------------------------------
>
>                 Key: SM-1897
>                 URL: https://issues.apache.org/activemq/browse/SM-1897
>             Project: ServiceMix
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>         Environment: Windows XP Pro.
> Java 1.6.0_12
>            Reporter: Trudi Ersvaer
>         Attachments: groups.properties, security.xml, SM-1897-sa.zip, users-passwords.properties
>
>
> In security.xml the authorizationEntry's service attribute seems not to cope with a urn namespace.
> For example, I've replaced the existing authorization entry (in security.xml) with a new one:
> service="{urn:/addsource.wsdl}:addsourceService" roles="superuser"
> The problem with this is that I get a PatternSyntaxException because the service name is translated into (I can see this in the debugger):
> {{urn}/addsource.wsdl}:addsourceService  
> When I removed the braces from the service name in security.xml for example: 
> service="urn:/addsource.wsdl:addsourceService" roles="superuser"
> the service still doesn't match because the service name is transated into (again viewed in the debugger): 
> {urn}/addsource.wsdl:addsourceService
> If I change all my namespaces to:
> xxx
> and in security.xml changed the service name to:
> xxx:addsourceService
> finally the service matched and authZ works.
>  
> Any ideas why the authorizationEntry isn't coping with a urn namespace?

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


[jira] Commented: (SM-1897) authorizationEntry service namespace can't be a urn

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54668#action_54668 ] 

Jean-Baptiste Onofré commented on SM-1897:
------------------------------------------

I'm not sure that your issue is really a bug.

Regarding the AuthorizationEntry, the service is a QName. So If you provide a string compatible with the service ServiceMix URIs (as explained http://servicemix.apache.org/uris.html), it should work.

I have tried to reproduce your issue without success (or providing not correct URIs).

For now? I close this bug, but if you have a stack trace or a specific test case, feel free to reopen it.

> authorizationEntry service namespace can't be a urn
> ---------------------------------------------------
>
>                 Key: SM-1897
>                 URL: https://issues.apache.org/activemq/browse/SM-1897
>             Project: ServiceMix
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>         Environment: Windows XP Pro.
> Java 1.6.0_12
>            Reporter: Trudi Ersvaer
>
> In security.xml the authorizationEntry's service attribute seems not to cope with a urn namespace.
> For example, I've replaced the existing authorization entry (in security.xml) with a new one:
> service="{urn:/addsource.wsdl}:addsourceService" roles="superuser"
> The problem with this is that I get a PatternSyntaxException because the service name is translated into (I can see this in the debugger):
> {{urn}/addsource.wsdl}:addsourceService  
> When I removed the braces from the service name in security.xml for example: 
> service="urn:/addsource.wsdl:addsourceService" roles="superuser"
> the service still doesn't match because the service name is transated into (again viewed in the debugger): 
> {urn}/addsource.wsdl:addsourceService
> If I change all my namespaces to:
> xxx
> and in security.xml changed the service name to:
> xxx:addsourceService
> finally the service matched and authZ works.
>  
> Any ideas why the authorizationEntry isn't coping with a urn namespace?

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


[jira] Commented: (SM-1897) authorizationEntry service namespace can't be a urn

Posted by "Trudi Ersvaer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54680#action_54680 ] 

Trudi Ersvaer commented on SM-1897:
-----------------------------------

Hi Jean-Baptiste,

Thanks for looking into this issue.

I've had a bit more of a play with it, but I don't seem to get it to work.  Let me try to explain my problem some more.

I have a namespace of: urn:/copy.wsdl
My WSDL defines a service named: copyServiceService

In security.xml I had the authZ entry as: 

<sm:authorizationEntry service="{urn:/copy.wsdl}:copyServiceService" roles="superuser" />

After reading the link you supplied (thanks) I change the authZ entry to: 

<sm:authorizationEntry service="{urn:/copy.wsdl}copyServiceService" roles="superuser" />

(I've removed the colon after the last brace).

In both cases above I don't get a stacktrace, but I do get an INFO log:

Illegal repetition&#xd;{urn

When I stop the debugger in SecuredBroker I see the following (note the additional braces):

authorizationEntries = {java.util.ArrayList@1135} size = 1
[0] = {org.apache.servicemix.jbi.security.acl.impl.AuthorizationEntry@1145}"AuthorizationEntry[service={{urn}/copy.wsdl}copyServiceService, endpoint=null, roles=superuser]"

So even if I didn't get the INFO message above, the service namespace would not match because of the additional braces.

Is my authZ entry still incorrect?

Btw, I am using a CXF consumer with WSS interceptors.  And SoapUI correctly adds the WSS credentials to the incoming message (observed via TCPMON).

Trudi Ersvaer
CA 
Sr Software Engineer
Tel: +61 3 99446629
Trudi.Ersvaer@ca.com





> authorizationEntry service namespace can't be a urn
> ---------------------------------------------------
>
>                 Key: SM-1897
>                 URL: https://issues.apache.org/activemq/browse/SM-1897
>             Project: ServiceMix
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>         Environment: Windows XP Pro.
> Java 1.6.0_12
>            Reporter: Trudi Ersvaer
>
> In security.xml the authorizationEntry's service attribute seems not to cope with a urn namespace.
> For example, I've replaced the existing authorization entry (in security.xml) with a new one:
> service="{urn:/addsource.wsdl}:addsourceService" roles="superuser"
> The problem with this is that I get a PatternSyntaxException because the service name is translated into (I can see this in the debugger):
> {{urn}/addsource.wsdl}:addsourceService  
> When I removed the braces from the service name in security.xml for example: 
> service="urn:/addsource.wsdl:addsourceService" roles="superuser"
> the service still doesn't match because the service name is transated into (again viewed in the debugger): 
> {urn}/addsource.wsdl:addsourceService
> If I change all my namespaces to:
> xxx
> and in security.xml changed the service name to:
> xxx:addsourceService
> finally the service matched and authZ works.
>  
> Any ideas why the authorizationEntry isn't coping with a urn namespace?

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


[jira] Reopened: (SM-1897) authorizationEntry service namespace can't be a urn

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

Trudi Ersvaer reopened SM-1897:
-------------------------------


> authorizationEntry service namespace can't be a urn
> ---------------------------------------------------
>
>                 Key: SM-1897
>                 URL: https://issues.apache.org/activemq/browse/SM-1897
>             Project: ServiceMix
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>         Environment: Windows XP Pro.
> Java 1.6.0_12
>            Reporter: Trudi Ersvaer
>         Attachments: groups.properties, security.xml, SM-1897-sa.zip, users-passwords.properties
>
>
> In security.xml the authorizationEntry's service attribute seems not to cope with a urn namespace.
> For example, I've replaced the existing authorization entry (in security.xml) with a new one:
> service="{urn:/addsource.wsdl}:addsourceService" roles="superuser"
> The problem with this is that I get a PatternSyntaxException because the service name is translated into (I can see this in the debugger):
> {{urn}/addsource.wsdl}:addsourceService  
> When I removed the braces from the service name in security.xml for example: 
> service="urn:/addsource.wsdl:addsourceService" roles="superuser"
> the service still doesn't match because the service name is transated into (again viewed in the debugger): 
> {urn}/addsource.wsdl:addsourceService
> If I change all my namespaces to:
> xxx
> and in security.xml changed the service name to:
> xxx:addsourceService
> finally the service matched and authZ works.
>  
> Any ideas why the authorizationEntry isn't coping with a urn namespace?

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


[jira] Commented: (SM-1897) authorizationEntry service namespace can't be a urn

Posted by "brad (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56461#action_56461 ] 

brad commented on SM-1897:
--------------------------

I have also encountered this problem and found an acceptable solution to it.

A little more information about the problem first.

1. The WSDL in use has a target namespace specified as targetNamespace="urn:/test.wsdl"
2. The security.xml wants to protect this resource, with a setting such as <sm:authorizationEntry service="urn:/test.wsdl:testService" roles="mygroup" />

This particular QName string specified in the "service" parameter gets messed up in QNameHelper.createQName() method, and I couldn't see a way to define something compatible, given the way it looks for the first instance of a colon to become the prefix, and goes from there.

So, the solution I've come up with is constructing my own QName object in Spring, therefore avoiding the QNameHelper process completely.

Before:

    <sm:authorizationEntry service="urn:/test.wsdl:testService" roles="mygroup" />

After:

    <sm:authorizationEntry>
        <property name="service" ref="blerg" />
        <property name="roles" value="mygroup" />
    </sm:authorizationEntry>

    <bean name="blerg" class="javax.xml.namespace.QName">
        <constructor-arg>
            <value>urn:/test.wsdl</value>
        </constructor-arg>
        <constructor-arg>
            <value>testService</value>
        </constructor-arg>
    </bean>

A more verbose definition, but it got the job done...

> authorizationEntry service namespace can't be a urn
> ---------------------------------------------------
>
>                 Key: SM-1897
>                 URL: https://issues.apache.org/activemq/browse/SM-1897
>             Project: ServiceMix
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>         Environment: Windows XP Pro.
> Java 1.6.0_12
>            Reporter: Trudi Ersvaer
>         Attachments: groups.properties, security.xml, SM-1897-sa.zip, users-passwords.properties
>
>
> In security.xml the authorizationEntry's service attribute seems not to cope with a urn namespace.
> For example, I've replaced the existing authorization entry (in security.xml) with a new one:
> service="{urn:/addsource.wsdl}:addsourceService" roles="superuser"
> The problem with this is that I get a PatternSyntaxException because the service name is translated into (I can see this in the debugger):
> {{urn}/addsource.wsdl}:addsourceService  
> When I removed the braces from the service name in security.xml for example: 
> service="urn:/addsource.wsdl:addsourceService" roles="superuser"
> the service still doesn't match because the service name is transated into (again viewed in the debugger): 
> {urn}/addsource.wsdl:addsourceService
> If I change all my namespaces to:
> xxx
> and in security.xml changed the service name to:
> xxx:addsourceService
> finally the service matched and authZ works.
>  
> Any ideas why the authorizationEntry isn't coping with a urn namespace?

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


[jira] Resolved: (SM-1897) authorizationEntry service namespace can't be a urn

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré resolved SM-1897.
--------------------------------------

    Resolution: Fixed

> authorizationEntry service namespace can't be a urn
> ---------------------------------------------------
>
>                 Key: SM-1897
>                 URL: https://issues.apache.org/activemq/browse/SM-1897
>             Project: ServiceMix
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>         Environment: Windows XP Pro.
> Java 1.6.0_12
>            Reporter: Trudi Ersvaer
>
> In security.xml the authorizationEntry's service attribute seems not to cope with a urn namespace.
> For example, I've replaced the existing authorization entry (in security.xml) with a new one:
> service="{urn:/addsource.wsdl}:addsourceService" roles="superuser"
> The problem with this is that I get a PatternSyntaxException because the service name is translated into (I can see this in the debugger):
> {{urn}/addsource.wsdl}:addsourceService  
> When I removed the braces from the service name in security.xml for example: 
> service="urn:/addsource.wsdl:addsourceService" roles="superuser"
> the service still doesn't match because the service name is transated into (again viewed in the debugger): 
> {urn}/addsource.wsdl:addsourceService
> If I change all my namespaces to:
> xxx
> and in security.xml changed the service name to:
> xxx:addsourceService
> finally the service matched and authZ works.
>  
> Any ideas why the authorizationEntry isn't coping with a urn namespace?

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


[jira] Updated: (SM-1897) authorizationEntry service namespace can't be a urn

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

Trudi Ersvaer updated SM-1897:
------------------------------

    Attachment: users-passwords.properties

> authorizationEntry service namespace can't be a urn
> ---------------------------------------------------
>
>                 Key: SM-1897
>                 URL: https://issues.apache.org/activemq/browse/SM-1897
>             Project: ServiceMix
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>         Environment: Windows XP Pro.
> Java 1.6.0_12
>            Reporter: Trudi Ersvaer
>         Attachments: groups.properties, security.xml, SM-1897-sa.zip, users-passwords.properties
>
>
> In security.xml the authorizationEntry's service attribute seems not to cope with a urn namespace.
> For example, I've replaced the existing authorization entry (in security.xml) with a new one:
> service="{urn:/addsource.wsdl}:addsourceService" roles="superuser"
> The problem with this is that I get a PatternSyntaxException because the service name is translated into (I can see this in the debugger):
> {{urn}/addsource.wsdl}:addsourceService  
> When I removed the braces from the service name in security.xml for example: 
> service="urn:/addsource.wsdl:addsourceService" roles="superuser"
> the service still doesn't match because the service name is transated into (again viewed in the debugger): 
> {urn}/addsource.wsdl:addsourceService
> If I change all my namespaces to:
> xxx
> and in security.xml changed the service name to:
> xxx:addsourceService
> finally the service matched and authZ works.
>  
> Any ideas why the authorizationEntry isn't coping with a urn namespace?

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


[jira] Commented: (SM-1897) authorizationEntry service namespace can't be a urn

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54658#action_54658 ] 

Jean-Baptiste Onofré commented on SM-1897:
------------------------------------------

Could you attach a complete stack trace of your first exception ?

> authorizationEntry service namespace can't be a urn
> ---------------------------------------------------
>
>                 Key: SM-1897
>                 URL: https://issues.apache.org/activemq/browse/SM-1897
>             Project: ServiceMix
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>         Environment: Windows XP Pro.
> Java 1.6.0_12
>            Reporter: Trudi Ersvaer
>
> In security.xml the authorizationEntry's service attribute seems not to cope with a urn namespace.
> For example, I've replaced the existing authorization entry (in security.xml) with a new one:
> service="{urn:/addsource.wsdl}:addsourceService" roles="superuser"
> The problem with this is that I get a PatternSyntaxException because the service name is translated into (I can see this in the debugger):
> {{urn}/addsource.wsdl}:addsourceService  
> When I removed the braces from the service name in security.xml for example: 
> service="urn:/addsource.wsdl:addsourceService" roles="superuser"
> the service still doesn't match because the service name is transated into (again viewed in the debugger): 
> {urn}/addsource.wsdl:addsourceService
> If I change all my namespaces to:
> xxx
> and in security.xml changed the service name to:
> xxx:addsourceService
> finally the service matched and authZ works.
>  
> Any ideas why the authorizationEntry isn't coping with a urn namespace?

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