# HG changeset patch # User Kim Alvefur # Date 1686866813 -7200 # Node ID 01a0b67a9afdf9f21e6b0bff23b0ecbd9709cf09 # Parent fd3c12c40cd912b4bfce3c6c6e471b3e72078dfb mod_http_oauth2: Add TODO about disabling password grant Per recommendation in draft-ietf-oauth-security-topics-23 it should at the very least be disabled by default. However since this is used by the Snikket web portal some care needs to be taken not to break this, unless it's already broken by other changes to this module. diff -r fd3c12c40cd9 -r 01a0b67a9afd mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Fri Jun 16 00:05:57 2023 +0200 +++ b/mod_http_oauth2/mod_http_oauth2.lua Fri Jun 16 00:06:53 2023 +0200 @@ -680,7 +680,11 @@ }; end -local allowed_grant_type_handlers = module:get_option_set("allowed_oauth2_grant_types", {"authorization_code", "password", "refresh_token"}) +local allowed_grant_type_handlers = module:get_option_set("allowed_oauth2_grant_types", { + "authorization_code"; + "password"; -- TODO Disable. The resource owner password credentials grant [RFC6749] MUST NOT be used. + "refresh_token"; +}) for handler_type in pairs(grant_type_handlers) do if not allowed_grant_type_handlers:contains(handler_type) then module:log("debug", "Grant type %q disabled", handler_type);