Bug 1538947 - [RFE] Suggest that the generating he setup answer file by cockpit don't contain HE password as clear text.
Summary: [RFE] Suggest that the generating he setup answer file by cockpit don't conta...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: cockpit-ovirt
Classification: oVirt
Component: Hosted Engine
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.2.2
: 0.11.12
Assignee: Phillip Bailey
QA Contact: Yihui Zhao
URL:
Whiteboard:
Depends On: 1548958
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-26 08:30 UTC by Yihui Zhao
Modified: 2018-03-29 11:03 UTC (History)
12 users (show)

Fixed In Version: cockpit-ovirt-0.11.12-0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-29 11:03:06 UTC
oVirt Team: Integration
Embargoed:
rbarry: ovirt-4.2?
rule-engine: planning_ack?
sbonazzo: devel_ack+
cshao: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 86972 0 master MERGED wizard: Randomize var file names and delete on finish 2018-02-20 14:27:35 UTC
oVirt gerrit 87102 0 master POST wizard: Randomize file name for OTOPI answer file 2018-02-03 02:26:17 UTC
oVirt gerrit 87940 0 ovirt-4.2 MERGED wizard: Randomize var file names and delete on finish 2018-02-20 14:27:50 UTC

Description Yihui Zhao 2018-01-26 08:30:18 UTC
Description of problem: 
Suggest that the generating he setup answer file by cockpit  don't contain HE password.


Version-Release number of selected component (if applicable): 
cockpit-ws-157-1.el7.x86_64
cockpit-dashboard-157-1.el7.x86_64
cockpit-bridge-157-1.el7.x86_64
cockpit-157-1.el7.x86_64
cockpit-storaged-157-1.el7.noarch
cockpit-system-157-1.el7.noarch
cockpit-ovirt-dashboard-0.11.4-0.1.el7ev.noarch
rhvh-4.2.1.1-0.20180115.0+1
ovirt-hosted-engine-setup-2.2.5-1.el7ev.noarch
ovirt-hosted-engine-ha-2.2.3-1.el7ev.noarch
rhvm-appliance-4.2-20171219.0.el7.noarch

How reproducible: 
100% 


Steps to Reproduce: 
1. Clean install rhvh-4.2.1.1-0.20180115.0+1 with ks
2. Deploy HE via cockpit
3. Check the he answer file (/tmp/he-setup-answerfile.conf)

Actual results: 
#cat /tmp/he-setup-answerfile.conf
[environment:default]
"""

OVEHOSTED_VM/cloudinitRootPwd=str:redhat

"""


Expected results: 
There is no clear text HE password in the he answer file.

Additional info:

Comment 1 Yedidyah Bar David 2018-01-29 06:34:29 UTC
The answer file should be protected. Simplest is probably creating it using the equivalent of 'mktemp'.

Other than that, I do not think it's worth investing in making passwords in it (strongly) encrypted. Note that if we do want that, it will require changes also in hosted-engine-setup, perhaps also in the engine. We have cleartext passwords (and other secrets) elsewhere. Having an option to get rid of all of these was discussed in the past and postponed.

Comment 2 Yedidyah Bar David 2018-01-29 06:35:48 UTC
Also, IIRC we noticed that it's not removed in the end. It should be, also on failure.

Comment 3 Yihui Zhao 2018-03-02 06:08:00 UTC
Tested cockpit-ovirt-0.11.14-0.1 on RHEL7.4.

I noticed that change the answer file from prevoius /tmp/he-setup-answerfile.conf to /var/lib/ovirt-hosted-engine-setup/cockpit/heAnswerFile*.conf . Also exist the clear password, so what about your idea here or this is the design.



[environment:default]
OVEHOSTED_CORE/rollbackProceed=none:None
OVEHOSTED_CORE/screenProceed=none:None
OVEHOSTED_CORE/deployProceed=bool:true
OVEHOSTED_CORE/upgradeProceed=none:None
OVEHOSTED_CORE/confirmSettings=bool:true
OVEHOSTED_STORAGE/domainType=str:nfs3
OVEHOSTED_STORAGE/imgSizeGB=str:58
OVEHOSTED_STORAGE/storageDomain=str:hosted_storage
OVEHOSTED_STORAGE/storageDomainConnection=str:10.66.148.11:/home/yzhao/nfs2
OVEHOSTED_STORAGE/mntOptions=none:None
OVEHOSTED_NETWORK/bridgeIf=str:ovirtmgmt
OVEHOSTED_NETWORK/bridgeName=str:ovirtmgmt
OVEHOSTED_NETWORK/firewallManager=str:iptables
OVEHOSTED_NETWORK/gateway=str:10.73.75.254
OVEHOSTED_NETWORK/fqdn=str:rhevh-hostedengine-vm-04.lab.eng.pek2.redhat.com
OVEHOSTED_VM/bootDevice=str:disk
OVEHOSTED_VM/vmVCpus=str:4
OVEHOSTED_VM/vmMACAddr=str:52:54:00:5e:8e:c7
OVEHOSTED_VM/vmMemSizeMB=int:16384
OVEHOSTED_VM/cloudinitVMStaticCIDR=none:None
OVEHOSTED_VM/cloudinitVMDNS=str:
OVEHOSTED_VM/cloudinitVMTZ=str:Asia/Shanghai
OVEHOSTED_VM/cloudInitISO=str:generate
OVEHOSTED_VM/cloudinitInstanceHostName=str:rhevh-hostedengine-vm-04
OVEHOSTED_VM/cloudinitInstanceDomainName=str:lab.eng.pek2.redhat.com
OVEHOSTED_VM/cloudinitExecuteEngineSetup=bool:true
OVEHOSTED_VM/automateVMShutdown=bool:true

OVEHOSTED_VM/cloudinitRootPwd=str:redhat

OVEHOSTED_VM/rootSshPubkey=none:None
OVEHOSTED_VM/rootSshAccess=str:yes
OVEHOSTED_VM/cloudinitVMETCHOSTS=bool:true
OVEHOSTED_ENGINE/hostIdentifier=str:hosted_engine_1
OVEHOSTED_ENGINE/adminUsername=str:admin@internal

OVEHOSTED_ENGINE/adminPassword=str:redhat

OVEHOSTED_VDSM/consoleType=str:vnc
OVEHOSTED_VDSM/cpu=str:model_Opteron_G5
OVEHOSTED_NOTIF/smtpServer=str:localhost
OVEHOSTED_NOTIF/smtpPort=str:25
OVEHOSTED_NOTIF/sourceEmail=str:root@localhost
OVEHOSTED_NOTIF/destEmail=str:root@localhost

Comment 4 Ryan Barry 2018-03-02 12:32:05 UTC
This appears to be the design, as per comment#1

Comment 5 Yihui Zhao 2018-03-02 13:02:54 UTC
According to the Comment 3 and Comment 4, change this bug's status to verified.

Comment 6 Sandro Bonazzola 2018-03-29 11:03:06 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.