Skip to content

Commit

Permalink
add sunrise configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
bbengfort committed Jan 30, 2025
1 parent c9ae103 commit f88a756
Show file tree
Hide file tree
Showing 5 changed files with 209 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/envoy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.22.0
version: 0.23.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.27.1"
appVersion: "v0.28.0"

dependencies:
- name: "regioninfo"
Expand Down
15 changes: 15 additions & 0 deletions charts/envoy/examples/alice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ trisa:
endpoint: "https://trp.alice.vaspbot.net/"
useMTLS: "false"

sunrise:
enabled: "true"
requireOTP: "false"

email:
sender:
name: "Alice VASP Compliance"
email: "compliance@alice.vaspbot.net"

supportEmail: "support@alice.vaspbot.net"
complianceEmail: "compliance@alice.vaspbot.net"

sendgrid:
apiKey: "notarealsendgridapikey"

# Because TRISA is a globally distributed system, region deployment information is
# useful information on the node. This information can be provided via config map or
# manually specified in the values.yaml -- behavior is not defined for when both are
Expand Down
30 changes: 30 additions & 0 deletions charts/envoy/templates/_environment.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,36 @@ env:
value: {{ .Values.trisa.trp.identity.vaspName | quote }}
- name: TRISA_TRP_IDENTITY_LEI
value: {{ .Values.trisa.trp.identity.lei | quote }}
- name: TRISA_SUNRISE_ENABLED
value: {{ .Values.trisa.sunrise.enabled | quote }}
- name: TRISA_SUNRISE_REQUIRE_OTP
value: {{ .Values.trisa.sunrise.requireOTP | quote }}
- name: TRISA_EMAIL_SENDER
value: {{ .Values.trisa.email.sender.email | quote }}
- name: TRISA_EMAIL_SENDER_NAME
value: {{ .Values.trisa.email.sender.name | quote }}
- name: TRISA_EMAIL_SUPPORT_EMAIL
value: {{ .Values.trisa.email.supportEmail | quote }}
- name: TRISA_EMAIL_COMPLIANCE_EMAIL
value: {{ .Values.trisa.email.complianceEmail | quote }}
{{- if .Values.trisa.email.smtp.host }}
- name: TRISA_EMAIL_SMTP_HOST
value: {{ .Values.trisa.email.smtp.host | quote }}
- name: TRISA_EMAIL_SMTP_PORT
value: {{ .Values.trisa.email.smtp.port | quote }}
- name: TRISA_EMAIL_SMTP_USERNAME
value: {{ .Values.trisa.email.smtp.username | quote }}
- name: TRISA_EMAIL_SMTP_PASSWORD
value: {{ .Values.trisa.email.smtp.password | quote }}
- name: TRISA_EMAIL_SMTP_USE_CRAM_MD5
value: {{ .Values.trisa.email.smtp.useCRAMMD5 | quote }}
- name: TRISA_EMAIL_SMTP_POOL_SIZE
value: {{ .Values.trisa.email.smtp.poolSize | quote }}
{{- end }}
{{- if .Values.trisa.email.sendgrid.apiKey }}
- name: TRISA_EMAIL_SENDGRID_API_KEY
value: {{ .Values.trisa.email.sendgrid.apiKey | quote }}
{{- end}}
{{- if .Values.regioninfo.enabled }}
{{- $configMap := default "region-info" .Values.regioninfo.configMap }}
- name: REGION_INFO_ID
Expand Down
126 changes: 126 additions & 0 deletions charts/envoy/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,132 @@
}
}
}
},
"sunrise": {
"type": "object",
"required": [],
"properties": {
"enabled": {
"type": "string",
"default": "false",
"examples": [
"true",
"false"
]
},
"requireOTP": {
"type": "string",
"default": "false",
"examples": [
"true",
"false"
]
}
}
},
"email:": {
"type": "object",
"requried": [],
"properties": {
"sender": {
"type": "object",
"required": ["email"],
"properties": {
"name": {
"type": "string",
"default": "",
"examples": [
"Compliance Team at VASP"
]
},
"email": {
"type": "string",
"default": "",
"examples": [
"compliance@example.com"
]
}
}
},
"supportEmail": {
"type": "string",
"default": "",
"examples": [
"support@example.com",
"VASP Support <support@example.com>"
]
},
"complianceEmail": {
"type": "string",
"default": "",
"examples": [
"compliance@example.com",
"VASP Compliance <support@example.com>"
]
},
"smtp": {
"type": "object",
"required": ["host"],
"properties": {
"host": {
"type": "string",
"default": "",
"examples": [
"smtp.example.com"
]
},
"port": {
"type": "integer",
"default": 587,
"examples": [
587
]
},
"username": {
"type": "string",
"default": "",
"examples": [
"smtpuser"
]
},
"password": {
"type": "string",
"default": "",
"examples": [
"smtppassword"
]
},
"useCRAMMD5": {
"type": "string",
"default": "false",
"examples": [
"true",
"false"
]
},
"poolSize": {
"type": "integer",
"default": 2,
"examples": [
2
]
}
}
},
"sendgrid": {
"type": "object",
"required": ["apiKey"],
"properties": {
"apiKey": {
"type": "string",
"default": "",
"examples": [
"SG.1234567890"
]
}
}
}
}
}
}
},
Expand Down
36 changes: 36 additions & 0 deletions charts/envoy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,42 @@ trisa:
# LEI of the VASP organization
lei: ""

sunrise:
# For sunrise to work it needs to be enabled and there needs to be a valid email
# configuration set so that sunrise emails can be sent.
enabled: "false"

# OTP requires a secondary verification using a one-time password sent to the email
# address of the contact the sunrise message was sent to. Disable to only use the
# verification token method.
requireOTP: "false"

# The email configuration allows envoy to send emails via SendGrid or SMTP.
# A valid email configuration is required for sunrise to work.
email:
# The email address that messages are sent from e.g. "Name <compliance@example.com>"
sender:
name: ""
email: ""

# A support email that is included in the email message and error pages (optional).
supportEmail: ""

# A compliance email that is included in the email message and VASP info (optional).
complianceEmail: ""

# Specify either SMTP or SendGrid - not both!
smtp:
host: ""
port: 587
username: ""
password: ""
useCRAMMD5: "false"
poolSize: 2

sendgrid:
apiKey: ""

# Because TRISA is a globally distributed system, region deployment information is
# useful information on the node. This information can be provided via config map or
# manually specified in the values.yaml -- behavior is not defined for when both are
Expand Down

0 comments on commit f88a756

Please sign in to comment.