Skip to content
  • OCPI off-the-shelf
  • OCPI interoperability
  • Book a meeting

The Practical OCPI Guide

Helping you to implement a robust Open Charge Point Interface

  • OCPI off-the-shelf
  • OCPI interoperability
  • Book a meeting
  • ⤫

The Secrets of the OCPI Credentials module

Posted by Erkki Tapola Posted on March 5, 2022January 2, 2024
0

Photo by Karolina Grabowska / Pexels

Before implementing the OCPI Credentials module, I would recommend you to take a look at Implementing OCPI – Tips and Tricks.

The OCPI Credentials exchange forms the basis for authentication and authorization between OCPI Platforms. The OCPI Platform uses the Credentials module both to establish and maintain communication with other OCPI Platforms.

The phases of the OCPI Credentials exchange

The exchange starts with the admins of two or more OCPI Platforms contacting each other offline. The first shared secret, the token_a, is transmitted between admins over a secure channel with the Versions endpoint URL (which is publicly accessible). Generally, this channel should preferably not be email or a chat app.

After the initial contact, the Credentials registration process takes places between the OCPI Platforms over two HTTPS connections. If you look at the OCPI Credentials registration flow chart, it may look daunting at first. What is actually happening is that the same sequence is mirrored so that each party initiates their own exchange.

The exchange consist of these steps:
1) Platform GETs the version info from the other platform
2) Platform GETs the endpoints list from the other platform
3) Platform generates a token and POSTs its Credentials record to the other party
4) Before responding to the POST in 3), the other platform in turn performs the steps 1) and 2)

The token generated in part 3 will be used until a new token may be generated at a later time.

IMPORTANT: Generating a new Credentials Token and pushing it to the other Platform does not undo a security breach. If your security has been compromised, you need to start the exchange again with a new token_a communicated offline between admins.

Do not allow the other party to change their country_code and party_id after verifying their identity during the initial Credentials registration process.

After the exchange is finished, the platforms are able to share information about Locations, Tariffs, Tokens and other OCPI objects in a secure way. What is essentially happening is that any changes to OCPI objects are reflected in connected systems near real time. Smaller changes, such as charger status change, are distributed to others using HTTP PATCH. Bigger changes like a new Location or Token are sent using HTTP PUT.

 NOTE: Token_a is used as a shared secret only during the Credentials registration and its use must be limited to the versions endpoint, endpoints list and POST Credentials. After tokens have been exchanged, token_a should be ignored.

Consider Also Implementing the HubClientInfo module

When implementing the Credentials module, it is useful to know if you are going to implement also the HubClientInfo module. The HubClientInfo module provides knowledge about the connection status of known parties. Due to overlapping data between Credentials and HubClientInfo, we recommend that the data required for HubClientInfo would be incorporated into the Credentials data structures. In practice, this includes two fields; status (the connection status) and last_updated (which you could call ”last_connection” internally, not to overlap with Credentials.last_updated).

Why implement HubClientInfo?

With the HubClientInfo we can communicate system wide status to the EV driver. In case an OCPI Platform drops momentarily off the network, the chargers without Token whitelists are inoperable. When the e-Mobility Service Provider shows charging stations on the map, the operational status of an individual charge point should reflect the following:
– The charge point has sent some data, a status change or a “still alive” message within a few minutes and it is available to start a session
– The OCPI Platform which manages the roaming for the charge point has sent data or answered a GET versions request during the past few minutes

Using the HubClientInfo, you can provide better service to the EV driver and work towards earning their trust.

What to do next?

To test your OCPI implementation, try the OCPI Connector. You can learn more by booking a meeting with our specialist.

Erkki Tapola is a multi-faceted IT professional with a background in technology, leadership and products. Since 2020 he has focused on EV roaming and the OCPI protocol. Erkki founded SolidRoam in 2023 to continue the work of ChargerHub.EU, and he acts as CEO. His passion is to improve the reliability and ease of use in electric mobility. In his spare time he’s into electric road trips, couples dancing, bicycling and photography.

Book a Meeting
Categories: Uncategorized

Post navigation

Previous Previous post: Implementing OCPI – How to make it work like a charm
Next Next post: OCPI Made Easy: The Smart Choice for EV Roaming
Use APIs

Related Posts

  • The New UK Charging Regulations in a Nutshell

    A new era in consumer friendly charging experiences has began. The stringent Public Charge Point Regulations 2023 (PCPR) came into force on 24 November 2023 in the United Kingdom. But why are these regulations so important for the future, and what kind of companies need to comply with them? The regulations will likely influence the

    Posted by Erkki Tapola Posted on January 1, 2024January 3, 2024
  • A glimpse at the future: what’s new in OCPI 3.0?

    Bringing ultimate convenience to the EV driver, OCPI 3.0 supports protocols such as Plug & Charge and Autocharge, which authenticate the vehicle through the charging cable connection. This makes use of RFID tags and applications unnecessary allowing the car to take care of the payment automatically…

    Posted by Erkki Tapola Posted on April 4, 2023March 31, 2024
  • OCPI Made Easy: The Smart Choice for EV Roaming

    So, you want to start roaming using the industry standard protocol, OCPI. You have probably already noticed that it is a versatile, but quite complex protocol. OCPI is nothing like OCPP, which is used in managing the charge points. It is costly and time consuming to implement the OCPI push and pull mechanisms for Locations,

    Posted by Erkki Tapola Posted on October 24, 2022March 31, 2024
Erkki Tapola
Eki is a software engineer, an agile coach and a manager. He has worked in software for 25 years and has learned how to make sustainable solutions. Eki's passion are electric road trips and recently he's driven Helsinki - Turkey - Helsinki and is already planning the next drive to Morocco. As an advocate of high quality charging service he is taking concrete steps to make exploration easier.

Leave a Reply Cancel reply

You must be logged in to post a comment.

The Practical OCPI Guide

Helping you to implement a robust Open Charge Point Interface

Contact us
info@solidroam.com

Information

  • Terms of Service
  • Privacy Policy
  • OCPI 2.2 tools
COPYRIGHT © 2025 - The Practical OCPI Guide // Designed By - ZeeTheme
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-advertisement1 yearSet by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category .
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
CookieLawInfoConsent1 yearRecords the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie.
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
CookieDurationDescription
_pk_id.1.67291 year 27 daysNo description
_pk_ses.1.672930 minutesNo description
themeneverNo description available.
SAVE & ACCEPT
Powered by CookieYes Logo