mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-06-14 20:16:05 +00:00
Merge pull request #1203 from pixelrebel/saml-fixes
Small fixes to SAML service
This commit is contained in:
@ -72,8 +72,9 @@ class SAML(object):
|
||||
def prepare_flask_request(self, request):
|
||||
# If server is behind proxys or balancers use the HTTP_X_FORWARDED fields
|
||||
url_data = urlparse(request.url)
|
||||
proto = request.headers.get('HTTP_X_FORWARDED_PROTO', request.scheme)
|
||||
return {
|
||||
'https': 'on' if request.scheme == 'https' else 'off',
|
||||
'https': 'on' if proto == 'https' else 'off',
|
||||
'http_host': request.host,
|
||||
'server_port': url_data.port,
|
||||
'script_name': request.path,
|
||||
@ -163,7 +164,8 @@ class SAML(object):
|
||||
'signatureAlgorithm'] = 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256'
|
||||
settings['security']['wantAssertionsEncrypted'] = current_app.config.get(
|
||||
'SAML_ASSERTION_ENCRYPTED', True)
|
||||
settings['security']['wantAttributeStatement'] = True
|
||||
settings['security']['wantAttributeStatement'] = current_app.config.get(
|
||||
'SAML_WANT_ATTRIBUTE_STATEMENT', True)
|
||||
settings['security']['wantNameId'] = True
|
||||
settings['security']['authnRequestsSigned'] = current_app.config[
|
||||
'SAML_SIGN_REQUEST']
|
||||
|
Reference in New Issue
Block a user