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

[BACK-3269] basic settings for oauth #303

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Tiltconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,22 @@ dexcom:
clientURL: "https://sandbox-api.dexcom.com"
### Dexcom API Config End ###

### Abbott API Config Start ###
abbott:
secret:
enabled: false
data_:
ClientId: ""
ClientSecret: ""
StateSalt: ""
configmap:
enabled: true
redirectURL: ""
tokenURL: ""
authorizeURL: ""
clientURL: ""
### Abbott API Config End ###

### Kafka config start ###
kafka:
configmap:
Expand Down
22 changes: 22 additions & 0 deletions charts/tidepool/charts/abbott/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
6 changes: 6 additions & 0 deletions charts/tidepool/charts/abbott/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: abbott
version: 0.1.0
home: https://github.com/tidepool-org/development/charts
21 changes: 21 additions & 0 deletions charts/tidepool/charts/abbott/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Abbott

![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)

A Helm chart for Kubernetes

**Homepage:** <https://github.com/tidepool-org/development/charts>

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| configmap.enabled | bool | `true` | whether to generate a configmap |
| configmap.redirectURL | string | `""` | |
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps add the other configmap fields here, too?

| secret.data_.ClientId | string | `""` | plaintext Abbott Oauth2 client id |
| secret.data_.ClientSecret | string | `""` | plaintext Abbott Oauth2 client secret |
| secret.data_.StateSalt | string | `""` | plaintext Abbott Oauth2 state salt |
| secret.enabled | bool | `false` | whether to create Abbott secret |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.3.0](https://github.com/norwoodj/helm-docs/releases/v1.3.0)
19 changes: 19 additions & 0 deletions charts/tidepool/charts/abbott/templates/0-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ if .Values.configmap.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: abbott
namespace: {{ .Release.Namespace }}
labels:
{{ include "charts.labels.standard" . }}
data:
{{ if .Values.configmap.redirectURL }}
RedirectURL: {{ .Values.configmap.redirectURL }}
{{ else }}
RedirectURL: "{{include "charts.host.api" .}}/v1/oauth/abbott/redirect"
{{ end }}
TokenURL: {{ .Values.configmap.tokenURL }}
AuthorizeURL: {{ .Values.configmap.authorizeURL }}
ClientURL: {{ .Values.configmap.clientURL }}
Scopes: "openid,offline,read.glucose,read.device"
darinkrauss marked this conversation as resolved.
Show resolved Hide resolved
{{ end }}
15 changes: 15 additions & 0 deletions charts/tidepool/charts/abbott/templates/0-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{ if .Values.secret.enabled -}}
---
apiVersion: v1
{{ with .Values.secret.data_ -}}
data:
ClientId: {{ .ClientId | default "" | b64enc | quote }}
ClientSecret: {{ .ClientSecret | default "" | b64enc | quote }}
StateSalt: {{ .StateSalt | default "" | b64enc | quote }}
{{- end }}
kind: Secret
metadata:
name: abbott
namespace: {{ .Release.Namespace }}
type: Opaque
{{- end }}
16 changes: 16 additions & 0 deletions charts/tidepool/charts/abbott/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
secret:
# -- whether to create abbott secret
enabled: false
data_:
# -- plaintext Abbott Oauth2 client id
ClientId: ""
# -- plaintext Abbott Oauth2 client secret
ClientSecret: ""
# -- plaintext Abbott Oauth2 state salt
StateSalt: ""
configmap:
# -- whether to generate a configmap
enabled: true
redirectURL: ""
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to add defaults for tokenURL and authorizeURL here, too, per our discussion yesterday? Perhaps alphabetically ordered?

clientURL: ""