Skip to content

Conversation

@pacevedom
Copy link
Contributor

No description provided.

@openshift-ci openshift-ci bot requested review from ibihim and knobunc September 7, 2022 07:50
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 8, 2022
@pacevedom
Copy link
Contributor Author

/hold
Need to rework.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 13, 2022
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 15, 2022
@pacevedom
Copy link
Contributor Author

/unhold
Ready for review. Depends on #27345
/assign @ingvagabund

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 15, 2022
// This test should use image.ShellImage but this requires having a local image
// registry, which not all deployment types have. Using LDAP test image guarantees
// capsh presence.
pod, err := exutil.NewPodExecutor(oc, "restrictedcapsh", image.OpenLDAPTestImage())
Copy link
Member

Choose a reason for hiding this comment

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

@stlaz for taking a look

Copy link
Member

Choose a reason for hiding this comment

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

@openshift/openshift-team-auth PTAL

Copy link
Member

Choose a reason for hiding this comment

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

@pacevedom is there a less complex image than LDAP? Something on the same level of complexity as the shell image? Complexity = minimum rpm installation/configuration inside the image. I assume you choosed OpenLDAPTestImage since it's publicly available from quay.io/openshifttest/ldap:1.2. I wonder whether we run these tests in a disconnected environment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly, took this one mainly for being publicly available. I checked other public images having capsh for size and number of RPMs and got:

  • quay.io/redhat-developer/test-build-simples2i:1.2. 216 MB, 186 RPMs.
  • quay.io/redhat-developer/test-build-roots2i:1.2. 216 MB, 186 RPMs.
  • quay.io/openshifttest/multicast:1.1. 267 MB, 240 RPMs.
  • quay.io/openshifttest/ldap:1.2. 375 MB, 306 RPMs.

So I will update it with either of the first two.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good

@pacevedom pacevedom force-pushed the ushift-sig-auth branch 3 times, most recently from 8b607fe to 184784a Compare September 23, 2022 07:50
@pacevedom
Copy link
Contributor Author

/hold
Need to get of microshift checks

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 23, 2022
@pacevedom
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 26, 2022
@pacevedom
Copy link
Contributor Author

/retest-required

2 similar comments
@pacevedom
Copy link
Contributor Author

/retest-required

@pacevedom
Copy link
Contributor Author

/retest-required

operatorsCoreOSGroup,
imageGroup,
),
func() {
Copy link
Member

Choose a reason for hiding this comment

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

Would you please put func() { right after the previous line as (, func() {? To reduce the diff. If that does not help you might move fmt.Sprintf next to g.It(.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

kubeInformers := informers.NewSharedInformerFactory(oc.AdminKubeClient(), 20*time.Minute)
ruleResolver := exutil.NewRuleResolver(kubeInformers.Rbac().V1()) // signal what informers we want to use early
g.It(
fmt.Sprintf("should have correct RBAC rules [apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s]",
Copy link
Member

Choose a reason for hiding this comment

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

This is quite complex. allUnauthenticatedRules is the source of so many groups. I'd rather turn allUnauthenticatedRules into a api-group-key map and loop over all apigroups over g.It("should have correct RBAC rules", func() { rather than have all groups in a single test name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mind if we change this in the next PR?

Copy link
Member

Choose a reason for hiding this comment

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

Making the change later would put the next work into backlog most likely. Better to do it now.

)

var _ = g.Describe("[sig-auth][Feature:OAuthServer] OAuth server", func() {
var _ = g.Describe("[sig-auth][Feature:OAuthServer] OAuth server [apigroup:auth.openshift.io]", func() {
Copy link
Member

@ingvagabund ingvagabund Sep 29, 2022

Choose a reason for hiding this comment

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

Is the requirement coming from oc get --raw /.well-known/oauth-authorization-server?

EDIT: From the previous review comment: "// MicroShift does not have the oauth well known data path in the API Server". So it does.

// This test should use image.ShellImage but this requires having a local image
// registry, which not all deployment types have. Using LDAP test image guarantees
// capsh presence.
pod, err := exutil.NewPodExecutor(oc, "restrictedcapsh", image.OpenLDAPTestImage())
Copy link
Member

Choose a reason for hiding this comment

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

@openshift/openshift-team-auth PTAL

oc := exutil.NewCLI("default-rbac-policy")

g.It("should have correct RBAC rules", func() {
g.It(fmt.Sprintf("should have correct RBAC rules [apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s][apigroup:%s]",
Copy link
Member

Choose a reason for hiding this comment

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

This is quite complex. allUnauthenticatedRules is the source of so many groups. I'd rather turn allUnauthenticatedRules into a api-group-key map and loop over all apigroups over g.It("should have correct RBAC rules", func() { rather than have all groups in a single test name.

Copy link
Contributor

@stlaz stlaz Oct 20, 2022

Choose a reason for hiding this comment

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

I don't think it's safe to break the test apart. I am not sure why these groups are listed here though because you don't actually need the API groups, you only need the RBAC group, the rest are just strings.

Copy link
Member

Choose a reason for hiding this comment

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

You are right. Also, I don't see an easy way how to run the test minus missing apigroups since the test is doing set diff of both "what's currently available" and "what's expected to be available".

Copy link
Member

Choose a reason for hiding this comment

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

Obvious approach is to dynamically detect the apigroups based on exutil.DoesApiResourceExist, constructing both allAuthenticatedRules and allUnauthenticatedRules based on the apigroup presence and then running the comparision/coverage. Though, there's more than just api group detection which needs to be taken into account. E.g. https://github.com/openshift/origin/blob/master/test/extended/authorization/rbac/groups_default_rules.go#L91-L94.

https://github.com/openshift/origin/blob/master/test/extended/authorization/rbac/groups_default_rules.go#L97-L100 can be removed. Maybe the legacy groups in https://github.com/openshift/origin/blob/master/test/extended/authorization/rbac/groups_default_rules.go#L59-L66 as well? What about https://github.com/openshift/origin/blob/master/test/extended/authorization/rbac/groups_default_rules.go#L134-L142?

Copy link
Member

@pmtk pmtk Nov 3, 2022

Choose a reason for hiding this comment

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

I'm taking a second look at this. It look like @stlaz is right, all [apigroup:*] seems wrong. Currently it complains about (fails due to) test data being too big which a nice mechanism except not right against microshift

Copy link
Member

Choose a reason for hiding this comment

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

Reverted these changes as this wasn't exercising [apigroups] - it was exercising RBAC about those apigroups so the test should run on MicroShift. If it fails then we should take a look what should we fix in MicroShift and how should we refactor test if needed

@pmtk
Copy link
Member

pmtk commented Oct 24, 2022

/retest-required

@ingvagabund
Copy link
Member

ingvagabund commented Nov 5, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 5, 2022
@pmtk
Copy link
Member

pmtk commented Nov 5, 2022

/retest-required

2 similar comments
@pmtk
Copy link
Member

pmtk commented Nov 5, 2022

/retest-required

@ggiguash
Copy link

ggiguash commented Nov 6, 2022

/retest-required

@mfojtik
Copy link
Contributor

mfojtik commented Nov 7, 2022

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 7, 2022
@ggiguash
Copy link

ggiguash commented Nov 7, 2022

/retest-required

@pmtk
Copy link
Member

pmtk commented Nov 7, 2022

/retest-required

It's no use, ci/prow/e2e-gcp-ovn-image-ecosystem seems to fail consistently on many PRs on the same tests, see: #27502 (comment)

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 7, 2022
@ingvagabund
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 7, 2022
@pmtk
Copy link
Member

pmtk commented Nov 7, 2022

/retest-required

1 similar comment
@ggiguash
Copy link

ggiguash commented Nov 8, 2022

/retest-required

@pmtk
Copy link
Member

pmtk commented Nov 8, 2022

/test e2e-aws-ovn-fips
/test e2e-gcp-ovn

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 8, 2022
@pmtk
Copy link
Member

pmtk commented Nov 9, 2022

/retest-required

1 similar comment
@pacevedom
Copy link
Contributor Author

/retest-required

@pmtk
Copy link
Member

pmtk commented Nov 9, 2022

/lgtm
:>

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 9, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 9, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ingvagabund, mfojtik, pacevedom, pmtk

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

The pull request process is described 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

1 similar comment
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 9, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ingvagabund, mfojtik, pacevedom, pmtk

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

The pull request process is described 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

@ingvagabund
Copy link
Member

/retest-required

@openshift-merge-robot openshift-merge-robot merged commit 8bd7286 into openshift:master Nov 9, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 9, 2022

@pacevedom: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-ovn-image-ecosystem b79906d link true /test e2e-gcp-ovn-image-ecosystem
ci/prow/e2e-aws-ovn-single-node-upgrade 2fdce66 link false /test e2e-aws-ovn-single-node-upgrade
ci/prow/e2e-aws-ovn-single-node-serial 2fdce66 link false /test e2e-aws-ovn-single-node-serial
ci/prow/e2e-metal-ipi-sdn 2fdce66 link false /test e2e-metal-ipi-sdn
ci/prow/e2e-openstack-ovn 2fdce66 link false /test e2e-openstack-ovn

Full PR test history. Your PR dashboard.

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. 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

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants