Cryptographic keys that protect access tokens must be protected.

STIG ID: SRG-APP-000965-API-001655  |  SRG: SRG-APP-000965 |  Severity: medium |  CCI: CCI-005156,CCI-000366 |  Vulnerability Id: V-274839

Vulnerability Discussion

Cryptographic keys are used to sign and verify access tokens, ensuring they have not been tampered with and that the user or service presenting the token is legitimate. If these keys are not securely managed, attackers could generate fraudulent tokens, bypass security controls, and gain unauthorized access to sensitive data or services. The API must protect these keys from disclosure or misuse, employing best practices such as key rotation, secure storage, and limiting access to only trusted entities. This minimizes the risk of key compromise, ensures tokens remain valid and trustworthy, and helps maintain the confidentiality and integrity of the authentication system.

By securing the cryptographic keys, the API mitigates the potential for security breaches and upholds a strong defense against various attack vectors.

Check

To check if cryptographic keys that protect access tokens are properly protected in an API:

1. Verify a proper key management system (KMS) is in place to generate, store, and rotate cryptographic keys.

2. Verify that keys are generated and stored using best practices, ensuring they are never exposed in plaintext.

3. Verify keys are stored securely.

4. Verify keys are not hardcoded in application code or exposed in configuration files.

5. Review who and what services have access to the cryptographic keys. Verify only authorized users or services (e.g., API services) have access to them.

6. Verify key rotation procedures are in place, and cryptographic keys are rotated regularly to mitigate the risk of key compromise.

7. Confirm that any access to or usage of cryptographic keys is logged and auditable. This should include who accessed the key, when, and for what purpose.

8. Review the API's documentation to ensure that cryptographic keys are managed and protected according to security guidelines (e.g., NIST, FIPS).

If cryptographic keys are not properly protected, this is a finding.

Fix

Build or configure the API to properly protect cryptographic keys that protect access tokens.