Browse Source

HUE-8690 [backend] Fix Hue allows unsigned SAML assertions

Prakash Ranade 6 years ago
parent
commit
899148b

+ 12 - 0
desktop/libs/libsaml/src/libsaml/conf.py

@@ -142,6 +142,18 @@ AUTHN_REQUESTS_SIGNED = Config(
   type=coerce_bool,
   help=_t("Have Hue initiated authn requests be signed and provide a certificate."))
 
+WANT_RESPONSE_SIGNED = Config(
+  key="want_response_signed",
+  default=True,
+  type=coerce_bool,
+  help=_t("Have Hue initiated authn response be signed."))
+
+WANT_ASSERTIONS_SIGNED = Config(
+  key="want_assertions_signed",
+  default=True,
+  type=coerce_bool,
+  help=_t("Have Hue initiated authn assertions response be signed."))
+
 LOGOUT_REQUESTS_SIGNED = Config(
   key="logout_requests_signed",
   default=False,

+ 3 - 1
desktop/libs/libsaml/src/libsaml/saml_settings.py

@@ -79,7 +79,9 @@ def config_settings_loader(request):
         'optional_attributes': libsaml.conf.OPTIONAL_ATTRIBUTES.get(),
 
         'logout_requests_signed': str(libsaml.conf.LOGOUT_REQUESTS_SIGNED.get()).lower(),
-        'authn_requests_signed': str(libsaml.conf.AUTHN_REQUESTS_SIGNED.get()).lower()
+        'authn_requests_signed': str(libsaml.conf.AUTHN_REQUESTS_SIGNED.get()).lower(),
+        'want_response_signed': str(libsaml.conf.WANT_RESPONSE_SIGNED.get()).lower(),
+        'want_assertions_signed': str(libsaml.conf.WANT_ASSERTIONS_SIGNED.get()).lower()
       },
     },