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

Managed ACL: Add AccessRestrictionList support #34932

Merged
merged 28 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c2fdd06
Add AccessRestrictionList support
tleacmcsa Jul 30, 2024
20f0b6a
Update src/access/AccessConfig.h
tleacmcsa Aug 19, 2024
04651f9
Reworked data manipulators and other cleanup
tleacmcsa Aug 20, 2024
03ea9d0
Fixed encode/decode so reading CommissioningARL and Arl attributes work
tleacmcsa Aug 21, 2024
cbff3b5
Merge branch 'project-chip:master' into arl-feature
tleacmcsa Aug 21, 2024
5a161e7
Reworked ARL storage
tleacmcsa Aug 22, 2024
459bee4
Review fixes
tleacmcsa Aug 22, 2024
d0928e7
Fixed GetEntries vector pointer arg
tleacmcsa Aug 22, 2024
dcc85c7
Updated core restriction logic/integration
tleacmcsa Aug 22, 2024
a3d1300
Restyled by clang-format
restyled-commits Aug 22, 2024
81effc2
fixed include check for renamed AccessRestrictionProvider.h file
tleacmcsa Aug 22, 2024
1c34d96
M-ACL updates
tleacmcsa Aug 23, 2024
d46ab30
Merge branch 'project-chip:master' into arl-feature
tleacmcsa Aug 23, 2024
9809516
Add plumbing for subject descriptor IsCommissioning field
tcarmelveilleux Aug 23, 2024
8ac75f8
Fix crash
tcarmelveilleux Aug 23, 2024
b151a0f
Use new IsCommissioning in ARL check
tleacmcsa Aug 23, 2024
1d463a0
Updates for review comments
tleacmcsa Aug 25, 2024
92bec3f
Merge remote-tracking branch 'upstream/master' into arl-feature
tleacmcsa Aug 25, 2024
b1ae8e3
restyled
tleacmcsa Aug 25, 2024
7cf925c
Review updates
tleacmcsa Aug 26, 2024
9dc45e8
Merge remote-tracking branch 'upstream/master' into arl-feature
tleacmcsa Aug 26, 2024
d27dfb6
restyled
tleacmcsa Aug 26, 2024
91d4f19
Merge remote-tracking branch 'upstream/master' into arl-feature
tleacmcsa Aug 26, 2024
cbcd55a
Updated ARL tests per review comments
tleacmcsa Aug 26, 2024
25bd650
work around nuttx and jsoncpp contention
tleacmcsa Aug 27, 2024
31a7ddd
Merge branch 'master' into arl-feature
tleacmcsa Aug 27, 2024
141c555
Review comments and nuttx build failure fix attempt
tleacmcsa Aug 27, 2024
3d976bf
review updates
tleacmcsa Aug 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions examples/platform/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
# limitations under the License.

import("//build_overrides/chip.gni")
import("//build_overrides/jsoncpp.gni")
import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni")
import("${chip_root}/src/app/common_flags.gni")
import("${chip_root}/src/lib/core/core.gni")
import("${chip_root}/src/lib/lib.gni")
import("${chip_root}/src/tracing/tracing_args.gni")

if (current_os != "nuttx") {
import("//build_overrides/jsoncpp.gni")
}

declare_args() {
chip_enable_smoke_co_trigger = false
chip_enable_boolean_state_configuration_trigger = false
Expand Down Expand Up @@ -95,14 +98,17 @@ source_set("app-main") {
"${chip_root}/src/controller:gen_check_chip_controller_headers",
"${chip_root}/src/lib",
"${chip_root}/src/platform/logging:default",
jsoncpp_root,
]
deps = [
":ota-test-event-trigger",
"${chip_root}/examples/providers:device_info_provider",
"${chip_root}/src/app/server",
]

if (current_os != "nuttx") {
public_deps += [ jsoncpp_root ]
}

if (chip_enable_pw_rpc) {
defines += [ "PW_RPC_ENABLED" ]
}
Expand Down
2 changes: 1 addition & 1 deletion src/access/AccessRestrictionProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ CHIP_ERROR AccessRestrictionProvider::SetEntries(const FabricIndex fabricIndex,
bool AccessRestrictionProvider::StandardAccessRestrictionExceptionChecker::AreRestrictionsAllowed(EndpointId endpoint,
ClusterId cluster)
{
if (endpoint != 0 &&
if (endpoint != kRootEndpointId &&
(cluster == app::Clusters::WiFiNetworkManagement::Id || cluster == app::Clusters::ThreadBorderRouterManagement::Id ||
cluster == app::Clusters::ThreadNetworkDirectory::Id))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,13 @@ bool emberAfAccessControlClusterReviewFabricRestrictionsCallback(
entry.restrictions.push_back(restriction);
}

if (restrictionIter.GetStatus() != CHIP_NO_ERROR)
{
ChipLogError(DataManagement, "AccessControlCluster: invalid ARL data");
commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::InvalidValue);
return true;
}

entries.push_back(entry);
}

Expand Down
Loading