-
Notifications
You must be signed in to change notification settings - Fork 215
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
Enforce role-based/execution context access control to KV tables #1523
Comments
The last example (preventing writes to governance tables that do not go through predefined governance calls) was spotted and discussed in #806. |
As first part of this we need a way to identify the different types of tables. Following dynamic table creation, we believe it should be possible to encode this information purely in the table's name, in the same way we currently use the We already have a I propose:
|
We had a discussion and settled on some different prefices:
|
This is now complete in my view:
|
We currently have a whitelisting system for preventing access to sensitive tables during Lua execution. We should extend this to apply to all table accesses elsewhere in CCF. There are several categories of table:
We should always know what context a transaction is executing, and pass this when requesting tables. Attempting to access table which is not accessible in the current context will raise an error.
We may need to narrow/alter the execution context within a single transaction. For instance it may begin in a service context, able to record a Request, but be narrowed to a user-context (preventing access to private service tables while granting access to application tables) before being passed to the application endpoint. There may be additional access checks imposed on top - for instance in the member frontend we want to prevent constitution-defined actions from breaking invariants on core governance tables.
The text was updated successfully, but these errors were encountered: