luci-mod-status: replace iptables controller actions with cgi-io calls
[oweals/luci.git] / modules / luci-base / root / usr / share / rpcd / acl.d / luci-base.json
1 {
2         "unauthenticated": {
3                 "description": "Allow system feature probing",
4                 "read": {
5                         "ubus": {
6                                 "luci": [ "getFeatures" ]
7                         }
8                 }
9         },
10
11         "uci-access": {
12                 "description": "Grant uci write access to all configurations",
13                 "read": {
14                         "uci": [ "*" ]
15                 },
16                 "write": {
17                         "uci": [ "*" ]
18                 }
19         },
20         "luci-access": {
21                 "description": "Grant access to basic LuCI procedures",
22                 "read": {
23                         "cgi-io": [ "backup", "download", "exec" ],
24                         "file": {
25                                 "/": [ "list" ],
26                                 "/*": [ "list" ],
27                                 "/dev/mtdblock*": [ "read" ],
28                                 "/etc/crontabs/root": [ "read" ],
29                                 "/etc/dropbear/authorized_keys": [ "read" ],
30                                 "/etc/filesystems": [ "read" ],
31                                 "/etc/rc.local": [ "read" ],
32                                 "/etc/sysupgrade.conf": [ "read" ],
33                                 "/etc/passwd": [ "read" ],
34                                 "/etc/group": [ "read" ],
35                                 "/proc/filesystems": [ "read" ],
36                                 "/proc/mtd": [ "read" ],
37                                 "/proc/partitions": [ "read" ],
38                                 "/proc/sys/kernel/hostname": [ "read" ],
39                                 "/proc/sys/net/netfilter/nf_conntrack_*": [ "read" ],
40                                 "/proc/mounts": [ "read" ],
41                                 "/usr/lib/lua/luci/version.lua": [ "read" ],
42                                 "/bin/ping *": [ "exec" ],
43                                 "/bin/ping6 *": [ "exec" ],
44                                 "/bin/traceroute *": [ "exec" ],
45                                 "/bin/traceroute6 *": [ "exec" ],
46                                 "/usr/bin/ping *": [ "exec" ],
47                                 "/usr/bin/ping6 *": [ "exec" ],
48                                 "/usr/bin/traceroute *": [ "exec" ],
49                                 "/usr/bin/traceroute6 *": [ "exec" ],
50                                 "/usr/bin/nslookup *": [ "exec" ],
51                                 "/usr/libexec/luci-peeraddr": [ "exec" ],
52                                 "/usr/sbin/iptables --line-numbers -w -nvxL -t *": [ "exec" ],
53                                 "/usr/sbin/ip6tables --line-numbers -w -nvxL -t *": [ "exec" ]
54                         },
55                         "ubus": {
56                                 "file": [ "list", "read", "stat" ],
57                                 "iwinfo": [ "assoclist", "freqlist", "txpowerlist", "countrylist" ],
58                                 "luci": [ "getConntrackList", "getInitList", "getLocaltime", "getProcessList", "getRealtimeStats", "getTimezones", "getLEDs", "getUSBDevices", "getSwconfigFeatures", "getSwconfigPortState", "getBlockDevices", "getMountPoints" ],
59                                 "luci-rpc": [ "getBoardJSON", "getDHCPLeases", "getDSLStatus", "getDUIDHints", "getHostHints", "getNetworkDevices", "getWirelessDevices" ],
60                                 "network.interface": [ "dump" ],
61                                 "network.rrdns": [ "lookup" ],
62                                 "network": [ "get_proto_handlers" ],
63                                 "system": [ "board", "info", "validate_firmware_image" ],
64                                 "uci": [ "changes", "get" ]
65                         },
66                         "uci": [ "*" ]
67                 },
68                 "write": {
69                         "cgi-io": [ "upload" ],
70                         "file": {
71                                 "/etc/crontabs/root": [ "write" ],
72                                 "/etc/dropbear/authorized_keys": [ "write" ],
73                                 "/etc/luci-uploads/*": [ "write" ],
74                                 "/etc/rc.local": [ "write" ],
75                                 "/etc/sysupgrade.conf": [ "write" ],
76                                 "/sbin/block": [ "exec" ],
77                                 "/sbin/firstboot": [ "exec" ],
78                                 "/sbin/ifdown": [ "exec" ],
79                                 "/sbin/ifup": [ "exec" ],
80                                 "/sbin/reboot": [ "exec" ],
81                                 "/sbin/sysupgrade": [ "exec" ],
82                                 "/sbin/wifi": [ "exec" ],
83                                 "/bin/kill": [ "exec" ],
84                                 "/bin/tar": [ "exec" ],
85                                 "/bin/umount": [ "exec" ],
86                                 "/tmp/backup.tar.gz": [ "write" ],
87                                 "/tmp/firmware.bin": [ "write" ],
88                                 "/tmp/upload.ipk": [ "write" ]
89                         },
90                         "ubus": {
91                                 "file": [ "write", "remove", "exec" ],
92                                 "hostapd.*": [ "del_client" ],
93                                 "iwinfo": [ "scan" ],
94                                 "luci": [ "setInitAction", "setLocaltime", "setPassword", "setBlockDetect" ],
95                                 "uci": [ "add", "apply", "confirm", "delete", "order", "set", "rename" ]
96                         },
97                         "uci": [ "*" ]
98                 }
99         },
100         "luci-app-firewall": {
101                 "description": "Grant access to firewall procedures",
102                 "read": {
103                         "file": {
104                                 "/etc/firewall.user": [ "read" ]
105                         },
106                         "ubus": {
107                                 "luci": [ "getConntrackHelpers" ]
108                         },
109                         "uci": [ "firewall" ]
110                 },
111                 "write": {
112                         "file": {
113                                 "/etc/firewall.user": [ "write" ],
114                                 "/etc/init.d/firewall": [ "exec" ]
115                         },
116                         "uci": [ "firewall" ]
117                 }
118         }
119 }