Skip to content

Commit

Permalink
[#208] FIX The definition for the attribute type declared that it sho…
Browse files Browse the repository at this point in the history
…uld use the syntax which is not defined in the schema (#483)
  • Loading branch information
vharseko authored Mar 3, 2025
1 parent 9333dd3 commit 688a9ff
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Copyright 2009-2010 Sun Microsystems, Inc.
* Portions copyright 2013-2016 ForgeRock AS.
* Portions copyright 2014 Manuel Gaupp
* Portions copyright 2025 3A Systems, LLC
*/
package org.forgerock.opendj.ldap.schema;

Expand Down Expand Up @@ -1582,6 +1583,14 @@ private static void defaultSyntaxes(final SchemaBuilder builder) {
.extraProperties(RFC4512_ORIGIN)
.implementation(new BooleanSyntaxImpl())
.addToSchema();
//Expression syntax for Boolean
//
//Values of this syntax hold either a Boolean value, or a configuration expression that evaluates to a Boolean value.
builder.buildSyntax("1.3.6.1.4.1.36733.2.1.3.3.7")
.description(SYNTAX_BOOLEAN_DESCRIPTION)
.extraProperties(RFC4512_ORIGIN)
.implementation(new BooleanSyntaxImpl())
.addToSchema();

builder.buildSyntax(SYNTAX_COUNTRY_STRING_OID)
.description(SYNTAX_COUNTRY_STRING_DESCRIPTION)
Expand All @@ -1600,7 +1609,14 @@ private static void defaultSyntaxes(final SchemaBuilder builder) {
.extraProperties(RFC4512_ORIGIN)
.implementation(new DirectoryStringSyntaxImpl())
.addToSchema();

//Expression syntax for Directory String
//
//Values of this syntax hold either an LDAP directory string value, or a configuration expression that evaluates to an LDAP directory string value.
builder.buildSyntax("1.3.6.1.4.1.36733.2.1.3.3.15")
.description(SYNTAX_DIRECTORY_STRING_DESCRIPTION)
.extraProperties(RFC4512_ORIGIN)
.implementation(new DirectoryStringSyntaxImpl())
.addToSchema();
builder.buildSyntax(SYNTAX_DIT_CONTENT_RULE_OID)
.description(SYNTAX_DIT_CONTENT_RULE_DESCRIPTION)
.extraProperties(RFC4512_ORIGIN)
Expand All @@ -1618,6 +1634,14 @@ private static void defaultSyntaxes(final SchemaBuilder builder) {
.extraProperties(RFC4512_ORIGIN)
.implementation(new DistinguishedNameSyntaxImpl())
.addToSchema();
//Expression syntax for DN
//
//Values of this syntax hold either a DN value, or a configuration expression that evaluates to a DN value.
builder.buildSyntax("1.3.6.1.4.1.36733.2.1.3.3.12")
.description(SYNTAX_DN_DESCRIPTION)
.extraProperties(RFC4512_ORIGIN)
.implementation(new DistinguishedNameSyntaxImpl())
.addToSchema();

builder.buildSyntax(SYNTAX_ENHANCED_GUIDE_OID)
.description(SYNTAX_ENHANCED_GUIDE_DESCRIPTION)
Expand Down Expand Up @@ -1660,7 +1684,14 @@ private static void defaultSyntaxes(final SchemaBuilder builder) {
.extraProperties(RFC4512_ORIGIN)
.implementation(new IntegerSyntaxImpl())
.addToSchema();

//Expression syntax for Integer
//
//Values of this syntax hold either an integer value, or a configuration expression that evaluates to an integer value.
builder.buildSyntax("1.3.6.1.4.1.36733.2.1.3.3.27")
.description(SYNTAX_INTEGER_DESCRIPTION)
.extraProperties(RFC4512_ORIGIN)
.implementation(new IntegerSyntaxImpl())
.addToSchema();
builder.buildSyntax(SYNTAX_JPEG_OID)
.description(SYNTAX_JPEG_DESCRIPTION)
.extraProperties(RFC4512_ORIGIN)
Expand Down
10 changes: 9 additions & 1 deletion opendj-server-legacy/resource/schema/02-config.ldif
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,22 @@
# Portions Copyright 2011 profiq, s.r.o.
# Portions Copyright 2012 Manuel Gaupp
# Portions copyright 2015 Edan Idzerda
# Portions copyright 2023-2024 3A Systems LLC
# Portions copyright 2023-2025 3A Systems LLC

# This file contains the attribute type and objectclass definitions for use
# with the Directory Server configuration.
dn: cn=schema
objectClass: top
objectClass: ldapSubentry
objectClass: subschema
ldapSyntaxes: ( 1.3.6.1.4.1.36733.2.1.3.4 DESC 'Duration in milli-seconds' X-SUBST '1.3.6.1.4.1.1466.115.121.1.27' X-ORIGIN 'OpenDJ Directory Server' )
ldapSyntaxes: ( 1.3.6.1.4.1.36733.2.1.3.5 DESC 'Size in bytes' X-SUBST '1.3.6.1.4.1.1466.115.121.1.27' X-ORIGIN 'OpenDJ Directory Server' )
ldapSyntaxes: ( 1.3.6.1.4.1.36733.2.1.3.6 DESC 'Timer metric' X-SUBST '1.3.6.1.4.1.36733.2.1.3.1' X-ORIGIN 'OpenDJ Directory Server' )
ldapSyntaxes: ( 1.3.6.1.4.1.36733.2.1.3.7 DESC 'Summary metric' X-SUBST '1.3.6.1.4.1.36733.2.1.3.1' X-ORIGIN 'OpenDJ Directory Server' )
ldapSyntaxes: ( 1.3.6.1.4.1.36733.2.1.3.8 DESC 'Filesystem path' X-SUBST '1.3.6.1.4.1.1466.115.121.1.15' X-ORIGIN 'OpenDJ Directory Server' )
ldapSyntaxes: ( 1.3.6.1.4.1.36733.2.1.3.9 DESC 'CSN (Change Sequence Number)' X-SUBST '1.3.6.1.4.1.1466.115.121.1.15' X-ORIGIN 'OpenDJ Directory Server' )
ldapSyntaxes: ( 1.3.6.1.4.1.36733.2.1.3.10 DESC 'Counter metric' X-SUBST '1.3.6.1.4.1.1466.115.121.1.27' X-ORIGIN 'OpenDJ Directory Server' )
ldapSyntaxes: ( 1.3.6.1.4.1.36733.2.1.3.11 DESC 'Host port' X-SUBST '1.3.6.1.4.1.1466.115.121.1.15' X-ORIGIN 'OpenDJ Directory Server' )
attributeTypes: ( 1.3.6.1.4.1.26027.1.1.1
NAME 'ds-cfg-java-class'
EQUALITY caseExactMatch
Expand Down

0 comments on commit 688a9ff

Please sign in to comment.