Project Overview

SecCharge: Secure Electric Vehicle Ecosystem for Smart Grid is a secure, multi‑tier electric‑mobility platform that enables end‑to‑end EV charging services—from user onboarding and reservations to authorization, charging session orchestration, metering, billing, and third‑party settlement.
The platform evolved through several iterations (2014–2017), with the Improved SecCharge System (2017) strengthening the architecture around a Spring‑based Application Server, JWT‑secured APIs, Angular single‑page web client, Android mobile clients (including an embedded AEV client), and a Control Center (CC) implementing Open Charge Point Protocol (OCPP) for wired and wireless charging stations (CS/WCS). A dedicated Authentication Server validates EV credentials (contract certificates), and a database persists operational and billing data. The improved version also clarifies domain entities (Network Provider, Charging Station Site, Charging Station/ports, charger/connector types) and maps them to operational policies (business hours, electricity prices, reservation slots).

This document synthesizes the complete SecCharge specification—System Architecture, System Implementation, Use Cases, and User Requirements—and emphasizes the 2017 Improved SecCharge where it supersedes earlier design choices. We preserve the 2014–2016 content for historical completeness and traceability, especially around ISO/IEC 15118 V2G PKI‑based authorization and detailed OCPP transaction flows.

System Architecture

High‑Level Topology (2017)

The Improved SecCharge architecture organizes the platform into the following components, interacting primarily via REST over HTTP(S):

  • Web App (Angular SPA): Single‑page application for participating users (search, reservation, charging control, trip planning) and service‑provider functions (manage sites/stations). End‑to‑end testing leverages Protractor.
  • Android Mobile App: Parity with the web app for participating users.
  • AEV Android App: Embedded in the vehicle (on a Raspberry Pi for demo). Monitors the vehicle State‑of‑Charge (SoC) and proactively reserves a station when the SoC drops below a critical threshold; not distributed to end users.
  • Application Server (Spring Boot): The transactional heart of SecCharge. Exposes REST APIs to clients and backend services. Responsible for all database CRUD, enforces endpoint security, and applies JWT‑based stateless authentication/authorization. Cross‑origin access is handled via CORS policies; REST API documentation is auto‑generated via Swagger.
  • Authentication Server (EV Only): Validates EV contract certificates sent by CS via CC and App Server; only authenticated EVs can start charging.
  • Control Center (CC): Manages protocol exchanges with Charging Stations (CS) and Wireless Charging Stations (WCS) using OCPP; forwards telemetry such as SoC and executes remote start/stop transactions.
  • CS/WCS (Raspberry Pi): Field gateways executing port control, local authorization, and periodic telemetry. On EV connection, the station sends the EV authentication certificate (for EVs) and SoC readings.
  • Database Server: Durable storage for users, assets (provider/site/station/ports), reservations, prices, and session/transaction/billing artifacts.

Compared to the legacy layout, the 2017 revision formalizes the provider→site→station→port hierarchy and attaches business hours and electricity prices to each site; charger energy levels (LEVEL1, LEVEL2, DCFAST, and WIRELESS) and connector types are modeled explicitly, enabling richer search and reservation flows.


Security Model

SecCharge's defense‑in‑depth is layered as follows:

  • Transport Security: HTTP(S) for client–server; HTTPS with SSL/TLS for third‑party payment integrations.
  • API Security: Spring Security guards endpoints; per‑endpoint authorization via ant‑matchers; JWT (JSON Web Token) conveys authenticated identity, roles, and claims for stateless, horizontally scalable sessions.
  • Error Handling: Centralized @RestControllerAdvice‑based exception handling provides consistent client feedback; ResponseStatusException accelerates prototyping of typed API errors.
  • Credential Hygiene: BCrypt (adaptive, slow hashing) hardens password storage against brute‑force attacks; parameterized strength settings align with policy and hardware capabilities.
  • Identity & Certificates (EV): For EV‑side identification, SecCharge adopts ISO/IEC 15118's V2G PKI model: EVs receive contract certificates from an issuing CA (under a global V2G Root/Regional Sub‑CA trust chain). Contract certificates support Plug‑and‑Charge identification; External Identification Means (EIM) is also supported for non‑PnC flows. SecCharge's Authentication Server validates certificates and binds EV↔user for charging authorization.

Legacy Architectural Baseline (2015)

The earlier architecture established core tiers (Java 7, Spring MVC, Tomcat 7, Oracle 11g) and communication patterns (REST/HTTPS between clients and the server; SQL over TCP/IP to the database; OCPP between CC and stations; TCP/Web APIs to payment providers). It modeled integration with home charging, the Control Server, and payment/authorization flows—providing the foundation refined in the 2017 improved variant.

System Implementation

Application Server (Spring Boot)

  • CORS Policies: Configured to permit approved origins for web/mobile front ends; preflight and method restrictions are enforced.
  • Swagger/OpenAPI: Auto‑documents REST endpoints; developers browse .../swagger-ui.html to explore and test.
  • Endpoint Security: Custom HttpSecurity config secures sensitive routes; anonymous/public endpoints (e.g., login) are whitelisted; all other routes require authentication.
  • JWT Auth Flow: (1) Client posts credentials; (2) Server validates, issues a signed JWT with user profile and roles; (3) Client includes bearer token in Authorization header for subsequent calls; (4) Token expiry prompts refresh/login; (5) Server remains stateless.
  • Global Error Handling: Central GlobalExceptionHandler handles validation/constraint violations; other exceptions mapped with ResponseStatusException when appropriate.
  • Password Storage: BCryptPasswordEncoder with policy‑aligned strength; migration hooks for future algorithms.
  • Reservation APIs: Search CSSs within a radius with optional filters (charger/connectors); return site metadata (business hours, provider, price vectors) and proceed to slot selection (multi‑slot reservations).

Control Center (OCPP) and Station Integration

  • OCPP Operations implemented/benchmarked against Syntronic charging stations include Authorize, StartTransaction, StopTransaction, MeterValues, Heartbeat, and BootNotification.
  • The 2016 work itemized each operation's required fields, expected OCPP behavior, and current implementation gaps. Where physical meters were unavailable, the system computed session energy from start/stop timestamps as an interim measure.
  • The CC mediates between the App Server and EVSE, forwarding remote start/stop and returning status/telemetry to the application tier.

Trip/Route Planning

  • Trip planning combines Google Directions alternatives with SoC‑aware critical points detection. For each route, the system identifies locations ~25 km before each critical point and finds CSs within a 10 km radius.
  • Users refine the candidates by charger attributes, prices, and availability to choose a feasible, cost‑aware path.

Third‑Party Payment

  • A reference integration demonstrates secure, account‑linked third‑party billing via an HTTPS client to a partner REST API.
  • Features include user verification, account CRUD, periodic usage export, and synchronized address/account updates.
  • Failure modes (invalid details, partner service outage) return clear UI states; successful verification transitions inputs to read‑only prior to submission.

Representative Use Cases

Mobile & Web

  • UC‑1.1 Login: Role‑based entry point with lockout after repeated failures; successful authentication lands the user on a personalized dashboard.
  • UC‑1.2 Find a Charging Station: Triggered by low SoC or by user intent; supports basic and advanced search (charger/connector types), reservation and trip planning handoffs.
  • Start/Cancel Charging: After reservation and pre‑authorization, the user confirms Start; CC unlocks the port and SoC telemetry renders as a live graph. Cancel frees the port and clears pre‑authorization.
  • Trip Planning: Enter origin/destination, review recommended routes with critical‑point clusters and nearby candidate stations; refine by price and attributes; inject chosen CSs into the route.
  • Manage Payments: Add/edit/delete third‑party accounts; verify via partner API; view billing history and invoices.

Administrative

  • SecCharge Administrator (SA): Add/modify/delete user accounts; reset passwords; audit actions.
  • Charging Station Administrator (CSA): Commission/decommission stations; update site/station metadata (address, power, price, comms capabilities).

EV/AEV Automations

  • AEV SoC‑Driven Reservation: Embedded client monitors SoC and auto‑reserves when below threshold.
  • EV Plug‑and‑Charge: EV presents contract certificate; station/CC/App/Authentication Server coordinate certificate validation; on success, EV is authorized to start charging.

User Requirements (Selected Highlights)

Module 1 – User Account & Preferences

  • Login with username/password; lockout after failed attempts; password reset via email.
  • Mobile‑compatible UI with standard controls; modify preferences and schedules.
  • Display SoC and optimal charging strategy; notify when charging completes with estimated cost; show plugged‑in SoC in real time.
  • Access electricity prices at any time.

Module 2 – Payments & Billing

  • Choose payment mode; email receipts; store and retrieve transaction history.
  • Support third‑party billing; authenticate user before charging and require explicit start confirmation.
  • Allow refund requests; display reservation policies and penalties.

Module 3 – V2H/B (Home/Building)

  • Select charge vs discharge; set maximum SoC thresholds; compute ahead‑of‑time price information; recommend schedules based on SoC, departure time, and price.

Module 4 – Trip/Route Planning

  • Map of CSs with types (L2/DC Fast/Wireless) and current user location with prices.
  • Select routes and available CSs; add CSs to route; full mobile access to functionality.
  • Choose payment/billing options (including third‑party); reserve/cancel in advance; save invoices locally.
  • Configuration: CSAs can commission/decommission stations, edit attributes, and open accounts with SecCharge; SA can modify any user account.

Gaps, Risks, and Roadmap

  • Reservation Completeness: Implement APIs to fetch already‑booked slots, query site‑supported charger types, and persist reservations (noted for future work in the improved system).
  • OCPP Parity: Replace file‑based interim authorization flow with standards‑conformant message exchange; add physical metering for MeterValues and complete Heartbeat/BootNotification semantics.
  • PnC at Scale: Stand up dedicated V2G Root/Sub‑CA integrations or leverage compliant PKI providers; automate certificate lifecycle (provisioning, rotation, revocation).
  • Security Hardening: JWT rotation/refresh, token binding for mobile, stricter CORS in production; expand exception mapping; formalize password policy (BCrypt work factor review).
  • Operational Observability: Structured audit logs for admin actions; API metrics; CC telemetry dashboards; alerting on partner‑API failures.
  • Data Model Enhancements: Normalize provider→site→station→port models across APIs; enrich price catalogs (time‑of‑use, demand charges); introduce slot‑level constraints.

Conclusion

  • The Improved SecCharge System modernizes the platform with a stateless, JWT‑secured application tier, richer client experiences (Angular SPA, Android, embedded AEV), and a clearer demarcation between application services, OCPP‑mediated control, and certificate‑based EV authentication.
  • Aligning OCPP flows with metered telemetry and operationalizing ISO/IEC 15118 authorization will complete the journey from research prototype to production‑grade EV charging network orchestration.
  • The user and administrative requirements articulated across Modules 1–4 form a concrete acceptance baseline that directly maps to implemented features and prioritized backlog items.