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

BackendConfig cdn: enable: true uses scary defaults #599

Closed
ConradIrwin opened this issue Jan 8, 2019 · 3 comments
Closed

BackendConfig cdn: enable: true uses scary defaults #599

ConradIrwin opened this issue Jan 8, 2019 · 3 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@ConradIrwin
Copy link

I created a backend config like this:

apiVersion: cloud.google.com/v1beta1
kind: BackendConfig
metadata:
  name: mediaproxy-backend-config
spec:
  timeoutSec: 120
  cdn:
    enabled: true

Expecting it to be equivalent to the default CDN policy, which is more explicitly written like this:

apiVersion: cloud.google.com/v1beta1
kind: BackendConfig
metadata:
  name: mediaproxy-backend-config
spec:
  timeoutSec: 120
  cdn:
    enabled: true
    cachePolicy:
      includeHost: true
      includeProtocol: true
      includeQueryString: true

Unfortunately the default if cachePolicy is omitted is actually equivalent to:

apiVersion: cloud.google.com/v1beta1
kind: BackendConfig
metadata:
  name: mediaproxy-backend-config
spec:
  timeoutSec: 120
  cdn:
    enabled: true
    cachePolicy:
      includeHost: false
      includeProtocol: false
      includeQueryString: false

This is a very unsafe default, in our case query parameters are essential to prevent data leakage between users, and I would like to ask that the default be the same as the Google Cloud CDN default.

For now I can work around the problem by explicitly setting the policy, but it was a nasty surprise.

@rramkumar1
Copy link
Contributor

@ConradIrwin Thanks for pointing this out, this appears to be a bug.

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 8, 2019
@rramkumar1
Copy link
Contributor

/assign @rramkumar1

@ConradIrwin
Copy link
Author

ConradIrwin commented Jan 16, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants