Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat: add Windows connection support and enhance documentation for SMB and local account secret rotation
Victor Santos045f758f9c6b
diff --git a/docs/api-reference/endpoints/app-connections/smb/available.mdx b/docs/api-reference/endpoints/app-connections/smb/available.mdxnew file mode 100644index 0000000000..503dac78a8--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/smb/available.mdx@@ -0,0 +1,4 @@+---+title: "List Available"+openapi: "GET /api/v1/app-connections/smb/available"+---diff --git a/docs/api-reference/endpoints/app-connections/smb/create.mdx b/docs/api-reference/endpoints/app-connections/smb/create.mdxnew file mode 100644index 0000000000..2e22736cea--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/smb/create.mdx@@ -0,0 +1,9 @@+---+title: "Create"+openapi: "POST /api/v1/app-connections/smb"+---++<Note>+ Check out the configuration docs for [Windows Connections](/integrations/app-connections/windows) to learn how to obtain+ the required credentials.+</Note>diff --git a/docs/api-reference/endpoints/app-connections/smb/delete.mdx b/docs/api-reference/endpoints/app-connections/smb/delete.mdxnew file mode 100644index 0000000000..25595e53d9--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/smb/delete.mdx@@ -0,0 +1,4 @@+---+title: "Delete"+openapi: "DELETE /api/v1/app-connections/smb/{connectionId}"+---diff --git a/docs/api-reference/endpoints/app-connections/smb/get-by-id.mdx b/docs/api-reference/endpoints/app-connections/smb/get-by-id.mdxnew file mode 100644index 0000000000..400d996f4b--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/smb/get-by-id.mdx@@ -0,0 +1,4 @@+---+title: "Get by ID"+openapi: "GET /api/v1/app-connections/smb/{connectionId}"+---diff --git a/docs/api-reference/endpoints/app-connections/smb/get-by-name.mdx b/docs/api-reference/endpoints/app-connections/smb/get-by-name.mdxnew file mode 100644index 0000000000..efb47817d8--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/smb/get-by-name.mdx@@ -0,0 +1,4 @@+---+title: "Get by Name"+openapi: "GET /api/v1/app-connections/smb/connection-name/{connectionName}"+---diff --git a/docs/api-reference/endpoints/app-connections/smb/list.mdx b/docs/api-reference/endpoints/app-connections/smb/list.mdxnew file mode 100644index 0000000000..fa488cedda--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/smb/list.mdx@@ -0,0 +1,4 @@+---+title: "List"+openapi: "GET /api/v1/app-connections/smb"+---diff --git a/docs/api-reference/endpoints/app-connections/smb/update.mdx b/docs/api-reference/endpoints/app-connections/smb/update.mdxnew file mode 100644index 0000000000..ad9a2faf00--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/smb/update.mdx@@ -0,0 +1,4 @@+---+title: "Update"+openapi: "PATCH /api/v1/app-connections/smb/{connectionId}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/windows-local-account/create.mdx b/docs/api-reference/endpoints/secret-rotations/windows-local-account/create.mdxnew file mode 100644index 0000000000..357c40b85d--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/windows-local-account/create.mdx@@ -0,0 +1,9 @@+---+title: "Create"+openapi: "POST /api/v2/secret-rotations/windows-local-account"+---++<Note>+ Check out the configuration docs for [Windows Local Account Rotations](/documentation/platform/secret-rotation/windows-local-account) to learn how to obtain the+ required parameters.+</Note>diff --git a/docs/api-reference/endpoints/secret-rotations/windows-local-account/delete.mdx b/docs/api-reference/endpoints/secret-rotations/windows-local-account/delete.mdxnew file mode 100644index 0000000000..4baf727071--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/windows-local-account/delete.mdx@@ -0,0 +1,4 @@+---+title: "Delete"+openapi: "DELETE /api/v2/secret-rotations/windows-local-account/{rotationId}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/windows-local-account/get-by-id.mdx b/docs/api-reference/endpoints/secret-rotations/windows-local-account/get-by-id.mdxnew file mode 100644index 0000000000..adb8ff72a2--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/windows-local-account/get-by-id.mdx@@ -0,0 +1,4 @@+---+title: "Get by ID"+openapi: "GET /api/v2/secret-rotations/windows-local-account/{rotationId}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/windows-local-account/get-by-name.mdx b/docs/api-reference/endpoints/secret-rotations/windows-local-account/get-by-name.mdxnew file mode 100644index 0000000000..a6f2f58440--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/windows-local-account/get-by-name.mdx@@ -0,0 +1,4 @@+---+title: "Get by Name"+openapi: "GET /api/v2/secret-rotations/windows-local-account/rotation-name/{rotationName}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/windows-local-account/get-generated-credentials-by-id.mdx b/docs/api-reference/endpoints/secret-rotations/windows-local-account/get-generated-credentials-by-id.mdxnew file mode 100644index 0000000000..b122662bdc--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/windows-local-account/get-generated-credentials-by-id.mdx@@ -0,0 +1,4 @@+---+title: "Get Generated Credentials by ID"+openapi: "GET /api/v2/secret-rotations/windows-local-account/{rotationId}/generated-credentials"+---diff --git a/docs/api-reference/endpoints/secret-rotations/windows-local-account/list.mdx b/docs/api-reference/endpoints/secret-rotations/windows-local-account/list.mdxnew file mode 100644index 0000000000..50bd0cbab1--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/windows-local-account/list.mdx@@ -0,0 +1,4 @@+---+title: "List"+openapi: "GET /api/v2/secret-rotations/windows-local-account"+---diff --git a/docs/api-reference/endpoints/secret-rotations/windows-local-account/reconcile.mdx b/docs/api-reference/endpoints/secret-rotations/windows-local-account/reconcile.mdxnew file mode 100644index 0000000000..3360e8e0b5--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/windows-local-account/reconcile.mdx@@ -0,0 +1,9 @@+---+title: "Reconcile"+openapi: "POST /api/v2/secret-rotations/windows-local-account/{rotationId}/reconcile"+---++<Note>+ The reconcile endpoint is used to reset the target user's password when credentials are out of sync.+ This uses the Windows Connection's administrator credentials to reset the target user's password and sync it with Infisical.+</Note>diff --git a/docs/api-reference/endpoints/secret-rotations/windows-local-account/rotate-secrets.mdx b/docs/api-reference/endpoints/secret-rotations/windows-local-account/rotate-secrets.mdxnew file mode 100644index 0000000000..406f13c240--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/windows-local-account/rotate-secrets.mdx@@ -0,0 +1,4 @@+---+title: "Rotate Secrets"+openapi: "POST /api/v2/secret-rotations/windows-local-account/{rotationId}/rotate-secrets"+---diff --git a/docs/api-reference/endpoints/secret-rotations/windows-local-account/update.mdx b/docs/api-reference/endpoints/secret-rotations/windows-local-account/update.mdxnew file mode 100644index 0000000000..49533abda7--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/windows-local-account/update.mdx@@ -0,0 +1,4 @@+---+title: "Update"+openapi: "PATCH /api/v2/secret-rotations/windows-local-account/{rotationId}"+---diff --git a/docs/docs.json b/docs/docs.jsonindex 7ecbbd0568..117a2d2cf8 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -151,6 +151,7 @@"integrations/app-connections/terraform-cloud","integrations/app-connections/vercel","integrations/app-connections/windmill",+ "integrations/app-connections/windows","integrations/app-connections/zabbix"]}@@ -452,6 +453,7 @@"documentation/platform/secret-rotation/databricks-service-principal-secret","documentation/platform/secret-rotation/ldap-password","documentation/platform/secret-rotation/unix-linux-local-account",+ "documentation/platform/secret-rotation/windows-local-account","documentation/platform/secret-rotation/mongodb-credentials","documentation/platform/secret-rotation/mssql-credentials","documentation/platform/secret-rotation/mysql-credentials",@@ -1612,6 +1614,18 @@"api-reference/endpoints/app-connections/ssh/delete"]},+ {+ "group": "Windows (SMB)",+ "pages": [+ "api-reference/endpoints/app-connections/smb/list",+ "api-reference/endpoints/app-connections/smb/available",+ "api-reference/endpoints/app-connections/smb/get-by-id",+ "api-reference/endpoints/app-connections/smb/get-by-name",+ "api-reference/endpoints/app-connections/smb/create",+ "api-reference/endpoints/app-connections/smb/update",+ "api-reference/endpoints/app-connections/smb/delete"+ ]+ },{"group": "TeamCity","pages": [@@ -2030,6 +2044,20 @@"api-reference/endpoints/secret-rotations/unix-linux-local-account/reconcile"]},+ {+ "group": "Windows Local Account",+ "pages": [+ "api-reference/endpoints/secret-rotations/windows-local-account/create",+ "api-reference/endpoints/secret-rotations/windows-local-account/delete",+ "api-reference/endpoints/secret-rotations/windows-local-account/get-by-id",+ "api-reference/endpoints/secret-rotations/windows-local-account/get-by-name",+ "api-reference/endpoints/secret-rotations/windows-local-account/get-generated-credentials-by-id",+ "api-reference/endpoints/secret-rotations/windows-local-account/list",+ "api-reference/endpoints/secret-rotations/windows-local-account/rotate-secrets",+ "api-reference/endpoints/secret-rotations/windows-local-account/update",+ "api-reference/endpoints/secret-rotations/windows-local-account/reconcile"+ ]+ },{"group": "Microsoft SQL Server Credentials","pages": [diff --git a/docs/documentation/platform/secret-rotation/windows-local-account.mdx b/docs/documentation/platform/secret-rotation/windows-local-account.mdxindex 3cbb9cf2d2..090677903d 100644--- a/docs/documentation/platform/secret-rotation/windows-local-account.mdx+++ b/docs/documentation/platform/secret-rotation/windows-local-account.mdx@@ -1,52 +1,20 @@---title: "Windows Local Account Rotation"-description: "Learn how to automatically rotate Windows local account passwords using OpenSSH."+description: "Learn how to automatically rotate Windows local account passwords using SMB."---<Note>Due to how Windows local account passwords are rotated, retired credentials will not be able to- authenticate with the SSH provider during their [inactive period](./overview#how-rotation-works).+ authenticate during their [inactive period](./overview#how-rotation-works).- This is a limitation of the SSH provider and cannot be- rectified by Infisical.+ This is a limitation of the rotation mechanism and cannot be rectified by Infisical.</Note>## Prerequisites-- **OpenSSH Server installed and enabled** on your Windows Server (Windows Server 2019+ includes OpenSSH by default)-- Create an [SSH Connection](/integrations/app-connections/ssh) with the **Secret Rotation** requirements-- Ensure your network security policies allow incoming requests from Infisical to this rotation provider, if network restrictions apply.--### Enable OpenSSH on Windows--For Windows Server 2019 and later (and Windows 10/11), OpenSSH Server is included as an optional feature. To enable it, run these PowerShell commands as Administrator:--```powershell-# Install OpenSSH Server (if not already installed)-$ssh = Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH.Server*'-if ($ssh.State -ne "Installed") {- Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0-}--# Start and enable the service-Start-Service sshd-Set-Service -Name sshd -StartupType Automatic-```--### Firewall Configuration (Optional)--If you need to allow SSH connections through Windows Firewall, you can use:--```powershell-New-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -DisplayName "OpenSSH Server" `- -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22-```--**Note**: Consult your security team if you have existing firewall policies, use Group Policy, or have third-party firewall software.--### For Older Windows Versions--For Windows Server versions prior to 2019, download and install OpenSSH from the [official repository](https://github.com/PowerShell/Win32-OpenSSH).+- **Windows Server** with SMB3 support enabled+- Create a [Windows Connection](/integrations/app-connections/windows) with administrator credentials+- Ensure your network security policies allow SMB connections from Infisical to this rotation provider## Create a Windows Local Account Rotation in Infisical@@ -58,10 +26,10 @@ For Windows Server versions prior to 2019, download and install OpenSSH from the2. Select the **Windows Local Account** option.- 3. Select the **SSH Connection** to use and configure the rotation behavior. Then click **Next**.+ 3. Select the **Windows Connection** to use and configure the rotation behavior. Then click **Next**.- - **SSH Connection** - the connection that will perform the rotation of the configured user's password.+ - **Windows Connection** - the connection that will perform the rotation of the configured user's password.- **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.@@ -74,8 +42,8 @@ For Windows Server versions prior to 2019, download and install OpenSSH from the- **Rotation Method** - The method to use when rotating the target user's password.- - **Login as Target** - Infisical will use the provided SSH username and password to log in and rotate its own password.- - **Login as Root** - Infisical will use the SSH Connection's credentials to log in and rotate the provided user's password.+ - **Login as Target** - Infisical will use the target user's current credentials to authenticate and rotate its own password.+ - **Login as Root** - Infisical will use the Windows Connection's administrator credentials to rotate the target user's password.- **Username** - The target Windows username whose password will be rotated.- **Current Password** - The current password of the target user (required when **Rotation Method** is set to **Login as Target**).- **Password Requirements** - The constraints to apply when generating new passwords.@@ -100,7 +68,7 @@ For Windows Server versions prior to 2019, download and install OpenSSH from the### Reconcile Windows Local Account- If you suspect the credentials are out of sync (for example, after a manual password change on the server), you can regain access by using **Reconcile**. This will use the configured SSH App Connection's administrator account to reset the target user's password and sync it with Infisical.+ If you suspect the credentials are out of sync (for example, after a manual password change on the server), you can regain access by using **Reconcile**. This will use the configured Windows Connection's administrator account to reset the target user's password and sync it with Infisical.@@ -178,9 +146,9 @@ For Windows Server versions prior to 2019, download and install OpenSSH from the"lastRotationJobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a","nextRotationAt": "2023-11-07T05:31:56Z","connection": {- "app": "ssh",- "name": "my-ssh-connection",- "description": "Windows SSH connection",+ "app": "smb",+ "name": "my-windows-connection",+ "description": "Windows SMB connection","credentials": {}},"folder": {@@ -224,21 +192,28 @@ For Windows Server versions prior to 2019, download and install OpenSSH from the### Common Issues-**OpenSSH service not starting**-- Verify the service is installed: `Get-Service sshd`-- Check Windows Event Viewer for SSH-related errors-- Ensure port 22 is not already in use by another service+**Connection failed (NT_STATUS_UNSUCCESSFUL)**+- Verify SMB is enabled on the target server: `Get-SmbServerConfiguration`+- Check that the firewall allows connections on port 445+- Ensure SMB3 protocol is supported (Windows Server 2012+)-**Connection refused**-- Verify the firewall allows SSH connections on port 22-- Check that the OpenSSH service is running: `Get-Service sshd`-- Test SSH connectivity locally: `ssh localhost`+**Authentication failed (NT_STATUS_LOGON_FAILURE)**+- Verify the username and password are correct+- Check if the account is locked or disabled+- For domain accounts, ensure the domain name is correct in the Windows Connection-**Permission denied errors**-- Ensure the SSH connection credentials have administrator privileges-- For "Login as Root" method, the SSH connection user must have rights to change other users' passwords+**Access denied (NT_STATUS_ACCESS_DENIED)**+- Ensure the Windows Connection credentials have administrator privileges+- For "Login as Root" method, the connection user must have rights to change other users' passwords- Verify the target user account exists and is not locked-**Password policy violations**+**Password policy violations (NT_STATUS_PASSWORD_RESTRICTION)**- Adjust the Password Requirements in Infisical to meet your Windows Server password policy- Check Windows Server password policy using: `net accounts`+- Ensure generated passwords meet minimum length and complexity requirements++**Host unreachable**+- Verify network connectivity to the Windows server+- Check DNS resolution if using a hostname+- Ensure there are no network firewalls blocking port 445+- Consider using the Infisical Gateway for private network accessdiff --git a/docs/integrations/app-connections/windows.mdx b/docs/integrations/app-connections/windows.mdxnew file mode 100644index 0000000000..e30c99b5ec--- /dev/null+++ b/docs/integrations/app-connections/windows.mdx@@ -0,0 +1,106 @@+---+title: "Windows"+description: "Learn how to configure a Windows Connection for Infisical."+---++The Windows Connection allows Infisical to connect to Windows servers using the SMB (Server Message Block) protocol for remote management operations such as password rotation.++## Prerequisites++You will need the following information to establish a Windows connection:++- **Host** - The hostname or IP address of the Windows server+- **Port** - The SMB port (default is 445)+- **Username** - A Windows administrator account with permissions to manage local accounts+- **Password** - The password for the administrator account+- **Domain** (optional) - The Windows domain name for domain-joined servers++### Windows Server Requirements++- **SMB3 Support** - This connection uses SMB3 with encryption enabled for secure communication with Windows servers.+- **Firewall Configuration** - The server must be accessible from Infisical or from the Infisical Gateway if using it.++## Setup Windows Connection in Infisical++<Tabs>+ <Tab title="Infisical UI">+ <Steps>+ <Step title="Navigate to App Connections">+ Navigate to the **App Connections** page in your organization.+ + </Step>+ <Step title="Select Windows Connection">+ Click the **+ Add Connection** button and select **Windows** from the available options.++ + </Step>+ <Step title="Fill out the Windows Connection Modal">+ Complete the Windows Connection form by entering:+ - A descriptive name for the connection+ - An optional description for future reference+ - The Windows server host (hostname or IP address)+ - The SMB port (default is 445)+ - The domain name (optional, for domain-joined servers)+ - The administrator username+ - The administrator password++ + </Step>+ <Step title="Connection Created">+ After clicking Create, your **Windows Connection** is established and ready to use with your Infisical project.++ + </Step>+ </Steps>+ </Tab>+ <Tab title="API">+ To create a Windows Connection, make an API request to the [Create Windows+ Connection](/api-reference/endpoints/app-connections/smb/create) API endpoint.++ ### Sample request++ ```bash Request+ curl --request POST \+ --url https://app.infisical.com/api/v1/app-connections/smb \+ --header 'Content-Type: application/json' \+ --data '{+ "name": "my-windows-connection",+ "method": "credentials",+ "credentials": {+ "host": "192.168.1.100",+ "port": 445,+ "username": "Administrator",+ "password": "your-admin-password",+ "domain": "MYDOMAIN"+ }+ }'+ ```++ ### Sample response++ ```bash Response+ {+ "appConnection": {+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "name": "my-windows-connection",+ "version": 1,+ "orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "createdAt": "2023-11-07T05:31:56Z",+ "updatedAt": "2023-11-07T05:31:56Z",+ "app": "smb",+ "method": "credentials",+ "credentials": {+ "host": "192.168.1.100",+ "port": 445,+ "username": "Administrator",+ "domain": "MYDOMAIN"+ }+ }+ }+ ```++ <Note>+ The password is not returned in the response for security reasons.+ </Note>+ </Tab>+</Tabs>\ No newline at end of file