LDAP mock server for local development #2
Labels
No Label
integration
discourse
integration
ejabberd
integration
ldap
integration
lndhub
integration
nostr
bug
design
dev environment
docs
duplicate
enhancement
feature
good first issue
idea
invalid
kredits-1
kredits-2
kredits-3
on hold
ops
question
release
major
release
minor
release
patch
security
ui/ux
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kosmos/akkounts#2
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I've seen this ldab-server-mock written in JavaScript and was wondering if we can use that one for local development.
It seems to run and I get a "Invalid username or password." error, but I am not sure what exactly needs to go into the server.json and users.json files to work with out kosmos ldap settings. (cn? dc? ou? attributes?)
That server is just for tests, but could come in handy for sure. Currently, the very few specs that there are do not talk to LDAP at all, but just use mocks or direct Warden sign-ins.
Our LDAP entry layout is documented on the wiki here:
https://wiki.kosmos.org/Infrastructure:LDAP
We basically use
cn
as unique ID/username, andou
for the domain (kosmos.org vs. custom/pro domains like currently 5apps.com).(Also see https://gitea.kosmos.org/kosmos/akkounts/src/branch/master/config/ldap.yml#L31-L32 for how it's configured with the devise LDAP plugin for example.)
yeah, I got:
server config:
users:
but
Devise::LDAP::Adapter.get_ldap_param(self.cn, "mail")
returns nil. (in User#ldap_before_save)If it found the user and only that method failed, then maybe the mock server doesn't implement whatever that call translates to as an LDAP request?
Difficult to say from here, not having looked into the mock server at all yet.
@bumi I've solved the LDAP dev situation with Docker Compose and new seed tasks:
#74
Maybe you can try it out and let me know if it works for you? There's a quick start section in the README there, which just needs a few commands to have everything running, configured, and seeded.