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

RPC Authorization #710

Closed
wants to merge 6 commits into from
Closed

RPC Authorization #710

wants to merge 6 commits into from

Conversation

kishansagathiya
Copy link
Contributor

This PR adds permission policy for raft consensus and adds
permission policy to config(but hides it from user).

It proposes minimum set of RPC methods which we have to allow peers in
order for all cluster features to work as expected. It restricts peers
from accessing methods that are not part of the proposed RPC method set.

Proposed authorization would work only for raft consensus.
authorizeWithPolicy would need to be edited in order to support
upcoming consensus mechanisms.

#666

@ghost ghost assigned kishansagathiya Mar 8, 2019
@ghost ghost added the status/in-progress In progress label Mar 8, 2019
Copy link
Collaborator

@hsanjuan hsanjuan left a comment

Choose a reason for hiding this comment

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

This goes in the right direction.

We need to discuss whether the "policy" config option is part of the consensus component configuration (only for crdts, for raft it would be implicit), or general in the cluster section like proposed here.

This decision has to do with where we place the trusted_peerset option which will be used by crdts.

@lanzafame opinion?

package.json Outdated Show resolved Hide resolved
rpc_permissions.go Outdated Show resolved Hide resolved
rpc_permissions.go Outdated Show resolved Hide resolved
rpc_permissions.go Outdated Show resolved Hide resolved
rpc_permissions.go Outdated Show resolved Hide resolved
rpc_permissions.go Show resolved Hide resolved
@kishansagathiya
Copy link
Contributor Author

Can I get a quick review for this?

@hsanjuan
Copy link
Collaborator

Thanks @kishansagathiya , I will finish this PR

This commit adds permission policy for raft consensus and adds
permission policy to config(but hides it from user).

It proposes minimum set of RPC methods which we have to allow peers in
order for all cluster features to work as expected. It restricts peers
from accessing methods that are not part of the proposed RPC method set.

Proposed authorization would work only for raft consensus.
`authorizeWithPolicy` would need to be edited in order to support
upcoming consensus mechanisms.

Issue #666
Addressed some review comments
- added `authorizer` that could contain all information required to
be used authrorize function
- ability to add more peers after `authorizer` has been created
- No need to change gx hash for gorpc and ocgorpc
- Use map for trusted peers instead of array

Issue #666
@hsanjuan
Copy link
Collaborator

hsanjuan commented May 9, 2019

Superseeded at #775

@hsanjuan hsanjuan closed this May 9, 2019
@ghost ghost removed the status/in-progress In progress label May 9, 2019
@hsanjuan hsanjuan mentioned this pull request May 9, 2019
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