Microsoft SQL Server Credentials
Learn how to automatically rotate Microsoft SQL Server credentials.
Prerequisites
- Create a Microsoft SQL Server Connection with the required Secret Rotation permissions
- Create two designated database users for Infisical to rotate the credentials for. Be sure to grant each user login permissions for the desired database with the necessary privileges their use case will require.
An example creation statement might look like:
To learn more about Microsoft SQL Server’s permission system, please visit their documentation.
Create a Microsoft SQL Server Credentials Rotation in Infisical
-
Navigate to your Secret Manager Project’s Dashboard and select Add Secret Rotation from the actions dropdown.
-
Select the Microsoft SQL Server Credentials option.
-
Select the Microsoft SQL Server Connection to use and configure the rotation behavior. Then click Next.
- Microsoft SQL Server Connection - the connection that will perform the rotation of the configured database user credentials.
- Rotation Interval - the interval, in days, that once elapsed will trigger a rotation.
- Rotate At - the local time of day when rotation should occur once the interval has elapsed.
- Auto-Rotation Enabled - whether secrets should automatically be rotated once the rotation interval has elapsed. Disable this option to manually rotate secrets or pause secret rotation.
- Input the usernames of the database users created above that will be used for rotation. Then click Next.
- Database Username 1 - the username of the first user that will be used for rotation.
- Database Username 2 - the username of the second user that will be used for rotation.
- Specify the secret names that the active credentials should be mapped to. Then click Next.
- Username - the name of the secret that the active username will be mapped to.
- Password - the name of the secret that the active password will be mapped to.
- Give your rotation a name and description (optional). Then click Next.
- Name - the name of the secret rotation configuration. Must be slug-friendly.
- Description (optional) - a description of this rotation configuration.
-
Review your configuration, then click Create Secret Rotation.
-
Your Microsoft SQL Server Credentials are now available for use via the mapped secrets.
-
Navigate to your Secret Manager Project’s Dashboard and select Add Secret Rotation from the actions dropdown.
-
Select the Microsoft SQL Server Credentials option.
-
Select the Microsoft SQL Server Connection to use and configure the rotation behavior. Then click Next.
- Microsoft SQL Server Connection - the connection that will perform the rotation of the configured database user credentials.
- Rotation Interval - the interval, in days, that once elapsed will trigger a rotation.
- Rotate At - the local time of day when rotation should occur once the interval has elapsed.
- Auto-Rotation Enabled - whether secrets should automatically be rotated once the rotation interval has elapsed. Disable this option to manually rotate secrets or pause secret rotation.
- Input the usernames of the database users created above that will be used for rotation. Then click Next.
- Database Username 1 - the username of the first user that will be used for rotation.
- Database Username 2 - the username of the second user that will be used for rotation.
- Specify the secret names that the active credentials should be mapped to. Then click Next.
- Username - the name of the secret that the active username will be mapped to.
- Password - the name of the secret that the active password will be mapped to.
- Give your rotation a name and description (optional). Then click Next.
- Name - the name of the secret rotation configuration. Must be slug-friendly.
- Description (optional) - a description of this rotation configuration.
-
Review your configuration, then click Create Secret Rotation.
-
Your Microsoft SQL Server Credentials are now available for use via the mapped secrets.
To create a Microsoft SQL Server Credentials Rotation, make an API request to the Create Microsoft SQL Server Credentials Rotation API endpoint.
Sample request
Sample response
Was this page helpful?