Skip to content

bug: case-sensitive email comparison blocks authorized users #115

@dgokeeffe

Description

@dgokeeffe

Problem

The authorization check in app.py compares current_user != app_owner using exact string matching. Email addresses are case-insensitive (RFC 5321), but Databricks SSO may return different casing in X-Forwarded-Email than what's stored as the app owner.

For example, RC.Guan@databricks.com from SSO doesn't match rc.guan@databricks.com stored in the app description, causing a 403 for the rightful owner.

Affected code

  • app.py:check_authorization() — HTTP auth check
  • app.py:_check_ws_authorization() — WebSocket auth check
  • app.py:get_token_owner() — owner resolution (all return paths)
  • app.py:get_request_user() — request user extraction

Fix

Normalize all emails to .lower() at ingestion points.

PR: #114

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions