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

Enhance Certificate Logging and Clearup Mutual Auth Docs #1426

Merged
merged 1 commit into from
Sep 27, 2017

Conversation

diazjf
Copy link

@diazjf diazjf commented Sep 27, 2017

Adds better logging to errors cause when getting a Certificate. Adds notes and updates documentation for Mutual Authentication, as well as removes unused function for Mutual Authentication.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 27, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 27, 2017
@@ -671,29 +671,6 @@ func (ic *GenericController) getBackendServers(ingresses []*extensions.Ingress)
return aUpstreams, aServers
}

// GetAuthCertificate ...
func (ic GenericController) GetAuthCertificate(secretName string) (*resolver.AuthSSLCert, error) {
Copy link
Member

Choose a reason for hiding this comment

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

You cannot remove this function. It's used in the auth cert annotation parser

Copy link
Author

Choose a reason for hiding this comment

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

I see and it is in ingress-controller because it deals with secret objects part of the ingress controller.

Adds better logging to errors caused when getting a Certificate.
Adds notes and updates documentation for Mutual Authentication.
@@ -509,9 +509,13 @@ func (ic *GenericController) getBackendServers(ingresses []*extensions.Ingress)
ca := ic.annotations.CertificateAuth(ing)
if ca != nil {
server.CertificateAuth = *ca
Copy link
Author

Choose a reason for hiding this comment

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

When building the annotation we just check if the secret exists in GetAuthCertificate, then cast it into an *ingress.SSLCert and then build the AuthSSLCert, but there are paths if the secret is created with tls.crt and tls.key but no ca.crt that CAFileName will be "".

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 43.769% when pulling 1ffeb2c on diazjf:ma-logging into 6e24dc6 on kubernetes:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 43.782% when pulling 1ffeb2c on diazjf:ma-logging into 6e24dc6 on kubernetes:master.

@aledbf aledbf self-assigned this Sep 27, 2017
@aledbf
Copy link
Member

aledbf commented Sep 27, 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 Sep 27, 2017
@aledbf
Copy link
Member

aledbf commented Sep 27, 2017

@diazjf thanks!

@aledbf aledbf merged commit 9164c38 into kubernetes:master Sep 27, 2017
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants