Skip to content
Reference

Adapter: SMB (Windows share)

Transfer files on an SMB (Windows) file share.

On this page

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), username and password. 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.

SettingTypeRequiredDefaultSecretDescription
hoststringYesNoSMB server hostname.
portnumberNo445NoSMB port.
sharestringYesNoShare name, e.g. inbound.
domainstringNo``NoWindows domain (may be empty).
usernamestringYesNoUser name.
passwordstringYesYesPassword.
timeoutnumberNo30000NoConnection and request timeout in milliseconds.
maxFileBytesnumberNo52428800NoLargest file a read loads into memory (bytes, counted as they arrive).
uploadModeenum: temp-rename, directNotemp-renameNotemp-rename writes a hidden .part file then renames it; direct writes the final name.
writeModeenum: overwrite, append, error-if-existsNooverwriteNooverwrite replaces an existing file; append adds to it (written directly); error-if-exists fails the step.
createDirsbooleanNofalseNoCreate 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.

ActionWhat it doesStep parametersKeys a message may supply
downloadRead a file from the SMB share.remotePath, encoding?None
uploadWrite a file to the SMB share.remotePath, filenamePattern?, content?content
listList files in a directory.remotePath?None
deleteDelete a file.remotePathNone
renameMove (rename) a file.fromPath, toPathNone

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.

json
{
  "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 maxFileBytes have 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 .part file onto it.
  • Append reads the file and writes it back whole: it is not atomic.
  • One connection per call, closed afterwards.

Reference