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

Propagate user/ACL from ownCloud to Etherpad #4

Closed
otetard opened this issue Aug 1, 2016 · 16 comments
Closed

Propagate user/ACL from ownCloud to Etherpad #4

otetard opened this issue Aug 1, 2016 · 16 comments

Comments

@otetard
Copy link
Owner

otetard commented Aug 1, 2016

Original request: https://apps.owncloud.com/content/show.php?content=174679

Make ownpad use ownCloud’s API to authenticate and check user rights within Etherpad. This must be optional since this will then create private pads, and will require to use Etherpad API.

Not sure if it’s possible to make use of such mechanism with Ethercalc.

@otetard otetard self-assigned this Aug 1, 2016
@otetard
Copy link
Owner Author

otetard commented Aug 4, 2016

I’ve started to work on that topic. A first preview is available in the feature/etherpad-api branch.

Olivier;

@inos-github
Copy link

Hi Olivier, thank's for working on that.
I didn't find a solution to use OC/NC for third party user authentication so I have opened an issue at: nextcloud/server#716

Concerning EtherCalc: as far as I can see, there is a key based authentication system for read/write access only and no user based authentication.

@inos-github
Copy link

inos-github commented Aug 4, 2016

I have tried the app from the new branch but for me it does not work until now.
My configuration as follows:

  • The cloud has a sub-domain: cloud.my-domain.de
  • The pad has a sub-domain: pad.my-domain.de with a proxy (apache) redirecting to localhost:port
  • Both sub-domains have SSL, the etherpad on localhost:port dos not
  • in settings:
    • Etherpad Host: https://pad.my-domain.de
    • Etherpad cookie domain: pad.my-domain.de (is this correct? I have tried .my-domain.de as well)
    • in Etherpad configuration:
      • "requireSession" : false, (have tried true as well)
      • "requireAuthentication" : false,
      • "requireAuthorization" : false,

New pads are created but opening a pad (regular as well as protected) results in You do not have permission to access this pad message.
There is nothing in the cloud log
The etherpad log stats:

[2016-08-04 15:38:22.438] [WARN] message - Authentication try failed:{"component":"pad","type":"CLIENT_READY","padId":"g.h7CTV92YKJuJCEJZ$PmwuY4kJ8sbEy9JE","sessionID":"null","password":null,"token":"t.mjDCWZyqrWef2xHEbOPV","protocolVersion":2}

@otetard
Copy link
Owner Author

otetard commented Aug 4, 2016

Thanks for the feedback.

For “Etherpad cookie domain” you should use my-domain.de (you can’t push cookies for another domain).

In your Etherpad log, the sessionID shouldn’t have the “null” value. Do you have the latest version of the feature/etherpad-api branch? In particular, commit 36fe634 is important.

Olivier;

@inos-github
Copy link

Thanks for your quick reply!
with the correct cookie domain setting I can now open both regular pads and protected pads from within the cloud. I can not open regular pads directly with the etherpad frondend or via the synchronized shortcut. The log output:
Authentication try failed:{"component":"pad","type":"CLIENT_READY","padId":"g.Le6jTsHVuruFhZRx$Se1JRYNbTkAobe9p","sessionID":"s.19e6b026bc8cffd55b8b0c0bbf94fc61","password":null,"token":"t.mjDCWZyqrWef2xHEbOPV","protocolVersion":2}

Thanks so much for your awesome work! Unfortunately I have only very very basic programming skills, otherwise I could help... :-(

Martin

@inos-github
Copy link

inos-github commented Aug 15, 2016

Hi Olivier,

the current etherpad-api branch version (fe6dd30) causes a reloading-loop on the login page even prior logging in. There is nothing related in the logfile.
My cloud version: Nextcloud 9.0.53 (stable)

best regards
Martin

[edit] I have just noticed, that the error exists in the current master branch as well

@otetard
Copy link
Owner Author

otetard commented Aug 16, 2016

Concerning NextCloud compatibility, I’ve just opened a new bug: #6. I didn’t have time to check for NC compatibility (but I plan to fully support it ;)).

@blackisle51
Copy link

As a side request to this topic - would it be possible to auto-fill the current OC/NC user name to the "Show the users on this pad" field?

@otetard
Copy link
Owner Author

otetard commented Sep 27, 2016

As a side request to this topic - would it be possible to auto-fill the current OC/NC user name to the "Show the users on this pad" field?

It works this way in the feature/etherpad-api branch. Your username/display name is used on Etherpad.

Olivier;

@inos-github
Copy link

In my case, the session-timeout is too short so I added a option in admin-settings to edit the timeout value:

sorry, until now, I am not familiar with git so I will post the changes here...

in ./settings.php insert after line 23
$template->assign('ownpad_sessionTimeout', $appConfig->getAppValue('ownpad', 'ownpad_sessionTimeout', '36000'));

in ./templates/settings.php insert after line 45
<label for="ownpad_sessionTimeout"><?php p($l->t('Session Timeout')); ?></label>
<input type="text" name="ownpad_sessionTimeout" id="ownpad_sessionTimeout" value="<?php p($_['ownpad_sessionTimeout']); ?>" />

in ./controller/displaycontroller.php insert after line 83
$sessionTimeout = $this->config->getAppValue('ownpad', 'ownpad_sessionTimeout');
and edit line 90 to
$session = $this->eplInstance->createSession($groupID, $author->authorID, time() + $sessionTimeout);

Martin

@poVoq
Copy link

poVoq commented Dec 19, 2017

Any progress on this?

This might help as a reference for the etherpad side of things:
https://github.com/michael-dev/dokuwikietherpadlite

@poVoq
Copy link

poVoq commented Dec 25, 2017

This might also be helpfull?:
https://github.com/kurounin/ep_auth_session

@otetard
Copy link
Owner Author

otetard commented Dec 27, 2017

Any progress on this?

I don’t have much time to work on this plugin, but this repo is open for pull requests :).

As said previously, the feature/etherpad-api branch should work for basic use cases.

Olivier;

@poVoq
Copy link

poVoq commented Dec 28, 2017

As said previously, the feature/etherpad-api branch should work for basic use cases.

That branch seems quite outdated otherwise, does it even support NC12?

But I understand the time limitations... thanks anyways!

@otetard otetard closed this as completed in dd70d4d Jan 9, 2018
@poVoq
Copy link

poVoq commented Jan 12, 2018

I tried installing the master branch but it gives me a "Error: This app can not be enabled because it makes the server unstable" when I try to enable it.

@otetard
Copy link
Owner Author

otetard commented Jan 12, 2018

I tried installing the master branch but it gives me a "Error: This app can not be enabled because it makes the server unstable" when I try to enable it.

Could you open a new issue explaining this bug please?

Olivier;

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

4 participants