nextcloud / user_oidc

OIDC connect user backend for Nextcloud
GNU Affero General Public License v3.0
89 stars 36 forks source link

Disable ssl verification in development #988

Open bdovaz opened 2 days ago

bdovaz commented 2 days ago

How to use GitHub


Feature request

Which Nextcloud Version are you currently using: (see administration page)

30.0.2

Is your feature request related to a problem? Please describe.

When we are developing there is no way to run Keycloak and Nextcloud over https with a self-signed certificate and have the user_oidc app work correctly. There are several scripts that make requests that do not take into account the ability to set the verify field of Guzzle:

Search for $client-> inside this scripts

https://github.com/nextcloud/user_oidc/blob/main/lib/Controller/LoginController.php https://github.com/nextcloud/user_oidc/blob/main/lib/Service/DiscoveryService.php

Some of the work is already done because at least for certain errors it is taken into account that if Nextcloud is in debug mode it considers that it is safe:

https://github.com/nextcloud/user_oidc/blob/d161cdd8b254ca90246b362165003ae2854cec1e/lib/Controller/LoginController.php#L87

Nextcloud does not have the option to globally disable verify by default, which would be ideal:

https://github.com/nextcloud/server/blob/d334773b9868561db86209bbf801d2835f182a7b/lib/private/Http/Client/Client.php#L55

Describe the solution you'd like

Assume that if Nextcloud is in debug mode it sends on Guzzle requests: $options['verify'] = false

Or have a setting in config.php itself as some apps do:

https://github.com/nextcloud/richdocuments/blob/05fa51e71a408a16624588d4f7aed23257090bb2/lib/Service/CachedRequestService.php#L95

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.