nextcloud / nextcloud/user_oidc

Disable ssl verification in development

Open
#988 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement fix in progress
Dominant language
PHP
Stars
181
Forks
60
Avg merge
7h 34m
Merged PRs (30d)
26

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/Controller/LoginController.php and lib/Service/DiscoveryService.php, reviewing the existing debug-mode handling and Guzzle requests. Compare the proposed debug-mode behavior with the config.php approach in CachedRequestService.php and the client behavior in server's lib/private/Http/Client/Client.php. Done means the chosen approach consistently supports self-signed HTTPS for development without changing production verification behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.