Skip to content

[MNG-5438] cli parameter to use a custom path settings-security.xml #6494

Open

Description

@jira-importer

Sarah Haselbauer opened MNG-5438 and commented

added -ssec as cli param, so that you have the same flexibility to place your settings-security.xml as you have to point to a custom settings.xml file

mvn -s /path/to/my/custom/settings.xml -ssec /path/to/my/custom/settings-security.xml

I attached to patches: one that can be run on the maven-3.0.4 tag and one that can be run on trunk (latest code state of today).
I also attached a maven-3.0.4-bin.zip (linux) so you can quickly try out the feature and test it yourself.

if you like the idea, I would welcome to have this feature merged into one of the next releases. I need it to write a puppet-maven module that allows to download artifacts from maven repositories with encrypted passwords in the puppet recipe.


Affects: 3.0.4, 3.0.5

Attachments:

Issue Links:

  • MNG-6089 Define a command line option to define settings-security.xml as well as settings.xml as well

  • MNG-4853 Make location of settings-security.xml configurable

5 votes, 9 watchers

Activity

  1. jira-importer commented on Feb 21, 2017

    @jira-importer
    Author

    Paul Landolt commented

    This has been a big "missing" for a long time. Any team using shared build machines and enterprise build tools (Bamboo, Jenkins, TeamCity, etc) must patch around this on the fly.

    The proposed solution worked at the time. What are the odds of an updated patch / pull request getting accepted?

  2. jira-importer commented on Feb 21, 2017

    @jira-importer
    Author

    Paul Landolt commented

    Patch file against code as of Feb-20-2017. Follows current checkstyle rules

  3. jira-importer commented on May 29, 2019

    @jira-importer
    Author

    Matthias Balke commented

    When is this change planned to be released? It seems that there is no progress since last year in here.

  4. jira-importer commented on May 30, 2019

    @jira-importer
    Author

    Robert Scholte commented

    I prefer not to have an additional commandline argument for this. The settings-security file is strongly bound the the users settings.xml, so I would prefer to have these files in the same directory.
    Allowing any random location might open a security breach.

  5. jira-importer commented on Nov 14, 2019

    @jira-importer
    Author

    Logan Mzz commented

    So may be you can change '-s' behavior to accept a directory ?

     

    Because you said its strongly bound but for the moment you can change 'settings.xml' location but not 'security-settings.xml' one

  6. jira-importer commented on Nov 14, 2019

    @jira-importer
    Author

    Robert Scholte commented

    Either that or var securitySettings = settings.resolveSibling("security-settings.xml"); where settings is a Path.

  7. jira-importer commented on Jan 22, 2020

    @jira-importer
    Author

    Ed Randall commented

    MNG-4853 already gave us -Dsettings.security=path/to/settings-security.xml, so any security breach is already present. And there's also the relocation mechanism.

    The system actually become less secure if we are forced to keep settings.xml and settings-security.xml in the same directory (even if permissions are tightened).

    We would like the ability to keep them separate in different locations so the permissions on settings-security.xml can be locked down rather more tightly (maybe separate filesystem, hidden/accessible by CI user only). This would allow developers to be permitted to view settings.xml whilst storing settings-security.xml safely out of the way.

    Stalling this long-awaited feature on grounds of security becomes rather moot, this is just a usability convenience.

  8. added
    enhancement
    priority:major
    on Jul 6, 2025
  9. modified the milestones: , 4.x on Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority:major

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions