๐ก๏ธ Azure Databricks Personal Access Tokens (PATs) are not restricted and expirable๐ขโช
- Contextual name: ๐ก๏ธ Databricks Personal Access Tokens (PATs) are not restricted and expirable๐ขโช
- ID:
/ce/ca/azure/databricks/personal-access-tokens - Tags:
- โช Impossible policy
- ๐ข Policy with categories
- ๐ข Policy with type
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Descriptionโ
Descriptionโ
Databricks personal access tokens (PATs) provide API-based authentication for users and applications. By default, users can generate API tokens without expiration, leading to potential security risks if tokens are leaked, improperly stored, or not rotated regularly.
To mitigate these risks, administrators should:
- Restrict token creation to approved users and service principals.
- Enforce expiration policies to prevent long-lived tokens.
- Monitor token usage and revoke unused or compromised tokens.
Rationaleโ
Restricting usage and enforcing expiry for personal access tokens reduces exposure to long-lived tokens, minimizes the risk of API abuse if compromised, and aligns with security best practices through controlled issuance and enforced expiry.
Impactโ
If revoked improperly, applications relying on these tokens may fail, requiring a remediation plan for token rotation. Increased administrative effort is required to track and manage API tokens effectively.
Auditโ
Azure Databricks administrators can monitor and revoke personal access tokens within their workspace. Detailed instructions are available in the "Monitor and Revoke Personal Access Tokens" section of the Microsoft documentation: https://learn.microsoft.com/en-us/azure/databricks/admin/access-control/tokens. To evaluate token usage, use the provided notebook that lists PATs not rotated or updated in the last 90 days, which helps identify tokens that may require revocation. This process is detailed here: https://docs.azure.cn/en-us/databricks/security/auth/oauth-pat-usage. Implementing diagnostic logging provides a comprehensive reference of audit log services and events and helps track activities related to personal access tokens. More information is available in the diagnostic log reference section: https://docs.azure.cn/en-us/databricks/security/auth/oauth-pat-usage.
... see more
Remediationโ
Remediationโ
From Azure Portalโ
Disable personal access tokens:
If your workspace does not require PATs, you can disable them entirely to prevent their use.
- Navigate to the Azure Databricks workspace.
- Click the
Settingsicon and selectAdmin Console.- Go to the
Advancedtab.- Under
Personal Access Tokens, set the toggle toDisabled.Databricks CLI:
databricks workspace-conf set-status --json '{"enableTokens": "false"}'Control who can create and use personal access tokens:
Define which users or groups are authorized to create and use PATs.
- Navigate to the Azure Databricks workspace.
- Click the
Settingsicon and selectAdmin Console.- Go to the
Advancedtab.- Click
Personal Access Tokens, thenPermissions.- Assign the appropriate permissions (e.g., No Permissions, Can Use, Can Manage) to users or groups.
Set maximum lifetime for new personal access tokens:
Limit the validity period of new tokens to reduce potential misuse.
Databricks CLI:
databricks workspace-conf set-status --json '{"maxTokenLifetimeDays": "90"}'
... [see more](remediation.md)
policy.yamlโ
Linked Framework Sectionsโ
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| ๐ผ CIS Azure v5.0.0 โ ๐ผ 2.1.6 Ensure that usage is restricted and expiry is enforced for Databricks personal access tokens (Manual) | 1 | no data | |||
| ๐ผ Cloudaware Framework โ ๐ผ Secure Access | 75 | no data |