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

Restrict members access to critical tables #806

Closed
jumaffre opened this issue Feb 5, 2020 · 4 comments
Closed

Restrict members access to critical tables #806

jumaffre opened this issue Feb 5, 2020 · 4 comments

Comments

@jumaffre
Copy link
Contributor

jumaffre commented Feb 5, 2020

Follow up from: #797 (comment)

Flexible governance allows members to perform a virtually-unlimited set of operations on the white-listed tables in the KV. And even if we provide a sensible default white-list, the constitution may allow this white-list to be updated (e.g. via unanimity of members).

This causes issues in terms of:

  • Security. For example, it might be possible that members write a new node to the KV, bypassing the attestation and code version verification performed during the join protocol.
  • Usability. Members may decide to add a new user but only update the ccf.users table. However, the ccf.user_certs and ccf.values tables should also be updated. (This particular point may be addressed by providing a richer KV API.)

This should be addressed by (at least) documenting these restrictions.

@achamayou
Copy link
Member

I think we should look at this from the perspective of preserving invariants, beyond Lua's type system abilities and beyond the KV's interface

@jumaffre
Copy link
Contributor Author

jumaffre commented Apr 3, 2020

Now that we issue new shares on consortium updates, etc., we should definitely make sure that members cannot raw_puts to the ccf.members table directly. Some unit and e2e tests still rely on this so I've left this table in the whitelist for now.

@achamayou
Copy link
Member

@jumaffre yes, this is otherwise a serious issue!

@achamayou
Copy link
Member

With governance proposals being restricted to pre-defined constitution functions, and a safe set of default actions, I don't think this is a problem anymore, since:

  1. There is no raw_puts in our default actions
  2. Multi-table actions have been simplified (thanks to new ids), and the default actions are a safe starting point for customisation if desired.
  3. Unsafe actions would need to be voted in as constitution amendments before they can be used. This is equivalent in governance complexity to a code update, so I think we've effectively made as much of an improvement as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants