-
Notifications
You must be signed in to change notification settings - Fork 11
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
[kratos] Add Ory Kratos service #266
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3f83907
Add Ory Kratos service
blootsvoets d69071b
Add <<: *logFailedRelease
pvannierop 3730766
Enable Ory-Kratos by default
pvannierop 0e124e3
Allow configuration of SMTP port
pvannierop ecf2478
Allow configuration of database name
pvannierop c5e1528
Fix indentation of comment
pvannierop 35cc4ca
Fix chart version and repository
pvannierop ba513d5
Move definition of SMTP 'from' field to base.yaml
pvannierop e071e5b
Remove field that are defined as defaults in helm chart
pvannierop ae0b4a7
Merge 15-ory.yaml into base.yaml
pvannierop fb94c71
Match Kratos version with radar-helm-charts
pvannierop cf30788
Move kratos definitions to 10-managementportal.yaml
pvannierop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,6 +184,8 @@ management_portal: | |
replicaCount: 1 # should be 1 | ||
postgres: | ||
host: postgresql | ||
user: postgres | ||
port: 5432 | ||
ssl: | ||
enabled: false | ||
managementportal: | ||
|
@@ -192,7 +194,25 @@ management_portal: | |
oauth_checking_key_aliases_0: radarbase-managementportal-ec | ||
oauth_checking_key_aliases_1: selfsigned | ||
smtp: | ||
username: secret | ||
password: secret | ||
host: localhost | ||
|
||
kratos: | ||
_install: true | ||
_chart_version: 0.43.1 | ||
_extra_timeout: 0 | ||
jdbc: | ||
database: kratos | ||
kratos: | ||
courier: | ||
smtp: | ||
from_address: [email protected] | ||
|
||
kratos_ui: | ||
_install: true | ||
_chart_version: 0.43.1 | ||
_extra_timeout: 0 | ||
|
||
app_config: | ||
_install: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,227 @@ | ||
ingress: | ||
admin: | ||
enabled: true | ||
className: "nginx" | ||
annotations: | ||
cert-manager.io/cluster-issuer: letsencrypt-prod | ||
hosts: | ||
- host: localhost | ||
paths: | ||
- path: "/admin/kratos/?(.*)" | ||
pathType: ImplementationSpecific | ||
tls: | ||
- secretName: radar-base-tls | ||
hosts: | ||
- localhost | ||
public: | ||
enabled: true | ||
className: "nginx" | ||
annotations: | ||
nginx.ingress.kubernetes.io/rewrite-target: /$1 | ||
cert-manager.io/cluster-issuer: letsencrypt-prod | ||
hosts: | ||
- host: localhost | ||
paths: | ||
- path: "/kratos/?(.*)" | ||
pathType: ImplementationSpecific | ||
tls: | ||
- secretName: kratos-public-tls | ||
hosts: | ||
- localhost | ||
|
||
kratos: | ||
# -- Enables database migration | ||
automigration: | ||
enabled: true | ||
|
||
# -- You can add multiple identity schemas here. You can pass JSON schema using `--set-file` Helm CLI argument. | ||
identitySchemas: | ||
"identity.user.schema.json": | | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "user", | ||
"title": "user", | ||
"type": "object", | ||
"properties": { | ||
"traits": { | ||
"type": "object", | ||
"properties": { | ||
"email": { | ||
"type": "string", | ||
"format": "email", | ||
"title": "E-Mail", | ||
"minLength": 5, | ||
"ory.sh/kratos": { | ||
"credentials": { | ||
"password": { | ||
"identifier": true | ||
}, | ||
"totp": { | ||
"account_name": true | ||
} | ||
}, | ||
"verification": { | ||
"via": "email" | ||
}, | ||
"recovery": { | ||
"via": "email" | ||
} | ||
} | ||
} | ||
}, | ||
"required": [ "email" ] | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
"identity.default.schema.json": | | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "default", | ||
"title": "user", | ||
"type": "object", | ||
"properties": { | ||
"traits": { | ||
"type": "object", | ||
"properties": { | ||
"email": { | ||
"type": "string", | ||
"format": "email", | ||
"title": "E-Mail", | ||
"minLength": 5, | ||
"ory.sh/kratos": { | ||
"credentials": { | ||
"password": { | ||
"identifier": true | ||
}, | ||
"totp": { | ||
"account_name": true | ||
} | ||
}, | ||
"verification": { | ||
"via": "email" | ||
}, | ||
"recovery": { | ||
"via": "email" | ||
} | ||
} | ||
} | ||
}, | ||
"required": [ "email" ] | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
|
||
config: | ||
|
||
session: | ||
# Defines how long a session is active. Once that lifespan has been reached, the user needs to sign in again. | ||
lifespan: 24h | ||
|
||
cookie: | ||
##-- If false, cookie is removed when the browser is closed --## | ||
persistent: false | ||
|
||
courier: | ||
smtp: | ||
from_address: [email protected] | ||
|
||
serve: | ||
public: | ||
base_url: https://localhost/kratos/ | ||
cors: | ||
enabled: true | ||
allowed_origins: | ||
- https://localhost/kratos-ui/ | ||
allowed_methods: | ||
- POST | ||
- GET | ||
- PUT | ||
- PATCH | ||
- DELETE | ||
allowed_headers: | ||
- Authorization | ||
- Cookie | ||
- Content-Type | ||
- Accept | ||
exposed_headers: | ||
- Content-Type | ||
- Set-Cookie | ||
- Accept | ||
allow_credentials: true | ||
admin: | ||
base_url: https://localhost/admin/kratos/ | ||
|
||
selfservice: | ||
default_browser_return_url: https://localhost/managementportal | ||
allowed_return_urls: | ||
- "https://localhost/" | ||
- "http://localhost/" | ||
|
||
methods: | ||
password: | ||
config: | ||
haveibeenpwned_enabled: true | ||
max_breaches: 0 | ||
ignore_network_errors: false | ||
min_password_length: 12 | ||
identifier_similarity_check_enabled: true | ||
enabled: true | ||
totp: | ||
config: | ||
issuer: Radar | ||
enabled: true | ||
link: | ||
enabled: true | ||
|
||
flows: | ||
error: | ||
ui_url: https://localhost/kratos-ui/error | ||
|
||
settings: | ||
ui_url: https://localhost/kratos-ui/settings | ||
required_aal: highest_available | ||
|
||
recovery: | ||
enabled: true | ||
ui_url: https://localhost/kratos-ui/recovery | ||
use: link | ||
|
||
verification: | ||
# our current flow necessitates that users reset their password after they activate an account in managementportal, | ||
# this works as verification | ||
ui_url: https://localhost/kratos-ui/verification | ||
enabled: false | ||
use: link | ||
after: | ||
default_browser_return_url: https://localhost/kratos-ui | ||
|
||
logout: | ||
after: | ||
default_browser_return_url: https://localhost/kratos-ui/login | ||
|
||
login: | ||
ui_url: https://localhost/kratos-ui/login | ||
|
||
registration: | ||
ui_url: https://localhost/kratos-ui/registration | ||
after: | ||
password: | ||
hooks: | ||
- hook: session | ||
oidc: | ||
hooks: | ||
- hook: session | ||
|
||
identity: | ||
default_schema_id: user | ||
schemas: | ||
# identitySchemas: | ||
- id: user | ||
url: file:///etc/config/identity.user.schema.json | ||
|
||
log: | ||
level: debug | ||
format: text | ||
leak_sensitive_values: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
config: | ||
csrfCookieName: "radar_csrf" | ||
|
||
ingress: | ||
enabled: true | ||
className: "nginx" | ||
annotations: | ||
nginx.ingress.kubernetes.io/rewrite-target: /$1 | ||
cert-manager.io/cluster-issuer: letsencrypt-prod | ||
hosts: | ||
- host: localhost | ||
paths: | ||
- path: "/kratos-ui/?(.*)" | ||
pathType: ImplementationSpecific | ||
tls: | ||
- secretName: radar-base-tls | ||
hosts: | ||
- localhost | ||
# -- Set this to ORY Kratos's Admin URL | ||
kratosAdminUrl: "kratos-admin" | ||
|
||
# -- Set this to ORY Kratos's public URL | ||
kratosPublicUrl: "https://localhost/kratos" | ||
|
||
# -- Set this to ORY Kratos's public URL accessible from the outside world. | ||
kratosBrowserUrl: "https://localhost/kratos" | ||
|
||
# -- The basePath | ||
basePath: "" | ||
|
||
# -- The jwksUrl | ||
jwksUrl: "" | ||
|
||
projectName: "SecureApp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be configurable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it is configurable, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is but I think it should be in
base.yaml
since it will be changed in every installation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok the most simple solution would be to write this entry in base.yaml like so:
However, since SMTP settings are also used by MP (and possibly other services), we should consider defining this as global properties and inject this in the
set:
section of helmfile where needed.