Skip to content

Remove policy in favor of role bindings. - #4933

Merged
openshift-bot merged 1 commit into
openshift:masterfrom
kwoodson:policy_to_binding
Jul 29, 2017
Merged

openshift-bot merged 1 commit into
openshift:masterfrom
kwoodson:policy_to_binding

Conversation

@kwoodson

Copy link
Copy Markdown
Contributor

No description provided.

@kwoodson
kwoodson requested a review from sdodson July 28, 2017 16:15
@kwoodson kwoodson self-assigned this Jul 28, 2017
@kwoodson

Copy link
Copy Markdown
Contributor Author

aos-ci-test

@kwoodson
kwoodson force-pushed the policy_to_binding branch from 295530d to 69a48e2 Compare July 28, 2017 18:07
@kwoodson
kwoodson force-pushed the policy_to_binding branch from 69a48e2 to 46c94de Compare July 28, 2017 18:11
@kwoodson

Copy link
Copy Markdown
Contributor Author

aos-ci-test

@sdodson sdodson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@sdodson
sdodson requested a review from enj July 28, 2017 19:12
@enj

enj commented Jul 28, 2017

Copy link
Copy Markdown
Contributor

Fixes #4880

@sdodson

sdodson commented Jul 28, 2017

Copy link
Copy Markdown
Member

aos-ci-test

@sdodson

sdodson commented Jul 28, 2017

Copy link
Copy Markdown
Member

After making some serious hacks to openshift-ansible to avoid attempting to install any rpms I've

  • Starting with an operational 3.6 install
  • Dump etcd data
  • Deploy custom build
  • Run playbooks, confirmed the same failures reported
  • Merged this PR
  • Run playbooks, confirmed success

I need to test a clean install w/ this but aos-ci-test should do that too.

@sdodson

sdodson commented Jul 28, 2017

Copy link
Copy Markdown
Member

[merge]

@simo5 simo5 mentioned this pull request Jul 28, 2017
27 of 67 tasks
@openshift-bot

Copy link
Copy Markdown

success: "aos-ci-jenkins/OS_3.6_NOT_containerized, aos-ci-jenkins/OS_3.6_NOT_containerized_e2e_tests" for 46c94de (logs)

@openshift-bot

Copy link
Copy Markdown

success: "aos-ci-jenkins/OS_3.6_containerized, aos-ci-jenkins/OS_3.6_containerized_e2e_tests" for 46c94de (logs)

@sdodson

sdodson commented Jul 29, 2017

Copy link
Copy Markdown
Member

[merge]

@openshift-bot

Copy link
Copy Markdown

Evaluated for openshift ansible merge up to 46c94de

@openshift-bot

openshift-bot commented Jul 29, 2017 •

Copy link
Copy Markdown

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_openshift_ansible/761/) (Base Commit: 1990a97) (PR Branch Commit: 46c94de)

@openshift-bot
openshift-bot merged commit 3be2748 into openshift:master Jul 29, 2017
openshift-merge-robot added a commit to openshift/origin that referenced this pull request Aug 17, 2017
Automatic merge from submit-queue

Migrate to Kubernetes RBAC

Trello xref: https://trello.com/c/n3bR3Ys9

Fixes #12303
Fixes #13549
Fixes #13432
Fixes #15338
Fixes #14168
Fixes #10056

Need to investigate:

- [x] ...

Dependencies:

- [x] Prerequisite #15342
- [x] Requires openshift/openshift-ansible/pull/4933 @sdodson 
- [x] Blocked on openshift/openshift-ansible/issues/4967
- [x] Prerequisite kubernetes/kubernetes#50639

Followups:
- [ ] #15412
- [ ] #13316
- [ ] #13156
- [ ] #13430
- [ ] Should delete with proxy return details?
- [ ] Make project creation use RBAC instead of proxy endpoints?
- [ ] Remove policy objects from bootstrap roles
- [ ] Check if delegated_test.go can be revived
- [ ] Check to see if the deleted unit tests are reflected upstream and fix gaps
- [ ] Open issue to remove `openshiftSubjectLocator`
- [ ] Open issue to revisit forbidden message maker
- [ ] Update upstream `subject_locator_test` with origin's extensive testing
- [ ] Fix proxied create: ` _ bool is includeUnintialized, which we should really be passing through to the underlying API... it's odd there's not a CreateOptions parameter to Create`
- [ ] Fix proxied update: `if initializers use Update() to initialize objects (which I think they do), we may need to pass GetOptions{IncludeUninitialized: true} here...`
- [ ] Fix panics() in Convert...OrDie() functions
- [ ] glog.Fatal on post stark hook error
- [ ] Remove `TestPolicyCache`?
- [ ] Use discovery API based gating?
- [ ] upstream rules have always required a group. followup issue to remove getAPIGroupLegacy from `pkg/authorization/authorizer/scope/converter.go`
- [ ] issue to remove "normalizeResources" from `pkg/cmd/server/bootstrappolicy/policy.go`
- [ ] issue to  find callers of `clusterpolicyregistry "github.com/openshift/origin/pkg/authorization/registry/clusterpolicy"` and move to point of use
- [ ] issue to switch our encoding to rbac in `pkg/cmd/server/admin/create_bootstrappolicy_file.go`
- [ ] Exercise proxied endpoints
- [ ] hack/test-cmd.sh of gated overwrite bootstrap policy
- [ ] Delete unused legacy policy registry code
- [ ] Make RBAC discovery rule authoritative `pkg/authorization/apis/authorization/types.go`
- [ ] Fix `ignoreError` in `pkg/oc/admin/router/router.go`
- [ ] Confirm changes to `TestAuthorizationResolution` and `TestAuthorizationResourceAccessReview` in `test/integration/authorization_test.go`

Done:

- Store ClusterRoles as native RBAC Objects via Kubernetes.
- Provides backwards compatible API for the old policy based roles.
- Use Kubernetes authorizer

TODO:

- [x] Delete policy end points
- [x] Decide what to do with overwrite policy
- [x] Remove or gate `oc create policybinding`
- [x] Move new impersonation code to `pkg/auth/client/impersonate.go`
- [x] Remove any unnecessary conversions
- [x] Review new `proxy.go` files
- [x] Remove reason logic `allowed by rule in ...`
- [x] Add interface assertion to proxy files
- [x] Confirm we need `pkg/authorization/util/convert/convert.go`
- [x] Confrim we need to expose some of the private conversion functions
- [x] Add protect/autoupdate annotation conversion to general conversion functions
- [x] ~~Support watch on proxied endpoints~~
- [x] Cherry pick kubernetes/kubernetes#49868 -> #15721
- [x] Fix upstream commits
- [x] Restore and version gate `NewCmdMigrateAuthorization`
- [x] ~~Wrap other errors in proxy files?~~ Remove all error wrapping
- [x] Make `NewImpersonatingRBACFromContext` more generic
- [x] Kube authorizer's reason on deny contains evaluation errors - do we want to preserve those?
- [x] Review `ImpersonatingRESTClient` in `pkg/auth/client/impersonate.go`
- [ ] Review `pkg/project/auth/cache.go` and ` pkg/project/auth/cache_test.go`
- [ ] Review ` pkg/authorization/authorizer/scope/converter_test.go`
- [ ] Review `k8s.io/kubernetes/staging/src/k8s.io/client-go/rest/request.go`
@kwoodson
kwoodson deleted the policy_to_binding branch September 18, 2017 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants