owncloud / openidconnect

OpenId Connect (OIDC) Integration for ownCloud
GNU General Public License v2.0
6 stars 2 forks source link

Add config option to allow basic auth only for guests #253

Closed jvillafanez closed 1 year ago

jvillafanez commented 1 year ago

Guests will be able to access ownCloud using basic auth, but other users will need to access through other mechanisms such as oidc.

Description

The new openid-connect.basic_auth_guest_only config option only allows guests to be able to log in using basic auth. Other users will need to use another auth mechanisms (such as oidc)

Note that the users can still log in with ANY OTHER auth mechanism available, not just oidc. It's expected that oidc is the only alternative though.

NOTE: minimum OC version raised to 10.4 in order to use the UserTypeHelper to detect guest users.

To be checked:

Related Issue

https://github.com/owncloud/enterprise/issues/5295

Motivation and Context

How Has This Been Tested?

Manually tested:

  1. Setup:
    • Keycloak with LDAP connected
    • Guest app installed
    • user_ldap app installed and connected to the same server which keycloak is connected to.
    • openidconnect app connected to keycloak
  2. Set 'openid-connect.basic_auth_guest_only' => true in the config.php file
  3. Ensure you can access with userA through keycloak using openidconnect (using the alternative login in the login page)
  4. Ensure you can access with a guest user using username and password in the ownCloud's login page
  5. Ensure you cannot access with userA through the ownCloud's login page

Screenshot from 2022-09-26 14-06-15

Note: Users (except guests) MUST also use a different auth mechanism (such as oidc) in order to access to the webdav interface. This might affect mobile and desktop clients. It's expected to work, but not tested yet.

Screenshots (if appropriate):

Types of changes

Checklist:

Open tasks:

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

pmaier1 commented 1 year ago

Needs documentation @mmattel -> https://github.com/owncloud/docs-server/issues/665

ChrisEdS commented 1 year ago

Needs also translation for the new error message?

image
DeepDiver1975 commented 1 year ago

indeed - until today we don't have any translations .... I can take care