HLRC: add support for the clear realm cache API (#35163)

This change adds support for clearing the cache of a realm. The realms
cache may contain a stale set of credentials or incorrect role
assignment, which can be corrected by clearing the cache of the entire
realm or just that of a specific user.

Relates #29827
This commit is contained in:
Jay Modi 2018-11-06 13:12:24 -07:00 committed by GitHub
parent a4b26febcb
commit 6f6b265166
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 462 additions and 67 deletions

View file

@ -0,0 +1,33 @@
--
:api: clear-realm-cache
:request: ClearRealmCacheRequest
:response: ClearRealmCacheResponse
--
[id="{upid}-{api}"]
=== Clear Realm Cache API
[id="{upid}-{api}-request"]
==== Clear Realm Cache Request
A +{request}+ supports defining the name of realms and usernames that the cache should be cleared
for.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== Clear Roles Cache Response
The returned +{response}+ allows to retrieve information about where the cache was cleared.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------
<1> the list of nodes that the cache was cleared on

View file

@ -331,6 +331,7 @@ The Java High Level REST Client supports the following Security APIs:
* <<java-rest-high-security-change-password>>
* <<java-rest-high-security-delete-role>>
* <<{upid}-clear-roles-cache>>
* <<{upid}-clear-realm-cache>>
* <<{upid}-authenticate>>
* <<java-rest-high-security-get-certificates>>
* <<java-rest-high-security-put-role-mapping>>
@ -345,6 +346,7 @@ include::security/disable-user.asciidoc[]
include::security/change-password.asciidoc[]
include::security/delete-role.asciidoc[]
include::security/clear-roles-cache.asciidoc[]
include::security/clear-realm-cache.asciidoc[]
include::security/authenticate.asciidoc[]
include::security/get-certificates.asciidoc[]
include::security/put-role-mapping.asciidoc[]