-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mint scope-based access tokens for RBAC (#1669)
- Loading branch information
Showing
30 changed files
with
556 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Enhancement: Mint scope-based access tokens for RBAC | ||
|
||
Primarily, this PR is meant to introduce the concept of scopes into our tokens. | ||
At the moment, it addresses those cases where we impersonate other users without | ||
allowing the full scope of what the actual user has access to. | ||
|
||
A short explanation for how it works for public shares: | ||
- We get the public share using the token provided by the client. | ||
- In the public share, we know the resource ID, so we can add this to the | ||
allowed scope, but not the path. | ||
- However, later OCDav tries to access by path as well. Now this is not allowed | ||
at the moment. However, from the allowed scope, we have the resource ID and | ||
we're allowed to stat that. We stat the resource ID, get the path and if the | ||
path matches the one passed by OCDav, we allow the request to go through. | ||
|
||
https://github.com/cs3org/reva/pull/1669 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[grpc] | ||
address = "0.0.0.0:16000" | ||
|
||
[grpc.services.publicstorageprovider] | ||
driver = "localhome" | ||
mount_path = "/public" | ||
mount_id = "123e4567-e89b-12d3-a456-426655440000" | ||
data_server_url = "http://localhost:16001/data" | ||
gateway_addr = "localhost:19000" | ||
|
||
[grpc.services.authprovider] | ||
auth_manager = "publicshares" | ||
|
||
[grpc.services.authprovider.auth_managers.publicshares] | ||
gateway_addr = "localhost:19000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.