# Bender a cln plugin that provide what you need

core lightning some version ago introduced the grpc plugin that enable a remote app to connect to core lightning node.
For now the plugin support only the tls certificate for autentication, and this make harder the integration of remote API because each of the app that want to use the grpc interface need to have a way to download the certificate from the server in some way and store it locally.
Christian shows already how to do it in some of the demo of [greenlight](https://blog.blockstream.com/en-greenlight-by-blockstream-lightning-made-easy/) that is by required the certificate by a API that in our case is a simple rest endpoint and and store the certificate in the local env.
In this way app like clnapp can download this file on mobile store on a local disk and use to autenticate the grpc.
Ad additional step, we need to add the rune autentication, that for a the biginning is just a simple password for us like alibaba.
In conclusion the plugin need also to provide an additional methd to generate the rune to allow the client to diplay it. With the correct architecture is is possible also make a command line application, but this is not required for now.
## Summary
* Step 1: Build a simple plugin that is able to startup a server and enbale an rest end point
- Library suggestion for server https://github.com/gin-gonic/gin
- make an endpoint that is /tls
* Step 2: Autenticate the endpoint with a simple password, the end point need to accept the following json request
```json
{
"password": "alibaba"
}
```
and if the password if valid need the server need to return a the file that a client needed (Talk with Kevan for that)
* Step 3: Create a RPC method to start the server
* Step 4: Create a RPC method to create a password
* To manage the password you may need a database, and you can use the lnmetrics one https://pkg.go.dev/github.com/LNOpenMetrics/lnmetrics.utils@v0.0.7/db/leveldb
* Step 5: move the password and use the rune instead, see https://lightning.readthedocs.io/lightning-commando-rune.7.html?highlight=command-rune ping me when you did this because we need to add also the autentication
* Step 6: option, create a comand line application that is able to create the rune and display it in the console with a QR code by using the app https://github.com/mdp/qrterminal
## Deadline
First release by August 18th
Article description by August: 25th (or couple of days later)