Create an additional authentication check for `/manage` endpoints
For API endpoints which are used to Admin actions like listing all PATs we will include an additional compulsory authentication step.
Along with PersonalAccessToken based authentication, user will need to send DPoP JWT Token along with each request. This check needs to be included in api_guard.rb.
Final Execution Plan -
- Introduce a Group level Setting named -
enforce_dpop_to_manage_api_endpoints - If setting is enabled
/manageendpoint cannot be accessed via Personal Access Tokens and DPoP authentication is enforced irrespective of user level settingdpop_enabled - If setting is disabled
/manageDpop authentication is only enforced when user level settingdpop_enabledis enabled as well.
Edited by Smriti Garg