I'm working on providing Container-managed security in Artemis
resource adapter for our app server.
Artemis RA has been coded to support it already. If there is a
security domain specified for its resource adapter, Artemis
ManagedConnection will use the security's Subject for its
authentication on the broker side.
However there is one use case that I'm not sure about.
When the user specifies credentials when calling the RA's
ConnectionFactory methods, Artemis discards them if there is a subject
from the SecurityDomain.
I would have expected the opposite: credential parameters from the
ConnectionRequestInfo should have precedence over the Subject's from
the security domain.
What do you think about changing that behaviour?
If there are credentials from the ConnectionRequestInfo, use them
else if there is a Subject, use it
else raise an exception.