oAuth / openID with skip-tls-verify #7562

Closed
opened 2025-11-02 07:29:53 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @inthuriel on GitHub (Jul 8, 2021).

Is it possibe to use oauth with openidConnect provider alongside with skip-tls-verify option?
We have openID provider with self-signed SSL and gitea isn't able to connect to it

2021/07/08 13:22:02 main.go:117:main() [F] Failed to run app with [gitea admin auth update-oauth --id 1 --auto-discover-url [url] --key [app] --name oAuth --provider openidConnect --secret [secret]]: models.SetEngine: Failed to connect to database: Unknown database type: 
Originally created by @inthuriel on GitHub (Jul 8, 2021). Is it possibe to use `oauth` with `openidConnect` provider alongside with `skip-tls-verify` option? We have `openID` provider with self-signed `SSL` and `gitea` isn't able to connect to it ```bash 2021/07/08 13:22:02 main.go:117:main() [F] Failed to run app with [gitea admin auth update-oauth --id 1 --auto-discover-url [url] --key [app] --name oAuth --provider openidConnect --secret [secret]]: models.SetEngine: Failed to connect to database: Unknown database type: ```
GiteaMirror added the type/proposal label 2025-11-02 07:29:53 -06:00
Author
Owner

@noerw commented on GitHub (Jul 10, 2021):

That's currently not supported as far as I can tell.
I'm also not sure skipping TLS verification is a good idea for an auth provider.
You could instead try to add your local CA used to create the self signed cert to the trust store on the system gitea is running on.

@noerw commented on GitHub (Jul 10, 2021): That's currently not supported as far as I can tell. I'm also not sure skipping TLS verification is a good idea for an auth provider. You could instead try to add your local CA used to create the self signed cert to the trust store on the system gitea is running on.
Author
Owner

@zeripath commented on GitHub (Jul 23, 2021):

Add your certificate to a copy of the root certs file and set SSL_CERT_FILE to the new file.

See: https://pkg.go.dev/crypto/x509@go1.16.6#SystemCertPool

and

https://cs.opensource.google/go/go/+/refs/tags/go1.16.6:src/crypto/x509/root_linux.go

(On linux that is. On windows and mac you need to add the new RootCA to the system pool.)

@zeripath commented on GitHub (Jul 23, 2021): Add your certificate to a copy of the root certs file and set `SSL_CERT_FILE` to the new file. See: https://pkg.go.dev/crypto/x509@go1.16.6#SystemCertPool and https://cs.opensource.google/go/go/+/refs/tags/go1.16.6:src/crypto/x509/root_linux.go (On linux that is. On windows and mac you need to add the new RootCA to the system pool.)
Author
Owner

@zeripath commented on GitHub (Jul 23, 2021):

If we were to provide an option to set the trusted CAs users would have to provide a file containing all root CAs.

@zeripath commented on GitHub (Jul 23, 2021): If we were to provide an option to set the trusted CAs users would have to provide a file containing all root CAs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7562