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
Who does what
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.
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.
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.
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.
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.