Directory Programming .NET

Active Directory and ADAM programming support for .NET developers
Welcome to Directory Programming .NET Sign in | Join | Help
in Search

maximum attribute length

Last post 07-03-2008, 12:54 PM by long. 4 replies.
Sort Posts: Previous Next
  •  07-02-2008, 5:05 PM 4090

    maximum attribute length

    Hi All,

    I try to define max length for user's attribute msRTCSIP-LineServer. This attribute appears after installation of LCS\OCS server. I did not find this information in the documentation.

    I tried to set different values for this attribute (aka RCC SIP URI) through Active Directory Users and Computers snap-in and received that in some cases, the maximum length is 211 characters, but in other cases it is more than this number.

    I found how LCS2005 expands the AD scheme, here is a fragment from the scheme file:
    dn: CN=ms-RTC-SIP-LineServer,CN=Schema,CN=Configuration,DC=X
    changetype: add
    adminDescription: msRTCSIP-LineServer
    adminDisplayName: msRTCSIP-LineServer
    description: This attribute contains SIP address of the PBX/CSTA gateway.
    objectclass: attributeSchema
    attributeID: 1.2.840.113556.1.6.24.1.89
    #schemaIDGUID:{3ef9706b-12d0-4073-8efa-5fec9e0a3146}
    schemaIDGUID:: a3D5PtASc0CO+l/sngoxRg==
    oMSyntax: 64
    attributeSyntax: 2.5.5.12
    isSingleValued: TRUE
    searchFlags: 0
    isMemberOfPartialAttributeSet: TRUE
    ldapDisplayName: msRTCSIP-LineServer
    #Base 64 Encoded GUID of :D819615A3B9B4738B47EF1BD8EE3AEA4
    attributeSecurityGUID:: WmEZ2Js7OEe0fvG9juOupA==

    as I can see this attribute has attributeSyntax: 2.5.5.12 which means that attribute has a type of unicode string, but nothing about it length.

    Can anybody advise me, about how to define attribute length?

    --
    Thanks,
    Max

  •  07-02-2008, 6:11 PM 4091 in reply to 4090

    Re: maximum attribute length

    rangeUpper controls the maximum length.  It sounds like it is not defined in the schema from OCS.

    Make sure you don't break OCS if you change this.  I'm sure their tools that write to this attribute won't know you did this.

    I can totally understand you wanting to limit the size, I'm just suggesting that there may be unintended consequences of doing so.

    I can't remember if this attribute can be modified after creation or not, but you'll find out.  :)

  •  07-03-2008, 3:48 AM 4093 in reply to 4091

    Re: maximum attribute length

    Thank you Joe,

    I don't want to change rangeUpper value for this attribute's schema, I want to define it rangeUpper value, but seems there's no such attribute for msRTCSIP-LineServer. Is there a default value for rangeUpper or may be this value inherits from something?

    --
    Thanks,
    Max

  •  07-03-2008, 8:47 AM 4096 in reply to 4093

    Re: maximum attribute length

    If it isn't defined, then the directory will not enforce a maximum size beyond the maximum size allowed in a single LDAP network operation (which is pretty big). 

    Thus, if you want apply this to the schema for this attribute, you must set it (assuming it will let you).

  •  07-03-2008, 12:54 PM 4099 in reply to 4096

    Re: maximum attribute length

    Yes Joe, you are right Active Directory does not check the maximum size for this attribute, this is restriction of ADUC UI.

    if someone is interested, format for sip_uri can be described by regexp like this:
    ^[sS][iI][pP]:(\w{0,194})@(((\w{1,63}\.){1,3}[A-Za-z]\w{0,62}$)|(\w{1,63}))$ I calculate it by experimentation.

    total length is 454.

    This also corresponds to the length of attribute msRTCSIP-PrimaryUserAddress. here is fragment from it schema:

    dn: CN=ms-RTC-SIP-PrimaryUserAddress,CN=Schema,CN=Configuration,DC=X
    changetype: add
    adminDescription: msRTCSIP-PrimaryUserAddress
    adminDisplayName: msRTCSIP-PrimaryUserAddress
    description: Valid SIP URI.
    objectclass: attributeSchema
    attributeID: 1.2.840.113556.1.6.24.1.1
    #schemaIDGUID:{45FC6F43-C8EB-40d4-91F3-763C46F6F250}
    schemaIDGUID:: RfxvQ8jrQNSR83Y8RvbyUA==
    oMSyntax: 64
    attributeSyntax: 2.5.5.12
    rangeLower: 0
    rangeUpper: 454

    isSingleValued: TRUE
    searchFlags: 5
    isMemberOfPartialAttributeSet: TRUE
    ldapDisplayName: msRTCSIP-PrimaryUserAddress
    #Base 64 Encoded GUID of :E2D6986B2C7F4CDA9851D5B5F3FB6706
    attributeSecurityGUID:: a5jW4n8s2kyYUdW18/tnBg==


    i believe that ms-RTC-SIP-PrimaryUserAddress has the same syntax.

View as RSS news feed in XML