set username by REMOTE_USER
set pad's username by the REMOTE_USER passed threw by http AuthBasic f.e.
Many Pads are running behind a webserver AuthBasic, so it would be nice to not have to set my username everytime I logged in.
maybe you can make an apache rule that passes the username with a ?userName parameter
maybe you can make an apache rule that passes the username with a ?userName parameter
So that userName can be faked ? I guess, this is not what spicewiesel wanted.
If you want Serious authentification, you may want to use the HTTP API to create a Session (e.g. in PHP with etherpad-lite-client). According to faking userNames: etherpad lite allows users to change their username in Pad - to avoid username-faking we would have to change more code (Perhaps forbid Authors to change their Username via API?)
it would be enough to initial set the username to REMOTE_USER. There is atm no need to avoid faking.
Note that the more commonly used header for that purpose is X-Forwarded-User; and it would be sufficiently safe to add a config option that makes etherpad read that header if present and authenticate as the specified user (just as safe as using a webserver in front of the etherpad for authentication). (REMOTE_USER is, usually, a wsgi / fastcgi variable)
HoverHell/etherpad-lite@5a5dd9034f6ef8abcb7176f0bab3ba389a08cf75 (also see two other commits in my fork for possible usefulness)
see also duplicate "Set author name from HTTP auth data" https://github.com/Pita/etherpad-lite/issues/759
Hi,
like others I want to authenticate etherpad-lite with Shibboleth through an Apache proxy using mod_shib.
I managed to found a solution which works.
The global idea is to use a value in the headers (set by the proxy) to set the AuthorName. This way it can be use for Shibboleth, but even CAS or any auth mechanism through a proxy.
I'm new to nodejs ; is the way I did it ok from a developper point of view ?
The suggested patch : support_shibb_etherpad-lite.diff => http://pastebin.com/raw.php?i=hYr8bd89 A sample config of apache with mod_shib : config_apache_shibb_etherpad-lite.txt => http://pastebin.com/raw.php?i=SDhJpDNd
If it's correct could it be commited in the master branch ?
Wow,
that sounds fantastic! Is s.th. like that also possible with ldap?
I guess yes. As long as you can set a header through a proxy It should work.
Auth is being reviewed at the moment and we're waiting on a draft spec from @pita so I'd say hold out on that before trying to integrate too prematurely and having to to redo your work. In a short answer of could it committed to the master branch. No. Sorry! It's worth noting we don't accept commits direct to master. You must issue pull requests against develop. We use a git flow model (or try to) when releasing. Please see our developer guidelines. Secondly auth is being rewritten so no pull requests for anything related to auth will be considered. If you want to be part of the auth rewrite I'd be very happy to help you with that by introducing you the the other developers. I'd recommend having a chat with @pita @rhelmer and @marcelklehr and/or jump into the IRC channel where they are all hanging out.
Which git rev is the patch applicable to?
Am 23.10.2012 um 22:03 schrieb mamachine [email protected]:
Hi,
like others I want to authenticate etherpad-lite with Shibboleth through an Apache proxy using mod_shib.
I managed to found a solution which works.
The global idea is to use a value in the headers (set by the proxy) to set the AuthorName. This way it can be use for Shibboleth, but even CAS or any auth mechanism through a proxy.
I'm new to nodejs ; is the way I did it ok from a developper point of view ?
The suggested patch : support_shibb_etherpad-lite.diff => http://pastebin.com/raw.php?i=hYr8bd89 A sample config of apache with mod_shib : config_apache_shibb_etherpad-lite.txt => http://pastebin.com/raw.php?i=SDhJpDNd
If it's correct could it be commited in the master branch ?
For @johnyma22, sorry I don't have time to help working on auth rewrite. But I could do some tests for Shibb or CAS authentication when you'll have something workable.
For @disy-mk, the patch was written for v1.1.4 :
commit e19c05d1c4652191467e7e53cbf906ce9882fd14 Merge: 3caa030 e484121 Author: John McLear [email protected] Date: Thu Oct 11 08:40:25 2012 -0700
Merge pull request #1058 from Pita/release/releases-1.1.4
Release 1.1.4
@mamachine: could you check on that?
Note: checking out 'e19c05d1c4652191467e7e53cbf906ce9882fd14'.
epl$ git log |head -n5 commit e19c05d1c4652191467e7e53cbf906ce9882fd14 Merge: 3caa030 e484121 Author: John McLear [email protected] Date: Thu Oct 11 08:40:25 2012 -0700
epl$ patch -p1 < shib.patch patching file settings.json.template patching file src/node/db/Pad.js patching file src/node/handler/PadMessageHandler.js Hunk #1 FAILED at 334. Hunk #2 FAILED at 412. Hunk #3 FAILED at 935. Hunk #6 FAILED at 1085. 4 out of 6 hunks FAILED -- saving rejects to file src/node/handler/PadMessageHandler.js.rej patching file src/node/utils/Settings.js
@mamachine: could you check on that?
Note: checking out 'e19c05d1c4652191467e7e53cbf906ce9882fd14'.
epl$ git log |head -n5 commit e19c05d1c4652191467e7e53cbf906ce9882fd14 Merge: 3caa030 e484121 Author: John McLear [email protected] Date: Thu Oct 11 08:40:25 2012 -0700
epl$ patch -p1 < shib.patch patching file settings.json.template patching file src/node/db/Pad.js patching file src/node/handler/PadMessageHandler.js Hunk #1 FAILED at 334. Hunk #2 FAILED at 412. Hunk #3 FAILED at 935. Hunk #6 FAILED at 1085. 4 out of 6 hunks FAILED -- saving rejects to file src/node/handler/PadMessageHandler.js.rej
patching file src/node/utils/Settings.js
There was some spaces/tabs problems with the first pastebin file.
Here it's better, but it may display a warning "(Stripping trailing CRs from patch.)" during the patch process. http://pastebin.com/raw.php?i=M3e3Dvi7
Here is how to replay the patch and check that it's been well applied :
$ git clone https://github.com/ether/etherpad-lite $ cd etherpad-lite $ git checkout e19c05d1c4652191467e7e53cbf906ce9882fd14 $ patch -p1 < shib.patch $ git diff|md5sum 656f8adfe0a2d9dc357182e1538eb24e -
If you know a better place to post the patch...
Otherwise you may try this alternative work someone else have done ; it seems to work too : https://github.com/wtsi-hgi/ep_sotauth
Please create a vote for this plugin / feature on http://etherpad.idea.informer.com/
Everyone interested, please vote here: http://etherpad.idea.informer.com/proj/?ia=72231
set author name to the one used in basic http auth
the etherpad lite is accessed directly without a proxy
the author name should be set to the one used in basic http auth
LDAP auth available here https://github.com/tykeal/ep_ldapauth
@JohnMcLear thanks for posting here!