ignite icon indicating copy to clipboard operation
ignite copied to clipboard

Encrypting the JKS password in the ignite-config.conf file

Open yarin1890 opened this issue 1 month ago • 2 comments

Hi there! I've deployed apache ignite version 3.0.0, but even though everything is working – I noticed that encrypting the JKS password in the ignite-config.conf file is impossible, I tried environment variables and a few other options – nothing worked. I would very much appreciate knowing the options I have for encrypting the password so it won't be plain text in the config file, or if there will be such an option soon, thank you!

yarin1890 avatar Nov 05 '25 13:11 yarin1890

The exception I am getting when trying to put environment variables in the ignite configuration file is org.apache.ignite.configuration.validation.ConfigurationValidationException: Failed to parse HOCON: need to Config#resolve(), see the API docs for Config#resolve(); substitution not resolved: ConfigReference at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710) at org.apache.ignite.internal.util.ExceptionUtils$10.copy(ExceptionUtils.java:1051) at org.apache.ignite.internal.util.ExceptionUtils$ExceptionFactory.createCopy(ExceptionUtils.java:873) at org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCause(ExceptionUtils.java:675) at org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCauseInternal(ExceptionUtils.java:808) at org.apache.ignite.internal.util.ExceptionUtils.copyExceptionWithCause(ExceptionUtils.java:653) at org.apache.ignite.internal.app.IgniteServerImpl.tryToCopyExceptionWithCause(IgniteServerImpl.java:543) at org.apache.ignite.internal.app.IgniteServerImpl.sync(IgniteServerImpl.java:535) at org.apache.ignite.internal.app.IgniteServerImpl.start(IgniteServerImpl.java:427) at org.apache.ignite.IgniteServer.start(IgniteServer.java:77) at org.apache.ignite.internal.app.IgniteRunner.call(IgniteRunner.java:49) at org.apache.ignite.internal.app.IgniteRunner.call(IgniteRunner.java:36) at picocli.CommandLine.executeUserObject(CommandLine.java:2041) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) at picocli.CommandLine.execute(CommandLine.java:2170) at org.apache.ignite.internal.app.IgniteRunner.start(IgniteRunner.java:61) at org.apache.ignite.internal.app.IgniteRunner.main(IgniteRunner.java:74) Caused by: java.util.concurrent.ExecutionException: org.apache.ignite.configuration.validation.ConfigurationValidationException: Failed to parse HOCON: need to Config#resolve(), see the API docs for Config#resolve(); substitution not resolved: ConfigReference(${xxxxxxxxx}) at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999) at org.apache.ignite.internal.app.IgniteServerImpl.sync(IgniteServerImpl.java:533) ... 14 more

emanuelh-cloud avatar Dec 09 '25 13:12 emanuelh-cloud

There is no .Resolve() in the method below

private SuperRoot convertToSuperRoot(String hocon) { try { Config config = ConfigFactory.parseString(hocon); KeyIgnorer keyIgnorer = module == null ? s -> false : KeyIgnorer.fromDeletedPrefixes(module.deletedPrefixes());

        ConfigurationSource hoconSource = HoconConverter.hoconSource(config.root(), keyIgnorer);

        SuperRoot superRoot = generator.createSuperRoot();
        hoconSource.descend(superRoot);

        return superRoot;
    } catch (Exception e) {
        throw new ConfigurationValidationException("Failed to parse HOCON: " + e.getMessage());
    }
}

emanuelh-cloud avatar Dec 09 '25 13:12 emanuelh-cloud