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

support ldap (somehow) #3342

Open
williamstein opened this issue Nov 9, 2018 · 7 comments
Open

support ldap (somehow) #3342

williamstein opened this issue Nov 9, 2018 · 7 comments

Comments

@williamstein
Copy link
Contributor

Not clear how we should in general. However, it's been done here, which should help:

HighwayStar@e44b19f

E.g., this might only be a feature that is enabled or configurable for our Docker image https://github.com/sagemathinc/cocalc-docker

@Kiolali
Copy link

Kiolali commented May 28, 2019

Hey!

I'm also interested in this feature! Do have an estimation when it will be available?

Best,
Kiolali

@williamstein
Copy link
Contributor Author

We use the passport auth system for node.js, and there is an LDAP plugin (see https://www.npmjs.com/package/passport-ldapauth), which would likely be easy to integrate with CoCalc. It probably wouldn't be too hard for me to add support for this, but I can't spend time on it in the near future, unless there is a customer willing to pay (if there is -- contact me).

@haraldschilly
Copy link
Contributor

for the record, ldap is part of the auth module we have:

// LDAP via passport-ldapauth: https://github.com/vesse/passport-ldapauth#readme

the real challenge is to figure out how to configure it, respective to the specifics of wherever cocalc is deployed, and if there is anything else that needs to be done. as far as I know it was never used anywhere.

@HighwayStar
Copy link
Contributor

Here is ldap code we using with recent cocalc version HighwayStar@fbff82a

@hoelscher-berlin
Copy link

Any update on this? I am really interested in deploying this small-scale in my school, and LDAP would be really useful. Any hints on how to configure it on my own would also be fine.

@haraldschilly
Copy link
Contributor

@schlecker no update, same as a year ago.

you can have a look at the code, which shows a line how to setup LDAP in the database: https://github.com/sagemathinc/cocalc/blob/master/src/smc-hub/auth.ts#L605

So, basically, give it a unique name and the cofiguration "value" is JSONB, which starts as {"type": "ldap", ...}. see function above, that extra_strategy_constructor returns the constructor. Those JSONB values are fed into that constructor (see _.omit(strategy, ...), i.e. everything except some parameters used elsewhere or special cases). Those other configuration values are used to customize the SSO button in the UI.

@HighwayStar
Copy link
Contributor

You can cherry-pick changes from my branch on current master and change values to your addresses https://github.com/HighwayStar/cocalc/tree/docker-ldap-20200823-public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants