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

Auth issue #5

Closed
Slapper opened this issue Mar 5, 2021 · 5 comments
Closed

Auth issue #5

Slapper opened this issue Mar 5, 2021 · 5 comments

Comments

@Slapper
Copy link

Slapper commented Mar 5, 2021

Hi!

I am trying to run the image with docker and i am getting the following error :

time="2021-03-05 21:28:22" level=fatal msg="error from makeRequest: HTTP status 400: content \"{\\\"success\\\":false,\\\"errors\\\":[{\\\"code\\\":6003,\\\"message\\\":\\\"Invalid request headers\\\",\\\"error_chain\\\":[{\\\"code\\\":6103,\\\"message\\\":\\\"Invalid format for X-Auth-Key header\\\"}]}],\\\"messages\\\":[],\\\"result\\\":null}\""

Any idea why this is happening ?

Api key seems to working fine according to cloudflare

curl -X GET "https://api.cloudflare.com/client/v4/user/tokens/verify" \
     -H "Authorization: Bearer *****************************" \
     -H "Content-Type:application/json"

And the output :

{"result":{"id":"*****************************","status":"active"},"success":true,"errors":[],"messages":[{"code":10000,"message":"This API Token is valid and active","type":null}]}

Thanks in advance!
Cheers!

@martinhaus
Copy link
Member

Hey @Slapper, are you using both the CF_API_EMAIL and CF_API_KEY? The exporter requires API key + email, not just the token.

@Slapper
Copy link
Author

Slapper commented Mar 6, 2021

hi @martinhaus

Thank you for your prompt reply! My bad... i was using the token & not the api key :(

So now the auth seems to work with the Global API Key and parsing my zones correctly, but now i am getting the following error :

time="2021-03-06 15:16:21" level=error msg="graphql: zone '****************' does not have access to the path"
time="2021-03-06 15:16:21" level=error msg="graphql: zone '****************' does not have access to the path"
time="2021-03-06 15:16:21" level=error msg="graphql: zone '****************' does not have access to the path"

My account has the necessary access on cloudflare so i am not sure why it cannot access the the zone's path.
Any idea will be really helpful!

Thank again!

@martinhaus
Copy link
Member

Hey @Slapper ,
I'm sorry, I haven't experienced any issues like you're describing. It seems like a permissions issue with your credentials though.

@haad haad closed this as completed Mar 15, 2021
@timtorChen
Copy link

The problem of level=error msg="graphql: zone '****************' does not have access to the path" is the exporter use some data source, like httpRequests1mByColoGroups, which only accessible for enterprise plan user.

Check the analytic API rate limit

@Slapper
Copy link
Author

Slapper commented Mar 31, 2021

Ok so after some trial & error tests i finally fix this issue. We have a mix of free and non-free domain in our cloudflare account so i had to use ZONE_<NAME> variable to explicitly set our enterprise domain IDs only.

Thanks once again for your help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants