Hey there, not entirely sure if this is the right place to bring it up, but considering it's probably not an npm package issue rather than something on my end, I gotta ask for help.I have set up a small express server that's supposed to be connected to our university's LDAP for auth, and I can get a just fine connection using my parameter using LDAPsearch, but as soon as I enter my data into the passport-ldapauth strategy, I get InvalidDnSyntaxError: InvalidDnSyntaxErrorI've been going over this for 5 hours now and honestly hit a wall, so maybe someone here can help? What I do: - Open a login page with 2 simple inputs and a submit button that send a request to /login - App.post('/login') handles nothing much yet, so far only app.post('/login', passport.authenticate('ldapauth', {session: false}), function(req, res) { console.log(req); res.send({status: 'ok'}); });My LDAPStrategy looks like this var rrzkLDAP = { server: { url: 'ldaps://xxxx:636', bindDN: 'cn=verw-sgm,ou=AuthConsumer,dc=uni-koeln,dc=de', bindCredentials: config['ldapPW'], searchBase: 'ou=People,dc=uni-koeln,dc=de', searchFilter: '(uid=*)', searchAttributes: "['UniCologneAccountStatus', 'UniColognePersonStatus']", tlsOptions: { ca: [ fs.readFileSync(xxx, 'utf8'), fs.readFileSync(xxx2, 'utf8'), ] }, reconnect: true } }; (I removed all irrelevant information here...)Error on Submitting the request from the login page: 2|STM | InvalidDnSyntaxError: InvalidDnSyntaxError 2|STM | at messageCallback (/home/cwergen1/stgmanagement/node_modules/ldapjs/lib/client/client.js:1419:45) 2|STM | at Parser.onMessage (/home/cwergen1/stgmanagement/node_modules/ldapjs/lib/client/client.js:1089:14) 2|STM | at emitOne (events.js:115:13) 2|STM | at Parser.emit (events.js:210:7) 2|STM | at Parser.write (/home/cwergen1/stgmanagement/node_modules/ldapjs/lib/messages/parser.js:111:8) 2|STM | at TLSSocket.onData (/home/cwergen1/stgmanagement/node_modules/ldapjs/lib/client/client.js:1076:22) 2|STM | at emitOne (events.js:115:13) 2|STM | at TLSSocket.emit (events.js:210:7) 2|STM | at addChunk (_stream_readable.js:266:12) 2|STM | at readableAddChunk (_stream_readable.js:253:11)I assume it has a problem with the BindDN, but since that's perfectly fine for LDAPsearch i am at a loss... If this is not the place to ask, my apologizes, just getting borderline desperate here.Thanks in advance!TreZ
Submitted November 08, 2018 at 01:48PM by TreZc0_
No comments:
Post a Comment