#
# This LDIF creates the needed schema objects for Access Grant support in LDAP.
#
# If any changes are made to the attribute names, the corresponding "pingfederate/server/default/data/config-store/org.sourceid.oauth20.token.AccessGrantManagerLDAPOracleImpl.xml" 
# must also be altered to reflect these changes.
#

#
# Create an AccessGrants OU to store them all. This is an optional OU to keep all access grants in
# the same location. If a different location is needed for them, alter the LDIF. Your search base
# in the "pingfederate/server/default/data/config-store/org.sourceid.oauth20.token.AccessGrantManagerLDAPOracleImpl.xml" file should point to
# this ou. eg.  <c:item name="SearchBase">OU=AccessGrants,DC=4s8i6q,DC=global</c:item>
#
# <Your DC Here> should be changed to the location of your full DC. eg. DC=4s8i6q,DC=global

dn: ou=AccessGrant,<Your DC Here>
objectclass: top
objectclass: organizationalUnit
ou: AccessGrant


#
# These are the required attributes. You may alter the name of the attributes, but in doing
# so you must also change their corresponding values in "pingfederate/server/default/data/config-store/org.sourceid.oauth20.token.AccessGrantManagerLDAPOracleImpl.xml"  
# to match, and change the "MUST" and "MAY" attribute names in the "accessGrant" objectClass in the
# file access-grant-ldap-oracle.ldif.
#
dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.28867.9.2.1 NAME ( 'accessGrantAttributes' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-MIN-VALUE-LENGTH '0' X-MAX-VALUE-LENGTH '4194304')

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.28867.9.2.2 NAME ( 'accessGrantContextualQualifier' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE X-MIN-VALUE-LENGTH '0' X-MAX-VALUE-LENGTH '64' )

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.28867.9.2.3 NAME ( 'accessGrantClientId' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE X-MIN-VALUE-LENGTH '0' X-MAX-VALUE-LENGTH '256' )

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.28867.9.2.4 NAME ( 'accessGrantExpires' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.28867.9.2.5 NAME ( 'accessGrantGuid' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE X-MIN-VALUE-LENGTH '0' X-MAX-VALUE-LENGTH '32' )

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.28867.9.2.6 NAME ( 'accessGrantGrantType' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-MIN-VALUE-LENGTH '0' X-MAX-VALUE-LENGTH '128' )

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.28867.9.2.7 NAME ( 'accessGrantHashedRefreshTokenValue' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE X-MIN-VALUE-LENGTH '0' X-MAX-VALUE-LENGTH '256')

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.28867.9.2.8 NAME ( 'accessGrantIssued' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.28867.9.2.9 NAME ( 'accessGrantScope' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE X-MIN-VALUE-LENGTH '0' X-MAX-VALUE-LENGTH '256')

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.28867.9.2.10 NAME ( 'accessGrantUniqueUserIdentifier' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE X-MIN-VALUE-LENGTH '0' X-MAX-VALUE-LENGTH '256')

dn: cn=schema
changetype: modify
add: attributeTypes
attributeTypes: ( 1.3.6.1.4.1.28867.9.2.11 NAME ( 'accessGrantUpdated' ) SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE)

