Hi,
When I add an attribute named "cm.host" in my OpenLDAP schema, I get an invalid name error.
The attribute I added is: attributeType ( 2.5.4.2.2 NAME 'cm.host' DESC 'host name' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )
I am getting the following error: Invalid NAME: "cm.host"
Does this mean attribute in OpenLDAP schema cannot have dot in attribute name or I am doing something wrong. Is there any way around, I cannot change the schema and our application depend on this data.
Thanks in advance.
Regards, Rana Biswas
Rana Biswas wrote:
Hi,
When I add an attribute named "cm.host" in my OpenLDAP schema, I get an invalid name error.
The attribute I added is: attributeType ( 2.5.4.2.2 NAME 'cm.host' DESC 'host name' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )
I am getting the following error: Invalid NAME: "cm.host"
Does this mean attribute in OpenLDAP schema cannot have dot in attribute name or I am doing something wrong. Is there any way around, I cannot change the schema and our application depend on this data.
Thanks in advance.
Regards, Rana Biswas
What version of OpenLDAP are you using?
Where did you add this attribute? It looks like you've hacked core.schema and not requested your own OID. Please read:
http://www.openldap.org/doc/admin23/schema.html#Extending%20Schema
According to rfc4512, section 1.4:
Short names, also known as descriptors, are used as more readable aliases for object identifiers. Short names are case insensitive and conform to the ABNF
ABNF has:
DOT = %x2E ; period (".")
So I read that as 'cm.host' be valid, I'm just not sure how it is to be written in a schema.
Anyone correct/clarify?
Thanks.
Hi Gavin,
Thanks for the reply.
You are right I have not requested for OID. The reason is I am just testing out few things right now and see if our application would work as is with OpenLDAP.
I am using OpenLDAP v 2.3.36.
I did not get you when you say "Short names", it seems more like description. I am having problem with NAME field of attributeType.
I have checked the link you have sent, but really not able to make much out of that, may be because I am new to OpenLDAP.
Any help is much appreciated.
Regards, Rana Biswas
On 10/2/07, Gavin Henry ghenry@suretecsystems.com wrote:
Rana Biswas wrote:
Hi,
When I add an attribute named "cm.host" in my OpenLDAP schema, I get an invalid name error.
The attribute I added is: attributeType ( 2.5.4.2.2 NAME 'cm.host' DESC 'host name' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} )
I am getting the following error: Invalid NAME: "cm.host"
Does this mean attribute in OpenLDAP schema cannot have dot in attribute name or I am doing something wrong. Is there any way around, I cannot change the schema and our application depend on this data.
Thanks in advance.
Regards, Rana Biswas
What version of OpenLDAP are you using?
Where did you add this attribute? It looks like you've hacked core.schema and not requested your own OID. Please read:
http://www.openldap.org/doc/admin23/schema.html#Extending%20Schema
According to rfc4512, section 1.4:
Short names, also known as descriptors, are used as more readable aliases for object identifiers. Short names are case insensitive and conform to the ABNF
ABNF has:
DOT = %x2E ; period (".")
So I read that as 'cm.host' be valid, I'm just not sure how it is to be written in a schema.
Anyone correct/clarify?
Thanks.
-- Kind Regards,
Gavin Henry. Managing Director.
T +44 (0) 1224 279484 M +44 (0) 7930 323266 F +44 (0) 1224 824887 E ghenry@suretecsystems.com
Open Source. Open Solutions(tm).
Rana Biswas wrote:
Any help is much appreciated.
attributeType ( 2.5.4.2.2 NAME 'cm.host'
According to rfc 4512, the NAME field must begin with an alphabetic char ("A"-"Z" / "a"-"z") and can only contain alphanumeric chars ("A"-"Z" / "a"-"z" / "0"-"9") and hyphens ("-"). So 'cm.host' is invalid because of the dot (".").
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it --------------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it ---------------------------------------
Pierangelo Masarati wrote:
Rana Biswas wrote:
Any help is much appreciated.
attributeType ( 2.5.4.2.2 NAME 'cm.host'
According to rfc 4512, the NAME field must begin with an alphabetic char ("A"-"Z" / "a"-"z") and can only contain alphanumeric chars ("A"-"Z" / "a"-"z" / "0"-"9") and hyphens ("-"). So 'cm.host' is invalid because of the dot (".").
Which section is that in? I couldn't find it this morning.
Gavin.
Gavin Henry wrote:
Pierangelo Masarati wrote:
Rana Biswas wrote:
Any help is much appreciated.
attributeType ( 2.5.4.2.2 NAME 'cm.host'
According to rfc 4512, the NAME field must begin with an alphabetic char ("A"-"Z" / "a"-"z") and can only contain alphanumeric chars ("A"-"Z" / "a"-"z" / "0"-"9") and hyphens ("-"). So 'cm.host' is invalid because of the dot (".").
Which section is that in? I couldn't find it this morning.
2.5. Attribute Descriptions
An attribute description is composed of an attribute type (see Section 2.5.1) and a set of zero or more attribute options (see Section 2.5.2).
An attribute description is represented by the ABNF:
attributedescription = attributetype options attributetype = oid options = *( SEMI option ) option = 1*keychar
...
oid and so are defined in
1.4. Common ABNF Productions
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it --------------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it ---------------------------------------
<quote who="Pierangelo Masarati">
Gavin Henry wrote:
Pierangelo Masarati wrote:
Rana Biswas wrote:
Any help is much appreciated.
attributeType ( 2.5.4.2.2 NAME 'cm.host'
According to rfc 4512, the NAME field must begin with an alphabetic char ("A"-"Z" / "a"-"z") and can only contain alphanumeric chars ("A"-"Z" / "a"-"z" / "0"-"9") and hyphens ("-"). So 'cm.host' is invalid because of the dot (".").
Which section is that in? I couldn't find it this morning.
2.5. Attribute Descriptions
An attribute description is composed of an attribute type (see Section 2.5.1) and a set of zero or more attribute options (see Section 2.5.2).
An attribute description is represented by the ABNF:
attributedescription = attributetype options attributetype = oid options = *( SEMI option ) option = 1*keychar
...
oid and so are defined in
1.4. Common ABNF Productions
p.
Hmmm, that's exactly what I found and quoted this morning.
ABNF has:
DOT = %x2E ; period (".")
So that _should_ be legal?
Gavin Henry wrote:
Hmmm, that's exactly what I found and quoted this morning.
ABNF has:
DOT = %x2E ; period (".")
So that _should_ be legal?
I read it this way:
<rfc4512> 2.5. Attribute Descriptions
An attribute description is composed of an attribute type (see Section 2.5.1) and a set of zero or more attribute options (see Section 2.5.2).
An attribute description is represented by the ABNF:
attributedescription = attributetype options attributetype = oid options = *( SEMI option ) option = 1*keychar </rfc4512>
let's forget about options and focus on attributetype:
<rfc4512> oid = descr / numericoid </rfc4512>
let's also forget about numericoid and focus on descr:
<rfc4512> descr = keystring </rfc4512>
<rfc4512> keystring = leadkeychar *keychar leadkeychar = ALPHA keychar = ALPHA / DIGIT / HYPHEN ... ALPHA = %x41-5A / %x61-7A ; "A"-"Z" / "a"-"z" DIGIT = %x30 / LDIGIT ; "0"-"9" ... HYPHEN = %x2D ; hyphen ("-") </rfc4512>
That's it. There's no room for other chars.
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it --------------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it ---------------------------------------
<quote who="Pierangelo Masarati">
Gavin Henry wrote:
Hmmm, that's exactly what I found and quoted this morning.
ABNF has:
DOT = %x2E ; period (".")
So that _should_ be legal?
I read it this way:
<rfc4512> 2.5. Attribute Descriptions
An attribute description is composed of an attribute type (see Section 2.5.1) and a set of zero or more attribute options (see Section 2.5.2).
An attribute description is represented by the ABNF:
attributedescription = attributetype options attributetype = oid options = *( SEMI option ) option = 1*keychar
</rfc4512>
let's forget about options and focus on attributetype:
<rfc4512> oid = descr / numericoid </rfc4512>
let's also forget about numericoid and focus on descr:
<rfc4512> descr = keystring </rfc4512>
<rfc4512> keystring = leadkeychar *keychar leadkeychar = ALPHA keychar = ALPHA / DIGIT / HYPHEN ... ALPHA = %x41-5A / %x61-7A ; "A"-"Z" / "a"-"z" DIGIT = %x30 / LDIGIT ; "0"-"9" ... HYPHEN = %x2D ; hyphen ("-") </rfc4512>
That's it. There's no room for other chars.
Ah, that's clear. I hadn't learned how to read the macros.
Thanks ando.
Gavin.
openldap-software@openldap.org