Skip to content

RBAC Migration Followup #11: Remove getAPIGroupLegacy from scope converter #15824

Closed

Description

@enj

Upstream rules have always required a group. Remove getAPIGroupLegacy from pkg/authorization/authorizer/scope/converter.go

Activity

  1. modified the milestone: on Aug 17, 2017
  2. self-assigned this
    on Aug 22, 2017
  3. mrogers950 commented on Aug 22, 2017

    @mrogers950

    @enj can you expand on "Remove" here? Just getting rid of getAPIGroupLegacy() and its call in removeEscalatingResources() outright causes the converter test to fail:

    	converter_test.go:281: skip non-matching group secrets: expected [PolicyRule{NonResourceURLs:["/" "/.well-known" "/.well-known/*" "/api" "/api/*" "/apis" "/apis/*" "/oapi" "/oapi/*" "/osapi" "/osapi/" "/swagger.json" "/swaggerapi" "/swaggerapi/*" "/version" "/version/*"], Verbs:["get"]} PolicyRule{Resources:["pods" "secrets"], APIGroups:["foo"]}], got [PolicyRule{NonResourceURLs:["/" "/.well-known" "/.well-known/*" "/api" "/api/*" "/apis" "/apis/*" "/oapi" "/oapi/*" "/osapi" "/osapi/" "/swagger.json" "/swaggerapi" "/swaggerapi/*" "/version" "/version/*"], Verbs:["get"]} PolicyRule{Resources:["pods"], APIGroups:["foo"]}]
    
  4. enj commented on Aug 22, 2017

    @enj
    ContributorAuthor

    @mrogers950 the only test the fails for me locally is match old group secrets. I believe that test can be changed to no longer match old group secrets" which should confirm that secrets is not dropped anymore.

  5. enj commented on Aug 23, 2017

    @enj
    ContributorAuthor

    Just to be clear, you should be able to delete the getAPIGroupLegacy code completely and only minor changes should be required to the associated tests to keep everything passing.

  6. added a commit that references this issue on Sep 2, 2017
    eca1051
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions