LDAP mock server for local development #2
Closed
opened 2020-11-18 17:57:22 +00:00 by bumi
·
4 comments
No Branch/Tag Specified
master
feature/nostr-onboarding-ruby
live
chore/btcpay_expired_paid-late
feature/nostr-onboarding
feature/import_deno_modules
docs/integrations
feature/ldap_aci
feature/contribution_nav
v0.11.1
v0.11.0
v0.10.0
v0.9.0
v0.8.1
v0.8.0
v0.7.0
v0.6.0
v0.5.0
v0.4.0
v0.3.0
v0.2.1
v0.2.0
v0.1.0
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
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kosmos/akkounts#2
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'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
cnas unique ID/username, andoufor 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.