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

[BUG] TC-IDM-6.2 step 13 and 14 getting INVALID_ACTION #29203

Open
pankore opened this issue Sep 13, 2023 · 6 comments
Open

[BUG] TC-IDM-6.2 step 13 and 14 getting INVALID_ACTION #29203

pankore opened this issue Sep 13, 2023 · 6 comments
Labels
bug Something isn't working needs triage sve

Comments

@pankore
Copy link
Contributor

pankore commented Sep 13, 2023

Reproduction steps

After applying the commit 5deb59b

In Step 13 and 14, I am still getting INVALID_ACTION after ACL command.

Tested with v1.2 TE2 all-cluster-app:
TC-IDM-6.2-step13-14.txt

Bug prevalence

always

GitHub hash of the SDK that was being used

5b4f800

Platform

ameba, other

Platform Version(s)

No response

Anything else?

No response

@bzbarsky-apple
Copy link
Contributor

I am still getting INVALID_ACTION after ACL command.

For step 13, the request has a single concrete path for an event you don't have ACLs for, correct?

Per spec, that should result in INVALID_ACTION. See "8.4.3.2. Incoming Read Request and Subscribe Request Action Processing" which says:

  • If no error free existent paths remain, then EventRequests are considered empty.
    ...
  • If this action is in response to a Subscribe Request action,
    • If both AttributeRequests and EventRequests are empty
      • a Status Response Action with the INVALID_ACTION Status Code SHALL be sent to the initiator,

Same thing for step 14.

Looks like the test plan (steps 14 and 16, which does not match the step numbering in the YAML, sigh) does not match the spec. Filed https://github.com/CHIP-Specifications/chip-test-plans/issues/3442 to get the test plan fixed, then we need to fix the YAML...

@xshuqun
Copy link

xshuqun commented Sep 14, 2023

@bzbarsky-apple From the test plan of step 13: "ACL command giving only access for ACL cluster, So except ACL cluster command if try to send any other command will get status as unsupported access."
So is there a need to change the test plan for step 13? to getting status as INVALID ACTION?
The outcome should be invalid action or unsupported access?

@bzbarsky-apple
Copy link
Contributor

The test plan is wrong, and it's wrong because it's not doing a command. It's doing a subscribe. For a subscribe, the right thing here per spec is INVALID_ACTION.

@cjandhyala
Copy link

@bzbarsky-apple the spec says 'If both AttributeRequests and EventRequests are empty' then return INVALID_ACTION' but the scenario in the test plan is 'EventRequests set to path which requires a privilege that is not granted for the cluster in the path'

If the path is a concrete path:
Else if reading the event in the path requires a privilege that is not granted to access the cluster in the path, an EventStatusIB SHALL be generated with the UNSUPPORTED_ACCESS Status Code.

@bzbarsky-apple
Copy link
Contributor

bzbarsky-apple commented Sep 14, 2023

@cjandhyala Please read what I quoted above. Just to re-emphasize:

  • If no error free existent paths remain, then EventRequests are considered empty.

So if all the paths provided lead to errors, it's an INVALID_ACTION. This is actually a very important security measure to prevent clients with no access to the device from being able to DoS it by taking up subscription slots.

@Apollon77
Copy link
Contributor

I completely agree here and also summarized that in #34015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage sve
Projects
None yet
Development

No branches or pull requests

5 participants