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

APIInterceptor: authTokenValidator interceptor does not close http response #17731

Closed
prachidamle opened this issue Jan 29, 2019 · 2 comments
Closed
Assignees
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release version/1.6
Milestone

Comments

@prachidamle
Copy link
Member

prachidamle commented Jan 29, 2019

Noticed that the authTokenValidator interceptor in https://github.com/rancher/websocket-proxy is opening http connection to make a request using the golang http client, but not closing the response. This can lead to connection pool being used up if the interceptor is being invoked for a lot of APIs and slowness in API response.

@alena1108
Copy link

Available to test in rancher/server:v1.6.26-rc7

@soumyalj
Copy link

Tested with v1.6.26-rc7 with a test-interceptor on a Cattle setup. Enabled Github auth in the setup. Performed few operations which invoke user calls and system calls and the the api interceptor had the headers printed accordingly(user or service)
Example interceptor below:

{
	"requestInterceptors": [{
		"type": "authTokenValidator",
		"paths": ["/v2-beta/projects", "/v2-beta/projects/{path:.*}"],
		"endpoint": "",
		"methods": ["post", "delete", "get"],
		"secretToken": ""
	}, {
		"type": "http",
		"paths": ["/v2-beta/projects", "/v2-beta/projects/{path:.*}"],
		"endpoint": "HOSTIP_WHERE_INTERCEPTOR_IS_RUNNING/authtokenvalidator",
		"methods": ["post", "delete", "get"],
		"secretToken": ""
	}]
}

Also, added and deleted members to the environment successfully. No errors were observed .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release version/1.6
Projects
None yet
Development

No branches or pull requests

4 participants