-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proxy {Cluster}Role{Binding}s to Native Kube RBAC
Store them as native RBAC Objects via Kubernetes. Also: - Provides backwards compatible Openshift API. - Kills Policy Sync Controller - Removes init of PolicyRegistry - Move helpers closer to their users - Remove TestRBACController - Remove tests that check only PolicyBindings related stuff - hack around TestAuthorizationResolution Signed-off-by: Simo Sorce <[email protected]> Signed-off-by: Monis Khan <[email protected]>
- Loading branch information
Showing
35 changed files
with
1,078 additions
and
2,354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package client | ||
|
||
import ( | ||
apierrors "k8s.io/apimachinery/pkg/api/errors" | ||
"k8s.io/apiserver/pkg/endpoints/request" | ||
apirequest "k8s.io/apiserver/pkg/endpoints/request" | ||
"k8s.io/client-go/rest" | ||
rbacinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/internalversion" | ||
) | ||
|
||
func NewImpersonatingRBACFromContext(ctx apirequest.Context, restclient rest.Interface) (rbacinternalversion.RbacInterface, error) { | ||
user, ok := request.UserFrom(ctx) | ||
if !ok { | ||
return nil, apierrors.NewBadRequest("user missing from context") | ||
} | ||
return rbacinternalversion.New(NewImpersonatingRESTClient(user, restclient)), nil | ||
} |
115 changes: 0 additions & 115 deletions
115
pkg/authorization/controller/authorizationsync/generic.go
This file was deleted.
Oops, something went wrong.
55 changes: 0 additions & 55 deletions
55
pkg/authorization/controller/authorizationsync/generic_test.go
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.