Test the Access Manager Plugin locallyRun Lerian’s plugins without deploying to Kubernetes using our plugins-docker-compose repository.Keep in mind that these services require a valid license to run. Without it, the application will not start. For license details, check our License documentation.
Why use the Access Manager plugin?
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.
Access Manager is available as a part of the Enterprise model. If you’d like to learn more or evaluate it for your use case, get in touch with our team.
Technical specs
- RESTful APIs and Console interface available.
- Midaz and its plugins include the
lib-auth
library, ready to enforce authorization checks. - Feature flag available via environment variable
PLUGIN_AUTH_ENABLED
to 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
1. Create credentials on both ends
If two plugins need to talk to each other, both must have the necessary M2M credentials created. Don’t assume symmetry — define explicitly on both sides.2. 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.3. 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 human access is required (for debugging, operations, or support), always create user credentials using thepassword
grant — not client_credentials
. This approach allows you to easily manage access, revoke permissions, and trigger forced logouts when needed via the appropriate endpoint.
We strongly recommend implementing a credentials rotation policy and performing regular access reviews to minimize exposure and ensure only authorized users retain access.
Always enforce the principle of least privilege, granting only the exact permissions needed — nothing more, nothing less — for both users and applications.
Looking to strengthen your infrastructure? Check out our Security Recommendations for best practices and actionable guidance.
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:
Once 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
.env
file should be in the root directory of the plugin.
- The
Can’t see the files? Try adjusting your system settings to show hidden files since
.env
files are often hidden by default.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: