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

Ingress Fake Certificate generation #382

Merged
merged 3 commits into from
Mar 7, 2017

Conversation

rikatz
Copy link
Contributor

@rikatz rikatz commented Mar 6, 2017

This PR solves the problem reported in #191

It generates a new Fake Cert, instead of using the snake oil.

Once the Fake Cert is generated, it's not created anymore until someone erases it.

Also it improves the secrets enqueing by removing some wrong code that wasn't downloading the other TLS Secrets.

A final change in this PR is inserting a 'os.Remove' in the Temporary Pem File generation, so when an error occurs the files does not fill the filesystem

This PR substitutes the #194.

cc @aledbf

Ricardo Pchevuzinske Katz added 3 commits March 6, 2017 09:21
…oesn't exists

Generates a Self signed certificate for default vhost if the secret doesn't exists

	modified:   core/pkg/ingress/controller/backend_ssl.go
	modified:   core/pkg/ingress/controller/controller.go
	modified:   core/pkg/net/ssl/ssl.go
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 6, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@aledbf aledbf self-assigned this Mar 6, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 46.173% when pulling e107e2b on rikatz:ingress-fake-cert into a6e3822 on kubernetes:master.

@aledbf
Copy link
Member

aledbf commented Mar 7, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 7, 2017
@aledbf
Copy link
Member

aledbf commented Mar 7, 2017

@rikatz thanks!

@aledbf aledbf merged commit 251990d into kubernetes:master Mar 7, 2017
@rikatz rikatz deleted the ingress-fake-cert branch March 7, 2017 12:31
@@ -944,9 +956,6 @@ func (ic *GenericController) createServers(data []interface{},
servers[host].SSLCertificate = cert.PemFileName
servers[host].SSLPemChecksum = cert.PemSHA
}
} else {
servers[host].SSLCertificate = defaultPemFileName
servers[host].SSLPemChecksum = defaultPemSHA
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this else statement was removed? This broke default TLS assignment on FQDN without a secretName. May we reinclude it? @rikatz @aledbf

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was removed due to a request from @bprashanth to not assign the default certificate on misconfigured ingresses.

Instead, I'm going to create a new ConfigMap to make this behaviour configurable (a heroku like), and it will be an admin choice to enable or not this.

Copy link
Contributor

Choose a reason for hiding this comment

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

@bprashanth PR #459 adds if tlsSecretName == "" before looking for a secret. Could this be changed to "use the default secret" instead a warning? This would fix a misbehavior on haproxy ingress. Note that this change doesn't assign the default cert on a misconfigured ingress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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.

6 participants