Skip to main content

Policies

Access is denied by default. A database policy grants named console users access to one database, as one database user, with specific privileges - and decides whether each login needs MFA.

Create a Policy​

Go to Policies and create a database policy.

Database policy creation screen
FieldWhat to choose
Policy nameAny name, for example db-access-policy
Database HostThe database server, from those the agent has discovered
Select DatabaseThe database on that server
Database UserThe database role users will connect as. The agent manages its password
PrivilegeREAD, WRITE, and/or EXECUTE
Fields to maskMySQL only: columns to mask in query results, per table
Select IAM UsersThe console users who may use this access. They receive the push
ActionWhat happens when they connect: Require MFA, Allow, or Block
ActionEffect
Require MFAThe user approves a push before every login
AllowThe login proceeds without MFA
BlockThe login is refused, and no push is sent

All tables in the database are covered; the privileges apply to each of them.

What Happens Next​

Creating the policy queues a job for the agent. On its next sync (within a minute) the agent sets a new password on the database role and adds the user to ProxySQL. To confirm:

sudo grep -E 'created successfully in ProxySQL|updated successfully in ProxySQL' /var/log/authnull-db-agent.log | tail -3

The policy is active as soon as it is created.

Manage Policies​

The Policies screen lists every database policy, with filters for database and status. A policy's ⋯ menu offers:

ActionEffect
Update policyChange the users, privileges, or action. Saving also queues a new job, so the agent provisions the user again
PauseThe policy stops applying until it is Re-activated
RevokeWithdraw the access
ApproveShown only for a policy that is not yet approved

Next Steps​

Continue to Connecting to open a session.