[Outline] An open, extensible, wiki for your team

Monday progress :

  • Upgrade works
  • Change URL works
  • I’ve given up on path_url as it doesn’t look like Outline is compatible anyway
  • I’ve found a potentially big problem on Outline licence, that would prevent the app from being added to the official app catalog (see here)

The app is now ready to test, for those who would be interested.
Again, please don’t install it yet on a prod server

After my current branch will be merged (PR) I’ll focus on something a little bit harder, which will be to add a passport.js strategy to make Outline compatible with Yunohost’s LDAP… Stay tuned :slight_smile:

1 Like

Hi @tituspijean @ericg , I got problem with the CI.
https://ci-apps-dev.yunohost.org/ci/job/3971

92272 INFO [####................] > Configuring system user...
92754 INFO [####................] > Creating a PostgreSQL database...
96718 INFO [####+...............] > Setting up source files...
98494 INFO [#####...............] > Setting up MinIO bucket for Outline...
98676 INFO [#####...............] > Configuring NGINX web server...
101744 INFO [#####++++...........] > Fetching Yarn dev dependencies... This can be very long, be patient !
vda1: write failed, user block limit reached.
vda1: write failed, user block limit reached.
vda1: write failed, user block limit reached.
vda1: write failed, user block limit reached.
240985 ERROR Unable to install outline: An error occurred inside the app installation script

Do you confirm that this is a CI server issue, and not something that has to do with my app ?
Thanks !

Yes indeed, it’s a CI issue. I had disabled the quota policy that triggered it, but it seems to be back.

1 Like

Hi @tituspijean I’m now working on making Outline compatible with Yunohost’s LDAP SSO, as per your advice. I have found the passport-ldapauth plugin and have tried to do the following :

  1. Added the plugin to the project with yarn add passport-ldapauth command
  2. Created a ldap.ts provider strategy under /server/routes/auth/providers, by copying as much as I could the google.ts auth provider, which is using another passport plugin.
  3. Compiled using the usual commands

I can compile without any problem, but when I run Outline I get a very strange error :

root@tests:/opt/yunohost/outline# yarn start

**yarn run v1.22.17**

$ node ./build/server/index.js

info: **[lifecycle]** Starting collaboration service

info: **[lifecycle]** Starting websockets service

info: **[lifecycle]** Starting worker service

info: **[lifecycle]** Starting web service

(node:16668) UnhandledPromiseRejectionWarning: Error: Cannot find module 'koa-webpack-dev-middleware'

Require stack:

- /opt/yunohost/outline/build/server/services/web.js

- /opt/yunohost/outline/build/server/services/index.js

- /opt/yunohost/outline/build/server/index.js

at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)

at Function.Module._load (internal/modules/cjs/loader.js:746:27)

at Module.require (internal/modules/cjs/loader.js:974:19)

at require (internal/modules/cjs/helpers.js:101:18)

at init (/opt/yunohost/outline/build/server/services/web.js:65:27)

at start (/opt/yunohost/outline/build/server/index.js:101:11)

at processTicksAndRejections (internal/process/task_queues.js:95:5)

at async throng (/opt/yunohost/outline/node_modules/throng/lib/throng.js:24:12)

(Use `node --trace-warnings ...` to show where the warning was created)

(node:16668) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

(node:16668) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Do you have any idea on where I should look for mistakes ?
I would be very glad to get rid of Slack and have Outline directly using Yunohost SSO.
Thanks in advance for your help !

Hi,

Thanks for this package, Outline seems to be very nice.
I’ve tried to install it on a test server. I notice two things:

  • Slack related fields are mandatory. I think it’s a problem: I don’t use Slack.
  • Install fails. Here is the log.

Good luck and thanks again :slight_smile:

Slack was mandatory up until recently. Outline devs have opened it up, but we need to implement our own authentication method (LDAP plugin is for paid Outline licence, for example…). So, wait and see, or test it out by creating à dummy Slack account.

We will have look, thanks!

Try npm install koa-webpack-dev-middleware before running the build.

Disclaimer: I am no Node dev, so I am like you trying to code by mimicking others. :sweat_smile:

Hi @jln, thanks for testing and very sorry that you have experienced an issue with the app.
From your logs it seems that you have used the testing branch, which is not up to date at the moment.
Could you please try using the latest tag v0.61.1-alpha ?

OK, so after a lot of trying and testing, I have found the reason for that error.
I was even able to write my first passport strategy for Outline : I did a “visitor” button that allows login for a dummy account, without any link with Yunohost LDAP system.

By doing so, I understood that there is a problem with the passport-ldap strategy : that strategy is meant to receive a user and password from the app, and to check them against the local LDAP server. Unfortunately, on its side, Outline was not designed to have fields to enter username or password on its login buttons. Indeed, these login buttons have been designed to use an Oauth 2.0 mechanism, which means going to a webpage and then have a callback webpage using the token given by Google, Slack or Azure !

So it looks like if I want Outline to use the passport-ldap strategy, I have to patch the app so that it will have a dedicated form where the user could enter its username and password… Quite difficult (I hope my explanation is clear?)

But then I was wondering : can SSOwat use http-auth ? Seems like yes, but I’m not sure and would be willing to have some guidance. If yes, then I could probably use the passport-http strategy, which would be easier and more in line with how the Outline app was designed.

Thanks in advance for your help @tituspijean @ericg or anybody else !

1 Like

Impressive! Node is so obscure to me… xD

Yes, it can, but you need to make a request to the SSO with Authorization header (cf. what I had done with https://github.com/tituspijean/flarum-ext-auth-ssowat/blob/master/src/Controllers/SSOwatLogInController.php, but it’s PHP/Laravel…). However, SSOwat will not answer with a token… That may to be linked with the revamp of the SSO that @Aleks was thinking about.

Many thanks for your reply, I’ll have a look. So is it “basic” style http-auth, or “digest” style ?

Should be “basic”. :wink:

1 Like

“Alpha” package has been updated to the latest Outline version (v0.62.0) :champagne:
You can go to that url :arrow_down: and follow the Readme

Current progress of the packaging
:white_check_mark: MinIO is installed automatically if needed
:white_check_mark: Safety checks on MinIO domain
:white_check_mark: Outline downloads mc MinIO client to create and set up automatically a dedicated MinIO bucket
:white_check_mark: Patch to remove branding on shared pages
:white_check_mark: Patch to have mailer working with Yunohost’s internal system
:white_check_mark: Install, Remove, Upgrade, Backup, Restore all working correctly
:stop_button: Not yet working on AMD platforms
:stop_button: Not yet validating CI for complex reasons related with MinIO
:stop_button: Not yet working with Yunohost SSO

Please don’t install this on a production server !

Don’t hesitate to fill in issues on Github or make some feedback here, I’ll be very interested.
Any help from you guys would be very welcomed !

1 Like

Hi @jln I have just made available a “visitor” version of Outline package here :

This will install Outline without the need of any slack account and should help you wait until I find some way to use SSOwat with Outline.

1 Like

Thanks a lot! I’ll try that when I’m less busy :slight_smile:

1 Like

I have found an app called “Canaille”
Yaal / Canaille · GitLab (Canaille — canaille 0.0.6 documentation)
It may be a good solution for my usecase, as it creates an OpenID Connect provider based on Yunohost’s LDAP server. I wouldn’t like to be dependant on a third app (Outline requires MinIO + Canaille ?) but I’m not very sure that http-auth header is doable.

@tituspijean could you please describe a little bit more what steps I should do ?
If I understood well, I need to load yunohost.domain/yunohost/sso with “Authorization” header
But if I do so, what will the SSO return to me ? Can I get a user ID, user name and/or email ?

I’m having a look to install Canaille on Yunohost.
It seems to be a “wsgi” app. What would be the cleanest Yunohot app based on that system so that I could have a look ?
Thanks !

Hi, I have a very good piece of news today !

I have been able to run dex identity provider on my test server.
I managed to have dex binding to Yunohost’s LDAP server. This will now make standard OpenID Connect authentification flows possible for Yunohost apps, including of course Outline.

Outline configured to use Dex app as OIDC provider (here named “Yunohost”)

Click brings you to Dex LDAP connect module, where you can input your credentials

Login brings you to the “Grant Access” page (Outline only requires a name and an email)

It works perfectly until the end where a new user will be created and logged in Outline.
I’m pretty happy with that result which looks rather clean. I could even brand the Dex app with Yunohost logo for the sake of nice details.

I will now need to package Dex properly for Yunohost and should be able to produce soon an updated version of my Outline package fully compatible with Yunohost SSO, getting completely rid of that Slack app creation requirement.

4 Likes

Hi there !

New release for Outline app is here !

A lot of changes have been made under the hood :

  • Automated installation and setup of Dex app for authentification against LDAP user base. Dex app is now part of Yunohost catalog and Level 7.
  • Updated installation and setup of MinIO app to follow major changes made to that app, now part of Yunohost catalog and Level 7.

You can now install a fully working version of Outline wiki and login with your Yunohost users.

Main disclaimer

  1. This is still a beta package. Please don’t install it yet on a production server !
  2. For technical reasons I’m still trying to understand, related to Dex app, Outine can’t be installed yet using the Web UI. Please use the command line instead sudo yunohost app install https://github.com/Yunohost-Apps/outline_ynh
  3. The licence of that app is not totally free, although very close to. You can refer to that conversation or to the app readme.

Next major steps will be to :

  1. Have Outline integrated into Yunohost catalog (should be done within a few days)
  2. Have Outline successfully running the CI tests and reach Level 7 integration
2 Likes

Hi there,

I’m getting closer and closer from reaching Level 7 for Outline !

To reach Level 7, I’ll need to solve two issues :

  1. How to solve my Missing $GOPATH problem (which makes the Outline installation using the web UI fail - that’s a big deal !)
  2. How to get rid of the linter error linked to my custom helper using openssl rand -hex 32 to generate a hex password required by Outline
1 Like

First stable release ! :rocket: It has been a long journey :sweat_smile:

Special thanks to @tituspijean @ericg @yalh76 and @Aleks who have all helped me to solve the very various difficulties I had to face during the packaging process.

Outline app is now reaching level 7 in the CI and both above mentionned issues have been solved.
Version v0.63.0 is packaged and should be running well in your server. You can install it directly from the Yunohost apps catalog within the admin web UI.
Please use with caution as it hasn’t been extensively tested yet.

I still need to tackle a few things like ARM version, MinIO URL change hook, what happens if MinIO or Dex are removed before Outline, creating a hook to delete Outline user if it’s deleted in Yunohost… But the main goal is reached : the Outline app, quite famous for being very difficult to self-host, is now nothing more than a “one click” effort for Yunohost users !

6 Likes