Skip to content

Troubleshoot an External Key Store

Private Preview

External Key Store (XKS) is currently available as a private preview. Review the service boundaries for current limitations and SLA status.

An error on a key store, or on one of its KMS keys, comes from one of two places:

  • Exoscale KMS. Before it calls your proxy, Exoscale KMS checks the key store and its keys: whether they exist in the zone, their state, their names and the request itself. These errors are listed in Errors from Exoscale KMS.
  • Your XKS proxy or external key manager. When a call to your proxy fails, Exoscale KMS returns Key store proxy request failed. If your proxy answered with an error, Exoscale KMS also passes that error on. These errors are listed in Errors from your proxy.

For the results of the periodic health checks, see Monitor the Health of a Key Store.

Errors from Exoscale KMS

Error titleCauseWhat to do
Key store not foundNo key store with this ID exists in the zone of the request. A key store belongs to a single zone.Check the key store ID and the zone of the request.
Key store is disconnectedYou used a KMS key in a disconnected key store, or tried to create one in it.Connect the key store, then retry.
Key store is referencedYou tried to delete a key store that still has KMS keys.Delete the keys first and wait for their waiting period to end.
Key store name already existsAnother key store of your organization in this zone uses this name.Choose a different name.
Key store state changedThe key store was modified by another request at the same time.Retry the request.
Invalid argumentA field of the request is invalid, for example a proxy endpoint that is not an https:// URL with a host, or a KMS key in an external key store requested with a usage other than encrypt-decrypt, a key spec other than AES_256, or as a multi-zone key.Correct the field named in the error detail, then retry.
Invalid originYou tried to replicate a KMS key in an external key store. These keys exist in a single zone.Use the key in its own zone.
Key store proxy request failedExoscale KMS could not complete a call to your proxy: the proxy could not be reached, did not answer in time, or answered with an error. When you create a KMS key, it is also returned if the external key is disabled or does not allow both encryption and decryption.Check the error detail. If your proxy answered with an error, see Errors from your proxy.
Invalid ciphertextThe ciphertext cannot be decrypted with this KMS key. For a key in an external key store, it is also returned when your proxy reports InvalidCiphertextException.Check that you decrypt with the KMS key and the encryption context used for encryption, and that the ciphertext is unchanged.

Errors from your proxy

When your proxy answers a request with an error, the error response of Exoscale KMS contains an xks-proxy-error object with two fields:

The specification defines the following errors. Their cause is on your proxy or your external key manager.

error-nameHTTP statusMeaningWhat to check
ValidationException400The proxy considers a parameter of the request invalid.That your proxy implements version 1 of the specification.
InvalidStateException400The external key or the key manager is disabled, deactivated or blocked.The state of the external key in your key manager.
InvalidCiphertextException400Decryption only. The ciphertext, initialization vector, authentication tag or additional authenticated data is invalid. Exoscale KMS returns Invalid ciphertext.That the ciphertext was produced by this KMS key and is unchanged.
InvalidKeyUsageException400The external key does not allow the requested encryption or decryption.That the external key allows both encryption and decryption.
AuthenticationFailedException401The AWS SigV4 signature of the request is invalid.The access key and secret key of the key store, and the region (the zone of the key store) and service name (kms-xks-proxy) configured in your proxy.
AccessDeniedException403The authorization rules of your proxy refused the request, based on its request metadata.The rules of your proxy for the calling principal and the KMS key, described below.
KeyNotFoundException404The external key does not exist in your key manager.The external-key-id of the KMS key.
InvalidUriPathException404The path of the request is not valid on your proxy.The path of the key store endpoint, including its prefix, for example /kms/xks/v1.
ThrottlingException429Your proxy is limiting the rate of requests.The rate limits of your proxy.
InternalException500Your proxy, or a component behind it such as your key manager, failed.The logs of your proxy and of your key manager.
UnsupportedOperationException501Your proxy does not implement the operation, or a parameter exceeds the size it supports.That your proxy implements GetHealthStatus, GetKeyMetadata, Encrypt and Decrypt.
DependencyTimeoutException503Your proxy timed out while reaching a component behind it, such as your key manager.The connection between your proxy and your key manager.

Requests to your proxy carry metadata that your proxy can use to authorize them, and that helps match its logs with your Exoscale requests:

FieldContentSent with
awsPrincipalArnThe ERN of the Exoscale API key or IAM user that made the requestGetKeyMetadata, Encrypt and Decrypt
kmsKeyArnThe ERN of the KMS keyEncrypt and Decrypt
kmsOperationThe Exoscale KMS operation, for example Encrypt, Decrypt, GenerateDataKey, ReEncryptFrom, ReEncryptTo, CreateKey or KmsHealthCheckAll requests
kmsRequestIdThe ID of the Exoscale KMS requestAll requests
Last updated on