Authentication troubleshooting
bleetube opened this issue · comments
My access.macaroon from cl-rest works for RTL, but I'm getting auth failure when I try to add lightningd to Zeus with the hex string, with or without base64. Any advice?
curl -H "macaroon:$(base64 access.macaroon)" http://127.0.0.1:3001/v1/getinfo/
{"message":"Authentication Failed!","error":"Bad Macaroon!"}
curl -H "macaroon:$(xxd -ps -u -c 256 access.macaroon)" http://127.0.0.1:3001/v1/getinfo/
{"message":"Authentication Failed!","error":"Bad Macaroon!"}
Finally found my way there:
curl -H "macaroon:$(base64 -w0 access.macaroon)" http://127.0.0.1:3001/v1/getinfo/
I'm still confused why the HEX string authentication didn't work with curl, but don't really need it. The other thing I overlooked for way too long is that Zeus has a dropdown for selecting node type. I still had it on the default option and once I finally fixed that, the hex authentication started working. Few.
Base64
is default encoding type for macaroon authentication. To authenticate with HEX
macaroon value, an additional header encodingtype
is required:
curl -k -H "encodingtype:hex" -H "macaroon:$(xxd -ps -u -c 256 access.macaroon)" https://127.0.0.1:3001/v1/getinfo