gyselroth / balloon

High performance, feature rich document management system written for the cloud
GNU General Public License v3.0
18 stars 7 forks source link

OpenID-connect only support authorization code flow #435

Open raffis opened 4 years ago

raffis commented 4 years ago

Describe the change

Balloon already has a working Idp (see current situation). But 1st party apps like the web ui and the desktop client use the resource owner grant flow for internal authentication. The web ui uses the implicit flow for external OpenID-connect providers.

In the view of the desktop client this brings the issue that additional openid-connect providers have to be configured locally on each client (or create a custom build and ship the configuration). New auth possibilities are therefore hard to deploy afterwards. This also applies to the web client but the configuration is centralized.

This issue proposes that balloon should continuing shipping an Idp but unlike having support for the resource owner grant flow only the authorization code flow (with PKCE) should be supported and first party clients like the web client and the desktop client should also use this flow and behave like a 3rd party. This means that the balloon server or an additional micro service must implement the authentication process and a login form. There will be no login form on either the web client and the desktop client. Both clients (and any other client) will start the code authorization flow.

This solves multiple issues:

Current situation

Currently balloon implements the following apps which are related to oauth2:

Should

Balloon must ship an idp with login support via a web form.

Note: Balloon needs to continue support basic auth for protocols like WebDAV. Users authenticated via a 3rd party authentication provider still need to set a local balloon password to be able to use protocols like WebDAV.

Additional context

It would be nice we could use a service like dex but I see multiple issues here:

Balloon already has implemented those features and switching to dex still would be nice but feels like a step backwards.

raffis commented 4 years ago

Ory hydra might be a good solution where one can implement its own consent app. The disadvantage is that it has no MongoDB support and would require a separate db (postgres).