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

GSS bz-2274193 noobaa db cleartext postgres password #9806

Merged
merged 8 commits into from
May 20, 2024
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import logging

from ocs_ci.framework.testlib import tier2, BaseTest, bugzilla
from ocs_ci.framework.pytest_customization.marks import red_squad, mcg
from ocs_ci.framework import config
from ocs_ci.ocs.resources import pod


log = logging.getLogger(__name__)


PrasadDesala marked this conversation as resolved.
Show resolved Hide resolved
@tier2
@bugzilla("2274193")
class TestNoobaaSecurity(BaseTest):
"""
Test Noobaa Security
"""

@mcg
@red_squad
@bugzilla("2274193")
PrasadDesala marked this conversation as resolved.
Show resolved Hide resolved
def test_noobaa_db_cleartext_postgres_password(self):
"""
1.Get noobaa db pod
2.Get logs from all containers in pod oc logs "noobaa-db-pg-0 --all-containers"
3.Verify postgres password does not exist in noobaa-db pod logs
"""
nooobaa_db_pod_obj = pod.get_noobaa_db_pod()
log.info(
"Get logs from all containers in pod 'oc logs noobaa-db-pg-0 --all-containers'"
)
nooobaa_db_pod_logs = pod.get_pod_logs(
pod_name=nooobaa_db_pod_obj.name,
namespace=config.ENV_DATA["cluster_namespace"],
all_containers=True,
)
log.info("Verify postgres password does not exist in noobaa-db pod logs")
assert (
"set=password" not in nooobaa_db_pod_logs
), f"noobaa-db pod logs include password logs:{nooobaa_db_pod_logs}"
Loading