Skip to content

PRP: Secret extractor for DataBricks User Account OAuth2 Client Credentials #1722

@0xXA

Description

@0xXA
  • Secret name: DataBricks User Account OAuth2 Client Credentials
  • DataBricks Explained:
    • What is DataBricks ?
     Databricks is a cloud-based data & AI platform built on top of Apache Spark.
     It’s designed to help companies store, process, analyze, and build machine learning models using massive amounts of data.
     Think of it as a workspace where data engineers, data scientists, and analysts all work together on big data.
     
     It runs on top of cloud providers like: AWS, Azure, and Google Cloud.
     Companies use Databricks for Big Data Processing, Data Warehousing & Analytics, and Machine Learning & AI.
    
    • What type of accounts are there in DataBricks ?
     There are two types of accounts that are used for authentication:
    
     	User account: For interactive CLI commands and API calls.
     	Service principal: For automated CLI commands and API calls without human interaction.
    
    • Does DataBricks OAuth Client Credentials have a specific format ?
     DataBricks OAuth2 Client Credentials regardless of User Account or Service Principal have the following format:
     	CLientID is UUID like string
     	Client Secret begins with a "dose" prefix followed by an Alphanumeric String. In concret regex terms: dose[a-zA-Z0-9]
    
  • Risk in exposing the secret:
     Leaked OAuth credentials can be used to generate a PAT, which is basically account takeover via API. Depending on the token owner's permissions, an attacker may be able to:
     Access Sensitive Data (customer's private data), Steal Intellectual Property (source code), Destroy or Corrupt Data,
     Run Malicious Workloads, and Move Laterally in the Cloud (S3 and GCS buckets).
    
  • Validation method, if any:
  • Send a POST request to /api/2.0/token/create endpoint with Workspace URL below to as host validate the secret:
    https://accounts.cloud.databricks.com // For AWS
    https://accounts.gcp.databricks.com // For Google Cloud
    https://accounts.azuredatabricks.net // For Microsoft Azure
    One must also include this in the header: OAuth2 Client Credentials and Account id
    We must note that Account id is only required for User Account authentication.
  • If the response code is 200 or 400 or 401, then it's a valid token

Metadata

Metadata

Assignees

No one assigned

    Labels

    PRPPatch Reward Program: This label is added to all PRP related issues for easy filteringPRP:RequestPatch Reward Program: This issue is a PRP contribution request and is being reviewed by the panel.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions