Module org.elasticsearch.xcore
Class PersistedCloudCredential
java.lang.Object
org.elasticsearch.xpack.core.security.cloud.PersistedCloudCredential
- All Implemented Interfaces:
Closeable,AutoCloseable,Writeable,Releasable,ToXContent,ToXContentObject
public final class PersistedCloudCredential
extends Object
implements Writeable, ToXContentObject, Releasable
Persistence envelope for a cloud-managed credential, pairing the public API key
id with
the raw internal API key text. The version field exists so that a future envelope encoding
(e.g. an encrypted payload) can be introduced without breaking documents written today.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases the underlyingSecureString.booleanstatic PersistedCloudCredentialfromXContent(XContentParser parser) inthashCode()id()toString()toXContent(XContentBuilder builder, ToXContent.Params params) intversion()voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
CURRENT_VERSION
public static final int CURRENT_VERSION- See Also:
-
-
Constructor Details
-
PersistedCloudCredential
-
PersistedCloudCredential
- Throws:
IOException
-
-
Method Details
-
version
public int version() -
id
-
internalApiKey
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
fromXContent
- Throws:
IOException
-
close
public void close()Releases the underlyingSecureString.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-
equals
-
hashCode
public int hashCode() -
toString
-