gRPC Resources do not support Native Users. Formal identities should pass
native credentials in addition to (or instead of) their Formal credentials.
- Web
- Terraform
Create a native user
-
Go to Resources and open the resource.

-
Select Authentication, then click Add User.

-
Select an authentication method. The available methods depend on the
resource technology.
For AWS resources, AWS IAM (standard) uses the Connector’s ambient
identity. AWS IAM (assume role) assumes the specified IAM role ARN.

-
Complete the fields and create the Native User.
For password authentication, Username and Password are upstream
credentials. Other methods show fields specific to their credential type.
For example, AWS IAM (assume role) asks for a Formal label in
Username and the role’s ARN in IAM Role ARN.

Configure the password of the native user
To configure the password of the native users, customers have the following options:Password-based authentication
- Set directly the password, Formal will keep it encrypted in the Control Plane and send it in the configuration of the Connectors.
- Set it via an environment variable. You can specify the following value in the secret:
ENV:NAME_OF_THE_ENV_VARIABLE_WITH_THE_PASSWORD_OF_THE_USER
IAM authentication
Instead of a stored password, the Connector can authenticate to the resource with a short-lived token minted from its own cloud identity in the environment where it runs. The secret value selects the cloud provider:- AWS: set the secret to
iamto use the Connector’s ambient IAM role, or to an IAM role ARN (arn:aws:iam::<account>:role/<name>) to have the Connector assume that role first. The username is a database user configured for IAM authentication that the Connector’s role is grantedrds-db:connectpermission to connect as; it is not derived from the IAM identity. - GCP: set the secret to
iam_gcp. The Connector authenticates to Cloud SQL with the service account resolved from its environment. That service account must be added as a Cloud SQL IAM user and granted the Cloud SQL instance-user role, and the username must match it (for a service account, the account email without the.gserviceaccount.comsuffix). - Azure: set the secret to
iam_azure. The Connector authenticates to Azure Database for PostgreSQL or MySQL Flexible Server with the Microsoft Entra identity resolved from its environment. The username is that identity’s Entra principal name, such as a user principal name or a managed identity name, provisioned as a login on the database.
Determine a Native User for a Formal User or Group
You can assign a native user to a Formal User or Group. This will override the default native user configured for the Resource.- Open the resource’s Authentication tab and select the Native User.

- Under Linked Identities, click Add beside Formal Users or Formal Groups.
- Select one or more identities, then click Add.

Control Which Credentials are Used Between the Connector and the Resource
There are three ways to control which credentials are passed between a Connector and Resource for individual requests:- Assign native users to Formal identities in the Control Plane
- Specify the native user at connection time
- Use resource credentials at connection time
Assign Native Users to Formal Identities in the Control Plane
If Formal credentials are passed at connection time, the Connector will determine the relevant native user using the Formal identity. Specify which native user to use via the Formal console or via Terraform.Specify the Native User at Connection Time
To connect using a specific native user, use the following format for your connection username:john@joinformal.com wants to connect to a Postgres database using the native user readonly, the connection username would be:
Use Resource Credentials at Connection Time
Although not recommended, Formal identities can also pass the credentials of the resource at connection time. In that case, the Connector will transparently forward these credentials to the resource.Understanding Native Users in Logs
If formal identities are used at connection time, the resulting native user username will be specified atuser.formal.native.
If formal identities are not used, user.type will be native and the username (if applicable) will be specified in user.username.
Accessing resources using native resource role credentials means that the user type will be native instead of formal and the formal user information
will be empty. In addition, the native resource role’s username will be specified at the user.username level in logs but user.native will be absent.
Access Control
You can control which users can access which native users through Formal policies. In particular, you can control which users can access specific native users when they attempt to connect using the@<native_user> syntax.
This is useful for enforcing least-privilege access and preventing users from accessing highly privileged accounts.
The following policy blocks the user john@joinformal.com from using the native user devops:
- Block multiple users from specific native users
- Allow only certain users to access privileged native users
- Require additional authentication for certain native users