Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftp/Delete.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Delete a file from an FTP server."
title = "Delete a remote FTP file",
description = "Removes the specified file on the server. Defaults: port 21, passive mode on, remote IP verification on, paths relative to user home."
)
@Plugin(
examples = {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftp/Download.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Download file from an FTP server."
title = "Download a file from FTP",
description = "Fetches a single remote file to internal storage. Defaults: port 21, passive mode on, remote IP verification on, paths relative to user home."
)
@Plugin(
examples = {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftp/Downloads.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Download multiple files from an FTP server."
title = "Download multiple files from FTP",
description = "Lists matching files then downloads them to internal storage. Respects `maxFiles` (default 25) and optional post-download action (MOVE/DELETE). Defaults: port 21, passive mode on, remote IP verification on, paths relative to user home."
)
@Plugin(
examples = {
Expand Down
28 changes: 17 additions & 11 deletions src/main/java/io/kestra/plugin/fs/ftp/FtpInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

public interface FtpInterface {
@Schema(
title = "FTP proxy host"
title = "FTP proxy hostname"
)
Property<String> getProxyHost();

Expand All @@ -26,17 +26,20 @@ public interface FtpInterface {
Property<Proxy.Type> getProxyType();

@Schema(
title = "Is the path relative to the user's home directory"
title = "Treat path as user home root",
description = "If true (default), remote paths are resolved relative to the authenticated user's home directory."
)
Property<Boolean> getRootDir();

@Schema(
title = "Whether to use a [passive mode](https://www.jscape.com/blog/active-v-s-passive-ftp-simplified). Passive mode is generally considered more secure as it's less likely to encounter issues with NAT and firewalls. Therefore, this property is by default set to `true`. To use active mode instead, set the property to `false`."
title = "Use passive data connections",
description = "Passive mode avoids most firewall and NAT issues and is enabled by default (`true`). Set to `false` to force active mode."
)
Property<Boolean> getPassiveMode();

@Schema(
title = "Ensure the server IP responding matches the one that received the request."
title = "Verify data channel IP",
description = "Ensures the responding server IP matches the control connection to prevent spoofed data channels."
)
Property<Boolean> getRemoteIpVerification();

Expand All @@ -47,33 +50,36 @@ public interface FtpInterface {
@Jacksonized
class Options {
@Schema(
title = "The timeout for the initial control connection."
title = "Control connection timeout",
description = "Maximum time to open the control channel. Default 30s."
)
@Builder.Default
Property<Duration> connectionTimeout = Property.ofValue(Duration.ofSeconds(30));

@Schema(
title = "The timeout for opening the data channel."
title = "Data channel timeout",
description = "Maximum time to open the data socket. Default 30s."
)
@Builder.Default
Property<Duration> dataTimeout = Property.ofValue(Duration.ofSeconds(30));

@Schema(
title = "The socket timeout."
title = "Socket read timeout",
description = "Timeout for socket reads and writes once connected. Default 30s."
)
@Builder.Default
Property<Duration> socketTimeout = Property.ofValue(Duration.ofSeconds(30));

@Schema(
title = "The control keep-alive timeout.",
description = "Ensures the socket stays alive after downloading a large file."
title = "Control keep-alive interval",
description = "Sends keep-alive commands during long transfers. Default 30s."
)
@Builder.Default
Property<Duration> controlKeepAliveTimeout = Property.ofValue(Duration.ofSeconds(30));

@Schema(
title = "The control keep-alive reply timeout.",
description = "Ensures the socket stays alive after downloading a large file."
title = "Keep-alive reply timeout",
description = "How long to wait for keep-alive responses before failing. Default 30s."
)
@Builder.Default
Property<Duration> controlKeepAliveReplyTimeout = Property.ofValue(Duration.ofSeconds(30));
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftp/List.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "List files from an FTP server directory."
title = "List files in an FTP directory",
description = "Lists entries under the given path with optional regexp filter. Defaults: port 21, passive mode on, remote IP verification on, paths relative to user home."
)
@Plugin(
examples = {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/kestra/plugin/fs/ftp/Move.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Move a file to an FTP server.",
description ="If the destination directory doesn't exist, it will be created"
title = "Move or rename an FTP file",
description = "Moves/renames a remote file; destination directories are created when missing. Defaults: port 21, passive mode on, remote IP verification on, paths relative to user home."
)
@Plugin(
examples = {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftp/Trigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Trigger a flow as soon as new files are detected in a given FTP server's directory."
title = "Trigger on new FTP files",
description = "Polls a remote directory on the interval and starts a Flow when new files appear. Defaults: port 21, passive mode on, remote IP verification on, paths relative to user home. Use `action` MOVE/DELETE to avoid reprocessing."
)
@Plugin(
examples = {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftp/Upload.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Upload a file to an FTP server."
title = "Upload a file to FTP",
description = "Pushes one local file to the remote path. Defaults: port 21, passive mode on, remote IP verification on, paths relative to user home."
)
@Plugin(
examples = {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftp/Uploads.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Upload files to an FTP server's directory."
title = "Upload multiple files to FTP",
description = "Uploads each provided file to the target directory. Defaults: port 21, passive mode on, remote IP verification on, paths relative to user home."
)
@Plugin(
examples = {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftps/Delete.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Delete a file from an FTPS server."
title = "Delete a remote FTPS file",
description = "Removes the specified file over FTPS. Defaults: port 990, EXPLICIT mode, PROT P data channel, passive mode on, remote IP verification on, paths relative to user home. `insecureTrustAllCertificates` skips SSL checks for testing."
)
@Plugin(
examples = {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftps/Download.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Download a file from an FTPS server."
title = "Download a file from FTPS",
description = "Fetches a single remote file over FTPS. Defaults: port 990, EXPLICIT mode, PROT P data channel, passive mode on, remote IP verification on, paths relative to user home. `insecureTrustAllCertificates` skips SSL checks for testing."
)
@Plugin(
examples = {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftps/Downloads.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Download multiple files from an FTPS server."
title = "Download multiple files from FTPS",
description = "Lists matching files then downloads them over FTPS. Respects `maxFiles` (default 25) and optional post-download action (MOVE/DELETE). Defaults: port 990, EXPLICIT mode, PROT P data channel, passive mode on, remote IP verification on, paths relative to user home. Use `insecureTrustAllCertificates` only for testing."
)
@Plugin(
examples = {
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/io/kestra/plugin/fs/ftps/FtpsInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@

public interface FtpsInterface {
@Schema(
title = "Sets FTPS mode, either \"implicit\" or \"explicit\"."
title = "Select FTPS mode",
description = "Choose implicit or explicit FTPS. Default EXPLICIT."
)
Property<FtpsMode> getMode();


@Schema(
title = "Sets the data channel protection level (PROT)."
title = "Data channel protection level",
description = "PROT command value (`P`, `C`, etc.). Default P (encrypted)."
)
Property<FtpsDataChannelProtectionLevel> getDataChannelProtectionLevel();

@Schema(
title = "Whether the client should disable checking of the remote SSL certificate.",
description = "Note: This makes the SSL connection insecure, and should only be used for testing."
title = "Trust all certificates",
description = "Skip server certificate validation. Insecure; use only for testing."
)
Property<Boolean> getInsecureTrustAllCertificates();
}
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftps/List.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "List files from an FTPS server directory."
title = "List files in an FTPS directory",
description = "Lists entries under the given path with optional regexp filter. Defaults: port 990, EXPLICIT mode, PROT P data channel, passive mode on, remote IP verification on, paths relative to user home. Use `insecureTrustAllCertificates` only for testing."
)
@Plugin(
examples = {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/kestra/plugin/fs/ftps/Move.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Move a file to an FTPS server.",
description ="If the destination directory doesn't exist, it will be created"
title = "Move or rename an FTPS file",
description = "Moves/renames a remote file; destination directories are created when missing. Defaults: port 990, EXPLICIT mode, PROT P data channel, passive mode on, remote IP verification on, paths relative to user home. `insecureTrustAllCertificates` skips SSL checks for testing."
)
@Plugin(
examples = {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftps/Trigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Trigger a flow as soon as new files are detected in a given FTPS server's directory."
title = "Trigger on new FTPS files",
description = "Polls a remote directory on the interval and starts a Flow when new files appear. Defaults: port 990, EXPLICIT mode, PROT P data channel, passive mode on, remote IP verification on, paths relative to user home. Use `action` MOVE/DELETE to prevent repeated triggering; `insecureTrustAllCertificates` is for testing only."
)
@Plugin(
examples = {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftps/Upload.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Upload a file to an FTPS server."
title = "Upload a file to FTPS",
description = "Pushes one local file over FTPS. Defaults: port 990, EXPLICIT mode, PROT P data channel, passive mode on, remote IP verification on, paths relative to user home. `insecureTrustAllCertificates` skips SSL checks for testing."
)
@Plugin(
examples = {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/kestra/plugin/fs/ftps/Uploads.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Upload files to an FTPS server's directory."
title = "Upload multiple files to FTPS",
description = "Uploads each provided file over FTPS to the target directory. Defaults: port 990, EXPLICIT mode, PROT P data channel, passive mode on, remote IP verification on, paths relative to user home. `insecureTrustAllCertificates` skips SSL checks for testing."
)
@Plugin(
examples = {
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/io/kestra/plugin/fs/local/Copy.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Copy files within the local file system.",
title = "Copy files on the local filesystem",
description = """
Local filesystem access is disabled by default.
You must configure the plugin default `allowed-paths` in your Kestra configuration.
Copies files or directories within allowed local paths. Local access requires configuring `allowed-paths` in plugin defaults; operations outside are blocked.
Set `overwrite: true` to replace existing targets.

Example (Kestra config):
```yaml
Expand Down Expand Up @@ -62,20 +62,20 @@
public class Copy extends AbstractLocalTask implements RunnableTask<VoidOutput> {

@Schema(
title = "The file or directory to move from local file system."
title = "Source file or directory path"
)
@NotNull
private Property<String> from;

@Schema(
title = "The path to move the file or directory to on the local file system."
title = "Destination path on the local file system"
)
@NotNull
private Property<String> to;

@Schema(
title = "Overwrite.",
description = "If set to false, it will raise an exception if the destination folder or file already exists."
title = "Overwrite existing files",
description = "If false, the task fails when the destination already exists."
)
@Builder.Default
protected Property<Boolean> overwrite = Property.ofValue(false);
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/io/kestra/plugin/fs/local/Delete.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Delete a file or directory from the local filesystem.",
title = "Delete local file or directory",
description = """
Local filesystem access is disabled by default.
You must configure the plugin default `allowed-paths` in your Kestra configuration.
Removes a file or directory under the configured `allowed-paths`; access outside is denied. Recursive deletion defaults to true for directories.
Set `errorOnMissing: true` to fail when the target is absent.

Example (Kestra config):
```yaml
Expand Down Expand Up @@ -57,17 +57,17 @@
)
public class Delete extends AbstractLocalTask implements RunnableTask<Delete.Output> {

@Schema(title = "The local file path to delete")
@Schema(title = "Local path to delete")
@NotNull
private Property<String> from;

@Schema(title = "Raise an error if the file is not found")
@Schema(title = "Raise an error if missing")
@Builder.Default
private Property<Boolean> errorOnMissing = Property.ofValue(false);

@Schema(
title = "Whether to include subdirectories",
description = "If true, the task will recursively delete files in all subdirectories."
title = "Include subdirectories",
description = "If true, deletes directory contents recursively."
)
@Builder.Default
private Property<Boolean> recursive = Property.ofValue(true);
Expand Down Expand Up @@ -135,4 +135,4 @@ public static class Output implements io.kestra.core.models.tasks.Output {
@Schema(title = "Whether the file was deleted")
private final boolean deleted;
}
}
}
12 changes: 6 additions & 6 deletions src/main/java/io/kestra/plugin/fs/local/Download.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
@Getter
@NoArgsConstructor
@Schema(
title = "Download a file from the local filesystem to the Kestra internal storage.",
title = "Download local file to internal storage",
description = """
Local filesystem access is disabled by default.
You must configure the plugin default `allowed-paths` in your Kestra configuration.
Copies a local file (within configured `allowed-paths`) into Kestra internal storage. Fails if the source is missing; preserves size and file extension when possible.
Local access requires `allowed-paths` in plugin defaults.

Example (Kestra config):
```yaml
Expand Down Expand Up @@ -58,8 +58,8 @@
public class Download extends AbstractLocalTask implements RunnableTask<Download.Output> {

@Schema(
title = "Source file path on the local filesystem",
description = "Absolute path of the file to download"
title = "Source file path",
description = "Absolute local path of the file to download"
)
@NotNull
private Property<String> from;
Expand Down Expand Up @@ -104,4 +104,4 @@ public static class Output implements io.kestra.core.models.tasks.Output {
)
private Long size;
}
}
}
Loading
Loading