Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-3946

LdapIdentityStore can not use backup server (failover)

    Details

    • Type: Feature Request
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.0.SP1, 2.1.1.CR1, 2.1.1.CR2, 2.1.1.GA
    • Fix Version/s: The future
    • Component/s: Security
    • Labels:
      None
    • Estimated Difficulty:
      Low

      Description

      Since LdapIdentityStore assembles the provider URL internally, it is not possible to use extended URL's, e. g., a primary and a backup server like this:

      env.setProperty(Context.PROVIDER_URL, "ldap://srv01:389 ldap://srv02:389");

      It would be nice if we would be able to set the providerUrl directly. For compatibility reasons, i suggest the following change:

      // new property settable from components.xml
      private String providerUrl = null;

      protected final InitialLdapContext initialiseContext(String principal, String credentials) throws NamingException {
      ...
      String url = providerUrl;
      if (url == null || url.equals(""))

      { url = String.format("ldap://%s:%d", getServerAddress(), getServerPort()); }

      env.setProperty(Context.PROVIDER_URL, url);
      ...

      Additionally it would be nice if initialiseContext() wouldn't be final so we are able to extend the class.

      Regards,
      Raimund

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shane.bryzak Shane Bryzak
                Reporter:
                raimundhoelle Raimund Hölle
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: