Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Tommy Situ
    @tommysitu
    sorry got muddled up with trusting hoverfly cert
    I think go uses the host system trusted ca cert
    but the thing is there is an option to turn off the destination server tls verification:
    -tls-verification
            Turn on/off tls verification for outgoing requests (will not try to verify certificates) (default true)
    have you tried hoverfly -tls-verification=false ?
    Tommy Situ
    @tommysitu
    I’d be surprised if this doesn’t work
    and the server doesn’t require two-way tls auth, does it?
    Jeff-Beery
    @Jeff-Beery

    starting hoverfly with -tls-verification=false does indeed allow the calls to go through.
    The https endpoints in question do not require two-way ssl
    I'll explore getting our certs added to the "host system trusted store"

    Is there a bug in that the localconfigs.disableTlsVerification() from the test does not seem to cause the hoverfly service to disable cert verification for outgoing requests?

    Tommy Situ
    @tommysitu
    also if you want your custom ca cert picked up by Golang, here it is: https://stackoverflow.com/questions/40051213/where-is-golang-picking-up-root-cas-from
    Jeff-Beery
    @Jeff-Beery

    Thanks for the help and info.

    I followed this post https://superuser.com/questions/437330/how-do-you-add-a-certificate-authority-ca-to-ubuntu and was successful in getting Hoverfly to "trust" our services for outgoing requests (capture and spy).

    We were installing our certs in Java keystore and /usr/share/ca-certificates on our dev boxes.

    after following the steps to add them to /usr/local/share/ca-certificates hoverfly is now happy!

    Tommy Situ
    @tommysitu
    awesome!!
    mrgaganchohan
    @mrgaganchohan
    Hey, in hoverfly REST APIs, in simulate mode, is it possible to get the usage stats, like how many times an API was hit?
    John Davenport
    @JohnFDavenport
    @mrgaganchohan point your browser at the Admin interface http://localhost:8888
    Teklie Belay
    @Teklie

    Hi Everyone,

    I've recently come across Hoverfly and it looks very helpful tool. Thanks for those of you who are investing time and effort.

    I'm now trying to build responses based on requests by enabling response templating - but I don't manage it. Here is the JSON file I'm playing with. My target is to get the first value in path - time.json.test/{valueInHere}

    {
    "data": {
    "pairs": [
    {
    "response": {
    "status": 200,
    "body": "{\n \"date\": \"{{ Request.Path.[0] }}\",\n \"milliseconds_since_epoch\": 1585913925943,\n \"time\": \"11:38:45 AM\"\n}\n",
    "encodedBody": false,
    "templated": true,
    "headers": {
    "Access-Control-Allow-Origin": [
    ""
    ],
    "Content-Length": [
    "100"
    ],
    "Content-Type": [
    "application/json"
    ],
    "Date": [
    "Fri, 03 Apr 2020 11:38:45 GMT"
    ],
    "Hoverfly": [
    "Was-Here"
    ],
    "Server": [
    "Google Frontend"
    ],
    "X-Cloud-Trace-Context": [
    "672765b338daafdca4fb9a241a080d9e"
    ]
    }
    },
    "request": {
    "path": {
    "glob": "/
    "
    },
    "method": {
    "exactMatch": "GET"
    },
    "destination": {
    "glob": "time.jsontest.com"
    },
    "scheme": {
    "exactMatch": "http"
    },
    "query": {
    "exactMatch": ""
    },
    "body": {
    "exactMatch": ""
    }
    }
    }
    ],
    "globalActions": {
    "delays": []
    }
    },
    "meta": {
    "schemaVersion": "v2",
    "hoverflyVersion": "v0.11.3",
    "timeExported": "2020-04-03T13:40:09+02:00"
    }
    }

    John Davenport
    @JohnFDavenport
    @Teklie maybe get a hoverfly.io trial account and use the editor there rather than ask other people to do your editing for you?
    mrgaganchohan
    @mrgaganchohan
    Hey, I have cors enabled but whenever i hit the localhost:888 api through axios react, it says CORS error
    hoverctl status says cors is enabled
    mrgaganchohan
    @mrgaganchohan
    I am trying to access port 8888
    Tommy Situ
    @tommysitu
    Port 8888 is the admin port, CORS doesn’t apply to Hoverfly’s admin API. It applies to the proxied response
    mrgaganchohan
    @mrgaganchohan
    so, can i access port 8888's admin data through react app?
    or the api's of the admin port through the react app?
    anyway, to get it's data in react app
    John Davenport
    @JohnFDavenport
    Yes. Use curl before writing any code.
    mrgaganchohan
    @mrgaganchohan
    curl works fine or i can call it inside chrome
    but can't call localhost
    8888 from inside react app
    react give CORS error
    mrgaganchohan
    @mrgaganchohan
    any ideas? I have been struggling with this for long
    mrgaganchohan
    @mrgaganchohan
    and what is the purpose of these REST APIs if you can't hit it with react app
    mrgaganchohan
    @mrgaganchohan
    /api/v2/journal, for this rest API for admin port, is it possible to increase limit from 25 to 1000 or something
    Tommy Situ
    @tommysitu
    @mrgaganchohan the admin API doesn’t have cors headers by default, so if you calling it from an app running on a different port in web browser you will get that error
    hoverfly has a hidden flag that let you enable cors on admin API actually, just do hoverfly -dev
    it will add the following cors headers:
    Access-Control-Allow-Credentials: true
    Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization
    Access-Control-Allow-Methods: GET, PUT, POST, OPTIONS, DELETE
    Access-Control-Allow-Origin: http://localhost:4200
    that means your app should be running on port 4200
    mrgaganchohan
    @mrgaganchohan
    and can i check the name of the files imported with hoverctl?
    Tommy Situ
    @tommysitu
    no, it’s not stored
    mrgaganchohan
    @mrgaganchohan
    anyway to get it?
    Tommy Situ
    @tommysitu
    hoverfly doesn’t keep the name of the simulation file, so that’s a no
    mrgaganchohan
    @mrgaganchohan
    one last thing, http://localhost:8888/api/v2/journal, this api has a limit of 25, anyway to increase it to 1000
    Tommy Situ
    @tommysitu
    that API supports paging param, I don’t seem to find it in the doc :(
    let me check
    Tommy Situ
    @tommysitu
    the limit = 25 in the response when no journal is misleading. I will fix it
    mrgaganchohan
    @mrgaganchohan
    Thanks
    mrgaganchohan
    @mrgaganchohan
    @tommysitu and is there a way to monitor number of hits to a particular path or API?
    that is present in an imported file
    Teklie Belay
    @Teklie
    Hi all,
    After upgrading hoverfly to v5 I 'm getting connection refused warning and my pod isn't getting ready. Any tips please?