Adapter: SMB (Windows share)
Transfer files on an SMB (Windows) file share.
Purpose
Read, write, list, move and delete files on an SMB (Windows) file share: the SMB scheme of a Mirth File Reader or File Writer. Pick files up with the file pickup trigger.
Auth
- NTLMv2 with
domain(may be empty),usernameandpassword. NTLMv1 and LM responses are never sent: a login that cannot be built as NTLMv2 is refused, and a server that accepts only NTLMv1 cannot be reached. The password is encrypted at rest.
Settings
Auth is no selector; the secret settings below are the credentials. Dotted names are fields inside an object setting. Secret settings are encrypted at rest, never returned by a read, and shown masked in the console and in exports; their defaults are not shown.
| Setting | Type | Required | Default | Secret | Description |
|---|---|---|---|---|---|
host | string | Yes | No | SMB server hostname. | |
port | number | No | 445 | No | SMB port. |
share | string | Yes | No | Share name, e.g. inbound. | |
domain | string | No | `` | No | Windows domain (may be empty). |
username | string | Yes | No | User name. | |
password | string | Yes | Yes | Password. | |
timeout | number | No | 30000 | No | Connection and request timeout in milliseconds. |
maxFileBytes | number | No | 52428800 | No | Largest file a read loads into memory (bytes, counted as they arrive). |
uploadMode | enum: temp-rename, direct | No | temp-rename | No | temp-rename writes a hidden .part file then renames it; direct writes the final name. |
writeMode | enum: overwrite, append, error-if-exists | No | overwrite | No | overwrite replaces an existing file; append adds to it (written directly); error-if-exists fails the step. |
createDirs | boolean | No | false | No | Create the parent directory before writing. |
Actions
A trailing ? marks an optional step parameter. A message can supply only the keys in the last column; everything else comes from the step.
| Action | What it does | Step parameters | Keys a message may supply |
|---|---|---|---|
download | Read a file from the SMB share. | remotePath, encoding? | None |
upload | Write a file to the SMB share. | remotePath, filenamePattern?, content? | content |
list | List files in a directory. | remotePath? | None |
delete | Delete a file. | remotePath | None |
rename | Move (rename) a file. | fromPath, toPath | None |
Minimal example
The smallest profile the engine accepts: the required settings only, with synthetic values. Create it with POST /api/adapter-profiles, then test it with POST /api/adapter-profiles/{id}/test.
{
"name": "SMB (Windows share) (example)",
"adapterType": "smb",
"config": {
"host": "example-host",
"share": "example-share",
"username": "example-username",
"password": "synthetic-secret"
}
}Limits
- The client speaks SMB 2.0.2 and 2.1, with no SMB3 encryption or signing, so every profile gets a warning on save: use it only over a private network or a VPN tunnel.
- For PHI, mount the share with the Kubernetes SMB CSI driver instead (the kernel cifs client: SMB 3 encryption and Kerberos), list it in Helm
fileAdapter.mounts, and use the Local File adapter. - A read stops once more than
maxFileByteshave arrived, whatever size the server reports. - The host goes through the SSRF rules: the cloud metadata server is always refused, and a private address needs
SSRF_ALLOWLIST. The engine connects to the address it checked. - Paths are relative to the share, with
/as the separator. A..segment is refused. - A rename never replaces an existing file, so an overwrite removes the old file first, then renames the
.partfile onto it. - Append reads the file and writes it back whole: it is not atomic.
- One connection per call, closed afterwards.