providers/proxy: make upstream SSL Validation configurable

This commit is contained in:
Jens Langhammer
2020-09-23 12:20:09 +02:00
parent 1aff9afca6
commit 6458b1dbf8
5 changed files with 41 additions and 5 deletions

View File

@ -46,15 +46,15 @@ class ProxyProvider(OutpostModel, OAuth2Provider):
external_host = models.TextField(
validators=[DomainlessURLValidator(schemes=("http", "https"))]
)
cookie_secret = models.TextField(default=get_cookie_secret)
internal_host_ssl_validation = models.BooleanField(
default=True, help_text=_("Validate SSL Certificates of upstream servers"))
skip_path_regex = models.TextField(
default="",
blank=True,
help_text=_(
(
"Regular expression for which authentication is not required. "
"Regular expressions for which authentication is not required. "
"Each new line is interpreted as a new Regular Expression."
)
),
@ -64,6 +64,8 @@ class ProxyProvider(OutpostModel, OAuth2Provider):
CertificateKeyPair, on_delete=models.SET_NULL, null=True, blank=True,
)
cookie_secret = models.TextField(default=get_cookie_secret)
def form(self) -> Type[ModelForm]:
from passbook.providers.proxy.forms import ProxyProviderForm