RTL icon indicating copy to clipboard operation
RTL copied to clipboard

Obfuscate `rpcuser` value in the config display

Open saubyk opened this issue 3 years ago • 21 comments

The rpcuser value is sensitive information and should not be displayed in the UI (/rtl/config/lnconfig). We can take the following approaches to display the hidden information: Password protect the config page and ask the user to enter password to display the page.

The expected behavior would be:

  • User clicks on the LND Config tab
  • The application prompts the user for entering the password
  • User enters the password
  • Upon successful authentication, the application will call the API to fetch the information and display the page

saubyk avatar Nov 20 '21 14:11 saubyk

Hi, is the issue still open? I am new to open source would like to contribute to the issue if possible.

Sarthakaga15 avatar Feb 12 '22 14:02 Sarthakaga15

Hi @Sarthakaga15 this issue is open and you can work on it. I edited the description and made the requirement more clear. You can revert if you have more questions.

Also checkout the RTL contribution guideline documented below: https://github.com/Ride-The-Lightning/RTL/blob/master/.github/docs/Contributing.md

Thanks and welcome. 😃

saubyk avatar Feb 12 '22 20:02 saubyk

@Sarthakaga15 Hey Sarthak, let me know if you need any help or are working on it. Otherwise, I will start working on it by Friday. Thanks.

ShahanaFarooqui avatar Feb 15 '22 15:02 ShahanaFarooqui

Hi @ShahanaFarooqui , I am trying to implement the expected behavior, I will try my best to complete it before Friday and will let you know if I remain stuck or need any help.

Sarthakaga15 avatar Feb 15 '22 16:02 Sarthakaga15

@Sarthakaga15 no rush to finish it by Friday. I just wanted to ensure that it is being worked on.

ShahanaFarooqui avatar Feb 15 '22 16:02 ShahanaFarooqui

Hi @ShahanaFarooqui @saubyk , I am getting error ( LND Get info failed due to bad or missing macaroon! Please check RTL-Config.json to verify the setup! ) after deploying server on login or opening /rtl/config/lnconfig page, need your suggestions.

Sarthakaga15 avatar Feb 16 '22 12:02 Sarthakaga15

@Sarthakaga15 you need to configure the lnserverurl link and macaroonPath in your ‘RTL-Config.json’ which should be located in your rtl root folder. If you have already done that and it is still not working then please share the contents of the file here after masking critical information.

ShahanaFarooqui avatar Feb 16 '22 12:02 ShahanaFarooqui

@Sarthakaga15 you need to configure the lnserverurl link and macaroonPath in your ‘RTL-Config.json’ which should be located in your rtl root folder. If you have already done that and it is still not working then please share the contents of the file here after masking critical information.

Hi, in Sample-RTL-Config.json all authentication path are there same with InserverUrl too, I renamed sample-RTL file to RTL too still same problem . Edit : just saw your comment installing prerequisites asap.

Sarthakaga15 avatar Feb 16 '22 13:02 Sarthakaga15

@Sarthakaga15 Working bitcoin node, lightning node, and nodejs are the prerequisites for RTL. https://github.com/Ride-The-Lightning/RTL#prereq. Please install them before starting RTL server.

ShahanaFarooqui avatar Feb 16 '22 15:02 ShahanaFarooqui

@Sarthakaga15 Working bitcoin node, lightning node, and nodejs are the prerequisites for RTL. https://github.com/Ride-The-Lightning/RTL#prereq. Please install them before starting RTL server.

@ShahanaFarooqui @saubyk do I need full bitcoin-core blockchain on the system and bitcoind on the system to run LND to run RTL? I have started the installation of the node but it will take couple of days to download, I have gone through full documentation of LND still unclear on working RTL, do I need all the above to run RTL or only repos . Please need your help!!

Sarthakaga15 avatar Feb 16 '22 19:02 Sarthakaga15

@Sarthakaga15 LND doesn’t have any documentation on RTL as these are two different projects. Prerequisites are definitely mandatory for any project to run.

We recommend full Bitcoin node to our users but it is not prerequisite for us. It is required by lightning implementations.

These installations are time consuming and beyond the scope of our project. However there is a lot of help and documentation available online. Feel free to post any specific question related to RTL. We will be happy to help.

I would also recommend to get familiar with Bitcoin and lightning basics before moving to RTL. As it is the user interface to operate lightning node.

There is no need to rush to work on this one. I will handle it and you can pick something else whenever you are comfortable.

ShahanaFarooqui avatar Feb 16 '22 19:02 ShahanaFarooqui

@Sarthakaga15 Working bitcoin node, lightning node, and nodejs are the prerequisites for RTL. https://github.com/Ride-The-Lightning/RTL#prereq. Please install them before starting RTL server.

@ShahanaFarooqui @saubyk do I need full bitcoin-core blockchain on the system and bitcoind on the system to run LND to run RTL? I have started the installation of the node but it will take couple of days to download, I have gone through full documentation of LND still unclear on working RTL, do I need all the above to run RTL or only repos . Please need your help!!

@Sarthakaga15 keep in mind that you should be setting up a testnet node for your development work, not mainnet. Testnet node will not take a lot of time to sync.

saubyk avatar Feb 16 '22 19:02 saubyk

Apologies @ShahanaFarooqui @saubyk if my message sounded amateur, just wanted to confirm on taking the right step towards installations as I didn't know much about this tech stack. I just want to contribute and learn. About LND as in documentation of RTL, it was mentioned running LND node so I was going through its documentation, also definitely gonna learn about the testnet nodes . I thought to have some knowledge of js so I tried to contribute. I learn most when subject to constraint. I still believe I can complete the issue after installations but as you recommend first to get familiar with Lightning and bitcoin I will do that. PS: Thanks for all the replies and help to my monotonous doubts. I will be back soon ;) .

Sarthakaga15 avatar Feb 16 '22 20:02 Sarthakaga15

@Sarthakaga15 There is nothing to apologise. We understand that learning all this is a bit overwhelming initially, but well worth in the end. We do not want you to feel pressured to close the issue. Rather, enjoy the journey and take your time to build a firm foundation. RTL is here to stay, take your time and looking forward to see you back.

ShahanaFarooqui avatar Feb 16 '22 21:02 ShahanaFarooqui

Hi @ShahanaFarooqui @saubyk , I have completed bitcoind setup and LND but not able to create wallet in LND getting some error , I have gone through basics of bitcoin and lnd I am trying to understand RTL code base and really want to contribute to RTL. Is there is any way to connect with you guys please let me know.

Sarthakaga15 avatar Mar 01 '22 18:03 Sarthakaga15

@Sarthakaga15, You can create LND wallet via RTL also. If bitcoin and lnd are already running than you just need to start RTL and it will automatically redirect you to initialize wallet after login.

Github issues, discussion boards, and twitter, all are great ways to connect with us. We usually reply immediately if possible, or as soon as possible.

ShahanaFarooqui avatar Mar 01 '22 18:03 ShahanaFarooqui

Hi @saubyk @ShahanaFarooqui,

  • I would like to contribute to RTL too.
  • I have a working bitcoin node, lightning node and Node.js but
  • I'm getting the same error: Lnd Get Info Failed Due To Bad Or Missing Macaroon! Please Check Rtl-config.json To Verify The Setup! .
  • In the RTL-Config.json file, my
    • "macaroonPath": "home/satyam/.lnd/data/chain/bitcoin/testnet", and
    • "lnServerUrl": "192.168.0.1:8080",.
  • I've verified in the terminal that the admin.macaroon file is inside the testnet folder but
  • I get the error: ENOENT: no such file or directory, open 'home/satyam/.lnd/data/chain/bitcoin/testnet/admin.macaroon'.

How do I fix this?

satyamsundaram avatar Apr 07 '22 13:04 satyamsundaram

Hi @satyam-01-byte there are a few corrections needed in your config file and you should be good.

  • "macaroonPath": "/home/satyam/.lnd/data/chain/bitcoin/testnet",
  • "lnServerUrl": "https://192.168.0.1:8080",

And, thanks for your interest in contributing to RTL.

saubyk avatar Apr 09 '22 14:04 saubyk

Hey @saubyk, I made the changes as you recommended. I'm not getting the same error anymore but my lnserver is not opening. I'm getting the error: ERROR: GetInfo => Get Info Error: {"name":"RequestError","message":"Error: connect ETIMEDOUT 192.168.0.1:8080" and thus, the client side gets stuck at getting node information after entering the password.

I've verified that my network connection is strong as everything else is working properly. What must I do to fix this?

satyamsundaram avatar Apr 11 '22 13:04 satyamsundaram

Hi, @satyam-01-byte Initially I too got errors in mysetup . I was missing the correct path configuration of node and go, due to which lncli and marcoon was not working for me too . Not sure, but once check if paths are correctly configured and testnet & lncli setuped correctly .

Sarthakaga15 avatar Apr 11 '22 14:04 Sarthakaga15

I've verified that my network connection is strong as everything else is working properly. What must I do to fix this?

@satyam-01-byte what's your setup configuration like? Are you running RTL and LND on the same device or they are running on separate devices?

If the former, you should change your lnServerUrl setting to "lnServerUrl": "https://127.0.0.1:8080",

if the latter, please share your lnd.conf file so that we can inspect how LND is configured (don't forget to remove the sensitive info like user and password etc. from the conf file before you share).

saubyk avatar Apr 11 '22 21:04 saubyk

Closed with pr #1100

saubyk avatar Nov 15 '22 03:11 saubyk