Skip to content

URLs behind CERN SSO are not reachable #7

Description

@mrceyhun

Impact of the bug
http exporter (http-exporter-mcm)

Describe the bug
http_exporter.go cannot reach URLs behind CERN SSO. http-exporter-mcm is the only one that I'm aware. Go HTTP client follows redirection but returns http 200 status code for CERN SSO page, not for the actual page behind SSO. It means that we may not know if the service is alive or not, since the status code is of SSO page.

How to reproduce

# Edit http_exporter.go to print response body 
proxy=/tmp/$USER/proxy
cd ~/.globus
voms-proxy-init -voms cms -rfc --key userkey.pem --cert usercert.pem -valid 95:50 --out /tmp/$USER/proxy
go run http_exporter.go -uri https://cms-pdmv.cern.ch/mcm/ -proxyfile /tmp/$USER/proxy -namespace ceyhun -port :18006 -agent test  -verbose
# another terminal
curl http://localhost:18006/metrics

Additional context and error message
I tried CheckRedirect that has an example here, but SSO is not related with redirection it seems, it did not work. @vkuznet any suggestions?

fyi @brij01 @leggerf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions