L2-Technology / sensei

A lightning node implementation for everyone
https://l2.technology/sensei
Other
198 stars 39 forks source link

use separate token auth for sensei admin api from node service #26

Closed johncantrell97 closed 2 years ago

johncantrell97 commented 2 years ago

Before this change the sensei admin service (CRUD for nodes) was using the "default/admin" node's macaroon to handle authentication.

This didn't seem like a good idea so created a separate access token system for the admin service. It supports scoped tokens, token expiration based on time, and single-use tokens.

When you create/start/init the 'default' node it will now return the macaroon for that node as well as a access token that has "*" scope for accessing every endpoint.