SftpFetcher
Secure File Transfer Protocol (SFTP) fetcher.
Notes
Fetches documents from SFTP (SSH File Transfer Protocol) servers. Supports credentials, compression, known hosts verification, preferred authentication method ordering, file name encoding, and strict host key checking.
Usage
- YAML
- JSON
- XML
class: SftpFetcher
acl: NONE
compression: string
connectTimeout: 0
credentials:
password: string
passwordKey:
size: 0
source: KEY
value: string
username: string
domain: string
fileNameEncoding: string
knownHosts: string
preferredAuthentications: string
referenceFilters: []
strictHostKeyChecking: string
userDirIsRoot: false
{
"class": "SftpFetcher",
"acl": "NONE",
"compression": "string",
"connectTimeout": 0,
"credentials": {
"password": "string",
"passwordKey": {
"size": 0,
"source": "KEY",
"value": "string"
},
"username": "string"
},
"domain": "string",
"fileNameEncoding": "string",
"knownHosts": "string",
"preferredAuthentications": "string",
"referenceFilters": [],
"strictHostKeyChecking": "string",
"userDirIsRoot": false
}
<sftpFetcher>
<class>SftpFetcher</class>
<acl>NONE</acl>
<compression>string</compression>
<connectTimeout>0</connectTimeout>
<credentials>
<password>string</password>
<passwordKey>
<size>0</size>
<source>KEY</source>
<value>string</value>
</passwordKey>
<username>string</username>
</credentials>
<domain>string</domain>
<fileNameEncoding>string</fileNameEncoding>
<knownHosts>string</knownHosts>
<preferredAuthentications>string</preferredAuthentications>
<referenceFilters>
<referenceFilter/>
</referenceFilters>
<strictHostKeyChecking>string</strictHostKeyChecking>
<userDirIsRoot>false</userDirIsRoot>
</sftpFetcher>
Properties
| Property | Type | Required | Default |
|---|---|---|---|
acl | enum | No | NONE |
compression | string | No | - |
connectTimeout | integer | No | - |
credentials | Credentials | No | Credentials |
domain | string | No | - |
fileNameEncoding | string | No | - |
knownHosts | string | No | - |
preferredAuthentications | string | No | - |
referenceFilters | ReferenceFilter[] | No | - |
strictHostKeyChecking | string | No | no |
userDirIsRoot | boolean | No | false |
Property Details
acl
Which permissions to read and write on each file as its access control list (ACL), in the crawler.acl field: NONE
(the default) or BASIC, the owner, group and mode bits, all that SFTP gives. With EXTENDED, the server's extended
ACLs, if any, cannot be read, so one warning is logged for the crawl and the files' ACLs are partial. A path level
says who may go through every folder above the file. SFTP gives the owner and group as numbers (uid, gid), of the
directory unix:<host>.
The ACL lists who may read the document, as one or more levels a person must all pass; within a level, a deny wins over
an allow. Committers send it as their own acl option says. When the permissions could only be read in part, the ACL
is marked partial, and a committer withholds the document unless its acl.partial is SEND; when they could not be
read at all, it always withholds it. A permission change alone does not change a file's date or size: to have it
noticed, use a metadata checksum that includes crawler.acl, such as a GenericMetadataChecksummer on the fields
crawler\.(lastModified|fileSize|acl).
Allowed Values
NONEBASICEXTENDED
compression
The compression algorithms to use to enable compression (e.g., "zlib,none").
connectTimeout
Timeout value to create the connection. Leave blank for no timeout.
credentials
Username and password used to authenticate with the SFTP server.
domain
The domain name for authentication when accessing the remote resource.
fileNameEncoding
The character encoding to use for file names.
knownHosts
Path to the known_hosts file (e.g., /home/user/.ssh/known_hosts2).
preferredAuthentications
Comma-separated order of authentication methods to try (e.g., publickey,password,keyboard-interactive).
referenceFilters
Filters applied to document references (URLs or file paths) to control which ones are fetched. Documents whose references do not pass the filters are skipped.
strictHostKeyChecking
Whether to verify the host key ("yes", "no" or "ask").
userDirIsRoot
When enabled, the user's home directory on the remote server is treated as the root directory for navigation.