Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

[nginx-ingress-controller] Add external authentication using auth_request #1796

Merged
merged 1 commit into from
Oct 3, 2016

Conversation

aledbf
Copy link
Contributor

@aledbf aledbf commented Sep 28, 2016

fixes #1492


This change is Reviewable

@k8s-github-robot k8s-github-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 28, 2016
@aledbf aledbf force-pushed the subrequest-auth branch 2 times, most recently from dec4a7a to d9214bd Compare September 28, 2016 14:05

var (
// ErrMissingAnnotations is returned when the ingress rule
// does not contains annotations related with authentication

Choose a reason for hiding this comment

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

s/does not contains/does not contain/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -723,6 +724,12 @@ func (lbc *loadBalancerController) getUpstreamServers(ngxCfg config.Configuratio
glog.V(3).Infof("error reading CORS annotation in Ingress %v/%v: %v", ing.GetNamespace(), ing.GetName(), err)
}

ra, err := authreq.ParseAnnotations(ing)

Choose a reason for hiding this comment

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

where are we using ra?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

controller.go (last commit)

@bprashanth
Copy link

Saw the related discussion on the bug, can you add an example of how to use this, and how that enables further integration with things like the oauth_proxy? (fine if you want to do this in a follow up)

@bprashanth
Copy link

I think your failure is legit

# k8s.io/contrib/ingress/controllers/nginx/nginx/authreq
controllers/nginx/nginx/authreq/main_test.go:86: t.Run undefined (type *testing.T has no field or method Run)

@aledbf
Copy link
Contributor Author

aledbf commented Sep 28, 2016

controllers/nginx/nginx/authreq/main_test.go:86: t.Run undefined (type *testing.T has no field or method Run)

oops I forgot to use go 1.6 features (t.Run is a new thing in 1.7)

@aledbf aledbf force-pushed the subrequest-auth branch 2 times, most recently from d3b6ce1 to 1dc197e Compare September 28, 2016 22:05
@aledbf aledbf changed the title WIP: [nginx-ingress-controller] Add external authentication using auth_request [nginx-ingress-controller] Add external authentication using auth_request Oct 3, 2016
@bprashanth bprashanth added the lgtm Indicates that a PR is ready to be merged. label Oct 3, 2016
@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 284bac0 into kubernetes-retired:master Oct 3, 2016
@aledbf aledbf deleted the subrequest-auth branch October 3, 2016 17:47
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nginx-ingress-controller: support for oauth2_proxy
4 participants