]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
feat(ocpp): implement Local Auth List Management Profile (GetLocalListVersion, SendLo...
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 10 Apr 2026 15:58:43 +0000 (17:58 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Apr 2026 15:58:43 +0000 (17:58 +0200)
commit34bbf3346d01f73e6de921bda734f05a029466dd
tree89a3a380622633f1099d2dd3afb94044cae2100f
parent9b06751c87a878d476ed39fb297d0e5ff6e6369f
feat(ocpp): implement Local Auth List Management Profile (GetLocalListVersion, SendLocalList) (#1782)

* feat(ocpp): add local auth list types for OCPP 1.6 and 2.0

* feat(ocpp): add InMemoryLocalAuthListManager implementation

* feat(ocpp): export local auth list types from main types barrel

* feat(ocpp): wire LocalAuthListManager into auth subsystem

* feat(ocpp/2.0): implement GetLocalListVersion and SendLocalList handlers

* docs: mark Local Auth List Management commands as implemented

* style: apply formatting to local auth list test file

* [autofix.ci] apply automated fixes

* fix(ocpp): enforce VersionMismatch and size limits in SendLocalList handlers

* fix(ocpp): address PR review feedback on local auth list implementation

* fix(ocpp): improve robustness and consistency in local auth list handlers

* fix(ocpp): fix config key, atomicity, and version validation in local auth list

* fix(ocpp): harmonize validation ordering and improve type safety in local auth list

* fix(ocpp): add error logging to OCPP 1.6 local auth list catch blocks

* fix(ocpp): use enum values for auth status and fix OCPP 2.0 config key semantics

* refactor(ocpp): rename DEFAULT_IDTAG to OCPP_DEFAULT_IDTAG for consistent naming

* fix(test): use convertToBoolean in mock getLocalAuthListEnabled for production parity

* fix(ocpp): align OCPP16UpdateStatus naming and add maxLocalAuthListEntries validation

* fix(ocpp): gate maxLocalAuthListEntries validation on localAuthListEnabled, not cache

* refactor(ocpp): convert LocalAuthListManager interface from async to sync

* refactor(ocpp): remove redundant async from OCPPAuthServiceImpl.authorize()

* fix(ocpp): remove stale LocalAuthListManager implementation note in RemoteAuthStrategy

* refactor(ocpp): use barrel imports for cross-component boundaries

Replace direct file imports with barrel (index.ts) imports when crossing
component boundaries (ocpp/ → charging-station/, auth/ → ocpp/).
Add Entries to OCPP20RequiredVariableName enum.
Sync LocalAuthListCtrlr.Entries variable after SendLocalList.

* fix(ocpp): update stale JSDoc in MockFactories and AuthComponentFactory

* feat(ocpp-server): add GetLocalListVersion and SendLocalList command support

* fix(test): reuse getConfigurationKey in mock getLocalAuthListEnabled

* refactor(test): use upsertConfigurationKey in OCPP 2.0 local auth list tests

* refactor(ocpp): move readMaxLocalAuthListEntries to AuthHelpers

* refactor(ocpp): move maxLocalAuthListEntries reading to version adapters

* docs: update agent memories with local auth list, QMD integration, and convention fixes

* refactor(ocpp): widen AuthStrategy.authenticate to allow sync return and remove eslint-disable

* fix(test): remove unnecessary async from LocalAuthStrategy test callbacks

* fix(ocpp): address review feedback on volatile Entries, circular dep, and interface

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
46 files changed:
.agents/skills/qmd/SKILL.md [new file with mode: 0644]
.agents/skills/qmd/references/mcp-setup.md [new file with mode: 0644]
.opencode/skills/qmd [new symlink]
README.md
src/charging-station/ocpp/1.6/OCPP16Constants.ts
src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
src/charging-station/ocpp/1.6/OCPP16RequestService.ts
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
src/charging-station/ocpp/1.6/__testable__/index.ts
src/charging-station/ocpp/2.0/OCPP20CertificateManager.ts
src/charging-station/ocpp/2.0/OCPP20Constants.ts
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts
src/charging-station/ocpp/2.0/OCPP20VariableManager.ts
src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts
src/charging-station/ocpp/2.0/__testable__/index.ts
src/charging-station/ocpp/auth/adapters/OCPP16AuthAdapter.ts
src/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.ts
src/charging-station/ocpp/auth/cache/InMemoryLocalAuthListManager.ts [new file with mode: 0644]
src/charging-station/ocpp/auth/factories/AuthComponentFactory.ts
src/charging-station/ocpp/auth/index.ts
src/charging-station/ocpp/auth/interfaces/OCPPAuthService.ts
src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts
src/charging-station/ocpp/auth/strategies/LocalAuthStrategy.ts
src/charging-station/ocpp/auth/strategies/RemoteAuthStrategy.ts
src/charging-station/ocpp/auth/types/AuthTypes.ts
src/charging-station/ocpp/auth/utils/ConfigValidator.ts
src/types/index.ts
src/types/ocpp/1.6/Requests.ts
src/types/ocpp/1.6/Responses.ts
src/types/ocpp/2.0/Requests.ts
src/types/ocpp/2.0/Responses.ts
src/types/ocpp/2.0/Variables.ts
tests/charging-station/helpers/StationHelpers.ts
tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-LocalAuthList.test.ts [new file with mode: 0644]
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-LocalAuthList.test.ts [new file with mode: 0644]
tests/charging-station/ocpp/auth/OCPPAuthIntegration.test.ts
tests/charging-station/ocpp/auth/cache/InMemoryLocalAuthListManager.test.ts [new file with mode: 0644]
tests/charging-station/ocpp/auth/factories/AuthComponentFactory.test.ts
tests/charging-station/ocpp/auth/helpers/MockFactories.ts
tests/charging-station/ocpp/auth/strategies/LocalAuthStrategy-DisablePostAuthorize.test.ts
tests/charging-station/ocpp/auth/strategies/LocalAuthStrategy.test.ts
tests/charging-station/ocpp/auth/strategies/RemoteAuthStrategy.test.ts
tests/ocpp-server/README.md
tests/ocpp-server/server.py
tests/ocpp-server/test_server.py