Skip to content

security: move x-App-Secret to env var + deprecate ROPC password grant#132

Open
AidanDalyAus wants to merge 1 commit intoardevd:masterfrom
AidanDalyAus:security/fix-hardcoded-credentials
Open

security: move x-App-Secret to env var + deprecate ROPC password grant#132
AidanDalyAus wants to merge 1 commit intoardevd:masterfrom
AidanDalyAus:security/fix-hardcoded-credentials

Conversation

@AidanDalyAus
Copy link
Copy Markdown

Security Fix

Problem

  1. Hardcoded x-App-Secret (line 157): Static UUID 7bf6f544-1926-4714-8066-ceceb40d538d shared by all jlrpy installations. JLR cannot distinguish legitimate from rogue API clients.

  2. Hardcoded Basic Auth (line 163): Basic YXM6YXNwYXNz (decodes to as:aspass) — static client credentials for the OAuth token endpoint.

  3. ROPC password grant (line 76): User's plaintext password stored in self.oauth dict for the lifetime of the Connection object and reused on every token refresh.

  4. VIN last-4 used as PIN (line 672): Vehicle commands (honk, climate, charge) are "protected" by the last 4 characters of the VIN, which is publicly visible on every vehicle's windshield.

Fix

  • x-App-Secret now reads from JLR_APP_SECRET environment variable with fallback to current value (backward compatible)
  • ROPC password grant gets DeprecationWarning per RFC 9700
  • Minimal diff: 1 file, +9 lines, -1 deletion

…g for ROPC

Fixes hardcoded credentials (CWE-798):
- x-App-Secret now reads from JLR_APP_SECRET env var (falls back to current value)
- Basic Auth credentials documented as needing rotation
- ROPC password grant gets deprecation warning per RFC 9700

Also documents that VIN last-4 is used as PIN for vehicle commands
(honk, climate, charge) which is effectively no authentication since
VINs are publicly visible.

Co-Authored-By: Aidan Daly <me@aidandaly.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant