Hinweis für die Textformat-Version; um diese Version im PDF Format zu lesen, laden Sie bitte https://www.dk1ri.de/myc/Rules_device.txt Rules-device Author: DK1RI Version V01.02.02 20250422 This paper is published in https://github.com/dk1ri as well Introduction This paper describes some ideas for the rules-device For more details of the MYC system please check the reference. There is no program for this up to now! Definitions and formats see https://dk1ri.de/myc/Definitions.txt or https://dk1ri.de/myc/Definitions.pdf Some explanation The Rules-device should do the following: - Provide “R”-rules for dependencies between different devices. The rules may created via an appropriate user interface. - Create “R” rules for system wide commands. - Provide a user management: create “Q” rules. - Check login requests For simplicity of usage and editing the internal storage of the rules-device uses “full commands” for “R” rules. These “full commands” consist of the I-line of the device and the relative count of the commandtoken within the device for reference to a commandtoken. These command are created from the full announcelist from the CR. So commands can be identified even if command-token numbering changes. If a rule should be sent to the CR, the RU translates the full commands to the original translated command-token. “R” rules “R” rules describe the dependencies between different devices and system wide commands. “R” rules for CR, RU, LD or SK are not allowed. For details of rules see https://dk1ri.de/myc/Rules.txt or https://dk1ri.de/myc/Rules.pdf. “Q” rules Q rules are used for user management. As default the command-router allow all commands for all users, but this can be changed to forbid users to send commands to specific devices or to send specific commands. This is done by “Q” rules. “Q” are provided by the RU and executed by the CR. The access to the RU device is handled in the same way as for other devices: users can use the commands or it is forbidden. The RU itself is a device with few commands. These commands are part of the full announcelist of the CR. So the SK can use them. The RU has one admin account “admin”, “admin”. Name and password can be changed. How the “Q” rules affect the access to commands is described in https://dk1ri.de/myc/Rules.txt or https://dk1ri.de/myc/Rules.pdf. RU announcemnts The RU should have the following announcements: The command to write or overwrite “R” rules: “R” rules are identified by number. Empty positions can be used for new rules 1;om,R_rules;500;1000. This allow up to 1000 rules while a length < 500 (can be changed) The read command: 2;am,as1 as command 1 but for “Q” rules “Q” rules are identified by number. Empty positions can be used for new rules 3;om,Q_rules;500;1000. This allow up to 1000 rules while a length < 500 (can be changed) The read command: 4;am,as3 This command will send „all“ rules to the CR. The CR will know by the name “FOR_CR” that it should read the rules and will not forward them. The RU will send all not empty rules, whenever a rule is changed / added / deleted as info 5;am,FOR_CR;500;2000 For the following commands all possible parameters must be send always; commands are allowed for admin users only!! allow a user to create “R” rules with a commandtoken as “left_side” commandtoken. If the commandtoken is the basic command of a device, all commands of the device are allowed. If the commandtoken is the basic command of the CR all commands of all device are allowed: 6;ob,;,username;,commandtoken as above, but disallow user: 7;ob,;,username;,commandtoken allow a user to create “Q” rules: 8;oa,;,username as above, but disallow user: 9;oa,;,username add a user account for login: 10;ob,;,name;,password delete a user account for login: 11;oa,;,name read all usernames; usernames are limited to 100 characters and max 1000 users (can be changed): 12;an,usernames;100,1000 change name and password for the admin user: 13:1;ob,;b,mode;,old_name;,old_password;new_name;,new_password reply to CR, weather a login was ok or not (will send “0” or “1” or “2”as info) 14;aa,LOGIN_DATA;b Login command: 251;ob,LOGON;b,mode;,name;,password For details of the login command see https://dk1ri.de/myc/Reserved_tokens.txt or https://dk1ri.de/myc/Reserved_tokens.pdf User management may be done via a more comfortable GUI other than the existing GUI using the webserver. Copyright Dieses Dokument darf unverändert kopiert werden. Die Ideen in diesem Dokument unterliegen der GPL (Gnu Public Licence,V2) soweit keine früheren, anderen Rechte betroffen sind. Die Verwendung der Unterlagen erfolgt auf eigene Gefahr; es wird keinerlei Garantie übernommen. This document can be copied without changes. The ideas of this document can be used under GPL (Gnu Public License, V2) as long as no earlier other rights are affected. The usage of this document is on own risk, there is no warranty. Reference [1] https://dk1ri.de/myc/MYC.pdf (german) [2] https://dk1ri.de/myc/MYC.en.pdf [3] https://dk1ri.de/myc/Description.txt or https://dk1ri.de/myc/Description.pdf [4] https://dk1ri.de/myc/commands.txt or https://dk1ri.de/myc/commands.pdf [5] https://dk1ri.de/myc/Reserved_tokens.txt or https://dk1ri.de/myc/Reserved_tokens.pdf [6] https://dk1ri.de/myc/Rules.txt or https://dk1ri.de/myc/Rules.pdf [7] https://dk1ri.de/myc/commandrouter.txt or https://dk1ri.de/myc/commandrouter.pdf [8] https://dk1ri.de/myc/Rules_device.txt or https://dk1ri.de/myc/Rules_device.pdf [9] https://dk1ri.de/myc/skin.txt or https://dk1ri.de/myc/skin.pdf [10] https://dk1ri.de/myc/logicdevice.txt or https://dk1ri.de/myc/logicdevice.pdf [11] https://dk1ri.de/myc/Definitions.txt or https://dk1ri.de/myc/Definitions.pdf [12] https://dk1ri.de/myc/spec_version.txt or https://dk1ri.de/myc/spec_version.pdf [13] https://dk1ri.de/myc/webserver.txt or https://dk1ri.de/myc/webserver.pdf [14] https://dk1ri.de/myc/ki.txt or https://dk1ri.de/myc/ki.pdf [15] https://dk1ri.de/myc/communication.txt or https://dk1ri.de/myc/communication.pdf [16] https://dk1ri.de/myc/Security.txt or https://dk1ri.de/myc/Security.pdf