How to enable authentication in MaxScale in MONGO for production?

153 Views Asked by At

We have a MariaBD version using MaxScale to use the NoSQL version using MongoDB driver.

However, the connection is made without authentication and so it is possible to create new databases and collections within MaxScale.

How to enable authentication for connection using nosql protocol.

Thank you very much for everyone's attention.

type=listener
service=Read-Write-Service
protocol=nosqlprotocol
nosqlprotocol.user=maxscale
nosqlprotocol.password=password
port=17017
2

There are 2 best solutions below

2
On BEST ANSWER

You can require authentication of clients by adding nosqlprotocol.authentication_required=true in the listener configuration.

1
On

There is a section Bootstrapping the Authentication/Authorization at https://mariadb.com/kb/en/mariadb-maxscale-6-nosql-protocol-module/#authentication that explains how to take authentication into use.