[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Cloud Checks - Make Optional #107

Open
goffinf opened this issue Mar 18, 2019 · 1 comment
Open

Azure Cloud Checks - Make Optional #107

goffinf opened this issue Mar 18, 2019 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers on pull request That issue was handled and will be closed after accepting it's pull request
Milestone

Comments

@goffinf
Copy link
goffinf commented Mar 18, 2019

I note that there is a check whether the cluster is deployed into Azure Cloud .. see below.

I don't have a problem with that per se except that in a corporate environment I don't want to request a proxy whitelist exception with my CISO for an endpoint that we have no use for (http://www.azurespeed.com). Moreover, whilst this test will eventually timeout and the checks resume, it delays the process by whatever our default timeout is (120 secs I think) which is not ideal.

Could you make this check optional using something like this ...

parser.add_argument('--azurechk', action="store_true", help="whether to check if the cluster is deployed on azure cloud - defaults to true")
...
class HostDiscoveryHelpers:
    @staticmethod
    def get_cloud(host):
        if config.azurechk:
            ...

Kind Regards

Fraser.

class HostDiscoveryHelpers:
    @staticmethod
    def get_cloud(host):
        if config.azurechk:
            try:
                logging.debug("Checking whether the cluster is deployed on azure's cloud")
                metadata = requests.get("http://www.azurespeed.com/api/region?ipOrUrl={ip}".format(ip=host)).text
            except requests.ConnectionError as e:
                logging.info("- unable to check cloud: {0}".format(e))
                return
        if "cloud" in metadata:
            return json.loads(metadata)["cloud"]
@shubb30
Copy link
shubb30 commented Aug 30, 2019

I would like to see this too. I can't have a security tool making calls to the outside.

@itaysk itaysk added this to the v0.2.1 milestone Nov 12, 2019
@itaysk itaysk added the on pull request That issue was handled and will be closed after accepting it's pull request label Nov 12, 2019
@itaysk itaysk modified the milestones: v0.2.1, v0.3.0 Nov 28, 2019
@lizrice lizrice modified the milestones: v0.3.0, v0.3.1 Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers on pull request That issue was handled and will be closed after accepting it's pull request
Projects
None yet
Development

No branches or pull requests

5 participants