Skip to content

Commit 7d57b25

Browse files
authored
3943 fixed manifest and documentation for Helidon Config Encryption for Helidon 3.x (helidon-io#4013)
* Fixed class path and documentation. * Applied comments. Fixed help. * Fixed checkstyle.
1 parent 87bc8d7 commit 7d57b25

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

config/encryption/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2017, 2021 Oracle and/or its affiliates.
4+
Copyright (c) 2017, 2022 Oracle and/or its affiliates.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -85,6 +85,7 @@
8585
<configuration>
8686
<archive>
8787
<manifest>
88+
<addClasspath>true</addClasspath>
8889
<mainClass>io.helidon.config.encryption.Main</mainClass>
8990
</manifest>
9091
</archive>

config/encryption/src/main/java/io/helidon/config/encryption/Main.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2021 Oracle and/or its affiliates.
2+
* Copyright (c) 2018, 2022 Oracle and/or its affiliates.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -52,11 +52,12 @@ public static void main(String[] args) {
5252

5353
private static void help() {
5454
System.out.println("To encrypt password using master password to be used in a property file:");
55-
System.out.println("java -jar secure-config-version.jar aes masterPassword secretToEncrypt");
55+
System.out.println("java -jar <path-to-app-libs-dir>/helidon-config-encryption-{helidon-version}.jar "
56+
+ "aes masterPassword secretToEncrypt");
5657
System.out.println();
5758
System.out.println("To encrypt password using public key to be used in a property file:");
58-
System.out.println("java -jar secure-config-version.jar rsa /path/to/pkcs12keystore keystorePassphrase "
59-
+ "publicCertAlias secretToEncrypt");
59+
System.out.println("java -jar <path-to-app-libs-dir>/helidon-config-encryption-{helidon-version}.jar "
60+
+ "rsa /path/to/pkcs12keystore keystorePassphrase publicCertAlias secretToEncrypt");
6061
}
6162

6263
enum Algorithm {

docs/mp/security/03_configuration-secrets.adoc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///////////////////////////////////////////////////////////////////////////////
22

3-
Copyright (c) 2018, 2020 Oracle and/or its affiliates.
3+
Copyright (c) 2018, 2022 Oracle and/or its affiliates.
44

55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -91,9 +91,8 @@ The config encryption filter provides a Main class `io.helidon.config.encryption
9191
[source,bash]
9292
.Encrypt secret `secretToEncrypt` using shared secret `masterPassword`
9393
----
94-
java io.helidon.config.encryption.Main aes masterPassword secretToEncrypt
94+
java -jar <path-to-app-libs-dir>/helidon-config-encryption-{helidon-version}.jar aes masterPassword secretToEncrypt
9595
----
96-
9796
The tool returns the string to be entered into configuration as the value of a
9897
property.
9998
@@ -124,7 +123,7 @@ The config encryption filter provides a Main class `io.helidon.config.encryption
124123
[source,bash]
125124
.Encrypt secret `secretToEncrypt` using public certificate in a keystore
126125
----
127-
java io.helidon.config.encryption Main rsa /path/to/keystore.p12 keystorePassword publicCertAlias secretToEncrypt
126+
java -jar <path-to-app-libs-dir>/helidon-config-encryption-{helidon-version}.jar rsa /path/to/keystore.p12 keystorePassword publicCertAlias secretToEncrypt
128127
----
129128
130129
The tool returns the string to be entered into configuration as the value of a

0 commit comments

Comments
 (0)