Skip to content

Commit 3521541

Browse files
[BACK-3960] Allow Tidepool user to initiate Oura C2C connection (#340)
- Add config for Jotform, customer.io, and Shopify - Add Oura chart with ConfigMap and Secret - Add AcceptURL and RevokeURL to all OAuth connections - Update Dexcom URLs in ConfigMap - Remove unnecessary Abbott environment variable - Update auth and data service environment variables - Add new routes - Fix typo in registry chart README.md - https://tidepool.atlassian.net/browse/BACK-3960 --------- Co-authored-by: Todd Kazakov <todd.kazakov@gmail.com>
1 parent eaaee60 commit 3521541

26 files changed

Lines changed: 534 additions & 11 deletions

charts/tidepool/charts/abbott/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ A Helm chart for Kubernetes
1414
| configmap.redirectURL | string | `""` | OAuth2 redirect URL |
1515
| configmap.tokenURL | string | `""` | OAuth2 token URL |
1616
| configmap.authorizeURL | string | `""` | OAuth2 authorization URL |
17+
| configmap.revokeURL | string | `""` | OAuth2 revoke URL |
1718
| configmap.jwksURL | string | `""` | JWKS URL |
1819
| configmap.clientURL | string | `""` | client URL |
1920
| configmap.scopes | string | `""` | OAuth2 scopes |

charts/tidepool/charts/abbott/templates/0-configmap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ data:
1414
{{ end }}
1515
TokenURL: {{ .Values.configmap.tokenURL | default "" }}
1616
AuthorizeURL: {{ .Values.configmap.authorizeURL | default "" }}
17+
RevokeURL: {{ .Values.configmap.revokeURL | default "" }}
1718
JWKSURL: {{ .Values.configmap.jwksURL | default "" }}
1819
ClientURL: {{ .Values.configmap.clientURL | default "" }}
1920
Scopes: {{ .Values.configmap.scopes | default "" }}

charts/tidepool/charts/abbott/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ configmap:
33
redirectURL: ""
44
tokenURL: ""
55
authorizeURL: ""
6+
revokeURL: ""
67
jwksURL: ""
78
clientURL: ""
89
scopes: ""

charts/tidepool/charts/auth/templates/1-deployment.yaml

Lines changed: 164 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ metadata:
88
name: auth
99
namespace: {{.Release.Namespace}}
1010
annotations:
11-
secret.reloader.stakater.com/reload: "server,{{ .Values.mongo.secretName }},abbott,dexcom,twiist,auth"
12-
configmap.reloader.stakater.com/reload: "abbott,dexcom,twiist"
11+
secret.reloader.stakater.com/reload: "auth,server,{{ .Values.mongo.secretName }},abbott,customer-io,dexcom,oura,twiist"
12+
configmap.reloader.stakater.com/reload: "abbott,auth,customer-io,dexcom,oura,twiist"
1313
{{ if .Values.deployment.annotations }}
1414
{{- .Values.deployment.annotations | toYaml | nindent 4 }}
1515
{{- end }}
@@ -75,6 +75,12 @@ spec:
7575
name: abbott
7676
key: TokenURL
7777
optional: true
78+
- name: TIDEPOOL_SERVICE_PROVIDER_ABBOTT_REVOKE_URL
79+
valueFrom:
80+
configMapKeyRef:
81+
name: abbott
82+
key: RevokeURL
83+
optional: true
7884
- name: TIDEPOOL_SERVICE_PROVIDER_ABBOTT_JWKS_URL
7985
valueFrom:
8086
configMapKeyRef:
@@ -99,8 +105,6 @@ spec:
99105
name: abbott
100106
key: StateSalt
101107
optional: true
102-
- name: TIDEPOOL_SERVICE_PROVIDER_ABBOTT_AUTH_STYLE_IN_PARAMS
103-
value: "true"
104108
- name: TIDEPOOL_SERVICE_PROVIDER_DEXCOM_AUTHORIZE_URL
105109
valueFrom:
106110
configMapKeyRef:
@@ -125,6 +129,12 @@ spec:
125129
name: dexcom
126130
key: TokenURL
127131
optional: true
132+
- name: TIDEPOOL_SERVICE_PROVIDER_DEXCOM_REVOKE_URL
133+
valueFrom:
134+
configMapKeyRef:
135+
name: dexcom
136+
key: RevokeURL
137+
optional: true
128138
- name: TIDEPOOL_SERVICE_PROVIDER_DEXCOM_CLIENT_ID
129139
valueFrom:
130140
secretKeyRef:
@@ -143,6 +153,78 @@ spec:
143153
name: dexcom
144154
key: StateSalt
145155
optional: true
156+
- name: TIDEPOOL_SERVICE_PROVIDER_OURA_CLIENT_ID
157+
valueFrom:
158+
secretKeyRef:
159+
name: oura
160+
key: ClientId
161+
optional: true
162+
- name: TIDEPOOL_SERVICE_PROVIDER_OURA_CLIENT_SECRET
163+
valueFrom:
164+
secretKeyRef:
165+
name: oura
166+
key: ClientSecret
167+
optional: true
168+
- name: TIDEPOOL_SERVICE_PROVIDER_OURA_ACCEPT_URL
169+
valueFrom:
170+
configMapKeyRef:
171+
name: oura
172+
key: AcceptURL
173+
optional: true
174+
- name: TIDEPOOL_SERVICE_PROVIDER_OURA_AUTHORIZE_URL
175+
valueFrom:
176+
configMapKeyRef:
177+
name: oura
178+
key: AuthorizeURL
179+
optional: true
180+
- name: TIDEPOOL_SERVICE_PROVIDER_OURA_REDIRECT_URL
181+
valueFrom:
182+
configMapKeyRef:
183+
name: oura
184+
key: RedirectURL
185+
optional: true
186+
- name: TIDEPOOL_SERVICE_PROVIDER_OURA_TOKEN_URL
187+
valueFrom:
188+
configMapKeyRef:
189+
name: oura
190+
key: TokenURL
191+
optional: true
192+
- name: TIDEPOOL_SERVICE_PROVIDER_OURA_REVOKE_URL
193+
valueFrom:
194+
configMapKeyRef:
195+
name: oura
196+
key: RevokeURL
197+
optional: true
198+
- name: TIDEPOOL_SERVICE_PROVIDER_OURA_SCOPES
199+
valueFrom:
200+
configMapKeyRef:
201+
name: oura
202+
key: Scopes
203+
optional: true
204+
- name: TIDEPOOL_SERVICE_PROVIDER_OURA_STATE_SALT
205+
valueFrom:
206+
secretKeyRef:
207+
name: oura
208+
key: StateSalt
209+
optional: true
210+
- name: TIDEPOOL_SERVICE_PROVIDER_OURA_CLIENT_ADDRESS
211+
valueFrom:
212+
configMapKeyRef:
213+
name: oura
214+
key: ClientURL
215+
optional: true
216+
- name: TIDEPOOL_SERVICE_PROVIDER_OURA_PARTNER_URL
217+
valueFrom:
218+
configMapKeyRef:
219+
name: oura
220+
key: PartnerURL
221+
optional: true
222+
- name: TIDEPOOL_SERVICE_PROVIDER_OURA_PARTNER_SECRET
223+
valueFrom:
224+
secretKeyRef:
225+
name: oura
226+
key: PartnerSecret
227+
optional: true
146228
- name: TIDEPOOL_SERVICE_PROVIDER_TWIIST_AUTHORIZE_URL
147229
valueFrom:
148230
configMapKeyRef:
@@ -161,6 +243,12 @@ spec:
161243
name: twiist
162244
key: TokenURL
163245
optional: true
246+
- name: TIDEPOOL_SERVICE_PROVIDER_TWIIST_REVOKE_URL
247+
valueFrom:
248+
configMapKeyRef:
249+
name: twiist
250+
key: RevokeURL
251+
optional: true
164252
- name: TIDEPOOL_SERVICE_PROVIDER_TWIIST_JWKS_URL
165253
valueFrom:
166254
configMapKeyRef:
@@ -320,6 +408,78 @@ spec:
320408
name: palmtree
321409
key: tlsKeyData
322410
optional: true
411+
- name: TIDEPOOL_OURA_JOTFORM_API_KEY
412+
valueFrom:
413+
secretKeyRef:
414+
name: oura
415+
key: JotformAPIKey
416+
optional: true
417+
- name: TIDEPOOL_OURA_JOTFORM_BASE_URL
418+
valueFrom:
419+
configMapKeyRef:
420+
name: oura
421+
key: JotformBaseURL
422+
optional: true
423+
- name: TIDEPOOL_OURA_JOTFORM_ENABLED
424+
valueFrom:
425+
configMapKeyRef:
426+
name: oura
427+
key: JotformEnabled
428+
optional: true
429+
- name: TIDEPOOL_OURA_JOTFORM_FORM_ID
430+
valueFrom:
431+
configMapKeyRef:
432+
name: oura
433+
key: JotformFormId
434+
optional: true
435+
- name: TIDEPOOL_OURA_JOTFORM_TEAM_ID
436+
valueFrom:
437+
configMapKeyRef:
438+
name: oura
439+
key: JotformTeamId
440+
optional: true
441+
- name: TIDEPOOL_CUSTOMERIO_SITE_ID
442+
valueFrom:
443+
configMapKeyRef:
444+
name: customer-io
445+
key: SiteId
446+
optional: true
447+
- name: TIDEPOOL_CUSTOMERIO_APP_API_KEY
448+
valueFrom:
449+
secretKeyRef:
450+
name: customer-io
451+
key: AppAPIKey
452+
optional: true
453+
- name: TIDEPOOL_CUSTOMERIO_TRACK_API_KEY
454+
valueFrom:
455+
secretKeyRef:
456+
name: customer-io
457+
key: TrackAPIKey
458+
optional: true
459+
- name: TIDEPOOL_OURA_SHOPIFY_ENABLED
460+
valueFrom:
461+
configMapKeyRef:
462+
name: oura
463+
key: ShopifyEnabled
464+
optional: true
465+
- name: TIDEPOOL_OURA_SHOPIFY_STORE_ID
466+
valueFrom:
467+
configMapKeyRef:
468+
name: oura
469+
key: ShopifyStoreId
470+
optional: true
471+
- name: TIDEPOOL_OURA_SHOPIFY_CLIENT_ID
472+
valueFrom:
473+
secretKeyRef:
474+
name: oura
475+
key: ShopifyClientId
476+
optional: true
477+
- name: TIDEPOOL_OURA_SHOPIFY_CLIENT_SECRET
478+
valueFrom:
479+
secretKeyRef:
480+
name: oura
481+
key: ShopifyClientSecret
482+
optional: true
323483
{{- range $key, $val := ((.Values.deployment).extraEnv | default ((.Values.global).deployment).extraEnv | default (dict)) }}
324484
- name: {{ $key }}
325485
value: {{ $val | quote }}

charts/tidepool/charts/auth/templates/4-routetable.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ spec:
6161
- matchers:
6262
- methods:
6363
- GET
64+
- POST
6465
- PUT
6566
- DELETE
6667
prefix: /v1/provider_sessions
@@ -152,6 +153,22 @@ spec:
152153
single:
153154
upstream:
154155
name: auth
156+
- matchers:
157+
- methods:
158+
- POST
159+
regex: /v1/partners/jotform/[^/]+
160+
routeAction:
161+
single:
162+
upstream:
163+
name: auth
164+
- matchers:
165+
- methods:
166+
- POST
167+
prefix: /v1/partners/shopify/
168+
routeAction:
169+
single:
170+
upstream:
171+
name: auth
155172
- matchers:
156173
- methods:
157174
- GET
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
22+
.vscode/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v1
2+
appVersion: "1.0"
3+
description: A Helm chart for Kubernetes
4+
name: customer-io
5+
version: 0.1.0
6+
home: https://github.com/tidepool-org/development/charts
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# customer-io
2+
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square)
4+
5+
A Helm chart for Kubernetes
6+
7+
**Homepage:** <https://github.com/tidepool-org/development/charts>
8+
9+
## Values
10+
11+
| Key | Type | Default | Description |
12+
|-----|------|---------|-------------|
13+
| secret.data_.customerIOAppAPIKey | string | `""` | API key customer.io's App API |
14+
| secret.data_.customerIOTrackAPIKey | string | `""` | API key customer.io's Track API |
15+
| secret.enabled | bool | `false` | whether to generate a secret |
16+
17+
----------------------------------------------
18+
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{ if .Values.configmap.enabled }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: customer-io
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{ include "charts.labels.standard" . }}
9+
data:
10+
SiteId: "{{ .Values.configmap.siteId | default "" }}"
11+
{{ end }}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{ if .Values.secret.enabled -}}
2+
---
3+
apiVersion: v1
4+
{{ with .Values.secret.data_ -}}
5+
data:
6+
AppAPIKey: {{ .appAPIKey | default "" | b64enc | quote }}
7+
TrackAPIKey: {{ .trackAPIKey | default "" | b64enc | quote }}
8+
{{- end }}
9+
kind: Secret
10+
metadata:
11+
name: customer-io
12+
namespace: {{ .Release.Namespace }}
13+
type: Opaque
14+
{{- end }}

0 commit comments

Comments
 (0)