Skip to content

Commit c704f87

Browse files
authored
DOC-1233 Add private_key field to SFTP input and output (#219)
1 parent 230d210 commit c704f87

File tree

2 files changed

+52
-40
lines changed

2 files changed

+52
-40
lines changed

modules/components/pages/inputs/sftp.adoc

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ Common::
2323
--
2424
2525
```yml
26-
# Common config fields, showing default values
26+
# Common configuration fields, showing default values
2727
input:
2828
label: ""
2929
sftp:
3030
address: "" # No default (required)
3131
credentials:
32-
username: ""
33-
password: ""
34-
private_key_file: ""
35-
private_key_pass: ""
32+
username: "" # No default (optional)
33+
password: "" # No default (optional)
34+
private_key_file: "" # No default (optional)
35+
private_key: "" # No default (optional)
36+
private_key_pass: "" # No default (optional)
3637
paths: [] # No default (required)
3738
auto_replay_nacks: true
3839
scanner:
@@ -41,7 +42,7 @@ input:
4142
enabled: false
4243
minimum_age: 1s
4344
poll_interval: 1s
44-
cache: ""
45+
cache: "" # No default (optional)
4546
```
4647
4748
--
@@ -50,16 +51,17 @@ Advanced::
5051
--
5152
5253
```yml
53-
# All config fields, showing default values
54+
# All configuration fields, showing default values
5455
input:
5556
label: ""
5657
sftp:
5758
address: "" # No default (required)
5859
credentials:
59-
username: ""
60-
password: ""
61-
private_key_file: ""
62-
private_key_pass: ""
60+
username: "" # No default (optional)
61+
password: "" # No default (optional)
62+
private_key_file: "" # No default (optional)
63+
private_key: "" # No default (optional)
64+
private_key_pass: "" # No default (optional)
6365
paths: [] # No default (required)
6466
auto_replay_nacks: true
6567
scanner:
@@ -69,7 +71,7 @@ input:
6971
enabled: false
7072
minimum_age: 1s
7173
poll_interval: 1s
72-
cache: ""
74+
cache: "" # No default (optional)
7375
```
7476
7577
--
@@ -87,23 +89,22 @@ You can access these metadata fields using xref:configuration:interpolation.adoc
8789

8890
=== `address`
8991

90-
The address of the server to connect to.
91-
92+
The address (hostname or IP address) of the SFTP server to connect to.
9293

9394
*Type*: `string`
9495

9596

9697
=== `credentials`
9798

98-
The credentials to use to log into the target server.
99+
The credentials required to log in to the SFTP server. This can include a username and password, or a private key for secure access.
99100

100101

101102
*Type*: `object`
102103

103104

104105
=== `credentials.username`
105106

106-
The username to connect to the SFTP server.
107+
The username required to authenticate with the SFTP server.
107108

108109

109110
*Type*: `string`
@@ -112,32 +113,39 @@ The username to connect to the SFTP server.
112113

113114
=== `credentials.password`
114115

115-
The password for the username to connect to the SFTP server.
116+
The password for the username used to authenticate with the SFTP server.
116117

117118
include::components:partial$secret_warning.adoc[]
118119

119120

120-
121121
*Type*: `string`
122122

123123
*Default*: `""`
124124

125125
=== `credentials.private_key_file`
126126

127-
The private key for the username to connect to the SFTP server.
127+
The path to a private key file used to authenticate with the SFTP server. You can also provide a private key using the <<credentials-private_key,`private_key`>> field.
128+
129+
*Type*: `string`
130+
131+
*Default*: `""`
128132

133+
=== `credentials.private_key`
134+
135+
The private key used to authenticate with the SFTP server. This field provides an alternative to the <<credentials-private_key_file, `private_key_file`>>.
136+
137+
include::components:partial$secret_warning.adoc[]
129138

130139
*Type*: `string`
131140

132141
*Default*: `""`
133142

134143
=== `credentials.private_key_pass`
135144

136-
Optional passphrase for private key.
145+
A passphrase for the private key.
137146

138147
include::components:partial$secret_warning.adoc[]
139148

140-
141149
*Type*: `string`
142150

143151
*Default*: `""`
@@ -146,7 +154,6 @@ include::components:partial$secret_warning.adoc[]
146154

147155
A list of paths to consume sequentially. Glob patterns are supported.
148156

149-
150157
*Type*: `array`
151158

152159

modules/components/pages/outputs/sftp.adoc

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@ Introduced in version 3.39.0.
1717
endif::[]
1818

1919
```yml
20-
# Config fields, showing default values
20+
# Configuration fields, showing default values
2121
output:
2222
label: ""
2323
sftp:
2424
address: "" # No default (required)
2525
path: "" # No default (required)
2626
codec: all-bytes
2727
credentials:
28-
username: ""
29-
password: ""
30-
private_key_file: ""
31-
private_key_pass: ""
28+
username: "" # No default (optional)
29+
password: "" # No default (optional)
30+
private_key_file: "" # No default (optional)
31+
private_key: "" # No default (optional)
32+
private_key_pass: "" # No default (optional)
3233
max_in_flight: 64
3334
```
3435

@@ -42,16 +43,13 @@ This output benefits from sending multiple messages in flight in parallel for im
4243

4344
=== `address`
4445

45-
The address of the server to connect to.
46-
46+
The address (hostname or IP address) of the SFTP server to connect to.
4747

4848
*Type*: `string`
4949

50-
5150
=== `path`
5251

53-
The file to save the messages to on the server.
54-
This field supports xref:configuration:interpolation.adoc#bloblang-queries[interpolation functions].
52+
The file to save the messages to on the SFTP server. This field supports xref:configuration:interpolation.adoc#bloblang-queries[interpolation functions].
5553

5654

5755
*Type*: `string`
@@ -92,15 +90,14 @@ codec: delim:foobar
9290

9391
=== `credentials`
9492

95-
The credentials to use to log into the target server.
96-
93+
The credentials required to log in to the SFTP server. This can include a username and password, or a private key for secure access.
9794

9895
*Type*: `object`
9996

10097

10198
=== `credentials.username`
10299

103-
The username to connect to the SFTP server.
100+
The username required to authenticate with the SFTP server.
104101

105102

106103
*Type*: `string`
@@ -109,28 +106,36 @@ The username to connect to the SFTP server.
109106

110107
=== `credentials.password`
111108

112-
The password for the username to connect to the SFTP server.
109+
The password for the username used to authenticate with the SFTP server.
113110

114111
include::components:partial$secret_warning.adoc[]
115112

116113

117-
118114
*Type*: `string`
119115

120116
*Default*: `""`
121117

122118
=== `credentials.private_key_file`
123119

124-
The private key for the username to connect to the SFTP server.
125-
120+
The path to a private key file used to authenticate with the SFTP server. You can also provide a private key using the <<credentials-private_key,`private_key`>> field.
126121

127122
*Type*: `string`
128123

129124
*Default*: `""`
130125

126+
=== `credentials.private_key`
127+
128+
The private key used to authenticate with the SFTP server. This field provides an alternative to the <<credentials-private_key_file, `private_key_file`>>.
129+
130+
include::components:partial$secret_warning.adoc[]
131+
132+
133+
*Type*: `string`
134+
135+
131136
=== `credentials.private_key_pass`
132137

133-
Optional passphrase for private key.
138+
A passphrase for private key.
134139

135140
include::components:partial$secret_warning.adoc[]
136141

0 commit comments

Comments
 (0)