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

swagger-client: Remove noAuth #396

Merged
merged 2 commits into from
Jan 12, 2019
Merged

swagger-client: Remove noAuth #396

merged 2 commits into from
Jan 12, 2019

Conversation

whs
Copy link
Contributor

@whs whs commented Jan 9, 2019

The /openapi/v2 endpoint is protected by authentication. Also reported by one of my downstream user on wongnai/kube-slack#50

I'm not sure why this call was flagged with noAuth?

@gordlea
Copy link

gordlea commented Jan 11, 2019

I'm getting an error that this PR fixes:

 Error: Failed to get /openapi/v2 and /swagger.json: Cannot find module './auth-providers/openid.js'
    at _getSpec.catch.then.catch.err (/Users/johlea/.nvm/versions/node/v8.13.0/lib/node_modules/@opendns/strln-k8-env/node_modules/kubernetes-client/lib/swagger-client.js:56:15)
    at <anonymous>
    at runMicrotasksCallback (internal/process/next_tick.js:122:5)
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickCallback (internal/process/next_tick.js:181:9)

I think the Cannot find module error is misleading, all of the files are there, and this PR fixes the issue for me.

Can we get this merged soon?

@silasbw
Copy link
Contributor

silasbw commented Jan 11, 2019

@ajpauwels can you help reconcile this with #372 ?

@whs
Copy link
Contributor Author

whs commented Jan 12, 2019

I tested /openapi/v2 and it does not requires authentication in GKE. However, in my cluster that use Kops it does require authentication. It might be due to different API server flag.

Edit: I've confirm I have --anonymous-auth=false set in my cluster. GKE seems to have anonymous auth permanently enabled. Maybe they want to call /healthz?

From what I see the reason authentication was removed was due to #371 as the user pass invalid credential to the library and get a server error. I think this is entirely user's error as it is a documented behavior.

@silasbw silasbw merged commit 4944fba into godaddy:master Jan 12, 2019
@silasbw
Copy link
Contributor

silasbw commented Jan 12, 2019

Thanks @whs 💯 .

Published your fix with kubernetes-client@6.8.1.

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

Successfully merging this pull request may close these issues.

None yet

3 participants