[jboss-jira] [JBoss JIRA] Created: (JBAS-6397) AbstractPasswordCredentialLoginModule should not require a MCF to be configured if IgnoreMissingMCF is true
Nicholas Sayer (JIRA)
jira-events at lists.jboss.org
Mon Jan 19 13:02:05 EST 2009
AbstractPasswordCredentialLoginModule should not require a MCF to be configured if IgnoreMissingMCF is true
-----------------------------------------------------------------------------------------------------------
Key: JBAS-6397
URL: https://jira.jboss.org/jira/browse/JBAS-6397
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: JBossAS-4.2.3.GA
Reporter: Nicholas Sayer
Priority: Minor
See also JBMESSAGING-1490
If you set ignoreMissingMCF to true on any bean derived from AbstractPasswordCredentialLoginModule, you should not be required to set a value for managedConnectionFactoryName. As the code is now, you must not only supply a value for the MCF Name, it must actually parse as a valid ObjectName. This winds up forcing us to set the value to "org.jboss.Nonexistent:service=NonExistent,name=NonExistent".
We do this because we use SecureIdentityLoginModules to hold onto usernames and passwords to access secure resources (other than MCFs) and then use JAAS to look them up. An example of this is the JAASAwareBridgeService referenced in the above JIRA.
As a proposed fix,
1. Find the line in initialize() that says
managedConnectionFactoryName = new ObjectName(name);
and add before it
if (name != null)
2. move the block of code that says
if (managedConnectionFactoryName == null)
{
throw new IllegalArgumentException("Must supply a managedConnectionFactoryName!");
}
under the next block that sets the value of ignoreMissingMCF, and change the if to read
if (!ignoreMissingMCF && managedConnectionFactoryName == null)
3. in getMcf(), change
if (mcf == null)
to
if (mcf == null && managedConnectionFactoryName != null)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list