For Agents
Manage Google Cloud encryption keys and perform encrypt, decrypt, sign, verify, and key-rotation operations. Useful for at-rest encryption, signing, and secrets-protection workflows on GCP.
Use for: I need to encrypt a customer secret with our shared KMS key, Decrypt a stored ciphertext blob for processing, Sign a JWT payload using our asymmetric KMS key, Rotate the primary version on our database encryption key
Not supported: Does not store application secrets, manage user credentials, or issue TLS certificates - use for cryptographic key management and crypto operations only.
Google Cloud KMS is the managed service for cryptographic keys and operations on Google Cloud. The API exposes key rings, crypto keys, key versions, import jobs, and EKM connections, along with cryptographic operations such as encrypt, decrypt, asymmetric sign, asymmetric decrypt, and MAC sign and verify. Agents can rotate keys, restore destroyed key versions within the destruction window, generate cryptographically random bytes, and retrieve a key version's public key for asymmetric verification.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Cloud Key Management Service (KMS) API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fgoogleapis.com%2Fcloudkms" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fgoogleapis.com%2Fcloudkms" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Cloud Key Management Service (KMS) API.
Encrypt and decrypt arbitrary payloads with a symmetric key version
Sign and verify payloads using asymmetric crypto keys
Asymmetrically decrypt ciphertext using a private key version
Rotate, destroy, restore, and disable individual key versions
Generate cryptographically random bytes via the dedicated random endpoint
Retrieve a key version's public key for offline verification
Configure import jobs and EKM connections for external key material
Patterns agents use Cloud Key Management Service (KMS) API for, with concrete tasks.
★ Application-Level Envelope Encryption
Backend services use Cloud KMS to encrypt a per-record data encryption key (DEK) under a KMS-managed key encryption key (KEK), then store the wrapped DEK alongside the ciphertext. The encrypt and decrypt endpoints handle the wrap and unwrap; the underlying KEK never leaves Google's HSMs. Setup is small, and the pattern scales to millions of records without exposing key material to the application.
Call POST /v1/{name}:encrypt on the crypto key with the plaintext DEK, store the returned ciphertext, then POST /v1/{name}:decrypt when the DEK is needed
Programmatic Key Rotation
Compliance pipelines rotate encryption keys on a fixed schedule by patching the crypto key to set a new primary version, or by creating a new version and updating dependent services. Cloud KMS retains old versions so previously encrypted data continues to decrypt, and the rotation event is audit-logged for compliance evidence.
Call PATCH on the crypto key resource with primaryVersion set to the new version name, then verify with GET on the crypto key
Asymmetric Signing for JWTs and Code
Services that issue JWTs or sign release artefacts use asymmetricSign with an EC or RSA key version. The private key never leaves Google's HSMs; verifiers download the public key once via getPublicKey and verify offline. This eliminates a class of key-leakage risk and gives a fully audit-logged signing surface.
Call POST /v1/{name}:asymmetricSign on the EC key version with the digest, then publish the public key returned by /v1/{name}/publicKey
AI Agent Crypto Operator via Jentic
An agent invoked by a security engineer searches Jentic for the right Cloud KMS operation, performs an encrypt or sign on behalf of a calling service, and returns the result. Through Jentic, the agent never holds the underlying service account key - Jentic injects a scoped token at execution time so cryptographic operations leave a clear audit trail.
Search Jentic for 'encrypt with google cloud kms', execute against POST /v1/{name}:encrypt with the plaintext, and return the resulting ciphertext
34 endpoints — google cloud kms is the managed service for cryptographic keys and operations on google cloud.
METHOD
PATH
DESCRIPTION
/v1/{+name}:encrypt
Encrypt plaintext with a crypto key
/v1/{+name}:decrypt
Decrypt ciphertext with a crypto key
/v1/{+name}:asymmetricSign
Sign a digest with an asymmetric key version
/v1/{+name}:asymmetricDecrypt
Decrypt with an asymmetric private key version
/v1/{+name}:destroy
Schedule a crypto key version for destruction
/v1/{+location}:generateRandomBytes
Generate cryptographically random bytes
/v1/{+name}/publicKey
Retrieve the public key of an asymmetric key version
/v1/{+name}
Update a crypto key, including its primary version
/v1/{+name}:encrypt
Encrypt plaintext with a crypto key
/v1/{+name}:decrypt
Decrypt ciphertext with a crypto key
/v1/{+name}:asymmetricSign
Sign a digest with an asymmetric key version
/v1/{+name}:asymmetricDecrypt
Decrypt with an asymmetric private key version
/v1/{+name}:destroy
Schedule a crypto key version for destruction
/v1/{+location}:generateRandomBytes
Generate cryptographically random bytes
/v1/{+name}/publicKey
Retrieve the public key of an asymmetric key version
/v1/{+name}
Update a crypto key, including its primary version
What agents get from Jentic-routed access to this vendor.
Setup
Wiring the Cloud KMS API by hand means setting up Google OAuth 2.0, minting short-lived tokens against the cloudkms scope, and addressing each key by resource name against cloudkms.googleapis.com yourself. Through Jentic you install once, import the Cloud KMS API from the API Directory, store the OAuth credential once, and your agent calls it.
Permission scoping
Cloud KMS puts the key resource name in the URL path (/v1/{+name}:encrypt, /v1/{+name}:decrypt), so a rule can pin your agent to one key: it can encrypt and decrypt with that key and nothing else. You choose the operations it may call, so key-version destroy or asymmetric signing are not included unless you add them.
Credential isolation
Your Cloud KMS OAuth credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'encrypt data with Cloud KMS' or 'get a key's public key', and Jentic returns the matching Cloud KMS operation with its input schema so the agent calls the right endpoint without browsing the reference docs.
Alternatives and complements available in the Jentic catalogue.
Specific to using Cloud Key Management Service (KMS) API through Jentic.
What authentication does the Cloud KMS API use?
The Cloud KMS API uses OAuth 2.0 with the cloudkms or cloud-platform scope. Tokens are issued for a Google service account or end user and the caller must hold the appropriate cloudkms.cryptoKeyEncrypterDecrypter or related role. Through Jentic, the OAuth credential lives in your Jentic One instance and the agent receives a short-lived access token only - the underlying credential never enters agent context.
Can I encrypt and decrypt data with this API?
Yes. POST /v1/{name}:encrypt with a base64 plaintext on a symmetric crypto key returns ciphertext; POST /v1/{name}:decrypt reverses it. The same key resource is used for both operations, and Cloud KMS automatically uses the primary version for encryption while still able to decrypt with any prior version.
What are the rate limits for the Cloud KMS API?
Cloud KMS quotas are published per-method in the Google Cloud console under the Cloud KMS API quota page; typical defaults are several thousand cryptographic operations per minute per project, with lower limits on key creation and import-job operations. HSM-protected keys have separate, lower quotas than software keys.
How do I rotate a key through Jentic?
Search Jentic for 'rotate google cloud kms key' and execute the returned operation against PATCH /v1/{name} on the crypto key with primaryVersion set to a new version name. Existing ciphertext continues to decrypt with the old version while new encryptions use the new primary.
Can I generate cryptographically random bytes with Cloud KMS?
Yes. POST /v1/{location}:generateRandomBytes with a length and a protectionLevel (SOFTWARE or HSM) returns a base64-encoded random byte string. This is useful for generating session tokens, salts, or DEKs without trusting client-side RNGs.
Is Cloud KMS free?
Cloud KMS charges per active key version per month plus per cryptographic operation, with HSM-protected keys priced higher than software keys; the full schedule is documented on the Cloud KMS pricing page. EKM and external key material have their own pricing tiers.
GET STARTED