# oidctx.sbs   Created 6/15/99
#
# Modified:
# 10/15/99  nlewis    Add changetype so we can use ldapmodify
# 10/12/99  nlewis    Update ACLs
# 9/2/99    nlewis    Add ACLs; change top context obj and group names
# 7/1/99    nlewis    Add blank lines between entries
# 6/15/99   nlewis    Creation
#
#
# This ldif file creates the required objects for an Oracle Admin context,
# including:
#   the top level container object (OracleContext),
#   the Products container object,
#   the 3 admin groups under that container,
#   the DBsecurity container object, and
#   the default domain under the DBsecurity container.
#
# In addition, ACLs are set up on those objects.  Please note that this file
# is really a SAMPLE file, and is only used directly by the RDBMS regression
# tests. There is a separate version of this file for each directory other
# than OID - for example, adctx.sbs for Microsoft Active Directory.
# Since it is for our tests, it includes a hardcoded directory administrative
# context (ou=Americas,o=Oracle,c=US) that will need to be replaced by a
# user-input value when used by NetCA or other config tools.
# Also the net config classes will have to add the current user (creating
# the context) to the three groups. Here we have pretended that 
# cn=ctxcreator,c=us is the current user, which is ridiculous.
#
#
# ***********************      oidctx.sbs  **************************
#
#
# Create Oracle Admin context object
#
dn: %s_OracleContextDN%
changetype: add
cn: OracleContext
objectclass: top
objectclass: orclContext

#
#
# Create Products container object under the context
#
dn: cn=Products,%s_OracleContextDN%
changetype: add
cn: Products
objectclass: top
objectclass: orclContainer

#
#
# Create the three admin groups under the context
# change cn=ctxcreator to someone else when we actually use these in RDBMS
# regression tests
#
dn: cn=OracleDBSecurityAdmins,%s_OracleContextDN%
changetype: add
cn: OracleDBSecurityAdmins
uniquemember: %s_OracleContextCreatorUserDN%
objectclass: top
objectclass: groupofUniqueNames

dn: cn=OracleDBCreators,%s_OracleContextDN%
changetype: add
cn: OracleDBCreators
uniquemember: %s_OracleContextCreatorUserDN%
objectclass: top
objectclass: groupofUniqueNames

dn: cn=OracleNetAdmins,%s_OracleContextDN%
changetype: add
cn: OracleNetAdmins
uniquemember: %s_OracleContextCreatorUserDN%
objectclass: top
objectclass: groupofUniqueNames

#
#
# Create DB Security container object to hold the domains 
#
dn: cn=OracleDBSecurity,cn=Products,%s_OracleContextDN%
changetype: add
cn: OracleDBSecurity
objectclass: top
objectclass: orclContainer

#
#
# Create default domain 
#
dn: cn=OracleDefaultDomain,cn=OracleDBSecurity,cn=Products,%s_OracleContextDN%
changetype: add
cn: OracleDefaultDomain
objectclass: top
objectclass: orclDBEnterpriseDomain

#
#
# Set up ACLs on the three groups. Note that DBSecurityAdmins have full
# privileges on all three groups inherited from the Oracle Context object ACI.
#
dn: cn=OracleDBSecurityAdmins,%s_OracleContextDN%
changetype: modify
replace: ACL
#orclaci: access to entry by * (none)
ACL: 0#subtree#[Public]#[Entry Rights]
#orclaci: access to attr=(*) by * (none)
ACL: 0#subtree#[Public]#[All Attributes Rights]

dn: cn=OracleDBCreators,%s_OracleContextDN%
changetype: modify
replace: ACL
#orclaci: access to entry by group="cn=OracleDBCreators,%s_OracleContextDN%" (browse) by * (none)
ACL: 1#subtree#cn=OracleDBCreators,%s_OracleContextDN%#[Entry Rights]
ACL: 0#subtree#[Public]#[Entry Rights]
#orclaci: access to attr=(*) by group="cn=OracleDBCreators,%s_OracleContextDN%" (read,search,compare) by * (none)
ACL: 3#subtree#cn=OracleDBCreators,%s_OracleContextDN%#[All Attributes Rights]
ACL: 0#subtree#[Public]#[All Attributes Rights]


dn: cn=OracleNetAdmins,%s_OracleContextDN%
changetype: modify
replace: orclaci
#orclaci: access to entry by group="cn=OracleNetAdmins,%s_OracleContextDN%" (browse,add,delete) by * (none)
ACL: 7#subtree#cn=OracleNetAdmins,%s_OracleContextDN%#[Entry Rights]
ACL: 0#subtree#[Public]#[Entry Rights]
#orclaci: access to attr=(*) by group="cn=OracleNetAdmins,%s_OracleContextDN%" (compare,search,read,selfwrite,write) by * (none)
ACL: 15#subtree#cn=OracleNetAdmins,%s_OracleContextDN%#[All Attributes Rights]
ACL: 0#subtree#[Public]#[All Attributes Rights]

#
#
# Set up ACL on default domain - entry level because we don't want DBcreators
# to have write access to the underlying roles and mappings. 
# Note that when a DB is added to this domain, the ACI would be modified to
# include a new orclACI that allows the server browse and read access. The ACI
# would look like:
# orclaci: access to entry by dn="cn=server1,cn=OracleContext,ou=Americas,
# o=Oracle,c=US" (browse)
# orclaci: orclaci: access to attr=(*) by dn="cn=server1,cn=OracleContext,
# ou=Americas,o=Oracle,c=US" (read,search,compare)
#
# This ACI must be inherited so the DB can view the underlying roles and
# mapping objects.
#
dn: cn=OracleDefaultDomain,cn=OracleDBSecurity,cn=Products,%s_OracleContextDN%
changetype: modify
replace: ACL
#orclentrylevelaci: access to attr=(*) by group="cn=OracleDBCreators,%s_OracleContextDN%" (write,selfwrite)
ACL: 12#entry#cn=OracleDBCreators,%s_OracleContextDN%#[All Attributes Rights]

#
#
# Set up ACL on DB Security container object
# DBCreators need permissions granted here so they don't fall into the
# * category (and get no read access).
#
dn: cn=OracleDBSecurity,cn=Products,%s_OracleContextDN%
changetype: modify
replace: ACL
#orclaci: access to entry by group="cn=OracleDBCreators,%s_OracleContextDN%" (browse) by * (none)
ACL: 1#subtree#cn=OracleDBCreators,%s_OracleContextDN%#[Entry Rights]
ACL: 0#subtree#[Public]#[Entry Rights]
#orclaci: access to attr=(*) by group="cn=OracleDBCreators,%s_OracleContextDN%" (read,search,compare) by * (none)
ACL: 3#subtree#cn=OracleDBCreators,%s_OracleContextDN%#[All Attributes Rights]
ACL: 0#subtree#[Public]#[All Attributes Rights]

#
#
# Set up ACLs on the OracleContext object to allow DBCreators to add DBs
# and NetAdmins to add Net8 objects. This is a workaround for the ACL
# processing on ADD.
# Give members of OracleNetAdmins full access to Net8 objects.
# Give members of OracleNetAdmins compare,search,read,selfwrite,write access
# to the Net8 attributes of service entries (includes database service entries). 
#
dn: %s_OracleContextDN%
changetype: modify
replace: ACL
#orclentrylevelaci: access to entry by group="cn=OracleNetAdmins,%s_OracleContextDN%" (add) by group="cn=OracleDBCreators,%s_OracleContextDN%" (add)
ACL: 2#entry#cn=OracleNetAdmins,%s_OracleContextDN%#[Entry Rights]
ACL: 2#entry#cn=OracleDBCreators,%s_OracleContextDN%#[Entry Rights]

dn: %s_OracleContextDN%
changetype: modify
replace: ACL
#orclaci: access to entry by group="cn=OracleDBSecurityAdmins,%s_OracleContextDN%" (browse,add,delete) by * (browse,noadd,nodelete)
ACL: 7#subtree#cn=OracleDBSecurityAdmins,%s_OracleContextDN%#[Entry Rights]
ACL: 1#subtree#[Public]#[Entry Rights]
#orclaci: access to attr=(*) by group="cn=OracleDBSecurityAdmins,%s_OracleContextDN%" (read,search,write,selfwrite,compare) by * (read,search,nowrite,noselfwrite,compare)
ACL: 15#subtree#cn=OracleDBSecurityAdmins,%s_OracleContextDN%#[All Attributes Rights]
ACL: 3#subtree#[Public]#[All Attributes Rights]
#orclaci: access to entry filter=(objectclass=orclNetService) by group="cn=OracleNetAdmins,%s_OracleContextDN%" (browse,add,delete) 
#orclaci: access to entry filter=(objectclass=orclNetDescriptionList) by group="cn=OracleNetAdmins,%s_OracleContextDN%" (browse,add,delete) 
#orclaci: access to entry filter=(objectclass=orclNetDescription) by group="cn=OracleNetAdmins,%s_OracleContextDN%" (browse,add,delete) 
#orclaci: access to entry filter=(objectclass=orclNetAddressList) by group="cn=OracleNetAdmins,%s_OracleContextDN%" (browse,add,delete) 
#orclaci: access to entry filter=(objectclass=orclNetAddress) by group="cn=OracleNetAdmins,%s_OracleContextDN%" (browse,add,delete) 
#orclaci: access to attr=(*)  filter=(objectclass=orclNetService) by group="cn=OracleNetAdmins,%s_OracleContextDN%" (compare,search,read,write) 
#orclaci: access to attr=(*)  filter=(objectclass=orclNetDescriptionList) by group="cn=OracleNetAdmins,%s_OracleContextDN%" (compare,search,read,write) 
#orclaci: access to attr=(*)  filter=(objectclass=orclNetDescription) by group="cn=OracleNetAdmins,%s_OracleContextDN%" (compare,search,read,write) 
#orclaci: access to attr=(*)  filter=(objectclass=orclNetAddressList) by group="cn=OracleNetAdmins,%s_OracleContextDN%" (compare,search,read,write) 
#orclaci: access to attr=(*)  filter=(objectclass=orclNetAddress) by group="cn=OracleNetAdmins,%s_OracleContextDN%" (compare,search,read,write) 
#orclaci: access to attr=(orclNetDescString, orclNetDescName)  filter=(objectclass=orclService) by group="cn=OracleNetAdmins,%s_OracleContextDN%" (compare,search,read,write)
