Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New subcommand resource #21

Merged
merged 17 commits into from
Apr 23, 2019
Merged

New subcommand resource #21

merged 17 commits into from
Apr 23, 2019

Conversation

corneliusweig
Copy link
Owner

This PR adds a new subcommand resource. It retrieves all (Cluster)Roles plus their bindings and evaluates the authorization for the given resource and verbs. The result is shown as a matrix with verbs in the horizontal and subjects in the vertical direction. For example:

rakkess resource deployments

show what subjects may globally hamper with deployments. It therefore only considers ClusterRoles. On the other hand,

rakkess r deploy -n default

shows who may deal with deployments in a particular namespace. It considers both ClusterRoles and Roles.

While the usual rakkess behavior slices the authorization space (subject, resource, verb) along a plane of constant subject (usually self), this new variant does a similar thing along a plane of fixed resource.

@codecov-io
Copy link

codecov-io commented Apr 23, 2019

Codecov Report

Merging #21 into master will increase coverage by 1.6%.
The diff coverage is 80.67%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #21     +/-   ##
=========================================
+ Coverage   71.72%   73.33%   +1.6%     
=========================================
  Files          11       15      +4     
  Lines         474      630    +156     
=========================================
+ Hits          340      462    +122     
- Misses        121      145     +24     
- Partials       13       23     +10
Impacted Files Coverage Δ
pkg/rakkess/validation/validation.go 66.66% <0%> (ø) ⬆️
cmd/signals.go 77.77% <0%> (ø) ⬆️
pkg/rakkess/client/result/resource.go 100% <100%> (ø)
pkg/rakkess/printer/printer.go 89.36% <100%> (-1.55%) ⬇️
cmd/resource.go 50% <50%> (ø)
cmd/root.go 25% <62.5%> (+5.76%) ⬆️
pkg/rakkess/client/resource_access.go 63.51% <63.51%> (ø)
pkg/rakkess/client/user_access.go 83.33% <90.9%> (ø)
pkg/rakkess/client/result/subject.go 94.11% <94.11%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f088c5...e2330ee. Read the comment docs.

@corneliusweig corneliusweig merged commit a5d2c1d into master Apr 23, 2019
@corneliusweig corneliusweig deleted the resource-subcommand branch April 23, 2019 12:16
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.

None yet

2 participants