auth();
+
+ @ConfigGroup
+ interface Auth {
+
+ /**
+ * The username to use for the JSch proxy.
+ *
+ *
+ * {@code proxy.auth} is optional.
+ */
+ String username();
+
+ /**
+ * The password to use for the JSch proxy.
+ *
+ *
+ * {@code proxy.auth} is optional.
+ */
+ String password();
+
+ }
+
+}
diff --git a/runtime/src/main/java/io/quarkus/jsch/runtime/JSchRuntimeConfig.java b/runtime/src/main/java/io/quarkus/jsch/runtime/JSchRuntimeConfig.java
new file mode 100644
index 0000000..635402e
--- /dev/null
+++ b/runtime/src/main/java/io/quarkus/jsch/runtime/JSchRuntimeConfig.java
@@ -0,0 +1,36 @@
+package io.quarkus.jsch.runtime;
+
+import java.util.Map;
+import java.util.Optional;
+
+import io.quarkus.jsch.JSchSession;
+import io.quarkus.runtime.annotations.ConfigDocMapKey;
+import io.quarkus.runtime.annotations.ConfigDocSection;
+import io.quarkus.runtime.annotations.ConfigPhase;
+import io.quarkus.runtime.annotations.ConfigRoot;
+import io.smallrye.config.ConfigMapping;
+import io.smallrye.config.WithDefaults;
+import io.smallrye.config.WithName;
+import io.smallrye.config.WithUnnamedKey;
+
+@ConfigMapping(prefix = "quarkus.jsch")
+@ConfigRoot(phase = ConfigPhase.RUN_TIME)
+public interface JSchRuntimeConfig {
+
+ /**
+ * JSch sessions.
+ */
+ @ConfigDocMapKey("session-name")
+ @WithDefaults
+ @WithUnnamedKey(JSchSession.DEFAULT_SESSION_NAME)
+ @WithName("session")
+ @ConfigDocSection
+ Map sessions();
+
+ /**
+ * The default proxy configuration to use for each JSch session.
+ */
+ @ConfigDocSection
+ Optional proxy();
+
+}
diff --git a/runtime/src/main/java/io/quarkus/jsch/runtime/JSchSessionRecorder.java b/runtime/src/main/java/io/quarkus/jsch/runtime/JSchSessionRecorder.java
new file mode 100644
index 0000000..2e9733a
--- /dev/null
+++ b/runtime/src/main/java/io/quarkus/jsch/runtime/JSchSessionRecorder.java
@@ -0,0 +1,17 @@
+package io.quarkus.jsch.runtime;
+
+import java.util.function.Supplier;
+
+import com.jcraft.jsch.Session;
+
+import io.quarkus.jsch.JSchSessions;
+import io.quarkus.runtime.annotations.Recorder;
+
+@Recorder
+public class JSchSessionRecorder {
+
+ public Supplier jschSessionSupplier(String sessionName) {
+ return () -> JSchSessions.fromName(sessionName);
+ }
+
+}
diff --git a/runtime/src/main/java/io/quarkus/jsch/runtime/JSchSessionRuntimeConfig.java b/runtime/src/main/java/io/quarkus/jsch/runtime/JSchSessionRuntimeConfig.java
new file mode 100644
index 0000000..f0eff1f
--- /dev/null
+++ b/runtime/src/main/java/io/quarkus/jsch/runtime/JSchSessionRuntimeConfig.java
@@ -0,0 +1,71 @@
+package io.quarkus.jsch.runtime;
+
+import java.util.Map;
+import java.util.Optional;
+
+import io.quarkus.runtime.annotations.ConfigDocMapKey;
+import io.quarkus.runtime.annotations.ConfigDocSection;
+import io.quarkus.runtime.annotations.ConfigGroup;
+import io.smallrye.config.WithDefault;
+
+@ConfigGroup
+public interface JSchSessionRuntimeConfig {
+
+ /**
+ * The host to use for the JSch session.
+ */
+ @WithDefault("localhost")
+ String host();
+
+ /**
+ * The port to use for the JSch session.
+ */
+ @WithDefault("22")
+ int port();
+
+ /**
+ * The username to use for the JSch session.
+ */
+ Optional username();
+
+ /**
+ * The password to use for the JSch session.
+ */
+ Optional password();
+
+ /**
+ * The private key to use for the JSch session.
+ */
+ Optional key();
+
+ /**
+ * The passphrase to use for the JSch session.
+ */
+ Optional passphrase();
+
+ /**
+ * The configuration to use for the JSch session.
+ */
+ @ConfigDocMapKey("config-name")
+ Map config();
+
+ /**
+ * Mock the JSch session in dev and test mode.
+ */
+ @WithDefault("true")
+ boolean mock();
+
+ /**
+ * The keep alive interval to use for the JSch session.
+ *
+ * If zero is specified, any keep-alive message.
+ */
+ @WithDefault("0")
+ int keepAliveInterval();
+
+ /**
+ * The proxy to use for the JSch session.
+ */
+ @ConfigDocSection
+ Optional proxy();
+}
diff --git a/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index 91d0833..d1486f2 100644
--- a/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -6,4 +6,6 @@ metadata:
guide: https://quarkiverse.github.io/quarkiverse-docs/quarkus-jsch/dev/index.html
categories:
- "miscellaneous"
+ config:
+ - "quarkus.jsch."
# status: "preview"