I have read https://mongoose-os.com/docs/mongoose-os/userguide/security.md and try to add authentication & authorisation to my project. I use this commands
htdigest -c rpc_auth.txt myproduct joe
mos put rpc_auth.txt
mos config-set rpc.auth_domain=myproduct
mos config-set rpc.auth_file=rpc_auth.txt
mos put rpc_acl.json
mos config-set rpc.acl_file=rpc_acl.json
to create credentials and put files to ESP32
My rpc_acl.json have next text:
[
{"method": "FS.*", "acl": "+joe,-user2"}
]
The commands like mos ls -l --rpc-creds=joe:11111 work well,
but , I have not found , how to include auth key in RPC request.
My questions are:
- How to use htdigest authentication & authorisation with mdash
- How to add auth key in RPC request