Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Implement "canonical" form for LDAP DNs

Aperta
#3,736 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start by reading the proposed enterprise/ldap/dn.rs abstraction and the existing dn_match_key usage, including comparisons in sync.rs; review the related work in #3709 and #3703. Done means Dn equality and hashing follow the stated RFC 4514 rules, multi-valued RDNs are preserved or explicitly rejected with a migration path, and all comparisons use canonical Dn equality.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

optional for release

This builds on recent work in #3709 and #3703.
To avoid further similar issues we should consider introducing our own internal abstraction for DNs that would follow RFC 4514 semantics as close as possible and be used for all comparisons in LDAP-related operations.

Known gaps:

  • Escape spelling outside the first component. A parent OU spelled , in one place and \2c in another doesn't match (for example ou=Sales, West vs ou=Sales\2c West).
  • dn_match_key drops the RDN attribute type. With uid as the RDN attribute, the member cn=jdoe,ou=people,... matches the user uid=jdoe,ou=people,..., so a non-user entry with the same value in the same OU passes its group memberships to that user.
  • Multi-valued RDNs. cn=Alice+uid=42 and cn=Alice+uid=42 both parse to the stored value Alice+uid=42 and rebuild to the same DN, so two distinct entries collide on identity and membership.

Proposed approach:

  • Move Dn into enterprise/ldap/dn.rs and give its PartialEq/Hash RFC 4514 semantics. It should split the DN into RDNs and their attribute-value pairs, unescape values, fold the case of attribute types and values, and treat a multi-valued RDN as a set of pairs.
  • Store the RDN in a form that keeps the structure of a multi-valued RDN, or reject such RDNs explicitly with a migration path for existing users.
  • Delete dn_match_key once every comparison, including those in sync.rs, goes through canonical Dn equality.
Lingua principale
Rust
Stelle
2.9k
Fork
121
Merge medio
21h 35m
PR unite (30g)
68

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DefGuard/defguard

Tutte le issue di DefGuard/defguard

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.