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

Remove no_log: True from openshift_version calls #7288

Merged

Conversation

sdodson
Copy link
Member

@sdodson sdodson commented Feb 26, 2018

#6519 set no_log: True on several plays and tasks in order to prevent logging credentials that come over from the inventory. However that's led to openshift_version role being invoked in a manner that it omits required debugging information like the following. I think we need to be very careful not to apply no_log: True at the playbook level and instead only use it on specific tasks that are known to emit sensitive information.

I think it's also worth considering that the ansible logs simply need to be treated as sensitive data and handled appropriately rather than omitting potentially useful debugging data.

# ansible-playbook /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_9/upgrade.yml

TASK [openshift_version : Get available atomic-openshift version] *************************************************************************************************************************************************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_version/tasks/check_available_rpms.yml:2
Using module file /usr/share/ansible/openshift-ansible/roles/lib_utils/library/repoquery.py

TASK [openshift_version : fail] ***********************************************************************************************************************************************************************************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_version/tasks/check_available_rpms.yml:8
fatal: [host-xxxx.redhat.com]: FAILED! => {
    "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", 
    "changed": false
}

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 26, 2018
@sdodson
Copy link
Member Author

sdodson commented Feb 26, 2018

https://github.com/openshift/openshift-ansible/blob/master/playbooks/init/basic_facts.yml#L18 also adds no_log: True to a playbook and I'm concerned it may mask vital information.

Copy link
Contributor

@michaelgugino michaelgugino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2018
@dak1n1
Copy link
Contributor

dak1n1 commented Feb 26, 2018

Hmm, this does present a dilemma. I don't want to obscure the debugging logs either. Unfortunately, the secrets are revealed at the play level, during Gathering Facts. This is from a previous test I did:

PLAY [Determine openshift_version to configure on first master] ****************

TASK [Gathering Facts] *********************************************************
Thursday 08 February 2018  00:26:08 +0000 (0:00:01.890)       0:00:22.929 ***** 

<snip>
 "storage": {"s3": {"secretkey": <REDACTED>
<snip>

I double-checked and thankfully only the S3 creds are revealed here. So it's probably an acceptable level of risk. I will run it by our security lead to be sure, but I'll give this PR a +1.

Copy link
Contributor

@dak1n1 dak1n1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@michaelgugino
Copy link
Contributor

@sdodson @dak1n1
This looks like another gift from openshift_facts. That would be the only reason these values would be on disk and readable.

IMO, this is a potential security concern; we shouldn't be storing secrets in openshift_facts for exactly this reason.

We should prioritize the removal of these variables from openshift_facts

@dak1n1
Copy link
Contributor

dak1n1 commented Feb 26, 2018

@michaelgugino I agree. Let's get this tracked somehow. Should I make a bz bug? Or github issue?

@michaelgugino
Copy link
Contributor

@dak1n1 Let's put it on BZ, sometimes issues don't always get the attention they deserve and this should be a high priority.

@dak1n1
Copy link
Contributor

dak1n1 commented Feb 26, 2018

@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue.

@openshift-merge-robot openshift-merge-robot merged commit 344f0a3 into openshift:master Feb 27, 2018
@openshift-ci-robot
Copy link

@sdodson: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/openshift-jenkins/system-containers 0a5f4dc link /test system-containers
ci/openshift-jenkins/extended_conformance_install_crio 0a5f4dc link /test crio

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants