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

proxy e2e test improvements #10070

Merged
merged 6 commits into from Jun 25, 2015
Merged

proxy e2e test improvements #10070

merged 6 commits into from Jun 25, 2015

Conversation

lavalamp
Copy link
Member

This improves the proxy test to make multiple attempts. It also adds a URL rewriting check, which should verify that the correct stack of transports is being used.

It also fixes kubectl proxy to allow traffic to the ui again.

@k8s-bot
Copy link

k8s-bot commented Jun 19, 2015

GCE e2e build/test failed for commit 748438b0acb88804129b84cdf14b9ad72165a86c.

@k8s-bot
Copy link

k8s-bot commented Jun 19, 2015

GCE e2e build/test failed for commit e9ff9f277989e71c127e59e2cc222049f16faacd.

@satnam6502
Copy link
Contributor

@k8s-bot ok to test

@satnam6502 satnam6502 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 19, 2015
@satnam6502 satnam6502 self-assigned this Jun 19, 2015
@satnam6502
Copy link
Contributor

@lavalamp why does the e2e fail?

@k8s-bot
Copy link

k8s-bot commented Jun 19, 2015

GCE e2e build/test failed for commit e9ff9f277989e71c127e59e2cc222049f16faacd.

@lavalamp lavalamp removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 19, 2015
@lavalamp
Copy link
Member Author

e2e fails because this is broken :)

Let's see if it's fixed now.

@lavalamp
Copy link
Member Author

OK, I think the test is diagnosing our system as being wrong. We probably shouldn't submit until I get a fix.

@k8s-bot
Copy link

k8s-bot commented Jun 19, 2015

GCE e2e build/test failed for commit 33a7e5a445fc609f58ccfbb9ab1d4f1bffd59035.

@k8s-bot
Copy link

k8s-bot commented Jun 19, 2015

GCE e2e build/test failed for commit 55152797448666ff745fdddad898c28335c6e1d5.

@lavalamp
Copy link
Member Author

Sorry I did not get a chance to update this. I still think it's the system that's broken, not the test.

@k8s-bot
Copy link

k8s-bot commented Jun 23, 2015

GCE e2e build/test failed for commit a3ebdfda4e25c89fb597251446abbbfc95ba0014.

@lavalamp
Copy link
Member Author

@stephenR In the "Make UI work through kubectl proxy (again)" commit, I'm allowing traffic to more paths in the apiserver. Do you see any security issue with this?

@k8s-bot
Copy link

k8s-bot commented Jun 23, 2015

GCE e2e build/test failed for commit 773a754efaa245b5743084552e51f7c0586faded.

@davidopp
Copy link
Member

@lavalamp Is this ready to review? If so, @satnam6502 can you review this today, since it's for a v1.0 issue?

@@ -33,7 +33,7 @@ const prefix = "SERVE_PORT_"

func main() {
for _, vk := range os.Environ() {
parts := strings.Split(vk, "=")
parts := strings.SplitN(vk, "=", 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it useful to have a comment or example for the use of things like SplitN to help others understand what is going on.

@k8s-bot
Copy link

k8s-bot commented Jun 23, 2015

GCE e2e build/test failed for commit 859b7d2d482dea34f444609d796cfc93cb3605df.

@k8s-bot
Copy link

k8s-bot commented Jun 23, 2015

GCE e2e build/test failed for commit 56528a59d8eff40bf06384816cd91178ce8e808e.

@satnam6502
Copy link
Contributor

Are you ready for me to PTAL?

@stephenR
Copy link

@stephenR In the "Make UI work through kubectl proxy (again)" commit, I'm allowing traffic to more paths in the apiserver. Do you see any security issue with this?

I don't have a good overview of what paths become available through this, but since POST requests are blocked anyway, this should be fine. An issue would be if there are any state changing endpoints in the new paths that can be triggered via a GET request, similar to the /api/*/{exec,run} handlers.

@lavalamp
Copy link
Member Author

@stephenR The UI is read only at the moment. Here's a list of top level paths. IMO we shouldn't have ANY state changing GET operations--that is like http 101--and we need to change the ones you mentioned.

{
  "paths": [
    "/api",
    "/api/v1",
    "/api/v1beta3",
    "/healthz",
    "/healthz/ping",
    "/logs/",
    "/metrics",
    "/static/",
    "/swagger-ui/",
    "/swaggerapi/",
    "/ui/",
    "/version"
  ]
}

But really I don't understand this mechanism of hiding mutating paths; I think people will just run without this filter because typically you're running this proxy because you want to do something.

@lavalamp
Copy link
Member Author

OK, final change-- I think this should make e2e pass.

@k8s-bot
Copy link

k8s-bot commented Jun 24, 2015

GCE e2e build/test failed for commit e90bcff0ca20601cd0415d7f82bd2420ae08cfff.

@lavalamp
Copy link
Member Author

OK. Final push. Should be ready to go now. PTAL

@k8s-bot
Copy link

k8s-bot commented Jun 24, 2015

GCE e2e build/test passed for commit 5eb5b4a.

@lavalamp
Copy link
Member Author

YAY IT PASSED

@lavalamp
Copy link
Member Author

@quinton-hoole @brendandburns I can haz LGTMs/ok-to-merge?

@satnam6502
Copy link
Contributor

LGTM

@davidopp
Copy link
Member

I can take a look.

@davidopp
Copy link
Member

LGTM

@davidopp
Copy link
Member

I guess technically it still needs an LGTM from @brendandburns or @quinton-hoole

@ghost
Copy link

ghost commented Jun 24, 2015

I can take a look now.

@ghost
Copy link

ghost commented Jun 24, 2015

High level comment. This really is a lot of code to add so late before v1.0. Do we really need all of this right now? @lavalamp ?

@ghost
Copy link

ghost commented Jun 24, 2015

PS: Can someone with more context help to decide whether the milestone for this is

  1. v1.0-post
  2. v1.0-candidate
  3. v1.0

?

@lavalamp
Copy link
Member Author

@quinton-hoole a large majority of this is test code. The non-test code changes are either fixing bugs or adding logging.

@lavalamp
Copy link
Member Author

The test code here, had it been in, would have saved us grief in GKE recently.

@stephenR
Copy link

But really I don't understand this mechanism of hiding mutating paths; I think people will just run without this filter because typically you're running this proxy because you want to do something.

I agree, I think this is just an intermediate solution and in the end we'll have to think of a good way to do proper xsrf protection.

@ghost
Copy link

ghost commented Jun 25, 2015

OK, I won't bother doing a full forth code review after @davidopp @satnam6502 and @stephenR . Based on what I see it's relatively low risk, and high value. ok-to-merge

@ghost ghost added the ok-to-merge label Jun 25, 2015
mbforbes added a commit that referenced this pull request Jun 25, 2015
@mbforbes mbforbes merged commit 5e748c1 into kubernetes:master Jun 25, 2015
@lavalamp lavalamp deleted the e2eProxyFix branch September 1, 2020 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants