-
Notifications
You must be signed in to change notification settings - Fork 1
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
enhance authz interface for policies #1
base: master
Are you sure you want to change the base?
Conversation
7105dbc
to
d176624
Compare
@mapuri - basic structure looks right to me - thanks! Some comments:
|
// set container policies associated by authz plugin(s) | ||
policies, ok := ctx.Value("policies").(map[container.PolicyType]string) | ||
if !ok { | ||
logrus.Warnf("incorrect type for policy map %T, expected %T", ctx.Value("policies"), config.Policies) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious why warn here? if policies are not associated with the ctx, then it is ok right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just a log message for type assertion failure.
Yes, it is ok for no policies to be associated. If policies are not associated then we just set the map as empty on the next line so that it is not nil.
@jainvipin thanks for the review. I will update the documentation and test cases as well and push them in this PR. |
e5534df
to
124246d
Compare
I have updated the policy related structure to be in line with the proposal here https://gist.github.com/jainvipin/8b1677f041534df576b2 PTAL when you get a chance. |
} | ||
|
||
type firewallRule struct { | ||
action string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we incorporate direction and PeerGroupId to the code? Ref the updated doc in the link below...
483a48d
to
d9c25e5
Compare
8399cb4
to
47346b8
Compare
…o daemon Also hooked container create handler to set the policies in container config. Signed-off-by: Madhav Puri <[email protected]>
8d94690
to
bafd8e6
Compare
https://gist.github.com/jainvipin/8b1677f041534df576b2 Signed-off-by: Madhav Puri <[email protected]>
This patch contains changes to:
docker inspect
.Next steps:
contiv/policyengine
repo) that adheres to the updated interfaceNote: some of the changes are in vendor directory which implies this will possibly be merged as separate PRs in docker, if it get's accepted that is :).
/cc @shaleman @jainvipin @erikh @unclejack