Update openwrt.md

Update homepage.json detail to add a missing comma, add json formatting
Add guidance on creating a crypt(5) password hash for improved security (suggested by OpenWRT community dev)
Correct /etc/config/rpc to /etc/config/rpcd
Remove additional (not required) permissions from rpcd
pull/3016/head
russkinz 3 months ago committed by GitHub
parent abce57379d
commit 571cfa2231
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -26,7 +26,7 @@ In order for homepage to access the OpenWRT RPC endpoints you will need to [crea
Create an ACL named `homepage.json` in `/usr/share/rpcd/acl.d/`, the following permissions will suffice:
```
```json
{
"homepage": {
"description": "Homepage widget",
@ -34,21 +34,25 @@ Create an ACL named `homepage.json` in `/usr/share/rpcd/acl.d/`, the following p
"ubus": {
"network.interface.wan": ["status"],
"network.interface.lan": ["status"],
"network.device": ["status"]
"network.device": ["status"],
"system": ["info"]
}
},
}
}
```
Create a `crypt(5)` password hash using the following command in the OpenWRT shell:
```sh
uhttpd -m "<somepassphrase>"
```
Then add a user that will use that ACL in `/etc/config/rpc`:
Then add a user that will use that ACL in `/etc/config/rpcd`:
```config login
```
config login
option username 'homepage'
option password '<password>'
option password '<hashedpassword>'
list read homepage
list write '*'
```
This username and password will be used in Homepage's services.yaml to grant access.

Loading…
Cancel
Save