]
Enrique González Martínez commented on WFLY-3405:
-------------------------------------------------
Variable interpolation not done during outbound connection instantiation. Using the same
criteria as the other parameters that allow expressions to get the value (Accessing the AD
to resolve the value)
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/dd3724f600e00e9cc539066cf0bd359f7...
I checked the api here:
http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/...
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().