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

ETCD backend interpretes everything as UTF-8 string which could lead to key collisions (besides other things) when being used with ldap connector #4017

Open
3 tasks done
ProbstDJakob opened this issue Mar 3, 2025 · 0 comments

Comments

@ProbstDJakob
Copy link

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • I am not looking for support or already pursued the available support channels without success.

Version

master

Storage Type

etcd

Installation Type

Other (specify below)

Expected Behavior

Either the ldap connector deserialises the values according to the schema or does treat the values as binary data.

Actual Behavior

The etcd backend interprets everything as UTF-8 string which could lead to key collisions when being used with the ldap connector. Though the ldap library suggests that EntryAttribute.Values returns an array of decoded strings (with the raw values in ByteValues), the values are actually always the same and may contain arbitrary byte values. In our case we tried to use objectSid as UserId but it is not deserialised and thus contains binary data. The etcd storage backend then serialises the value to json within txnCreate which replaces all invalid UTF-8 sequences with the replacement character U+FFFD (0xEFBFBD). This could then lead to key collisions as the value is being used as sub. This may also apply to other connectors/storage backends.

Steps To Reproduce

No response

Additional Information

No response

Configuration

Logs

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

1 participant