Opened 8 months ago
Last modified 8 months ago
#61644 new feature request
Invalidate application password
Reported by: |
|
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:
- Add ability to revoke token based on appId as this is known value to application
- 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)
Note: See
TracTickets for help on using
tickets.
Hi @senna765,
Thanks for the ticket and welcome to Trac!
I could see us adding this. Probably as a
DELETE /wp/v2/users/me/application-passwords?app_id=blah
.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.