Describe the bug
When Command Authority is enabled, users must take command authority for a given TARGET to be able to "Start" a script for that TARGET.
However, there are no guards against that script executing commands against arbitrary targets.
For example:
Suppose User A has command authority for TARGET_1, and User B has command authority for TARGET_2.
User A is able to send manual commands only to TARGET_1, and User B is able to send manual commands only to TARGET_2.
However, if User A loads a script for TARGET_1 that includes commands to targets besides TARGET_1 (e.g. cmd("TARGET_2", "MY_CMD"), they are not prevented from running this script and issuing commands to other targets.
To Reproduce
- Create 2 targets, TARGET_1 and TARGET_2
- Enable command authority
- Take command authority for TARGET_1 but not TARGET_2
- Create a new script under the TARGET_1 directory with
cmd("TARGET_2", "MY_COMMAND")
- Start the script
Expected behavior
Either:
- user cannot start the script because they do not have TARGET_2 authority, or
- script starts but fails to run the
cmd() because the user does not have TARGET_2 authority
Screenshots
No response
OS
AWS EKS
OpenC3 COSMOS Version
7.2.0
Browser
Chrome
Describe the bug
When Command Authority is enabled, users must take command authority for a given TARGET to be able to "Start" a script for that TARGET.
However, there are no guards against that script executing commands against arbitrary targets.
For example:
Suppose User A has command authority for TARGET_1, and User B has command authority for TARGET_2.
User A is able to send manual commands only to TARGET_1, and User B is able to send manual commands only to TARGET_2.
However, if User A loads a script for TARGET_1 that includes commands to targets besides TARGET_1 (e.g.
cmd("TARGET_2", "MY_CMD"), they are not prevented from running this script and issuing commands to other targets.To Reproduce
cmd("TARGET_2", "MY_COMMAND")Expected behavior
Either:
cmd()because the user does not have TARGET_2 authorityScreenshots
No response
OS
AWS EKS
OpenC3 COSMOS Version
7.2.0
Browser
Chrome