Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#61644 new feature request

Invalidate application password

Reported by: senna765's profile senna765 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.6
Component: Application Passwords Keywords:
Focuses: rest-api Cc:

Description

Currently application passwords does not have any expiration. Due security issue as password is returned in query string and all GET requests are logged in webserver logs we need to invalidate those tokens programatically.

To revoke token we need to get uuid because it is not possible to delete token by appId. Currently there is endpoint GET /wp-json/wp/v2/users/me/application-passwords/introspect but because this is GET request method it is cached by litespeed cache plugin and returns cached results.

So my proposal would be to:

  1. Add ability to revoke token based on appId as this is known value to application
  2. Change request method to POST for wp-json/wp/v2/users/me/application-passwords/introspect as litespeed cache plugin is not caching POST requests

Change History (1)

#1 @TimothyBlynJacobs
3 weeks ago

  • Focuses rest-api added
  • Severity changed from major to normal
  • Version changed from 6.5.5 to 5.6

Hi @senna765,

Thanks for the ticket and welcome to Trac!

Add ability to revoke token based on appId as this is known value to application

I could see us adding this. Probably as a DELETE /wp/v2/users/me/application-passwords?app_id=blah.

Change request method to POST for wp-json/wp/v2/users/me/application-passwords/introspect as litespeed cache plugin is not caching POST requests

We wouldn't be making this change. This is a read action, it should not have POST semantics. If the Litespeed plugin is caching an authenticated route, that's incorrect. The REST API sends nocache headers on authenticated requests.

Note: See TracTickets for help on using tickets.