Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-6397

AbstractPasswordCredentialLoginModule should not require a MCF to be configured if IgnoreMissingMCF is true

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Minor Minor
    • No Release
    • JBossAS-4.2.3.GA
    • None
    • None

      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)

              Unassigned Unassigned
              nsayer Nicholas Sayer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: