ARTICLE
8 November 2023
At Mambu, when we initially began using APIs, basic authentication (username and password) was considered a reliable method for authentication. However, as technology advanced and the demand for enhanced security grew, basic authentication became outdated. Nowadays, most technology companies have phased out support for username/password authentication and have transitioned to more secure and up-to-date solutions.
Most API Gateway vendors support the same core set of API security mechanisms with API Keys and OAuth 2.0 standing out as the most prominent choices for authentication and authorisation. Over the last few years, we’ve been working on our APIs. We wanted to share what we’ve learnt implementing a more powerful security model through a custom implementation on top of API Keys. We will explain our choices and share best practices.
Our journey with API Keys began a few years ago. At the time it was the best solution for How we chose the best authentication method for our needs
Our journey with API Keys began a few years ago. At the time it was the best solution for our needs as a Cloud Banking Platform and the needs of our customers. The reason was, API Keys are very simple to use from the consumer perspective:
It can’t get simpler than that.
Also, in our case, we were looking to cover one main use case which is to authenticate and authorise application-to-application interaction within a private perimeter. And with OAuth 2.0 being primarily designed for ‘non-developer’ users, who frequently need to access public-facing APIs to expose data towards end-users’ mobile or web applications, the choice was simple.
We have introduced the below options to provide our customers with means to leverage our API Key with an extra layer of protection.
Ideally you should add an expiration time to each API Key you create. The recommended TTL (Time To Live) depends on your specific use and security requirements. You can set the expiration time for each API Key you create either via the Mambu UI or APIs.
As best practice, you should change/rotate your API Keys at least once a year or right after any attack attempt.
API Key rotation allows you to invalidate specific API Keys using a secret key for authentication. When a key is rotated via our api-consumers-rotatekey endpoint, you will immediately receive a replacement API Key and a new secret key in the response body.
As best practice, we recommend also using the Automatic Expiry of API Consumer Key from Access Preferences. This way, if you forget to specify an expiration time for the replacement key in the rotation request, the key will expire in the TTL set through Automatic Expiry of the API Consumer Key which overrides the TTL set via API call, ensuring you won’t end up with keys that never expire.
If you want to learn more about how you can set expiration time, rotate keys and generate secret keys, please see our support documentation API Keys.
In order to further enhance protection, API Keys are stored through an encryption process, through our API Key management systems, in compliance with the highest security standards.
At Mambu, we feel confident in our custom implementation of API Keys and API Consumers and we are continuously making improvements to keep up with market standards while being proactive with identifying and staying ahead of evolving customer needs. Over the course of next year, we are planning to add new capabilities to our API Authentication & Authorisation solution to further bolster security.