Skip to main content
Keypair secrets store asymmetric key pairs (public and private keys) with optional passphrase protection. Use them for SSH authentication, JWT signing, encryption, or any cryptographic operation requiring public-key infrastructure.

Use Cases

  • SSH Authentication: Store SSH keys for accessing remote servers or Git repositories
  • JWT Signing: Sign and verify JSON Web Tokens for API authentication
  • Encryption/Decryption: Encrypt data with the public key, decrypt with the private key
  • Code Signing: Sign artifacts to verify authenticity and integrity
  • Secure Communication: Establish encrypted channels between services

Configuration Options

FieldDescriptionRequired
secretKeyPrivate key in PEM formatYes
publicKeyPublic key in PEM formatYes
passphrasePassphrase for encrypted private keysNo
Both keys must be PEM-encoded. The private key can be encrypted with a passphrase—if so, provide the passphrase so your workload can use the key.

Create a Keypair Secret

1

Navigate to Secrets

In the Console, navigate to Secrets and click New, or use the Create dropdown in the top-right corner and select Secret.
2

Enter basic information

Enter a Name and optional Description.
3

Select secret type

Select Keypair as the secret type.
4

Configure key data

Click Data in the left pane. For Secret Key, drag and drop your private key file or click to import. For Public Key, drag and drop your public key file or click to import. Enter the Passphrase if the private key is encrypted (optional).
5

Create the secret

Click Create.

Generating Key Pairs

RSA Keys

# Generate a 4096-bit RSA private key
openssl genrsa -out private_key.pem 4096

# Extract the public key
openssl rsa -in private_key.pem -pubout -out public_key.pem

# With passphrase protection
openssl genrsa -aes256 -out private_key.pem 4096

Ed25519 Keys (for SSH)

# Generate an Ed25519 keypair
ssh-keygen -t ed25519 -f my_key -C "my-workload"

# Convert to PEM format if needed
ssh-keygen -p -m PEM -f my_key

ECDSA Keys

# Generate an ECDSA private key (P-256 curve)
openssl ecparam -genkey -name prime256v1 -out private_key.pem

# Extract the public key
openssl ec -in private_key.pem -pubout -out public_key.pem
For JWT signing, RSA with 2048 or 4096 bits and ECDSA P-256 are common choices. Ed25519 offers excellent security with smaller key sizes.

Best Practices

For RSA, use at least 2048 bits (4096 recommended). For ECDSA, use P-256 or higher curves.
Always encrypt private keys with a strong passphrase when storing them, adding an extra layer of protection.
Establish a key rotation schedule. When rotating, update the secret and ensure workloads can handle the transition.
Use Control Plane policies to restrict which workloads can access the keypair. Only services that need to sign or decrypt should have access.

Next Steps