shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyangtack Lee (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SHIRO-636) Adding a substring syntax for LDAP user DN
Date Mon, 04 Sep 2017 07:23:00 GMT
Hyangtack Lee created SHIRO-636:
-----------------------------------

             Summary: Adding a substring syntax for LDAP user DN
                 Key: SHIRO-636
                 URL: https://issues.apache.org/jira/browse/SHIRO-636
             Project: Shiro
          Issue Type: Improvement
          Components: Authentication (log-in), Configuration
            Reporter: Hyangtack Lee
            Priority: Minor


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:
{noformat}
CN=OAalice, OU=OA, ...
{noformat}

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: 
{noformat}
CN={0},OU={0:0:2},...
{noformat}
(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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message