# 8.3 Gateway Config Secrets

**URL:** <https://forum.inductiveautomation.com/t/8-3-gateway-config-secrets/110445>\
**Category:** Module Development\
**Tags:** ignition83\
**Created:** [September 8, 2025, 11:16am UTC](https://forum.inductiveautomation.com/t/8-3-gateway-config-secrets/110445 "2025-09-08T11:16:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [September 8, 2025, 11:16am UTC](https://forum.inductiveautomation.com/t/8-3-gateway-config-secrets/110445/1 "2025-09-08T11:16:49Z")

</div>

Is there any examples of a gateway config with secrets (Device login passwords or similar) for 8.3? I have worked out most of the rest, I just seem to be missing something to enable the password to save.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 8, 2025, 11:52am UTC](https://forum.inductiveautomation.com/t/8-3-gateway-config-secrets/110445/2 "2025-09-08T11:52:28Z")

</div>

You're using `SecretConfig` for the field type in your config class? Is this an `ExtensionPointResourceForm` or something custom?

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [September 8, 2025, 11:58am UTC](https://forum.inductiveautomation.com/t/8-3-gateway-config-secrets/110445/3 "2025-09-08T11:58:57Z")

</div>

```java
@Nonnull
@Required
@FormCategory("SETTINGS")
@Label("Password")
@FormField(FormFieldType.SECRET)
SecretConfig password,

```

This appears fine, but I don't seem to be able to get the non-secret text back out later in the module, so I was hoping there was an example of that mechanism around.

```java
public Connection(String host, String user, Secret password, boolean secure, boolean ackEnabled) throws SecretException {
    try {
            this.password = password.getPlaintext().getAsString();
        } catch (SecretException e) {
            throw new RuntimeException(e);
        }

```

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 8, 2025, 12:02pm UTC](https://forum.inductiveautomation.com/t/8-3-gateway-config-secrets/110445/4 "2025-09-08T12:02:47Z")

</div>

```java
GatewayContext context = ...;
SecretConfig password = ...;

Secret<?> secret = Secret.create(context, password);

secret.getPlaintext().getAsBytes();
secret.getPlaintext().getAsString();

```

---

<div class="post-metadata">

**Author:** ![jspecht](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jspecht/32/6465_2.png) [@jspecht](https://forum.inductiveautomation.com/u/jspecht)\
**Post date:** [September 9, 2025, 4:27pm UTC](https://forum.inductiveautomation.com/t/8-3-gateway-config-secrets/110445/5 "2025-09-09T16:27:33Z")

</div>

Just as another reference / example: we recently added a Mongo DB backed user source profile in the SDK examples which retrieves the Mongo DB password as a secret: [ignition-sdk-examples/user-source-profile/user-source-gateway/src/main/java/com/inductiveautomation/ignition/examples/usersource/mongodb/MongoDbUserSource.java at f9aa673775043d4dafb0eddcc77981645528a2a2 · inductiveautomation/ignition-sdk-examples · GitHub](https://github.com/inductiveautomation/ignition-sdk-examples/blob/f9aa673775043d4dafb0eddcc77981645528a2a2/user-source-profile/user-source-gateway/src/main/java/com/inductiveautomation/ignition/examples/usersource/mongodb/MongoDbUserSource.java#L127)
