Test who can sign with a managed key

Sign a harmless message with a test key, verify the signature and check whether a second identity has signing access.

Before you start

  • Use a dedicated asymmetric signing key in a test organization, project or vault. Record its identifier and version if available, its public key and its signature algorithm. Choose a harmless message rather than a real transaction or release.
  • Use an authorized test operator and a separate identity that should be denied. Keep an administrator with independent access to restore the original test configuration.

Data and access

Shared or checked
The selected key service receives a signing request for the test input. An independent verifier uses the corresponding public key and returned signature.
Check separately
Permission to sign is separate from permission to manage the key and from a verifier’s decision to trust its output.

Who does what

Test administrator
Chooses the disposable key and keeps independent access to restore its policy.
Authorized operator
Requests a new signature with the intended key and algorithm.
Restricted operator
Attempts new signing with the same key while lacking the expected permission. In Turnkey, use a non-root test user.
Verifier
Checks the signature against the expected public key and sample. Verification alone does not grant permission to sign.
  1. Turnkey

    For the disposable signing account, review which activity, key and non-root test users the policy covers. Submit a raw payload signing activity with the encoding and hash setting required by the test key. Keep the original sample and verify the resulting signature with the expected public key using a verifier for that curve. Test policy enforcement with a non-root user because the root quorum can bypass policy.

    Check. The public key verifies the approved sample. Record the activity result for the non-root test user whose permission you are checking.

  2. Google Cloud KMS

    Select an enabled key version with the asymmetric signing purpose. Sign from the authorized identity using the input required by that version’s algorithm. Retrieve the public key for the same version and follow Google’s verification example for that algorithm. Try a fresh signing request from the identity that should lack signing permission.

    Check. The public key for the exact key version verifies the authorized signature. The unpermitted identity produces no fresh signature.

  3. Azure Key Vault

    Call Sign on the disposable key version with the digest and algorithm specified for that key. Use Verify with the same signature, digest and key version, or verify with its public key locally. Try a fresh Sign request from the identity without signing permission.

    Check. The signature verifies for the original digest and key version. The other identity cannot generate a fresh signature.

  4. Separate signature verification from permission

    Use the original signature on a changed copy of the sample and confirm verification fails. Record who could produce a fresh signature. After a permission change, an existing valid signature can still verify with the public key.

    Check. The original signature is valid for the original sample and fails for the changed sample. Record fresh signing access separately.

Check your result

The authorized test operator signs the original sample and the expected public key verifies it. The changed sample fails verification and the unauthorized identity cannot produce a new signature.

How to verify your setup

If you get stuck

Verification passes while the permission test fails

Check the identity that made the new signing request and any inherited grants or administrator exemptions. For a signature mismatch, compare the exact key version, algorithm, hash settings and input bytes.

Report a problem with this guide

Explore all setup guides →