Switch LDAP avatar to store raw JPEG instead of base64-encoded string #157
Closed
opened 2024-01-22 10:58:40 +00:00 by raucao
·
3 comments
No Branch/Tag Specified
Labels
Clear labels
bug
design
dev environment
docs
duplicate
enhancement
feature
good first issue
idea
invalid
kredits-1
kredits-2
kredits-3
on hold
ops
question
security
ui/ux
wontfix
integration
btcpay
integration
discourse
integration
ejabberd
integration
email
integration
ldap
integration
lndhub
integration
mastodon
integration
nostr
integration
remotestorage
Something is not working
Graphic/visual design
Config, builds, CI, deployment, etc.
Documentation
This issue or pull request already exists
Improving existing functionality
New functionality
Dive in, and start contributing
Something to consider
Not a bug
Small contribution
Medium contribution
Large contribution
Currently not actionable
Manual IT ops activities
Looking for an answer
release
major
release
minor
release
patch
All your base are belong to us
User interface, process design, etc.
This won't be fixed
Milestone
No items
No Milestone
1.0.0 Release
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kosmos/akkounts#157
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I'm not sure where we found the information for it being generally stored as base64 string, but I just found out that Gitea only supports the binary format, and the RFC for inetOrgPerson also doesn't mention encoded strings.
Since I only just deployed the version with base64 today, I'll change it asap so we don't announce before it works with Gitea and ejabberd at least.
Switch LDAP avatar to store raw JPEG/PNG instead of base64-encoded stringto Switch LDAP avatar to store raw JPEG instead of base64-encoded stringThis one turns out to be more difficult than I expected. Could use another set of eyes to look at what I have, which isn't working as it should...
I have temporarily hidden the feature by default, so we don't have to care about migrating existing avatars at some point.
I have a working implementation of this in
9e2210cnow, but now I'm not sure it makes sense anymore. There are a few issues with the idea of storing this in LDAP in general, which I'll document here for posterity:So, considering all these points, I think it makes more sense to just use ActiveStorage to store avatars in S3/Garage (or filesystem for smaller akkounts deployments), and then have multiple jobs to update them in services where needed or desired. One of them can be the LDAP one that from abovementioned commit, so it's possible to use it from there also.