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?)
I've seen this [ldab-server-mock](https://github.com/veo-labs/ldap-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:
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, and `ou` for the domain (kosmos.org vs. custom/pro domains like currently 5apps.com).
```ldif
dn: cn=bumi,ou=kosmos.org,cn=users,dc=kosmos,dc=org
```
(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.)
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.
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.
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.
@bumi I've solved the LDAP dev situation with Docker Compose and new seed tasks:
https://gitea.kosmos.org/kosmos/akkounts/pulls/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.
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.