Beta - Indefinitely Databricks Token Lifetime

  • Query id: 7d05ca25-91b4-42ee-b6f6-b06611a87ce8
  • Query name: Beta - Indefinitely Databricks Token Lifetime
  • Platform: Terraform
  • Severity: Medium
  • Category: Insecure Defaults
  • CWE: 307
  • URL: Github

Description

Token has an indefinitely lifetime
Documentation

Code samples

Code samples with security vulnerabilities

Positive test num. 1 - tf file
resource "databricks_token" "positive" {
  provider = databricks.created_workspace
  comment  = "Terraform Provisioning"
}

Code samples without security vulnerabilities

Negative test num. 1 - tf file
resource "databricks_token" "negative" {
  provider = databricks.created_workspace
  comment  = "Terraform Provisioning"
  // 100 day token
  lifetime_seconds = 8640000
}