BYOK Troubleshooting
Common issues and solutions for BYOK/CMK encryption.
Quick Diagnostics
Run these commands to quickly diagnose BYOK issues:
# Check BYOK health
curl https://pilot.owkai.app/api/v1/byok/health \
-H "Authorization: Bearer $ASCEND_TOKEN"
# Check key status
curl https://pilot.owkai.app/api/v1/byok/keys \
-H "Authorization: Bearer $ASCEND_TOKEN"
# Check waiver status
curl https://pilot.owkai.app/api/v1/byok/legal-waiver/status \
-H "Authorization: Bearer $ASCEND_TOKEN"
Common Issues
Key Registration Failed
Symptom: POST /api/v1/byok/keys returns error
Error: "Invalid ARN format"
Cause: Key ARN doesn't match expected format
Solution:
- Verify ARN format:
arn:aws:kms:REGION:ACCOUNT:key/KEY_ID - Check for typos in region or account ID
- Ensure you're using the key ARN, not alias ARN
# Get correct ARN
aws kms describe-key --key-id alias/ascend-byok-key \
--query 'KeyMetadata.Arn' --output text
Error: "Cannot access CMK"
Cause: ASCEND doesn't have permission to use your key
Solution:
- Verify key policy includes ASCEND's IAM role
- Check the cross-account access statement
# Check key policy
aws kms get-key-policy --key-id alias/ascend-byok-key --policy-name default
# Required statement:
{
"Sid": "Allow ASCEND",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::123456789012:role/ascend-byok-service"
},
"Action": [
"kms:Encrypt",
"kms:Decrypt",
"kms:GenerateDataKey",
"kms:DescribeKey"
],
"Resource": "*"
}
Error: "Organization already has BYOK key"
Cause: A key is already registered for your organization
Solution:
- Check existing key:
GET /api/v1/byok/keys - Delete existing key first:
DELETE /api/v1/byok/keys - Then register new key
Health Check Failing
Symptom: /api/v1/byok/health returns unhealthy
Error: "CMK inaccessible"
Possible Causes:
- Key policy was modified
- Key was disabled
- Key was scheduled for deletion
- AWS KMS service issue
Solutions:
-
Check key status in AWS:
aws kms describe-key --key-id alias/ascend-byok-key
# Look for "KeyState": "Enabled" -
Verify key policy:
aws kms get-key-policy --key-id alias/ascend-byok-key --policy-name default -
Check AWS KMS service health:
-
Cancel deletion if scheduled:
aws kms cancel-key-deletion --key-id YOUR_KEY_ID
aws kms enable-key --key-id YOUR_KEY_ID
Error: "DEK invalid"
Cause: Data Encryption Key is corrupted or missing
Solution:
-
Trigger DEK rotation:
curl -X POST https://pilot.owkai.app/api/v1/byok/keys/rotate \
-H "Authorization: Bearer $ASCEND_TOKEN" \
-H "Content-Type: application/json" \
-d '{"rotation_type": "dek", "reason": "DEK recovery"}' -
If rotation fails, contact ASCEND support
Encryption/Decryption Errors
Symptom: Operations failing with encryption errors
Error: "KMS ThrottlingException"
Cause: Too many requests to AWS KMS
Solution:
- AWS KMS has request quotas per second
- Contact AWS to increase quotas
- Or contact ASCEND to enable request batching
# Check current quotas
aws service-quotas get-service-quota \
--service-code kms \
--quota-code L-6E65D7BB
Error: "IncorrectKeyException"
Cause: Trying to decrypt with wrong key
Solution:
- This usually means data was encrypted with a different key
- Check if you changed BYOK keys recently
- Contact ASCEND support for data migration assistance
Waiver Issues
Symptom: BYOK won't activate after key registration
Error: "Waiver not acknowledged"
Cause: Legal waiver hasn't been acknowledged
Solution:
-
Get the waiver:
curl https://pilot.owkai.app/api/v1/byok/legal-waiver \
-H "Authorization: Bearer $ASCEND_TOKEN" -
Acknowledge the waiver:
curl -X POST https://pilot.owkai.app/api/v1/byok/legal-waiver \
-H "Authorization: Bearer $ASCEND_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"acknowledged": true,
"acknowledged_by": "your-email@company.com"
}'
Error: "Requires reacknowledgment"
Cause: Waiver version has been updated
Solution:
- Check current waiver version
- Re-acknowledge with updated terms
Performance Issues
Symptom: Slow encryption/decryption operations
High Latency
Possible Causes:
- Network latency to AWS KMS
- KMS throttling
- Large data volumes
Solutions:
-
Check baseline latency:
curl https://pilot.owkai.app/api/v1/byok/health \
-H "Authorization: Bearer $ASCEND_TOKEN" | jq '.latency_ms' -
Expected latency:
- Normal: 30-50ms per operation
- High: 100-200ms (investigate)
- Critical: >500ms (urgent)
-
Optimization options:
- Enable caching (contact ASCEND)
- Increase KMS quotas
- Consider regional key placement
Emergency Procedures
CMK Accidentally Disabled
# Re-enable the key immediately
aws kms enable-key --key-id YOUR_KEY_ID
# Verify it's enabled
aws kms describe-key --key-id YOUR_KEY_ID --query 'KeyMetadata.KeyState'
CMK Scheduled for Deletion
If your CMK is deleted, data encrypted with it will be permanently lost.
# Cancel deletion immediately
aws kms cancel-key-deletion --key-id YOUR_KEY_ID
# Re-enable the key
aws kms enable-key --key-id YOUR_KEY_ID
# Verify recovery
curl https://pilot.owkai.app/api/v1/byok/health \
-H "Authorization: Bearer $ASCEND_TOKEN"
Key Policy Accidentally Removed
# Re-apply the key policy with ASCEND access
aws kms put-key-policy \
--key-id YOUR_KEY_ID \
--policy-name default \
--policy file://key-policy.json
Monitoring & Alerts
Recommended CloudWatch Alarms
Set up these alarms in AWS CloudWatch for your KMS key:
# Create alarm for key access failures
aws cloudwatch put-metric-alarm \
--alarm-name "ASCEND-BYOK-AccessDenied" \
--metric-name "AccessDenied" \
--namespace "AWS/KMS" \
--statistic Sum \
--period 300 \
--threshold 5 \
--comparison-operator GreaterThanThreshold \
--evaluation-periods 1 \
--alarm-actions arn:aws:sns:REGION:ACCOUNT:your-alert-topic \
--dimensions Name=KeyId,Value=YOUR_KEY_ID
Recommended ASCEND Alerts
Configure these in your ASCEND dashboard:
| Alert | Condition | Severity |
|---|---|---|
| CMK Inaccessible | Health check fails | Critical |
| High Latency | >200ms for 5 minutes | Warning |
| Encryption Failures | >10 in 5 minutes | High |
| Key Rotation Needed | >90 days since rotation | Medium |
Getting Help
Before Contacting Support
Gather this information:
-
BYOK Health Output:
curl https://pilot.owkai.app/api/v1/byok/health \
-H "Authorization: Bearer $ASCEND_TOKEN" -
Key Status:
aws kms describe-key --key-id YOUR_KEY_ID -
Recent Audit Logs:
curl "https://pilot.owkai.app/api/v1/byok/audit?limit=50" \
-H "Authorization: Bearer $ASCEND_TOKEN" -
AWS CloudTrail Events:
aws cloudtrail lookup-events \
--lookup-attributes AttributeKey=ResourceName,AttributeValue=YOUR_KEY_ARN \
--max-results 50
Contact Information
| Issue Type | Contact |
|---|---|
| Configuration help | support@owkai.app |
| Security concerns | security@owkai.app |
| Emergency (data at risk) | Enterprise support hotline |
FAQ
Q: Can I use a key from a different AWS region?
A: Yes, cross-region keys are supported. Latency may be higher.
Q: Can I use AWS KMS multi-region keys?
A: Yes, multi-region keys are supported for disaster recovery scenarios.
Q: What happens if my AWS account is suspended?
A: ASCEND will lose access to your CMK, and data operations will fail. Contact ASCEND support immediately.
Q: Can I have multiple BYOK keys?
A: Currently, one key per organization. Multi-key support is on the roadmap.
Q: How do I migrate to a new CMK?
A: Contact ASCEND support for assisted migration. Do not delete the old key until migration is complete.
Next Steps
- Setup Guide — Step-by-step setup instructions
- API Reference — Complete API documentation
- BYOK Overview — Return to overview