Skip to content

Security: OCPP AuthorizationKey is readable via GetConfiguration and logged on telnet #203

Closed

Description

@basmeerman

Incident context

Incident context (shared by all five): on 2026-10-04 05:45 a local OpenVAS scan ran against
the LAN. Both units (7388 master, 7803 slave, bm-2026.09.5) stayed associated to the AP
(UniFi "online") but stopped answering ARP, ping, HTTP, telnet. Charging via RFID kept
working. A UniFi "reconnect client" on 2026-10-05 ~19:40 restored the network without a reboot
(OCPP counters were not reset). Two sessions charged during the outage never reached
e-Flux (ocpp_tx_id: 0 in /session/last) and had to be replayed by hand.

Problem

MicroOcppMongooseClient.cpp:122 declares AuthorizationKey with the default
accessible = true, so GetConfiguration returns the key value to the backend. In debug builds
the reply is printed on the telnet console ([MO] Send: ...), which has no authentication. In the
2026-10-05 capture the line was truncated by the console before the value, but that depends on
key order and line length. OCPP 1.6 security whitepaper: AuthorizationKey is write-only, and a read
must not return the value. This also conflicts with the CLAUDE.md "never log secrets" rule (C-5).

Specification

Scenario: GetConfiguration does not disclose the key
  Given AuthorizationKey is set
  When the backend sends GetConfiguration (all keys or AuthorizationKey explicitly)
  Then the key is either omitted or returned with an empty value

Scenario: console traffic log redacts the key
  Given a debug build with MO traffic logging
  When any frame containing "AuthorizationKey" is logged
  Then the value is redacted

Acceptance criteria

🤖 Generated with Claude Code

Activity

  1. added 2 commits that reference this issue on Oct 5, 2026
  2. basmeerman commented on Oct 5, 2026

    @basmeerman
    OwnerAuthor

    Fixed in #206, released in bm-2026.10.1 and installed on both units (2026-10-05). The fix has not yet been exercised by a real incident on hardware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions