Adding Custom Machine-to-Machine (MtM) Authentication

This section describes how to add custom authentication when sending MtM requests between Atoti Limits and your connected servers.

Overview

Atoti Limits connects to your Atoti Server application via MtM REST requests. For more information on the connection, see the connection guide.

By default, Basic Authentication is used to authenticate the REST requests. This is configured using the autoconfiguration properties.

Your organization may not permit basic authentication, may require some other form of authentication, or may already have some third-party authentication mechanism in place. In these scenarios, knowing how to extend Atoti Limits’s machine-to-machine authentication mechanisms is useful.

How to add custom MtM authentication

The steps are as follows:

1. Configure your Connected Server Rest client

In your connected Atoti Server project, implement an instance of ILimitsRestClientProvider (for Atoti Server version 6.1.x or 6.0.x-sb3) or ILimitsRestTemplateProvider (for Atoti Server version 6.0.x).

Your implementation should return the RestClient or RestTemplate that you intend to use.

These are used to create Http clients used to send REST requests from the connected servers to Atoti Limits.

ILimitsRestClientProvider
ILimitsRestTemplateProvider

2. Configure your Atoti Limits Rest client

In your Atoti Limits project, implement an instance of ILimitsRestClientBuilderProvider. This is used to create an Http client used to send REST requests from Atoti Limits to the connected servers.

ILimitsRestClientBuilderProvider

3. Import your custom implementations as Spring Beans

Finally, expose your custom implementations as Spring Beans.

This is the simplest way to implement custom MtM authentication. In the following sections we’ll dive into some examples.