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

Deploy mojo should use maven's encrypted password functionality #77

Open
paulprogrammer opened this issue Aug 25, 2017 · 4 comments
Open

Comments

@paulprogrammer
Copy link

The maven's configuration allows for servers to include encrypted passwords as part of the config.

http://maven.apache.org/settings.html#Servers

We should update the plugin to read the encrypted profile data, to adhere to PCI and HIPAA rules, as well as just good operational practice.

@ssvaidyanathan
Copy link
Collaborator

ssvaidyanathan commented Sep 2, 2017

Hi @paulprogrammer
You can still do it using profiles within your settings.xml. Thats how I have been using.

In your project's pom.xml, say you have the following profile:

<profile>
    <id>test</id>
    <properties>
    <apigee.profile>test</apigee.profile>
    <apigee.env>test</apigee.env>
    <apigee.hosturl>https://api.enterprise.apigee.com</apigee.hosturl>
    <apigee.apiversion>v1</apigee.apiversion>
    <apigee.org>${org}</apigee.org>
    <apigee.username>${username}</apigee.username>
    <apigee.password>${password}</apigee.password>
    <apigee.options>update</apigee.options>
    <api.northbound.domain>${org}-test.apigee.net</api.northbound.domain>
    <api.testtag>~@wip</api.testtag>
   </properties>
 </profile>

You can include a settings.xml in your ~/.m2 directory and externalize all of these params so that you dont have to pass them

For example:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      https://maven.apache.org/xsd/settings-1.0.0.xsd">
 
    <profiles>
       <profile>
            <id>test</id>
            <properties>
                <org>apigeeOrg</org>
                <username>[email protected]</username>
                <password>secret</password>
                <env>test</env>
            </properties>
        </profile> 
    </profiles>
    <activeProfiles>
        <activeProfile>test</activeProfile>
    </activeProfiles>

</settings>

Once you have this, you can just execute mvn clean install -Ptest . The properties are automatically picked from settings.xml and applied

Or else you can use OAuth tokens where these passwords are not needed to be passed

@ssvaidyanathan
Copy link
Collaborator

@paulprogrammer - will the above comment help or are you looking for anything in particular ? IF not, please close this issue

@paulprogrammer
Copy link
Author

paulprogrammer commented Oct 9, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants