Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNG-8372] Augment error message to give users more context when running into deprecated encryption warning #1898

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public SettingsDecryptionResult decrypt(SettingsDecryptionRequest request) {
try {
if (securityDispatcher.isLegacyEncryptedString(password)) {
problems.add(new DefaultSettingsProblem(
"Legacy/insecurely encrypted password detected for server " + server.getId(),
"Pre-Maven 4 legacy encrypted password detected for server " + server.getId()
+ " - configure password encryption with the help of mvnenc to be compatible with Maven 4.",
Severity.WARNING,
"server: " + server.getId(),
-1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ Java version: 21.0.4, vendor: Eclipse Adoptium, runtime: /home/cstamas/.sdkman/c
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.11.4-201.fc40.x86_64", arch: "amd64", family: "unix"
[INFO] Scanning for projects...
[INFO]
[INFO]
[INFO] ---------------< org.apache.maven.it.mresolver614:root >----------------
[INFO] Building root 1.0.0
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO]
[INFO] --- toolbox:0.3.5:tree (default-cli) @ root ---
[INFO] org.apache.maven.it.mresolver614:root:jar:1.0.0
[INFO] ╰─org.apache.maven.it.mresolver614:level1:jar:1.0.0 [compile]
Expand All @@ -43,7 +43,7 @@ OS name: "linux", version: "6.11.4-201.fc40.x86_64", arch: "amd64", family: "uni
[INFO] Total time: 0.192 s
[INFO] Finished at: 2024-10-24T19:20:39+02:00
[INFO] ------------------------------------------------------------------------
$
$
```

Example output with 4.0.0-beta-5: **this version is transitive but broken**, as it applies level2 depMgt onto its own
Expand All @@ -56,15 +56,15 @@ Java version: 21.0.4, vendor: Eclipse Adoptium, runtime: /home/cstamas/.sdkman/c
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.11.4-201.fc40.x86_64", arch: "amd64", family: "unix"
[WARNING] Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it.
[WARNING] Legacy/insecurely encrypted password detected for server my-legacy-server
[WARNING] Legacy/insecurely encrypted password detected for server my-legacy-broken-server
[WARNING] Pre-Maven 4 legacy encrypted password detected for server my-legacy-server - configure password encryption with the help of mvnenc to be compatible with Maven 4.
[WARNING] Pre-Maven 4 legacy encrypted password detected for server my-legacy-broken-server - configure password encryption with the help of mvnenc to be compatible with Maven 4.
[INFO] Scanning for projects...
[INFO]
[INFO]
[INFO] ----------------------------------------< org.apache.maven.it.mresolver614:root >-----------------------------------------
[INFO] Building root 1.0.0
[INFO] from pom.xml
[INFO] ---------------------------------------------------------[ jar ]----------------------------------------------------------
[INFO]
[INFO]
[INFO] --- toolbox:0.3.5:tree (default-cli) @ root ---
[INFO] org.apache.maven.it.mresolver614:root:jar:1.0.0
[INFO] ╰─org.apache.maven.it.mresolver614:level1:jar:1.0.0 [compile]
Expand All @@ -79,7 +79,7 @@ OS name: "linux", version: "6.11.4-201.fc40.x86_64", arch: "amd64", family: "uni
[INFO] Total time: 0.285 s
[INFO] Finished at: 2024-10-24T19:21:10+02:00
[INFO] --------------------------------------------------------------------------------------------------------------------------
$
$
```

The **expected** output is:
Expand All @@ -103,15 +103,15 @@ Java version: 21.0.4, vendor: Eclipse Adoptium, runtime: /home/cstamas/.sdkman/c
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.11.4-201.fc40.x86_64", arch: "amd64", family: "unix"
[WARNING] Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it.
[WARNING] Legacy/insecurely encrypted password detected for server my-legacy-server
[WARNING] Legacy/insecurely encrypted password detected for server my-legacy-broken-server
[WARNING] Pre-Maven 4 legacy encrypted password detected for server my-legacy-server - configure password encryption with the help of mvnenc to be compatible with Maven 4.
[WARNING] Pre-Maven 4 legacy encrypted password detected for server my-legacy-broken-server - configure password encryption with the help of mvnenc to be compatible with Maven 4.
[INFO] Scanning for projects...
[INFO]
[INFO]
[INFO] ----------------------------------------< org.apache.maven.it.mresolver614:root >-----------------------------------------
[INFO] Building root 1.0.0
[INFO] from pom.xml
[INFO] ---------------------------------------------------------[ jar ]----------------------------------------------------------
[INFO]
[INFO]
[INFO] --- toolbox:0.3.5:tree (default-cli) @ root ---
[INFO] org.apache.maven.it.mresolver614:root:jar:1.0.0
[INFO] ╰─org.apache.maven.it.mresolver614:level1:jar:1.0.0 [compile]
Expand All @@ -126,5 +126,5 @@ OS name: "linux", version: "6.11.4-201.fc40.x86_64", arch: "amd64", family: "uni
[INFO] Total time: 0.312 s
[INFO] Finished at: 2024-10-24T21:11:21+02:00
[INFO] --------------------------------------------------------------------------------------------------------------------------
$
```
$
```