-
Notifications
You must be signed in to change notification settings - Fork 113
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
eosgrpc and HTTP - Small fixes for ACLs and client certs #2252
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
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.
Please also add user ACLs if sys.eval.useracl
is set. Since EOS doesn't obey sys ACLs for files, we have to set these as user attrs. (This is not merged yet, it's part of this PR #2247)
reva/pkg/eosclient/eosbinary/eosbinary.go
Lines 1098 to 1112 in 519aa3d
// Read user ACLs if sys.eval.useracl is set | |
if userACLEval, ok := attrs["sys."+userACLEvalKey]; ok && userACLEval == "1" { | |
if userACL, ok := attrs["user.acl"]; ok { | |
userAcls, err := acl.Parse(userACL, acl.ShortTextForm) | |
if err != nil { | |
return nil, err | |
} | |
for _, e := range userAcls.Entries { | |
err = sysACL.SetEntry(e.Type, e.Qualifier, e.Permissions) | |
if err != nil { | |
return nil, err | |
} | |
} | |
} | |
} |
I have added the snippet of ACL logic |
Fulfils:
#2246