-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add initial prototype of AccessControl module #10579
Add initial prototype of AccessControl module #10579
Conversation
mlepage-google
commented
Oct 15, 2021
- Not complete, always allows actions
- Not hooked up to interaction model or messaging layer
- Progress toward issues Initial ACL prototype implementation #10236 and Design AccessControlProvider interface #10249
- Fully isolated as a module
- Has unit tests
until we have an actual implementation, allow accessconnectedhomeip/src/access/AccessControl.cpp Lines 61 to 71 in 2eed92c
This comment was generated by todo based on a
|
check CATs (subject1, subject2)connectedhomeip/src/access/AccessControl.cpp Lines 76 to 86 in 2eed92c
This comment was generated by todo based on a
|
these basic types need to come from a lower layerconnectedhomeip/src/access/BasicTypes.h Lines 31 to 41 in 2eed92c
This comment was generated by todo based on a
|
provide iteratorconnectedhomeip/src/access/DataProviderImpl.cpp Lines 40 to 50 in 2eed92c
This comment was generated by todo based on a
|
provide iteratorconnectedhomeip/src/access/DataProviderImpl.cpp Lines 46 to 51 in 2eed92c
This comment was generated by todo based on a
|
don't worry about node for now (proxy source)connectedhomeip/src/access/RequestPath.h Lines 38 to 44 in 2eed92c
This comment was generated by todo based on a
|
make this table driven, add a bunch more test casesconnectedhomeip/src/access/tests/TestAccessControl.cpp Lines 353 to 363 in 2eed92c
This comment was generated by todo based on a
|
PR #10579: Size comparison from efc17de to 2eed92c 22 builds
|
don't worry about node for now (proxy source)connectedhomeip/src/access/RequestPath.h Lines 33 to 39 in 8f6ebd4
This comment was generated by todo based on a
|
don't worry about node for now (proxy source)connectedhomeip/src/access/RequestPath.h Lines 33 to 39 in df86b45
This comment was generated by todo based on a
|
don't worry about node for now (proxy source)connectedhomeip/src/access/RequestPath.h Lines 33 to 39 in 6ec8954
This comment was generated by todo based on a
|
Basic types (FabricIndex etc.) were moved in PR project-chip#10925 from app to lib/core, so now they can be used from this module.
Also, remove CatId and move PasscodeId into lib/core.
3704aa6
to
1a570d3
Compare
check error (but can't until we have an implementation)connectedhomeip/src/access/AccessControl.cpp Lines 67 to 77 in 1a570d3
This comment was generated by todo based on a
|
a few more cases (PASE commissioning, CASE Authenticated Tags, etc.)connectedhomeip/src/access/AccessControl.cpp Lines 74 to 84 in 1a570d3
This comment was generated by todo based on a
|
handle CASE Authenticated Tags (CAT1/CAT2)connectedhomeip/src/access/tests/TestAccessControl.cpp Lines 283 to 293 in 1a570d3
This comment was generated by todo based on a
|
Consider making this a class and the various utility methods staticconnectedhomeip/src/lib/core/PasscodeId.h Lines 24 to 30 in 1a570d3
This comment was generated by todo based on a
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, modulo the one outstanding comment question in #10579 (comment)
check error (but can't until we have an implementation)connectedhomeip/src/access/AccessControl.cpp Lines 67 to 77 in 3efcbd4
This comment was generated by todo based on a
|
a few more cases (PASE commissioning, CASE Authenticated Tags, etc.)connectedhomeip/src/access/AccessControl.cpp Lines 74 to 84 in 3efcbd4
This comment was generated by todo based on a
|
handle CASE Authenticated Tags (CAT1/CAT2)connectedhomeip/src/access/tests/TestAccessControl.cpp Lines 283 to 293 in 3efcbd4
This comment was generated by todo based on a
|
Consider making this a class and the various utility methods staticconnectedhomeip/src/lib/core/PasscodeId.h Lines 24 to 30 in 3efcbd4
This comment was generated by todo based on a
|
* Add initial prototype of AccessControl module - Not complete, always allows actions - Not hooked up to interaction model or messaging layer - Progress toward issues project-chip#10236 and project-chip#10249 - Fully isolated as a module - Has unit tests * Remove file comments from files * Add 'k' prefix to enum values * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Remove "empty" .cpp files * Apply suggestions from code review * Apply suggestions from code review * Fix compatibility under different compilers * Fix unit test compatability on different compilers * Restyled by clang-format * Change forward declaration to include Allows tooling to detect circular dependencies. * Changes from code review suggestions - rename namespace access --> Access - rename DataProvider --> AccessControlDataProvider - decouple DataProvider lifecycle (Init/Finish) - rename DataProviderImpl --> ExampleAccessControlDataProvider - change GetInstance/SetInstance to global functions - remove Config.h since global instance must be set - change EntryIterator::Next to return pointer - add comments to Privilege and AuthMode - remove SubjectDescriptor.isCommissioning for now - improve naming of CAT subjects in SubjectDescriptor - change SubjectId typedef to use NodeId * Make tests table-driven Should also fix some build complaints on ESP32 * Restyled by clang-format * Restyle * Add more metatesting Ensure not just that results are correct, but that they were correctly obtained. * Restyled by clang-format * Change enums to enum classes * Address review comments * Use basic types in lib/core Basic types (FabricIndex etc.) were moved in PR project-chip#10925 from app to lib/core, so now they can be used from this module. * A bit of cleanup * Refactor SubjectId and SubjectDescriptor Also, remove CatId and move PasscodeId into lib/core. * Restyled by clang-format * Add clarifying examples to documentation. Co-authored-by: Restyled.io <[email protected]>
* Add initial prototype of AccessControl module - Not complete, always allows actions - Not hooked up to interaction model or messaging layer - Progress toward issues project-chip#10236 and project-chip#10249 - Fully isolated as a module - Has unit tests * Remove file comments from files * Add 'k' prefix to enum values * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Remove "empty" .cpp files * Apply suggestions from code review * Apply suggestions from code review * Fix compatibility under different compilers * Fix unit test compatability on different compilers * Restyled by clang-format * Change forward declaration to include Allows tooling to detect circular dependencies. * Changes from code review suggestions - rename namespace access --> Access - rename DataProvider --> AccessControlDataProvider - decouple DataProvider lifecycle (Init/Finish) - rename DataProviderImpl --> ExampleAccessControlDataProvider - change GetInstance/SetInstance to global functions - remove Config.h since global instance must be set - change EntryIterator::Next to return pointer - add comments to Privilege and AuthMode - remove SubjectDescriptor.isCommissioning for now - improve naming of CAT subjects in SubjectDescriptor - change SubjectId typedef to use NodeId * Make tests table-driven Should also fix some build complaints on ESP32 * Restyled by clang-format * Restyle * Add more metatesting Ensure not just that results are correct, but that they were correctly obtained. * Restyled by clang-format * Change enums to enum classes * Address review comments * Use basic types in lib/core Basic types (FabricIndex etc.) were moved in PR project-chip#10925 from app to lib/core, so now they can be used from this module. * A bit of cleanup * Refactor SubjectId and SubjectDescriptor Also, remove CatId and move PasscodeId into lib/core. * Restyled by clang-format * Add clarifying examples to documentation. Co-authored-by: Restyled.io <[email protected]>
* Add initial prototype of AccessControl module - Not complete, always allows actions - Not hooked up to interaction model or messaging layer - Progress toward issues project-chip#10236 and project-chip#10249 - Fully isolated as a module - Has unit tests * Remove file comments from files * Add 'k' prefix to enum values * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Remove "empty" .cpp files * Apply suggestions from code review * Apply suggestions from code review * Fix compatibility under different compilers * Fix unit test compatability on different compilers * Restyled by clang-format * Change forward declaration to include Allows tooling to detect circular dependencies. * Changes from code review suggestions - rename namespace access --> Access - rename DataProvider --> AccessControlDataProvider - decouple DataProvider lifecycle (Init/Finish) - rename DataProviderImpl --> ExampleAccessControlDataProvider - change GetInstance/SetInstance to global functions - remove Config.h since global instance must be set - change EntryIterator::Next to return pointer - add comments to Privilege and AuthMode - remove SubjectDescriptor.isCommissioning for now - improve naming of CAT subjects in SubjectDescriptor - change SubjectId typedef to use NodeId * Make tests table-driven Should also fix some build complaints on ESP32 * Restyled by clang-format * Restyle * Add more metatesting Ensure not just that results are correct, but that they were correctly obtained. * Restyled by clang-format * Change enums to enum classes * Address review comments * Use basic types in lib/core Basic types (FabricIndex etc.) were moved in PR project-chip#10925 from app to lib/core, so now they can be used from this module. * A bit of cleanup * Refactor SubjectId and SubjectDescriptor Also, remove CatId and move PasscodeId into lib/core. * Restyled by clang-format * Add clarifying examples to documentation. Co-authored-by: Restyled.io <[email protected]>