Package com.google.iam.admin.v1
Class ServiceAccountKey
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.iam.admin.v1.ServiceAccountKey
-
- All Implemented Interfaces:
ServiceAccountKeyOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class ServiceAccountKey extends com.google.protobuf.GeneratedMessageV3 implements ServiceAccountKeyOrBuilder
Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key's lifetime. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API.
Protobuf typegoogle.iam.admin.v1.ServiceAccountKey- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServiceAccountKey.BuilderRepresents a service account key.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intDISABLED_FIELD_NUMBERstatic intKEY_ALGORITHM_FIELD_NUMBERstatic intKEY_ORIGIN_FIELD_NUMBERstatic intKEY_TYPE_FIELD_NUMBERstatic intNAME_FIELD_NUMBERstatic intPRIVATE_KEY_DATA_FIELD_NUMBERstatic intPRIVATE_KEY_TYPE_FIELD_NUMBERstatic intPUBLIC_KEY_DATA_FIELD_NUMBERstatic intVALID_AFTER_TIME_FIELD_NUMBERstatic intVALID_BEFORE_TIME_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static ServiceAccountKeygetDefaultInstance()ServiceAccountKeygetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()booleangetDisabled()The key status.ServiceAccountKeyAlgorithmgetKeyAlgorithm()Specifies the algorithm (and possibly key size) for the key.intgetKeyAlgorithmValue()Specifies the algorithm (and possibly key size) for the key.ServiceAccountKeyOrigingetKeyOrigin()The key origin.intgetKeyOriginValue()The key origin.ListServiceAccountKeysRequest.KeyTypegetKeyType()The key type.intgetKeyTypeValue()The key type.StringgetName()The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.com.google.protobuf.ByteStringgetNameBytes()The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.com.google.protobuf.Parser<ServiceAccountKey>getParserForType()com.google.protobuf.ByteStringgetPrivateKeyData()The private key data.ServiceAccountPrivateKeyTypegetPrivateKeyType()The output format for the private key.intgetPrivateKeyTypeValue()The output format for the private key.com.google.protobuf.ByteStringgetPublicKeyData()The public key data.intgetSerializedSize()com.google.protobuf.TimestampgetValidAfterTime()The key can be used after this timestamp.com.google.protobuf.TimestampOrBuildergetValidAfterTimeOrBuilder()The key can be used after this timestamp.com.google.protobuf.TimestampgetValidBeforeTime()The key can be used before this timestamp.com.google.protobuf.TimestampOrBuildergetValidBeforeTimeOrBuilder()The key can be used before this timestamp.inthashCode()booleanhasValidAfterTime()The key can be used after this timestamp.booleanhasValidBeforeTime()The key can be used before this timestamp.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static ServiceAccountKey.BuildernewBuilder()static ServiceAccountKey.BuildernewBuilder(ServiceAccountKey prototype)ServiceAccountKey.BuildernewBuilderForType()protected ServiceAccountKey.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static ServiceAccountKeyparseDelimitedFrom(InputStream input)static ServiceAccountKeyparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ServiceAccountKeyparseFrom(byte[] data)static ServiceAccountKeyparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ServiceAccountKeyparseFrom(com.google.protobuf.ByteString data)static ServiceAccountKeyparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ServiceAccountKeyparseFrom(com.google.protobuf.CodedInputStream input)static ServiceAccountKeyparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ServiceAccountKeyparseFrom(InputStream input)static ServiceAccountKeyparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ServiceAccountKeyparseFrom(ByteBuffer data)static ServiceAccountKeyparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<ServiceAccountKey>parser()ServiceAccountKey.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PRIVATE_KEY_TYPE_FIELD_NUMBER
public static final int PRIVATE_KEY_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
KEY_ALGORITHM_FIELD_NUMBER
public static final int KEY_ALGORITHM_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PRIVATE_KEY_DATA_FIELD_NUMBER
public static final int PRIVATE_KEY_DATA_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PUBLIC_KEY_DATA_FIELD_NUMBER
public static final int PUBLIC_KEY_DATA_FIELD_NUMBER
- See Also:
- Constant Field Values
-
VALID_AFTER_TIME_FIELD_NUMBER
public static final int VALID_AFTER_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
VALID_BEFORE_TIME_FIELD_NUMBER
public static final int VALID_BEFORE_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
KEY_ORIGIN_FIELD_NUMBER
public static final int KEY_ORIGIN_FIELD_NUMBER
- See Also:
- Constant Field Values
-
KEY_TYPE_FIELD_NUMBER
public static final int KEY_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DISABLED_FIELD_NUMBER
public static final int DISABLED_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getName
public String getName()
The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.string name = 1;- Specified by:
getNamein interfaceServiceAccountKeyOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.string name = 1;- Specified by:
getNameBytesin interfaceServiceAccountKeyOrBuilder- Returns:
- The bytes for name.
-
getPrivateKeyTypeValue
public int getPrivateKeyTypeValue()
The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
.google.iam.admin.v1.ServiceAccountPrivateKeyType private_key_type = 2;- Specified by:
getPrivateKeyTypeValuein interfaceServiceAccountKeyOrBuilder- Returns:
- The enum numeric value on the wire for privateKeyType.
-
getPrivateKeyType
public ServiceAccountPrivateKeyType getPrivateKeyType()
The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
.google.iam.admin.v1.ServiceAccountPrivateKeyType private_key_type = 2;- Specified by:
getPrivateKeyTypein interfaceServiceAccountKeyOrBuilder- Returns:
- The privateKeyType.
-
getKeyAlgorithmValue
public int getKeyAlgorithmValue()
Specifies the algorithm (and possibly key size) for the key.
.google.iam.admin.v1.ServiceAccountKeyAlgorithm key_algorithm = 8;- Specified by:
getKeyAlgorithmValuein interfaceServiceAccountKeyOrBuilder- Returns:
- The enum numeric value on the wire for keyAlgorithm.
-
getKeyAlgorithm
public ServiceAccountKeyAlgorithm getKeyAlgorithm()
Specifies the algorithm (and possibly key size) for the key.
.google.iam.admin.v1.ServiceAccountKeyAlgorithm key_algorithm = 8;- Specified by:
getKeyAlgorithmin interfaceServiceAccountKeyOrBuilder- Returns:
- The keyAlgorithm.
-
getPrivateKeyData
public com.google.protobuf.ByteString getPrivateKeyData()
The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with <a href="/sdk/gcloud/reference/auth/activate-service-account">gcloud auth activate-service-account</a>.
bytes private_key_data = 3;- Specified by:
getPrivateKeyDatain interfaceServiceAccountKeyOrBuilder- Returns:
- The privateKeyData.
-
getPublicKeyData
public com.google.protobuf.ByteString getPublicKeyData()
The public key data. Only provided in `GetServiceAccountKey` responses.
bytes public_key_data = 7;- Specified by:
getPublicKeyDatain interfaceServiceAccountKeyOrBuilder- Returns:
- The publicKeyData.
-
hasValidAfterTime
public boolean hasValidAfterTime()
The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;- Specified by:
hasValidAfterTimein interfaceServiceAccountKeyOrBuilder- Returns:
- Whether the validAfterTime field is set.
-
getValidAfterTime
public com.google.protobuf.Timestamp getValidAfterTime()
The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;- Specified by:
getValidAfterTimein interfaceServiceAccountKeyOrBuilder- Returns:
- The validAfterTime.
-
getValidAfterTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getValidAfterTimeOrBuilder()
The key can be used after this timestamp.
.google.protobuf.Timestamp valid_after_time = 4;- Specified by:
getValidAfterTimeOrBuilderin interfaceServiceAccountKeyOrBuilder
-
hasValidBeforeTime
public boolean hasValidBeforeTime()
The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
.google.protobuf.Timestamp valid_before_time = 5;- Specified by:
hasValidBeforeTimein interfaceServiceAccountKeyOrBuilder- Returns:
- Whether the validBeforeTime field is set.
-
getValidBeforeTime
public com.google.protobuf.Timestamp getValidBeforeTime()
The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
.google.protobuf.Timestamp valid_before_time = 5;- Specified by:
getValidBeforeTimein interfaceServiceAccountKeyOrBuilder- Returns:
- The validBeforeTime.
-
getValidBeforeTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getValidBeforeTimeOrBuilder()
The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
.google.protobuf.Timestamp valid_before_time = 5;- Specified by:
getValidBeforeTimeOrBuilderin interfaceServiceAccountKeyOrBuilder
-
getKeyOriginValue
public int getKeyOriginValue()
The key origin.
.google.iam.admin.v1.ServiceAccountKeyOrigin key_origin = 9;- Specified by:
getKeyOriginValuein interfaceServiceAccountKeyOrBuilder- Returns:
- The enum numeric value on the wire for keyOrigin.
-
getKeyOrigin
public ServiceAccountKeyOrigin getKeyOrigin()
The key origin.
.google.iam.admin.v1.ServiceAccountKeyOrigin key_origin = 9;- Specified by:
getKeyOriginin interfaceServiceAccountKeyOrBuilder- Returns:
- The keyOrigin.
-
getKeyTypeValue
public int getKeyTypeValue()
The key type.
.google.iam.admin.v1.ListServiceAccountKeysRequest.KeyType key_type = 10;- Specified by:
getKeyTypeValuein interfaceServiceAccountKeyOrBuilder- Returns:
- The enum numeric value on the wire for keyType.
-
getKeyType
public ListServiceAccountKeysRequest.KeyType getKeyType()
The key type.
.google.iam.admin.v1.ListServiceAccountKeysRequest.KeyType key_type = 10;- Specified by:
getKeyTypein interfaceServiceAccountKeyOrBuilder- Returns:
- The keyType.
-
getDisabled
public boolean getDisabled()
The key status.
bool disabled = 11;- Specified by:
getDisabledin interfaceServiceAccountKeyOrBuilder- Returns:
- The disabled.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static ServiceAccountKey parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccountKey parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccountKey parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccountKey parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccountKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccountKey parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ServiceAccountKey parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static ServiceAccountKey parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static ServiceAccountKey parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static ServiceAccountKey parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static ServiceAccountKey parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static ServiceAccountKey parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public ServiceAccountKey.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static ServiceAccountKey.Builder newBuilder()
-
newBuilder
public static ServiceAccountKey.Builder newBuilder(ServiceAccountKey prototype)
-
toBuilder
public ServiceAccountKey.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ServiceAccountKey.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static ServiceAccountKey getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<ServiceAccountKey> parser()
-
getParserForType
public com.google.protobuf.Parser<ServiceAccountKey> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public ServiceAccountKey getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-