Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-636

Adding a substring syntax for LDAP user DN

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Hello.

      I would like to propose a new syntax of substring LDAP user DN.

      For now, "DefaultLdapRealm" supports only "{0}" token to substitute user DN template with a user's principal.

      In my case, I need to substitute user DN template with a part of user's principle.
      For example if I have a principal as a form of 'organization code + username', I need to make the user's DN as follows:

      CN=OAalice, OU=OA, ...
      

      So I would like to propose a new syntax like "{0:beginIndex:endIndex}" in order to get a part of a user's principle. The template would be:

      CN={0},OU={0:0:2},...
      

      (The indexes are following Java's substring API's specifications.)

      What do you think about my proposal? If you think it is acceptable, I would be able to make a fix.

      Thanks.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hyangtack Hyangtack Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: