Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute options are badly parsed #52

Closed
nitnelave opened this issue Feb 20, 2024 · 5 comments
Closed

Attribute options are badly parsed #52

nitnelave opened this issue Feb 20, 2024 · 5 comments

Comments

@nitnelave
Copy link
Collaborator

See lldap/lldap#846 (comment) :
Attribute options (e.g. "uuid;text" or "uuid;binary") are parsed as an extra attribute (so you'd get ["uuid", "text"] as attributes) in a search request.

Even if we don't represent the options, we at least should correctly ignore them.

@Firstyear
Copy link
Member

Which parser has the issue here? From my reading we should just be passing it through as uuid;text, we don't have any special handling for attr tags I don't think ....

In fact we handle this case in kani, where a user can search https://github.com/kanidm/kanidm/blob/master/proto/src/constants.rs#L203 which we map through correctly https://github.com/kanidm/kanidm/blob/master/server/lib/src/idm/ldap.rs#L603

@nitnelave
Copy link
Collaborator Author

Hmm, yeah, you're right. It seems to be a bug in OCIS, coming from the go lico library.
AFAICT, they're setting the attributes in something like here: https://github.com/libregraph/lico/blob/0a498c48948e0a8566fa32f3f1d1b9b6d4195b95/identifier/backends/ldap/ldap.go#L630 after creating the map here: https://github.com/libregraph/lico/blob/0a498c48948e0a8566fa32f3f1d1b9b6d4195b95/identifier/backends/ldap/ldap.go#L85
So the format is not uuid;text but uuid and text (I don't know how they expect it to work).

@nitnelave nitnelave closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2024
@nitnelave
Copy link
Collaborator Author

Filed libregraph/lico#127

@nitnelave
Copy link
Collaborator Author

(not that LLDAP supports attribute tags, it would have crapped itself anyway, but at least I have a chance of parsing them correctly when they're sent right)

@Firstyear
Copy link
Member

Thanks, glad it wasn't something here!

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

No branches or pull requests

2 participants