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

Implement AccessControlProvider in-memory data structures #10250

Closed
mlepage-google opened this issue Oct 5, 2021 · 2 comments
Closed

Implement AccessControlProvider in-memory data structures #10250

mlepage-google opened this issue Oct 5, 2021 · 2 comments
Labels
acl Access Control feature

Comments

@mlepage-google
Copy link
Contributor

mlepage-google commented Oct 5, 2021

@mlepage-google
Copy link
Contributor Author

Spent a few days on this, progressing well, PR coming soon.

mlepage-google added a commit to mlepage-google/connectedhomeip that referenced this issue Nov 8, 2021
New interface (issue project-chip#10249) and new implementation (issue project-chip#10250).

Implementation is all in-memory and uses only static storage and stack
(no heap).

Some details missing (e.g. CAT support) but most is here, though not yet
hooked up to other code.

Comes with unit tests.
andy31415 pushed a commit that referenced this issue Nov 16, 2021
* Add full implementation of access control

New interface (issue #10249) and new implementation (issue #10250).

Implementation is all in-memory and uses only static storage and stack
(no heap).

Some details missing (e.g. CAT support) but most is here, though not yet
hooked up to other code.

Comes with unit tests.

* Fix configuration

Was added at last minute, missed this spot.

* Address code review comments

- rewrite portions of the check loop to use boolean instead of goto
- refactor privilege checking to make it clearer
- ensure storage classes are POD types (with static_assert)
- remove memsets on storage classes (for now, can re-add later)
- clarify some comments
- remove debug log statement

* Restyled by clang-format

* Address code review comments

Also fix some compiler warnings/errors on other builds

* Add tests for fabric filtered indexing

Refactor the index conversion (to/from fabric filtered) to be clearer.

* Restyled by clang-format

* Address code review comments

- change Target::Flags from int to unsigned
- use unsigned in static_asserts for flags
- tweak auto variables

* Add docs and comments

- Add API documentation (mainly to clarify in/out parameters).
- Add implementation comments (where warranted).
- Add more unit tests (mainly for removing subjects/targets).
- A few fixes to get aforementioned tests passing.
- A bit of refactoring/renaming to clarify the code.

* Restyled by whitespace

* Restyled by clang-format

* Some code review suggestions

* Restyled by clang-format

* Fix errors on other compilers

* Fix more build errors on other compilers

* More code review suggestions

* Restyled by clang-format

* Fix typo in config flag

Co-authored-by: Restyled.io <commits@restyled.io>
@mlepage-google
Copy link
Contributor Author

Example implementation using in-memory data structures is added in PR #11550.

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

No branches or pull requests

1 participant