-
Notifications
You must be signed in to change notification settings - Fork 1
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
Added functionality to remove passwords from clear text and support auditdb runtime credentials #8
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<#-- | ||
|
||
Copyright 2018 XEBIALABS | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
--> | ||
|
||
<#assign ddb_audit_user><#if deployed.container.audit_username?has_content>@set DDB_AUDIT_USER=${deployed.container.audit_username}</#if></#assign> | ||
<#assign ddb_audit_pass><#if deployed.container.audit_password?has_content>@set DDB_AUDIT_PASS=${deployed.container.audit_password}</#if></#assign> | ||
<#assign ddb_user><#if deployed.container.username?has_content>@set DDB_USER=${deployed.container.username}</#if></#assign> | ||
<#assign ddb_pass><#if deployed.container.password?has_content>@set DDB_PASS=${deployed.container.password}</#if></#assign> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<#-- | ||
|
||
Copyright 2018 XEBIALABS | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
--> | ||
|
||
<#assign ddb_audit_user><#if deployed.container.audit_username?has_content>export DDB_AUDIT_USER=${deployed.container.audit_username} > /dev/null</#if></#assign> | ||
<#assign ddb_audit_pass><#if deployed.container.audit_password?has_content>export DDB_AUDIT_PASS=${deployed.container.audit_password} > /dev/null</#if></#assign> | ||
<#assign ddb_user><#if deployed.container.username?has_content>export DDB_USER=${deployed.container.username} > /dev/null</#if></#assign> | ||
<#assign ddb_pass><#if deployed.container.password?has_content>export DDB_PASS=${deployed.container.password} > /dev/null</#if></#assign> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,18 @@ | |
|
||
--> | ||
<#include "/datical/datical_generic.ftl"> | ||
<#include "/datical/datical_credentials.bat.ftl"> | ||
${ddb_audit_user} | ||
${ddb_audit_pass} | ||
${ddb_user} | ||
${ddb_pass} | ||
<#-- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can those lines be removed? Why are they commented out? Looks like a leftover from testing the changes. |
||
echo DDB_USER=%DDB_USER% | ||
echo DDB_PASS=%DDB_PASS% | ||
echo DDB_AUDIT_USER=%DDB_AUDIT_USER% | ||
echo DDB_AUDIT_PASS=%DDB_AUDIT_PASS% | ||
--> | ||
<#-- | ||
${login} -p ${deployed.targetPath} deploy ${environment} ${labels} ${reports} ${pipeline} | ||
--> | ||
${login_simple} -p ${deployed.targetPath} deploy ${environment} ${labels} ${reports} ${pipeline} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,12 @@ | |
|
||
<#assign login>${deployed.container.home} <#if deployed.container.username?has_content>-un ${environment}:::${deployed.container.username} -pw ${environment}:::${deployed.container.password}</#if></#assign> | ||
|
||
<#assign login_simple>${deployed.container.home} </#assign> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is |
||
|
||
<#assign labels><#if deployed.labels?has_content>--labels="${deployed.labels}"</#if></#assign> | ||
|
||
<#assign reports><#if deployed.reportsLocation?has_content>--report="${deployed.reportsLocation}"</#if></#assign> | ||
|
||
<#assign pipeline><#if deployed.pipeline?has_content>--pipeline="${deployed.pipeline}"</#if></#assign> | ||
|
||
|
||
<#assign curl><#if deployed.curl_path?has_content>"${deployed.curl_path} --insecure --request POST https://${deployed.daticalweb_host}/service/reporting/qa/v1/audit-db/sync"</#if></#assign> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,19 @@ | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
--> | ||
|
||
<#include "/datical/datical_credentials.sh.ftl"> | ||
<#include "/datical/datical_generic_undeploy.ftl"> | ||
<#if previousDeployed.changeids?size gt 0> | ||
<#list previousDeployed.changeids as changeid> | ||
<#-- | ||
${login} -p ${previousDeployed.targetPath} rollback ${environment} changeid:id=${changeid} | ||
--> | ||
${login} -p ${previousDeployed.targetPath} rollback ${environment} changeid:id=${changeid} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be |
||
</#list> | ||
<#else> | ||
<#-- | ||
${login} -p ${previousDeployed.targetPath} rollback ${environment} lastdeploy | ||
--> | ||
${login} -p ${previousDeployed.targetPath} rollback ${environment} lastdeploy | ||
</#if> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<#-- | ||
|
||
Copyright 2018 XEBIALABS | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
--> | ||
<#include "/datical/datical_generic.ftl"> | ||
<#include "/datical/datical_credentials.bat.ftl"> | ||
${ddb_audit_user} | ||
${ddb_audit_pass} | ||
${ddb_user} | ||
${ddb_pass} | ||
<#-- | ||
echo DDB_USER=%DDB_USER% | ||
echo DDB_PASS=%DDB_PASS% | ||
echo DDB_AUDIT_USER=%DDB_AUDIT_USER% | ||
echo DDB_AUDIT_PASS=%DDB_AUDIT_PASS% | ||
--> | ||
<#-- | ||
${login} -p ${deployed.targetPath} status ${environment} | ||
--> | ||
${login_simple} -p ${deployed.targetPath} status ${environment} | ||
${curl} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<#-- | ||
|
||
Copyright 2018 XEBIALABS | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
--> | ||
<#include "/datical/datical_generic.ftl"> | ||
<#include "/datical/datical_credentials.sh.ftl"> | ||
${ddb_audit_user} | ||
${ddb_audit_pass} | ||
${ddb_user} | ||
${ddb_pass} | ||
<#-- | ||
echo DDB_USER=$DDB_USER | ||
echo DDB_PASS=$DDB_PASS | ||
echo DDB_AUDIT_USER=$DDB_AUDIT_USER | ||
echo DDB_AUDIT_PASS=$DDB_AUDIT_PASS | ||
--> | ||
<#-- | ||
${login} -p ${deployed.targetPath} statusDetails ${environment} | ||
--> | ||
echo "Refeshing status with Datical Management Console ..." | ||
if [ "${curl}" != "" ] && [ "${daticalweb}" != "" ]; then | ||
${login_simple} -p ${deployed.targetPath} status ${environment} | ||
${curl} --insecure --request POST https://${daticalweb}/service/reporting/qa/v1/audit-db/sync | ||
else | ||
echo "INFO: curl Command Path not set. Or Datical Web Hostname not specified." | ||
fi | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ | |
</steps> | ||
</rule> | ||
|
||
|
||
<!-- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this rule commented out? |
||
<rule name="datical.DeployedProject.DESTROY" scope="deployed"> | ||
<conditions> | ||
<type>datical.DeployedProject</type> | ||
|
@@ -93,13 +93,11 @@ | |
<deployed expression="true">previousDeployed</deployed> | ||
</freemarker-context> | ||
</os-script> | ||
|
||
<os-script> | ||
<description expression="true">"Undeploy datical %s" % previousDeployed.name</description> | ||
<script>datical/datical_undeploy</script> | ||
<order>42</order> | ||
</os-script> | ||
|
||
<os-script> | ||
<description expression="true">"Remove project [%s] from server" % previousDeployed.name</description> | ||
<script>datical/datical_remove</script> | ||
|
@@ -111,6 +109,7 @@ | |
</os-script> | ||
</steps> | ||
</rule> | ||
--> | ||
|
||
<rule name="datical.DeployedProject.StatusDetail.DESTROY" scope="deployed"> | ||
<conditions> | ||
|
@@ -131,5 +130,20 @@ | |
</steps> | ||
</rule> | ||
|
||
<rule name="datical.DeployedProject.StatusDetail.After.CREATE" scope="deployed"> | ||
<conditions> | ||
<type>datical.DeployedProject</type> | ||
<operation>CREATE</operation> | ||
<operation>MODIFY</operation> | ||
</conditions> | ||
<steps> | ||
<os-script> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we do this using a Jython step (maybe using requests). That would remove the dependency on |
||
<description expression="true">"Refresh Datical Monitoring Console"</description> | ||
<script>datical/daticalweb_status_refresh</script> | ||
<order>63</order> | ||
<upload-artifacts>false</upload-artifacts> | ||
</os-script> | ||
</steps> | ||
</rule> | ||
|
||
</rules> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these 4 lines needed? Shouldn't the include be enough? So taking out the assign from the include statement?