Skip to content

Pin OID leniency as a decision: RFC 2849 ldap-oid, matched to slapd - #64

Merged
joshmakestuff merged 1 commit into
mainfrom
pin-numericoid-leniency
Aug 3, 2026
Merged

Pin OID leniency as a decision: RFC 2849 ldap-oid, matched to slapd#64
joshmakestuff merged 1 commit into
mainfrom
pin-numericoid-leniency

Conversation

@joshmakestuff

@joshmakestuff joshmakestuff commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Turns the IsNumericOid question surfaced in #63's adversarial review into a build-failable decision, per the maintainer's ruling.

IsNumericOid deliberately implements RFC 2849's looser ldap-oid grammar (leading-zero arcs, single-arc OIDs) rather than RFC 4512's numericoid:

  • Spec-correct on every LDIF boundary — control OIDs and attribute descriptions are governed by RFC 2849, whose ldap-oid = 1*DIGIT 0*1("." ldap-oid) allows exactly these shapes.
  • Empirically matched to slapd on the schema boundary — slaptest against OpenLDAP 2.6.10 (2026-08-03, container probe) accepted attributetype directives with 01.2.3.4.5, 1.02.3, and bare 1. Tightening toward RFC 4512 would reject schema files slapd loads, inverting the tolerant-reader / slapd-compatibility invariant.

Changes: one clarifying doc comment on IsNumericOid recording the decision and the probe, a theory in SchemaParserTests pinning all three probed OID shapes through schema parsing, and one AttributeDescriptionTests.IsValid row for the 2849 side. No product behavior change; suite green (417 passed).

IsNumericOid deliberately implements RFC 2849's looser ldap-oid grammar
(leading-zero arcs, single-arc OIDs) rather than RFC 4512's numericoid.
That is spec-correct on every LDIF boundary (control OIDs, attribute
descriptions), and empirically matched to slapd on the schema boundary:
slaptest against OpenLDAP 2.6.10 (2026-08-03) accepted attributetype
directives with 01.2.3.4.5, 1.02.3, and bare 1. Tightening toward RFC 4512
would reject schema files slapd loads.

Raised as a finding in PR #63's adversarial review and surfaced there for a
ruling; ruled working-as-intended on the probe evidence. These tests turn
that ruling into something that fails the build if someone later "fixes"
the grammar without re-probing slapd.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@joshmakestuff
joshmakestuff merged commit 951710c into main Aug 3, 2026
6 checks passed
joshmakestuff added a commit that referenced this pull request Aug 4, 2026
)

IsNumericOid deliberately implements RFC 2849's looser ldap-oid grammar
(leading-zero arcs, single-arc OIDs) rather than RFC 4512's numericoid.
That is spec-correct on every LDIF boundary (control OIDs, attribute
descriptions), and empirically matched to slapd on the schema boundary:
slaptest against OpenLDAP 2.6.10 (2026-08-03) accepted attributetype
directives with 01.2.3.4.5, 1.02.3, and bare 1. Tightening toward RFC 4512
would reject schema files slapd loads.

Raised as a finding in PR #63's adversarial review and surfaced there for a
ruling; ruled working-as-intended on the probe evidence. These tests turn
that ruling into something that fails the build if someone later "fixes"
the grammar without re-probing slapd.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant