Skip to content

[MNG-8425] creating maven encryption settings creates invalid settings #10202

Description

@jira-importer

James Nord opened MNG-8425 and commented

I ran through the wizard to create a new maven4 encryption setup and then tried to encrypt a password.
the password encryption failed telling me
"Maven Encryption is not configured, run mvnenc init first."

 

Steps to reproduce

Create a maven 4 encryption context to use an environment variable:

  • Start the Maven 4 encryption wizard to setup encryption ({}mvn --force --enc init{})
  • Choose "Master Password Dispatcher"
  • Choose "Environment variable (variable name should be edited)"
  • Choose "AES/GCM/NoPadding"
  • when promped for the variable enter "{}MVN_PASSWORD{}"
  • check the proposed values look correct and approve with "Y"
  • wait for the file to be written

Set the variable for maven to use

  • SET MVN_PASSWORD=TESTING_PASSWORD  (or use export on *nix like system)

Attempt to create an encrypted password

  •  mvn --enc encrypt

Expected results

  • there is a prompt for the password that is to be encrytped
  • an encrypted password is output

Actual results

The command tells you encryption is not configured.

 

mvn --enc encrypt
Configuration validation of MavenSecDispatcher: INVALID
  Configuration file present on path C:\Users\jnord\.m2\settings-security4.xml
  Default dispatcher configured
  Legacy dispatcher present in system
  Legacy dispatcher is operational; transparent fallback possible
  Configured default dispatcher configuration is invalid
  Configuration validation of MasterDispatcher: INVALID
    Configured Cipher supported
    Configured Source configuration not handled
  Configuration validation of LegacyDispatcher: VALID
    Legacy configuration found with encrypted master password
    Legacy master password successfully decrypted
Maven Encryption is not configured, run `mvnenc init` first. 

 

 


Affects: 4.0.0-rc-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:majorMajor loss of function

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions