Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oAuth / openID with skip-tls-verify #16376

Closed
inthuriel opened this issue Jul 8, 2021 · 3 comments
Closed

oAuth / openID with skip-tls-verify #16376

inthuriel opened this issue Jul 8, 2021 · 3 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@inthuriel
Copy link

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: 
@noerw
Copy link
Member

noerw commented 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 noerw added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jul 10, 2021
@zeripath
Copy link
Contributor

zeripath commented 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
Copy link
Contributor

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

@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

3 participants