ACL-Notes 8.3 KB

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