Ok, I see the problem with using the mcf and cri at the base connection manager
level due to the opaqeness of these objects. This cannot be handled at the
login module level because of another outstanding issue, building a jca Subject
when there is a run-as identity. The issue here is that the run-as identity is
not anonymous, but it also does not have an inherent PasswordCredential. The
run-as is an assumed identity based that has one spec defined role, and may
have other roles assigned to it in 4.x+ using an appserver specific deployment
setting.
About the only thing I can see doing is updating the logic in
getConnectionProperties to try to use the cri and then the mcf:
| WrappedConnectionRequestInfo lcri = (WrappedConnectionRequestInfo)cri;
| if (subject != null)
| {
| if (SubjectActions.addMatchingProperties(subject, props, this) ==
true)
| {
| return props;
| }
| // If there is no PasswordCredential retry with one based on the
cri
| if( subject.getPrivateCredentials(PasswordCredential.class).size()
== 0 )
| {
| String criUser = lcri.getUserName() == null ? "":
lcri.getUserName();
| char[] criPW = lcri.getPassword() == null ? new char[0]:
lcri.getPassword().toCharArray();
| PasswordCredential cripw = new PasswordCredential(criUser,
criPW);
| subject.getPrivateCredentials().add(cripw);
| if (SubjectActions.addMatchingProperties(subject, props, this)
== true)
| {
| return props;
| }
| // Else, repeat with the mcf default username/password ...
| }
| throw new JBossResourceException("No matching credentials in
Subject!");
| } // end of if ()
|
Its not clear to me that the SubjectCriKey pooling key will work if the mcf
defaults are included as I have not tracked down all the Subject based call
paths.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3866345#3866345
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3866345
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development