1
0

ACL-Notes 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. #
  2. # BEGIN COPYRIGHT BLOCK
  3. # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  4. # Copyright (C) 2005 Red Hat, Inc.
  5. # All rights reserved.
  6. #
  7. # License: GPL (version 3 or any later version).
  8. # See LICENSE for details.
  9. # END COPYRIGHT BLOCK
  10. #
  11. Date What ?
  12. ===================================
  13. 10/15/98 - Created the ACL plugin
  14. - Created a new file aclplugin.c and split the old
  15. acl.c to acl.c & aclparse.c files.
  16. - Merged changes made upt 4.0B2
  17. 10/21/98 - Added USERATTR rule.
  18. 02/01/99 - Cleanup needed to be done in 5.0 to make it a real plugin
  19. =====================================================================================
  20. 1. Do not use slap.h but use slapi-plugin.h. This will require
  21. some work. Work involves
  22. 1) Making the ACLCB an extensible object of CONN struct
  23. 2) Remove reference of Connection & operation struct
  24. 3) Need slapi plugin apis to get the IP and DNS so that
  25. we can evaluate it in the LASes.
  26. 4) Need new option to get values of conn , op & pb stuct like
  27. cert, authtype,
  28. 2. Make ACLPB hang from the Operation struct instead of the PBlock.
  29. 3. Make ACLCB an extensible object of CONN struct and remove any reference
  30. about acl private info.
  31. 4. I implemented the Userattr rule before even deciding if we need in 5.0
  32. or not. I think it is useful. The documents those were based on are
  33. in http://jazz/users/prasanta/acl_manage_filter
  34. 5. Move acllas_dn_parent to the libslapd. This is duplicated code and is
  35. BAAAD.
  36. 6. Use the new normalized dn code so that we don't have to it over and over again.
  37. We have to very careful ins slapi_access_allowed() as we keep the dn around and
  38. free it later ( we can use dn by ref ).
  39. 7. Merge from DS4.1 ( proxy auth) to DS 5.0.
  40. 8. Miscs
  41. a) can we use the SDK URL parsing code ?
  42. b) Merge teh printing routines ( it's all over ).
  43. My estimate for doing the above cleanup will require anywhere between 5 to 8 days.
  44. Run the ACL tests after all the changes -- that is a MUST.
  45. ===============================
  46. 04/28/99
  47. -- All the work descibed above is done.
  48. -- Also
  49. a) Created a Pool pf ACLPB one of which is grabed at the init time.
  50. b) Created a global lockarary which takes care of the concurreny issue between
  51. aclpb & aclcb
  52. c) Fixed plugin init.
  53. I think the userattr rule should be made generic
  54. useAttr = "attrName#Type"
  55. <Type> :== DN | GROUP | ROLE | URL | <value>
  56. <value> :== < any printable String>
  57. Example:
  58. userAttr = "manager#DN" --- similar to userdnattr
  59. userAttr = "owner#GROUP" --- similar to groupdnattr
  60. userAttr = "attr#ROLE" --- The value of attr contains a role definition
  61. userAttr = "myattr#URL" --- The value contains a URL or filter
  62. userAttr = "OU#Directory Server"
  63. --- In this case the client's OU and the
  64. resource entry's OU must have
  65. "Directory Server" value.
  66. This way we can get rid of userdnattr and groupdnattr and accomplish a
  67. lot with a single rule.
  68. At this point, we are done with the changes and waiting for what needs to be
  69. done in 5.0.
  70. =================================
  71. 06/01/1999
  72. -- Split the code into smaller modules
  73. ( aclanom, aclgroup, aclinit, ...)
  74. --- The ACLs are read and kept in a AVL tree.
  75. --- Few bugs fixed in the acl_scan_match code.
  76. ================================================
  77. 07/02/99
  78. -- Added support for parameterized bind rules.
  79. -- Added support for caching of ATTR rules using recompute.S
  80. What's left for 5.0
  81. -------------------
  82. 1. Support for roles
  83. 2. Re-architect user/group cache
  84. 3. startup in multiple threads ( low priority)
  85. 4. look at add/delete/modrdn operations.
  86. 5. cleanup:
  87. - revist all the debug statements
  88. - new tests etc.
  89. 6. UI work
  90. ============
  91. commit:14/12/99 rbyrne
  92. . Added targattrfilters keyword for value based acls.
  93. Required also slapi_filter_apply(), slapi_get_attribute_type()
  94. and slapi_attr_syntax_normalize() in slapd (filter.c and attrsyntax.c).
  95. . Memory leak fix in acl.c for PListInit() call--see comments in code.
  96. . made access an int on it's own to give room for expansion
  97. (see aci_access and aclpb_access)
  98. . files: ACL-Notes, acl.c acl.h acl-ext.c aclanom.c acllas.c acllist.c aclparse.c aclutil.c slapd/attrsyntax.c slapd/slapi-plugin.h slapd/filter.c slapd/libslapd.def
  99. ===
  100. commit: Mon 20th Dec 199
  101. . aclparse.c: add proxy back to acl_access2str
  102. . filter.c: get_filter() does not recurse anymore--get_fitler_internal(), get_filter_list()
  103. do the recursion...this way testing for ldapsubentry works.
  104. . aclinit.c: now have filter (|(aci=*)(objectclass=ldapsubentry)) in
  105. aclinit_search_and_insert_aci(). This means that when slapi_search_internal_callback()
  106. stops returning subentries by default, we will still get them as we have the correct filter.
  107. ===
  108. commit: 12/01/2000:
  109. . aclplugin.c: fix for proxyauth bug in aclplugin_preop_search() and
  110. acl_plugin_preop_modify()--the proxy_dn and dn were swapped.
  111. . acl_ext.c: Also, when we PListAssignValue() on DS_ATTR_USERDN in acl_init_aclpb(),
  112. we should pass it a dn from aclpb_sdn, NOT the dn passed into acl_init_aclpb() which
  113. gets freed after the call to acl_init_acpb(). JAlso here need to be careful thatif dn contains NULL that we indicate this in aclpb_sdn by setting dn to a non-NULL empty string ("") which the code takes to be anon.
  114. . checked that none of the PList objects (DS_PROP_ACLPB, DS_ATTR_USERDN, DS_ATTR_ENTRY) have mem leak problems.
  115. . acl.c, acllas.c, aclproxy.c: removed some #ifdef 0 and comments--tidy up but
  116. no code changes.
  117. . acl_ext.c: in acl__done_aclpb() we need to PListDleteProp() on ACL_ATTR_IP
  118. and ACL_ATTR_DNS. This is because if LASIpEval/ACL_GetAttribute() and
  119. LASDnsEval/ACL_GetAttribute() see that these properties exist, they do
  120. not bother calling the respective Getter() function. So, everytime
  121. the aclpb is reused and ip or dns eval is required, the old value is used (
  122. or whatever hjappens to be in the memory.). Tested--works fine now with ip and dns keywords. ALso tested that when the same user tries an a non-allowed machine he is not allowed by accident (as he was before).
  123. . in schema.c/oc_find(): normalize the objectclass name before looking for it. Otherwise
  124. if there's a trailing space in the oc name, you won't dfind it.
  125. ===
  126. commit:
  127. . aclparse.c: fix for syntax.ksh tp6 test: if there is no "version" in an aci item, reject it.
  128. . acllas.c: in DS_UserDnEval() now call slapi_normalize_dn() when comparing param strings and
  129. ordinary dns.
  130. . acl_ext.c: when seeting DS_USER_DN_ATTR, get the ndn, the normalized form.
  131. ====
  132. commit: 7/02/2000
  133. anom profile and groupdn != don't work together! Bug 381830 in 4.X
  134. . acl.h: new bit in aci_type to mark as below.
  135. . aclparse.c: mark an aci if it's like deny() groupdn != blah
  136. . aclanom.c: if marked like that cancel anom profile (just like userdn !=)
  137. ==
  138. . removed these for the mo...
  139. commit:
  140. . acllas.c: now get the vattrs via slapi_vattr_merge_copy() when testing the client entry.
  141. . vattr.c: assign i the length of the list:i = type_context.list_length;
  142. . entry.c: slapi_entry_add_valueset()
  143. ==
  144. commit: 03/03/2000
  145. . support for roledn in acis.
  146. ===
  147. . acllist: in slapi_sdn_free(&aciListHead->acic_sdn); gbeelato's mem leak fix.
  148. commited
  149. =====
  150. committed: 17/008/00
  151. . support for $dn: aclutil.c, aclparse.c, acllist.c, acllas.c, acl.c, acl.h
  152. . acl_ext.c:Make sure aclpb_search_base is initialized to NULL in aclpb__malloc()
  153. . acl.c: set_result_status: wrong bit masks were being used in a_eval->attrEval_s_astatus etc.
  154. acl__attr_cached_result(): in the attr==NULL case, need to test for potential
  155. "recompute" case of attribute--this happens if it's a param or attr style aci.
  156. ========
  157. commited
  158. Support for dynamic backends:
  159. . acllist.c, aclinit.c, libslapd.def, control.c, slapi-plugin.h:
  160. acl_be_state_change_fnc(), slapi_build_control_from_berval() etc.
  161. . aclanom.c: logical error in aclanom_match_profile() was causing misctest4 to fail.
  162. . acl_ext.c:fix mem leak by calling acl_clean_aclEval_control() in acl_ext_conn_desctructor()
  163. .
  164. ===
  165. committed:24 Aug 2000
  166. now SLAPI_ACL_ALL (allow(all)) does NOT include proxy right
  167. ==
  168. committed: 30 Aug 2000
  169. . acl.c: new print_access_control_Summary() routine to display final acl status. Gets the proxy
  170. stuff right too.
  171. in acl__resource_match_aci() always test the TARGET_FILTER case, the old cod ethere was wrong.
  172. ==
  173. . add support for macros to userdn ldapurl keyword.
  174. ==
  175. Committed:
  176. . Sep 07 2000: Support for $attr in macros.
  177. . Sep 15 2000: Support for aci macros in targetfilter keyword.
  178. . Sep 18 2000: improve ret code handling in __aclinit_handler--stops spurious error message.
  179. --eof