Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Implement "canonical" form for LDAP DNs

Abierto
#3,736 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Rust
Estrellas
2.9k
Forks
121
Merge medio
1 d 3 h
PR fusionados (30 d)
59

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DefGuard/defguard

Todos los issues de DefGuard/defguard

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.