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

Block users #3402

Merged
merged 2 commits into from
Oct 27, 2022
Merged

Block users #3402

merged 2 commits into from
Oct 27, 2022

Conversation

gmgigi96
Copy link
Member

@gmgigi96 gmgigi96 commented Oct 27, 2022

This PR allows an operator to set a list of users (username) that are banned for every operation in reva.
This requires that every service is restarted to get the new list if a user is added!

Example:
Given the storage-references example.
Add in gateway.toml:

[shared]
blocked_users = ["einstein"]
$ cmd/reva/reva -host localhost:19000 -insecure
reva-cli v1.19.0-124-ga4ffa8aa (rev-a4ffa8aa)
Please use `exit` or `Ctrl-D` to exit this program.
>> login basic
username: einstein
password: error: code=CODE_PERMISSION_DENIED msg="user is blocked" support_trace="ac860997b02743ef52b9d5bdab4311d0"

Even with a valid token:

>> whoami
rpc error: code = PermissionDenied desc = user einstein blocked

@update-docs
Copy link

update-docs bot commented Oct 27, 2022

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.

@gmgigi96 gmgigi96 requested review from ishank011 and a team as code owners October 27, 2022 09:35
@labkode
Copy link
Member

labkode commented Oct 27, 2022

@gmgigi96 looks good, can you just add an example on the config change?

@labkode labkode merged commit d9d8777 into cs3org:master Oct 27, 2022
vascoguita pushed a commit to vascoguita/reva that referenced this pull request Nov 2, 2022
vascoguita pushed a commit to vascoguita/reva that referenced this pull request Nov 2, 2022
vascoguita pushed a commit to vascoguita/reva that referenced this pull request Nov 11, 2022
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.

2 participants