Skip to content

Tighten the security on Knative Serving pods from cluster local ingress accesses - #47

Closed
wtam2018 wants to merge 5 commits into
openshift-knative:release-1.3from
wtam2018:protect_monitoring_data
Closed

wtam2018 wants to merge 5 commits into
openshift-knative:release-1.3from
wtam2018:protect_monitoring_data

Conversation

@wtam2018

@wtam2018 wtam2018 commented Dec 4, 2019 •

Copy link
Copy Markdown
Contributor

Fixes: https://jira.coreos.com/browse/SRVKS-227
The current Network Policies on knative serving pods grant ingress access from anywhere. The proposed changes are to change the Network Polices on the following pods:

  • Activator, autoscaler, controller - allow pods in the namespace of monitoring policy group member
  • Networking-istio networking-certmanager - disallow pods from anyway.

Network prolicy on Webhook is unchanged.

Note that pods in namespace member of service mesh control plane and openshift ingress router group can still access to knative serving pods as allowed by other Network Polices.

ServiceMonitor as documented https://docs.openshift.com/container-platform/4.2/serverless/monitoring-serverless.html should continue to work.

…ntroller, and autoscaler pods. No ingress access to netoworking-istio and networking-istio pods. Note that pods in member namespaces of the service messh control plane are still allowed.
@openshift-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wtam2018
To complete the pull request process, please assign bbrowning
You can assign the PR to them by writing /assign @bbrowning in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot

Copy link
Copy Markdown

Hi @wtam2018. Thanks for your PR.

I'm waiting for a openshift-knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@mgencur

mgencur commented Dec 4, 2019

Copy link
Copy Markdown
Contributor

Can you please add some tests? The test framework is there and already includes some tests for security aspects (normal user vs. admin).

@markusthoemmes

Copy link
Copy Markdown
Contributor

/ok-to-test

@wtam2018

wtam2018 commented Dec 4, 2019

Copy link
Copy Markdown
Contributor Author

/test 4.3-e2e-aws-ocp-43

@wtam2018

wtam2018 commented Dec 4, 2019

Copy link
Copy Markdown
Contributor Author

@mgencur Can you point me to where the security tests are?

@wtam2018

wtam2018 commented Dec 4, 2019

Copy link
Copy Markdown
Contributor Author

/re-test

@mgencur

mgencur commented Dec 5, 2019

Copy link
Copy Markdown
Contributor

@wtam2018

Copy link
Copy Markdown
Contributor Author

/test 4.1-upgrade-tests-aws-ocp-41

@wtam2018

Copy link
Copy Markdown
Contributor Author

@markusthoemmes

Copy link
Copy Markdown
Contributor

/hold

We shouldn't merge against 1.3 anymore. Will cut a proper master soon.

@bbrowning

Copy link
Copy Markdown
Contributor

This also doesn't really do anything to fix the underlying issue. Every namespace in the cluster that uses Knative will be part of the same Service Mesh AND a user can automatically get any namespace added to that Service Mesh by just deploying a Knative Service. So, any user in any namespace on the cluster can still hit those metrics endpoints.

@markusthoemmes

Copy link
Copy Markdown
Contributor

Closing this as outdated. Please reopen against master if still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants