[jboss-jira] [JBoss JIRA] (WFLY-3405) Variable interpolation not applied to remote-outbound-connection username attribute due to calling asString() instead of resolve() on the ModelValue

Enrique González Martínez (JIRA) issues at jboss.org
Mon Aug 25 11:07:01 EDT 2014


     [ https://issues.jboss.org/browse/WFLY-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Enrique González Martínez reassigned WFLY-3405:
-----------------------------------------------

    Assignee: Enrique González Martínez  (was: David Lloyd)


> Variable interpolation not applied to remote-outbound-connection username attribute due to calling asString() instead of resolve() on the ModelValue
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-3405
>                 URL: https://issues.jboss.org/browse/WFLY-3405
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Remoting
>    Affects Versions: JBoss AS7 7.2.0.Final, 8.0.0.Final, 8.1.0.Final
>            Reporter: Mikal Henriksen
>            Assignee: Enrique González Martínez
>
> We want to externalize the username and password used for remote ejb between two AS7.2 instances. But variable interpolation does not work in the <remote-outbound-connection> element's username attribute. It always sends the variable expression verbatim according to attached debugger, and trace logging of org.jboss.security on the target server.
> I dug through the code and found the problem. The offending line as of writing this:
> https://github.com/wildfly/wildfly/blob/dd3724f600e00e9cc539066cf0bd359f73d62064/remoting/subsystem/src/main/java/org/jboss/as/remoting/RemoteOutboundConnectionAdd.java#L80
> I checked the api here: http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss/jboss-dmr/1.2.0.Final/org/jboss/dmr/ExpressionValue.java#ExpressionValue.asString%28%29
> It looks like you're supposed to use resolve(), not asString(). The earliest version I verified this mistake was 7.2.0.Final, which is the version we're running. It's still there in the latest revision of master of the Wildfly repo.
> This problem possibly also affects other elements and attributes, so you may want to do a full usage scan of org.jboss.dmr.ModelValue#asString().



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)



More information about the jboss-jira mailing list