Skip to content

Commit

Permalink
3943 fixed manifest and documentation for Helidon Config Encryption f…
Browse files Browse the repository at this point in the history
…or Helidon 3.x (#4013)

* Fixed class path and documentation.

* Applied comments. Fixed help.

* Fixed checkstyle.
  • Loading branch information
dalexandrov authored Mar 29, 2022
1 parent 87bc8d7 commit 7d57b25
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion config/encryption/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2017, 2021 Oracle and/or its affiliates.
Copyright (c) 2017, 2022 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -85,6 +85,7 @@
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>io.helidon.config.encryption.Main</mainClass>
</manifest>
</archive>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2021 Oracle and/or its affiliates.
* Copyright (c) 2018, 2022 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -52,11 +52,12 @@ public static void main(String[] args) {

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

enum Algorithm {
Expand Down
7 changes: 3 additions & 4 deletions docs/mp/security/03_configuration-secrets.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2018, 2020 Oracle and/or its affiliates.
Copyright (c) 2018, 2022 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -91,9 +91,8 @@ The config encryption filter provides a Main class `io.helidon.config.encryption
[source,bash]
.Encrypt secret `secretToEncrypt` using shared secret `masterPassword`
----
java io.helidon.config.encryption.Main aes masterPassword secretToEncrypt
java -jar <path-to-app-libs-dir>/helidon-config-encryption-{helidon-version}.jar aes masterPassword secretToEncrypt
----
The tool returns the string to be entered into configuration as the value of a
property.
Expand Down Expand Up @@ -124,7 +123,7 @@ The config encryption filter provides a Main class `io.helidon.config.encryption
[source,bash]
.Encrypt secret `secretToEncrypt` using public certificate in a keystore
----
java io.helidon.config.encryption Main rsa /path/to/keystore.p12 keystorePassword publicCertAlias secretToEncrypt
java -jar <path-to-app-libs-dir>/helidon-config-encryption-{helidon-version}.jar rsa /path/to/keystore.p12 keystorePassword publicCertAlias secretToEncrypt
----
The tool returns the string to be entered into configuration as the value of a
Expand Down

0 comments on commit 7d57b25

Please sign in to comment.