You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by sm...@apache.org on 2018/07/06 02:36:20 UTC

directory-fortress-core git commit: FC-108 - Add support for RFC2307 BIS

Repository: directory-fortress-core
Updated Branches:
  refs/heads/master f7d92656e -> f1f3f58df


FC-108 - Add support for RFC2307 BIS


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/f1f3f58d
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/f1f3f58d
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/f1f3f58d

Branch: refs/heads/master
Commit: f1f3f58dfd6c3ec80cd5200bb1d5a06541a60017
Parents: f7d9265
Author: Shawn McKinney <sm...@apache.org>
Authored: Thu Jul 5 10:37:27 2018 -0500
Committer: Shawn McKinney <sm...@apache.org>
Committed: Thu Jul 5 10:37:27 2018 -0500

----------------------------------------------------------------------
 build-config.xml                                |  3 ---
 build.properties.example                        |  6 ++++-
 config/bootstrap/fortress.properties.src        |  5 +----
 ldap/setup/refreshLDAPData-src.xml              |  6 -----
 ldap/symas-openldap.conf.src                    |  0
 slapd.properties.example                        |  4 +---
 .../directory/fortress/core/impl/RoleDAO.java   | 23 +-------------------
 7 files changed, 8 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f1f3f58d/build-config.xml
----------------------------------------------------------------------
diff --git a/build-config.xml b/build-config.xml
index 4db1ef0..2138fe9 100644
--- a/build-config.xml
+++ b/build-config.xml
@@ -388,9 +388,6 @@
          <replace file="${dst.load.bootstrap.script}" token="@GROUP_PROPERTIES@" value="${group.properties}"/>
          <replace file="${dst.load.bootstrap.script}" token="@ROLE_OCCUPANTS@" value="${role.occupants}"/>
          <replace file="${dst.load.bootstrap.script}" token="@IS_RFC2307@" value="${rfc2307}"/>
-         <replace file="${dst.load.bootstrap.script}" token="@RFC2307_GROUP@" value="${rfc2307.group}"/>
-         <replace file="${dst.load.bootstrap.script}" token="@RFC2307_USER_MBR@" value="${rfc2307.user.member}"/>
-         <replace file="${dst.load.bootstrap.script}" token="@RFC2307_GROUP_MBR@" value="${rfc2307.group.member}"/>
          <echo message="###############  Copy ehcache config to bootstrap config folder  ###############"/>
          <delete file="${bootstrap.ehcache.conf}"/>
        <copy file="${ehcache.conf}" tofile="${bootstrap.ehcache.conf}"/>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f1f3f58d/build.properties.example
----------------------------------------------------------------------
diff --git a/build.properties.example b/build.properties.example
index 4998f70..4c107d5 100644
--- a/build.properties.example
+++ b/build.properties.example
@@ -155,5 +155,9 @@ group.properties=configParameter
 #http.port=8443
 #http.protocol=https
 
-
+########################################################################
+# 5. RFC2307 OBJECT CLASS DEFINITIONS
+########################################################################
+# Boolean value. If true, requires rfc2307bis schema because posixUser and posixGroup must be auxiliary object classes to work with ftRls which is structural..
+rfc2307=false
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f1f3f58d/config/bootstrap/fortress.properties.src
----------------------------------------------------------------------
diff --git a/config/bootstrap/fortress.properties.src b/config/bootstrap/fortress.properties.src
index 53b0b21..3776cbb 100755
--- a/config/bootstrap/fortress.properties.src
+++ b/config/bootstrap/fortress.properties.src
@@ -171,7 +171,4 @@ clientside.sorting=true
 attr.delimiter=$
 
 # These are used to enable RFC2307bis support on User and Role entities:
-rfc2307=@IS_RFC2307@
-rfc2307.group=@RFC2307_GROUP@
-rfc2307.user.member=@RFC2307_USER_MBR@
-rfc2307.group.member=@RFC2307_GROUP_MBR@
\ No newline at end of file
+rfc2307=@IS_RFC2307@
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f1f3f58d/ldap/setup/refreshLDAPData-src.xml
----------------------------------------------------------------------
diff --git a/ldap/setup/refreshLDAPData-src.xml b/ldap/setup/refreshLDAPData-src.xml
index 1ebe626..cdbfc89 100755
--- a/ldap/setup/refreshLDAPData-src.xml
+++ b/ldap/setup/refreshLDAPData-src.xml
@@ -102,9 +102,6 @@
                 <config props="group.properties:@GROUP_PROPERTIES@"/>
                 <config props="role.occupants:@ROLE_OCCUPANTS@"/>
                 <config props="rfc2307:@IS_RFC2307@"/>
-                <config props="rfc2307.group:@RFC2307_GROUP@"/>
-                <config props="rfc2307.group.member:@RFC2307_GROUP_MBR@"/>
-                <config props="rfc2307.user.member:@RFC2307_USER_MBR@"/>
                 <config props="gidNumber:5000"/>
                 <config props="uidNumber:1000"/>
 
@@ -175,9 +172,6 @@
                 <config props="group.protocol:@GROUP_PROTOCOL@"/>
                 <config props="group.properties:@GROUP_PROPERTIES@"/>
                 <config props="rfc2307:@IS_RFC2307@"/>
-                <config props="rfc2307.group:@RFC2307_GROUP@"/>
-                <config props="rfc2307.group.member:@RFC2307_GROUP_MBR@"/>
-                <config props="rfc2307.user.member:@RFC2307_USER_MBR@"/>
                 <config props="attr.delimiter:$"/>
                 <config props="field.length:130"/>
                 <config props="ldap.filter.size:15"/>

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f1f3f58d/ldap/symas-openldap.conf.src
----------------------------------------------------------------------
diff --git a/ldap/symas-openldap.conf.src b/ldap/symas-openldap.conf.src
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f1f3f58d/slapd.properties.example
----------------------------------------------------------------------
diff --git a/slapd.properties.example b/slapd.properties.example
index 4e4d80e..3d0284a 100644
--- a/slapd.properties.example
+++ b/slapd.properties.example
@@ -197,7 +197,5 @@ db.bak.sess.dir=${db.root}/backup/rbacsess
 ########################################################################
 # 6. RFC2307 OBJECT CLASS DEFINITIONS
 ########################################################################
+# Boolean value. If true, requires rfc2307bis schema because posixUser and posixGroup must be auxiliary object classes to work with ftRls which is structural..
 rfc2307=false
-rfc2307.group=groupOfNames
-rfc2307.user.member=memberof
-rfc2307.group.member=memberuid
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f1f3f58d/src/main/java/org/apache/directory/fortress/core/impl/RoleDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/RoleDAO.java b/src/main/java/org/apache/directory/fortress/core/impl/RoleDAO.java
index 90e1bd9..4a761f8 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/RoleDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/RoleDAO.java
@@ -105,7 +105,7 @@ final class RoleDAO extends LdapDataProvider implements PropertyProvider<Role>,
 {
     /*
       *  *************************************************************************
-      *  **  OpenAccessMgr ROLE STATICS
+      *  **  ROLE STATICS contain object and attribute definitions for LDAP operations.
       *  ************************************************************************
       */
     private static final String ROLE_NM = "ftRoleName";
@@ -119,9 +119,6 @@ final class RoleDAO extends LdapDataProvider implements PropertyProvider<Role>,
     // rfc2307 decls:
     private static final String POSIX_GROUP = "posixGroup";
     static final boolean IS_RFC2307 = Config.getInstance().getProperty( GlobalIds.RFC2307_PROP ) != null && Config.getInstance().getProperty( GlobalIds.RFC2307_PROP ).equalsIgnoreCase( "true" ) ? true : false;
-    private static final String MEMBER_UID = "memberuid";
-    private static final String RFC2307_GROUP = Config.getInstance().getProperty( "rfc2307.group" ) != null ? Config.getInstance().getProperty( "rfc2307.group" ) : "groupOfNames";
-    //private static final String RFC2307_GROUP_MEMBER = IS_RFC2307 && Config.getInstance().getProperty( "rfc2307.group.member" ) != null ? Config.getInstance().getProperty( "rfc2307.group.member" ) : GlobalIds.ROLE_OCCUPANT;
 
     private static final String[] ROLE_ATRS =
         {
@@ -132,7 +129,6 @@ final class RoleDAO extends LdapDataProvider implements PropertyProvider<Role>,
             SchemaConstants.ROLE_OCCUPANT_AT,
             GlobalIds.PARENT_NODES,
             GlobalIds.PROPS,
-            IS_RFC2307 ? MEMBER_UID : null,
             IS_RFC2307 ? GlobalIds.GID_NUMBER : null
     };
 
@@ -155,7 +151,6 @@ final class RoleDAO extends LdapDataProvider implements PropertyProvider<Role>,
             GlobalIds.FT_MODIFIER_AUX_OBJECT_CLASS_NAME
         };
 
-
     /**
      * Method on PropUdater interface used to increment UID and GID prop values.
      * @param value contains a String that will be converted to an Integer before incremeting.
@@ -168,7 +163,6 @@ final class RoleDAO extends LdapDataProvider implements PropertyProvider<Role>,
         return newId.toString();
     }
 
-
     /**
      * @param entity
      * @return
@@ -352,17 +346,9 @@ final class RoleDAO extends LdapDataProvider implements PropertyProvider<Role>,
 
         try
         {
-            //ld = getAdminConnection();
             List<Modification> mods = new ArrayList<Modification>();
             mods.add( new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, SchemaConstants.ROLE_OCCUPANT_AT,
                 userDn ) );
-/*
-            if ( IS_RFC2307 )
-            {
-                mods.add( new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, MEMBER_UID,
-                    getRdnValue( userDn ) ) );
-            }
-*/
             ld = getAdminConnection();
             modify( ld, dn, mods, entity );
         }
@@ -397,13 +383,6 @@ final class RoleDAO extends LdapDataProvider implements PropertyProvider<Role>,
             List<Modification> mods = new ArrayList<Modification>();
             mods.add( new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE,
                 SchemaConstants.ROLE_OCCUPANT_AT, userDn ) );
-/*
-            if ( IS_RFC2307 )
-            {
-                mods.add( new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, MEMBER_UID,
-                    getRdnValue( userDn ) ) );
-            }
-*/
             ld = getAdminConnection();
             modify( ld, dn, mods, entity );
         }