Why use Access Manager?
When your security strategy requires native, fine-tuned access control across Midaz and its plugins, Access Manager is your go-to. It helps you manage users, credentials, and application access with performance and flexibility in mind.Components
The Access Manager tool is made up of two independent services that work together:-
Auth: Acts as the bridge between your applications and your authentication/authorization layer. It handles:
- Access token generation (OAuth2).
- Token refresh.
- Credential validation.
-
Identity: Provides a clear interface—via REST API or the Console—for managing users and access controls. It covers:
- User Management.
- Machine-to-Machine (M2M) Credentials.
Technical specs
- RESTful APIs and Console interface available.
- Midaz and its plugins include the
lib-authlibrary, ready to enforce authorization checks. - Feature flag available via environment variable
PLUGIN_AUTH_ENABLEDto toggle validation. - OAuth2-based token management and credential flow.
- Integration-ready with third-party authentication and authorization platforms.
- Valkey caching to boost performance.
- Role-based access control (RBAC) aligned with Midaz resource structure.
Use cases
Access Manager is ideal for:- Clients looking for built-in authentication and authorization at the application layer.
- Organizations without a pre-existing IAM solution.
- Scenarios where secure M2M integrations are needed.
- Teams that want unified access control across Midaz and all its plugins.
Best practices
Access Manager is powerful — it handles identity, authorization, and credentials at the heart of your Midaz stack. That power comes with responsibility. Here’s how to use it securely and efficiently.Credentials
Create credentials on both ends
If two services need to talk to each other, both must have the necessary M2M credentials created. Don’t assume symmetry — define explicitly on both sides.Lock down the physical environment
Access Manager store credentials locally. That means anyone with access to the hardware could potentially extract them. Make sure the physical or virtual machine hosting the plugin is tightly secured — this is your first line of defense.Avoid exposing endpoints that retrieve the credentials.
Admins in Access Manager (via Identity) can retrieve credentials — which is exactly why these endpoints should not be integrated into any back-office system. Keep sensitive operations isolated to reduce the chance of accidental exposure.Security recommendations
Use Application-to-Application flows for sensitive endpoints.
For critical accesses like the Ledger, we recommend interacting through Applications. This ensures you have full control over each credential. If something leaks, you can revoke or delete the Application without bringing down your entire system.Manual actions? Use user-based credentials
When a human needs to act (for debugging, operations, etc.), create user credentials with thepassword grant — not client_credentials. That way, if access needs to be revoked, you can easily block the user and force logout using the appropriate endpoint.
Enabling Access Manager
After installing the Access Manager plugin, you must enable it for it to function properly. This means updating the Auth variables in the.env files of Midaz Ledger, Midaz Console, or any plugin where you want to use Access Manager.
Your configuration should look like this:
ImportantOnce Access Manager is enabled, all API requests must include an
Authorization header with a valid Bearer access token.Without this header, your requests will be rejected, even for public or previously accessible endpoints.Learn how to generate and use access tokens.Where to update
You’ll find the relevant.env files in these locations:
-
Midaz Ledger and Midaz Console
/midaz/components/onboarding/midaz/components/transaction/midaz/components/console
-
Other plugins
- The
.envfile should be in the root directory of the plugin.
- The
Rebuild after changes
After updating the environment, rebuild your Docker images to apply the changes:1
In your terminal, go to the root of your Midaz project.
2
If Docker is running, stop it:
3
Then rebuild everything:

