Problem
In app.py, if app_owner can't be resolved (SDK unavailable, token invalid, network error), the auth check allows all access:
def check_authorization():
if not app_owner:
return True, None # ← fails open
This means if the Databricks SDK fails to resolve the token owner at startup, the app runs with no authentication — anyone with the URL can access the terminal and all coding agents.
Expected behavior
Should fail closed: if the owner can't be determined, deny all access. Better to have a broken app than an open terminal with a PAT.
Fix
- If
app_owner is None and we're running on Databricks Apps (not local dev), return False
- Allow the fail-open behavior only for local development (
DATABRICKS_APP_PORT not set or similar)
Impact
Any user who can reach the app URL gets full terminal access with the PAT owner's credentials, including:
- Databricks workspace access
- AI Gateway / model serving
- Unity Catalog data access
- Shell execution
Problem
In
app.py, ifapp_ownercan't be resolved (SDK unavailable, token invalid, network error), the auth check allows all access:This means if the Databricks SDK fails to resolve the token owner at startup, the app runs with no authentication — anyone with the URL can access the terminal and all coding agents.
Expected behavior
Should fail closed: if the owner can't be determined, deny all access. Better to have a broken app than an open terminal with a PAT.
Fix
app_ownerisNoneand we're running on Databricks Apps (not local dev), returnFalseDATABRICKS_APP_PORTnot set or similar)Impact
Any user who can reach the app URL gets full terminal access with the PAT owner's credentials, including: