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

Attempt to create ACL entry with subjects greater than SubjectsPerAccessControlEntry returns FAILURE instead of RESOURCE_EXHAUSTED #32569

Open
sumaky opened this issue Mar 14, 2024 · 1 comment
Labels
bug Something isn't working cert blocker needs triage

Comments

@sumaky
Copy link

sumaky commented Mar 14, 2024

Feature Area

Other

Test Case

TC-ACL

Reproduction steps

  1. ./chip-tool accesscontrol read subjects-per-access-control-entry 1 0
    value returned is 4
  2. ./chip-tool accesscontrol write acl '[{ "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, { "privilege": 3, "authMode": 2, "subjects":[33,44,55,66,77] , "targets": null}]' 1
    note subject count is greater than 4
    returned code is 0x01 (FAILURE) but expected error code as per spec is status = 0x89 (RESOURCE_EXHAUSTED),
    [1710399600.533388][23053:23055] CHIP:DMG: },

SPEC Reference:

ACLResourceEX

Note: same behavior with TargetsPerAccessControlEntry Attribute
with the below comand we see a FAILURE response instead of RESOURCE_EXHAUSTED

Bug prevalence

Always

GitHub hash of the SDK that was being used

c90481f

Platform

other

Anything else?

No response

@sumaky sumaky added bug Something isn't working cert blocker needs triage labels Mar 14, 2024
@sumaky sumaky changed the title [CERT-TEST-FAILURE] Attempt to create ACL entry with subjects greater than SubjectsPerAccessControlEntry returns FAILURE instead of RESOURCE_EXHAUSTED Attempt to create ACL entry with subjects greater than SubjectsPerAccessControlEntry returns FAILURE instead of RESOURCE_EXHAUSTED Mar 14, 2024
@tcarmelveilleux
Copy link
Contributor

The RESOURCE_EXHAUSTED is only if there is going to be too many entries at the top-level.

Having too many subjects in one given entry would be CONSTRAINT_ERROR (i.e. the format of the entry is wrong)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cert blocker needs triage
Projects
Status: Open Cert Blockers
Development

No branches or pull requests

2 participants