owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.4k stars 183 forks source link

Expansion of OIDC documentation #5975

Open mpldr opened 1 year ago

mpldr commented 1 year ago

Since OCIS no longer has integrated authentication, it would be nice to have a dedicated page with information about setting up OIDC instead of having to search through issues and various blogs that may or may not be available in a month.

Information I found particularly useful:

micbar commented 1 year ago

@mpldr Thanks for the ticket.

I would ask back which parts are missing from your POV.

We provide examples for keycloak. https://owncloud.dev/ocis/deployment/ocis_keycloak/

micbar commented 1 year ago

@mmattel FYI

mpldr commented 1 year ago

On Fri Mar 31, 2023 at 10:21 AM CEST, Michael Barz wrote:

We provide examples for keycloak. https://owncloud.dev/ocis/deployment/ocis_keycloak/ And that's just what I imagined for OIDC as well (maybe under Deployment > Authentication > oCIS with OIDC)

I would ask back which parts are missing from your POV. I think in that regard other projects have strengths to adapt and weaknesses to learn from in their documentation:

headscale (https://github.com/juanfont/headscale/blob/main/docs/oidc.md)

Synapse (https://matrix-org.github.io/synapse/latest/openid.html)

soju (https://soju.im/doc/soju.1.html#CONFIG_FILE) (see auth oauth)

CodiMD (https://hackmd.io/c/codimd-documentation/%2F%40codimd%2Fcodimd-generic-oauth-2)

Snipe-IT (https://snipe-it.readme.io/docs/ldap-sync-login)

Drawing inspiration from that, I'd suggest:

-- Moritz Poldrack https://moritz.sh

mpldr commented 1 year ago

I'll also gladly contribute my findings once I finally manage to convince oCIS to get the ocRole claim from the returned JWT.

-- Moritz Poldrack https://moritz.sh

mpldr commented 1 year ago

Okay, I have successfully made it work, but am not too sure what exactly was the change that actually convinced it.

mpldr commented 1 year ago

Another interesting piece of information: there must only be one role claim. Having group inheritance is not supported at the moment.

Yasamato commented 1 year ago

To pick up on this: https://github.com/owncloud/ocis/issues/2445#issuecomment-907392492

  1. Please include the information for not being able to set a client secret into the documentation.
  2. This seems to be a technical debt as the client secret provides an additional layer of security (see domain hijacking or man in the middle attacks).
mpldr commented 1 year ago

Please include the information for not being able to set a client secret into the documentation. — @Yasamato

I would honestly prefer that IDP was expanded to include secret-capabilities. This would of course mean that ISP had to keep state, which seems to be against the idea. Going by the definition, I think OCIS should be considered a confidential client. It doesn't act like one though.

micbar commented 1 year ago

I would honestly prefer that IDP was expanded to include secret-capabilities. This would of course mean that ISP had to keep state, which seems to be against the idea. Going by the definition, I think OCIS should be considered a confidential client. It doesn't act like one though.

The ocis desktop and mobile clients use client secrets as you can see in the default ocis configuration. The web client does not, like it was explained above. It uses the PSKE code challenge.

What is exactly the problem you need to solve?

mpldr commented 1 year ago

What is exactly the problem you need to solve?

Users complaining that they get redirected through the identity provider each and every time they access OCIS, which can be especially bad for them if they want to access a file semi-quickly and have bad reception in rural areas. (The OIDC-Providers page isn't exactly lightweight either)

So far I have only received 2 complaints about it (with <10 users), one of which called it "annoying because my screen keeps flashing".

mpldr commented 1 year ago

Patch on the docs is WIP btw.

micbar commented 1 year ago

Users complaining that they get redirected through the identity provider each and every time they access OCIS, which can be especially bad for them if they want to access a file semi-quickly and have bad reception in rural areas. (The OIDC-Providers page isn't exactly lightweight either)

Ok but that is a different issue. That depends on the session lifetime of the IdP.

mpldr commented 1 year ago

Thanks, I'll add it to the OIDC doc page.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

mpldr commented 1 year ago

This bot is a bane on the Free Software world