Package dirsyn implements directory syntax parsing and matching rule components.
This package was mainly developed for the XDAPL Project, but may be freely used by anyone needing value abstract syntax checking or matching rule capabilities related to directory technologies.
NOT YET READY FOR GENERAL USE!
The current state of this package is EXPERIMENTAL and very unstable. It should NOT be used in mission-critical or production environments, and is prone to breaking changes at any time. There are some interesting long-term plans for this package, so it should continue to evolve and grow.
Much research remains before this package can be relied upon implicitly. Some functionality is present only to serve as a placeholder, and does not exhibit fully standards-compliant behavior at this time.
Contributions are most welcome.
The go-dirsyn
package is released under the terms of the MIT license. See the repository root for applicable license files.
Content developed or appropriated from external sources, such as that found within the dn.go
file, will also contain the relevant license text within the file comment header.
The scope of this package is intended to, ultimately, cover all of the syntactical components and logic of ITU-T Rec. X.500. Though exclusive to directory services, it is not exclusive to LDAP.
This package relies upon the following packages from the standard library:
encoding/asn1
encoding/base64
encoding/hex
errors
fmt
†math/big
os
reflect
††regexp
†††sort
strconv
strings
testing
time
unicode
unicode/utf8
unicode/utf16
†† - very limited use
††† - only used for custom syntaxes implemented through the X-PATTERN eXtension
This package relies upon the following third-party packages:
The following matching rules are supported by this package at this time. More will be added in the future:
bitStringMatch
(RFC 4517 § 4.2.1)booleanMatch
(RFC 4517 § 4.2.2)caseExactIA5Match
(RFC 4517 § 4.2.3)caseExactMatch
(RFC 4517 § 4.2.4)caseExactOrderingMatch
(RFC 4517 § 4.2.5)caseExactSubstringsMatch
(RFC 4517 § 4.2.6)caseIgnoreIA5Match
(RFC 4517 § 4.2.7)caseIgnoreIA5SubstringsMatch
(RFC 4517 § 4.2.8)caseIgnoreListMatch
(RFC 4517 § 4.2.9)caseIgnoreListSubstringsMatch
(RFC 4517 § 4.2.10)caseIgnoreMatch
(RFC 4517 § 4.2.11)caseIgnoreOrderingMatch
(RFC 4517 § 4.2.12)caseIgnoreSubstringsMatch
(RFC 4517 § 4.2.13)directoryStringFirstComponentMatch
(RFC 4517 § 4.2.14)distinguishedNameMatch
(RFC 4517 § 4.2.15)generalizedTimeMatch
(RFC 4517 § 4.2.16)generalizedTimeOrderingMatch
(RFC 4517 § 4.2.17)integerFirstComponentMatch
(RFC 4517 § 4.2.18)integerMatch
(RFC 4517 § 4.2.19)integerOrderingMatch
(RFC 4517 § 4.2.20)keywordMatch
(RFC 4517 § 4.2.21)numericStringMatch
(RFC 4517 § 4.2.22)numericStringOrderingMatch
(RFC 4517 § 4.2.23)numericStringSubstringsMatch
(RFC 4517 § 4.2.24)objectIdentifierFirstComponentMatch
(RFC 4517 § 4.2.25)objectIdentifierMatch
(RFC 4517 § 4.2.26)octetStringMatch
(RFC 4517 § 4.2.27)octetStringOrderingMatch
(RFC 4517 § 4.2.28)telephoneNumberMatch
(RFC 4517 § 4.2.29)telephoneNumberSubstringsMatch
(RFC 4517 § 4.2.30)uniqueMemberMatch
(RFC 4517 § 4.2.31)wordMatch
(RFC 4517 § 4.2.32)
The following syntaxes are supported by this package at this time. More will be added in the future:
- Attribute Type Description (RFC 4512 § 4.1.2 and RFC 4517 § 3.3.1)
- Bit String (RFC 4517 § 3.3.2)
- Boolean (RFC 4517 § 3.3.3)
- Boot Parameter (RFC 2307 § 2.4)
- Country String (RFC 4517 § 3.3.4)
- Delivery Method (RFC 4517 § 3.3.5)
- Directory String (RFC 4517 § 3.3.6 and ITU-T Rec. X.520 § clause 2.6)
- TeletexString (ITU-T Rec. T.61)
- PrintableString (ITU-T Rec. X.680 and RFC 4517 § 3.3.29)
- BMPString (ITU-T Rec. X.680)
- UniversalString (ITU-T Rec. X.680)
- UTF8String (ITU-T Rec. X.680)
- DIT Content Rule Description (RFC 4512 § 4.1.6 and RFC 4517 § 3.3.7)
- DIT Structure Rule Description (RFC 4512 § 4.1.7.1 and RFC 4517 § 3.3.8)
- DN (RFC 4517 § 3.3.9)
- Enhanced Guide (RFC 4517 § 3.3.10)
- Facsimile Telephone Number (RFC 4517 § 3.3.11)
- Fax (RFC 4517 § 3.3.12)
- Filter (RFC 4515 § 2 and RFC 4515 § 3)
- Generalized Time (RFC 4517 § 3.3.13)
- Guide (RFC 4517 § 3.3.14)
- IA5 String (RFC 4517 § 3.3.15)
- Integer (RFC 4517 § 3.3.16)
- JPEG (RFC 4517 § 3.3.17)
- LDAP Syntax Description (RFC 4512 § 4.1.5 and RFC 4517 § 3.3.18)
- Matching Rule Description (RFC 4512 § 4.1.3 and RFC 4517 § 3.3.19)
- Name and Optional UID (RFC 4517 § 3.3.21)
- Name Form Description (RFC 4512 § 4.1.7.2 and RFC 4517 § 3.3.22)
- NIS Netgroup Triple (RFC 2307 § 2.4)
- Numeric String (RFC 4517 § 3.3.23)
- Object Class Description (RFC 4512 § 4.1.1 and RFC 4517 § 3.3.24)
- Octet String (RFC 4517 § 3.3.25)
- OID (RFC 4517 § 3.3.26)
- Other Mailbox (RFC 4517 § 3.3.27)
- Postal Address (RFC 4517 § 3.3.28)
- Substring Assertion (RFC 4517 § 3.3.30)
- Subtree Specification (Appendix A, RFC 3672)
- Telephone Number (RFC 4517 § 3.3.31)
- Teletex Terminal Identifier (RFC 4517 § 3.3.32)
- Telex Number (RFC 4517 § 3.3.33)
- UTC Time (RFC 4517 § 3.3.34)
- UUID (RFC 4530 § 2.1)
To parse instances of the Netscape ACIv3 "aci
" attribute type, see go-antlraci
, or the full-featured go-aci
. This functionality may be ported into this package in the future.