Class ApiKeyService.CachedApiKeyDoc

java.lang.Object
org.elasticsearch.xpack.security.authc.ApiKeyService.CachedApiKeyDoc
Enclosing class:
ApiKeyService

public static final class ApiKeyService.CachedApiKeyDoc extends Object
A cached version of the ApiKeyService.ApiKeyDoc. The main difference is that the role descriptors are replaced by their hashes. The actual values are stored in a separate role descriptor cache, so that duplicate role descriptors are cached only once (and therefore consume less memory).
  • Constructor Details

    • CachedApiKeyDoc

      public CachedApiKeyDoc(long creationTime, long expirationTime, Boolean invalidated, String hash, String name, int version, Map<String,Object> creator, String roleDescriptorsHash, String limitedByRoleDescriptorsHash, @Nullable org.elasticsearch.common.bytes.BytesReference metadataFlattened)
  • Method Details

    • toApiKeyDoc

      public ApiKeyService.ApiKeyDoc toApiKeyDoc(org.elasticsearch.common.bytes.BytesReference roleDescriptorsBytes, org.elasticsearch.common.bytes.BytesReference limitedByRoleDescriptorsBytes)