RC3 - Critical information in config are not censored in logs

Issue #705 resolved
Desrever Nu created an issue

No description provided.

Comments (4)

  1. Desrever Nu reporter

    They are not censored in multiple places

    1:

    the JSON of the post {"mailrecipient":"desrever.nu@gmail.com","maxsellvolume":"21","executeorders":true,"priceincrement":"0.5","wallchangethreshold":"0.1","backupfeeds":["coinbase","blockchain"],"dualside":true,"mainfeed":"btce","apisecret":"xxx","txfee":"0.2","emergencytimeout":"60","submitliquidity":true,"nudip":"127.0.0.1","apikey":"1PS581UD5VZ5JSUHLGOTP32K33P2B9EBMWJA3HVURRH12MF2PQ2K4G1BFXIX7I5T","multiplecustodians":true,"nubitaddress":"bSBh4Kag9f1kSdsLhVRnnd1TuDwBMs4yPq","hipchat":false,"exchangename":"ccedk","maxbuyvolume":"3","pair":"nbt_btc","verbose":false,"mailnotifications":"SEVERE","spread":"50","keepproceeds":"0","nudport":"9091","rpcpass":"xxx","rpcuser":"rpctestuser"} - [c.n.n.w.ConfigController]
    

    2

    13:22:14.288 INFO  - parsed: new opt: {"nudIp":"127.0.0.1","submitLiquidity":true,"apiKey":"1PS581UD5VZ5JSUHLGOTP32K33P2B9EBMWJA3HVURRH12MF2PQ2K4G1BFXIX7I5T","distributeLiquidity":false,"nubitAddress":"bSBh4Kag9f1kSdsLhVRnnd1TuDwBMs4yPq","mainFeed":"btce","rpcUser":"rpctestuser","mailRecipient":"desrever.nu@gmail.com","maxBuyVolume":3.0,"maxSellVolume":21.0,"nudPort":9091,"backupFeeds":["coinbase","blockchain"],"priceIncrement":0.5,"rpcPass":"xxx","apiSecret":"xxx","hipchat":false,"pair":"nbt_btc","mailnotifications":"SEVERE","verbose":false,"spread":50.0,"emergencyTimeout":60,"multipleCustodians":true,"txFee":0.2,"exchangeName":"ccedk","executeOrders":true,"wallchangeThreshold":0.1,"dualSide":true,"keepProceeds":0.0} - [c.n.n.w.ConfigController]
    

    3

    13:22:14.292 INFO  - new opt: {
      "apiKey": "1PS581UD5VZ5JSUHLGOTP32K33P2B9EBMWJA3HVURRH12MF2PQ2K4G1BFXIX7I5T",
      "apiSecret": "xxxx",
      "mailRecipient": "desrever.nu@gmail.com",
      "exchangeName": "ccedk",
      "dualSide": true,
      "pair": "nbt_btc",
      "rpcUser": "rpctestuser",
      "rpcPass": "xxxx",
      "nubitAddress": "bSBh4Kag9f1kSdsLhVRnnd1TuDwBMs4yPq",
      "nudPort": 9091,
      "nudIp": "127.0.0.1",
      "mailnotifications": "SEVERE",
      "submitLiquidity": true,
      "executeOrders": true,
      "verbose": false,
      "hipchat": false,
      "multipleCustodians": true,
      "txFee": 0.2,
      "priceIncrement": 0.5,
      "emergencyTimeout": 60,
      "keepProceeds": 0.0,
      "maxSellVolume": 21.0,
      "maxBuyVolume": 3.0,
      "distributeLiquidity": false,
      "wallchangeThreshold": 0.1,
      "spread": 50.0,
      "mainFeed": "btce",
      "backupFeeds": [
        "coinbase",
        "blockchain"
      ]
    } - [c.n.n.w.ConfigController]
    

    4

    13:22:25.585 INFO  - Options loaded : {"nudIp":"127.0.0.1","submitLiquidity":true,"apiKey":"1PS581UD5VZ5JSUHLGOTP32K33P2B9EBMWJA3HVURRH12MF2PQ2K4G1BFXIX7I5T","distributeLiquidity":false,"nubitAddress":"bSBh4Kag9f1kSdsLhVRnnd1TuDwBMs4yPq","mainFeed":"btce","rpcUser":"rpctestuser","mailRecipient":"desrever.nu@gmail.com","maxBuyVolume":3.0,"maxSellVolume":21.0,"nudPort":9091,"backupFeeds":["coinbase","blockchain"],"priceIncrement":0.5,"rpcPass":"xxx","apiSecret":"xxxx","hipchat":false,"pair":"nbt_btc","mailnotifications":"SEVERE","verbose":false,"spread":50.0,"emergencyTimeout":60,"multipleCustodians":true,"txFee":0.2,"exchangeName":"ccedk","executeOrders":true,"wallchangeThreshold":0.1,"dualSide":true,"keepProceeds":0.0} - [c.n.n.b.NuBotBase]
    13:22:25.647 INFO  - Configuring NuBot for Dual-Side strategy - [c.n.n.s.S.NuBotSecondary]
    
  2. Desrever Nu reporter

    removed 1,2,and 3.

    4 is the result of LOG.info("Options loaded : " + Global.options.toStringNoKeys());
    which apparently is not working

  3. Desrever Nu reporter

    case was a problem . changed to

      //Replace sensitive information
                String[] sensitiveKeys = {"apisecret", "apikey", "rpcpass", "apiSecret", "apiKey", "rpcPass"};
                String replaceString = "hidden";
    
                for (int i = 0; i < sensitiveKeys.length; i++) {
                    serializedOptionsJSON.replace(sensitiveKeys[i], replaceString);
                }
    
  4. Log in to comment