diff --git a/incubator/buzzfeed-sso/Chart.yaml b/incubator/buzzfeed-sso/Chart.yaml index ea4ae257d2..bd403fbc9c 100644 --- a/incubator/buzzfeed-sso/Chart.yaml +++ b/incubator/buzzfeed-sso/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Single sign-on for your Kubernetes services using Google OAuth name: buzzfeed-sso -version: 0.0.5 +version: 0.0.6 appVersion: 1.2.0 home: https://github.com/buzzfeed/sso sources: diff --git a/incubator/buzzfeed-sso/README.md b/incubator/buzzfeed-sso/README.md index a5692df5b7..34bc787db0 100644 --- a/incubator/buzzfeed-sso/README.md +++ b/incubator/buzzfeed-sso/README.md @@ -53,6 +53,7 @@ Parameter | Description | Default `namespace` | namespace to use | `default` `emailDomain` | the sso email domain for authentication | REQUIRED `rootDomain` | the parent domain used for protecting your backends | REQUIRED +`whitelistedEmails` | comma-seperated list of emails which should be whitelisted | OPTIONAL `cluster` | the cluster name for SSO | `dev` `auth.annotations` | extra annotations for auth pods | `{}` `auth.domain` | the auth domain used for OAuth callbacks | REQUIRED diff --git a/incubator/buzzfeed-sso/templates/auth-deployment.yaml b/incubator/buzzfeed-sso/templates/auth-deployment.yaml index cce2249f86..293d3bf9c9 100644 --- a/incubator/buzzfeed-sso/templates/auth-deployment.yaml +++ b/incubator/buzzfeed-sso/templates/auth-deployment.yaml @@ -57,6 +57,10 @@ spec: value: {{ .Values.emailDomain | quote }} - name: HOST value: {{ $authDomain }} + {{- if .Values.whitelistedEmails }} + - name: SSO_EMAIL_ADDRESSES + value: {{ .Values.whitelistedEmails }} + {{- end }} - name: REDIRECT_URL value: https://{{ $authDomain }} - name: PROXY_ROOT_DOMAIN diff --git a/incubator/buzzfeed-sso/templates/proxy-deployment.yaml b/incubator/buzzfeed-sso/templates/proxy-deployment.yaml index 9c390b1c1e..775da098a5 100644 --- a/incubator/buzzfeed-sso/templates/proxy-deployment.yaml +++ b/incubator/buzzfeed-sso/templates/proxy-deployment.yaml @@ -63,6 +63,10 @@ spec: key: proxy-cookie-secret - name: EMAIL_DOMAIN value: {{ .Values.emailDomain | quote }} + {{- if .Values.whitelistedEmails }} + - name: EMAIL_ADDRESSES + value: {{ .Values.whitelistedEmails }} + {{- end }} - name: UPSTREAM_CONFIGS value: /sso/upstream_configs.yml - name: PROVIDER_URL diff --git a/incubator/buzzfeed-sso/values.yaml b/incubator/buzzfeed-sso/values.yaml index 34d4be1e1a..1eefb36145 100644 --- a/incubator/buzzfeed-sso/values.yaml +++ b/incubator/buzzfeed-sso/values.yaml @@ -2,6 +2,7 @@ emailDomain: "" # Required. e.g "email.mydomain.foo" rootDomain: "" # Required. e.g "mydomain.foo" +# whitelistedEmails: "" # Optional. e.g. "userA.nameA@mydomain.foo,userB.nameB@mydomain.foo" cluster: dev auth: