mirror of
https://codeberg.org/MarkusThielker/next-ory.git
synced 2025-07-01 12:39:18 +00:00
Initial commit
This commit is contained in:
commit
a74e7f3ebd
84 changed files with 11089 additions and 0 deletions
88
docker/ory-dev/ory/hydra/hydra.yaml
Normal file
88
docker/ory-dev/ory/hydra/hydra.yaml
Normal file
|
@ -0,0 +1,88 @@
|
|||
#
|
||||
# Documentation: https://www.ory.sh/docs/hydra/reference/configuration
|
||||
# Configuration UI: https://www.ory.sh/docs/hydra/reference/configuration-editor
|
||||
#
|
||||
|
||||
#
|
||||
# Configure the Hydra logging
|
||||
#
|
||||
log:
|
||||
level: info
|
||||
format: text
|
||||
leak_sensitive_values: true
|
||||
|
||||
|
||||
#
|
||||
# Configure the datasource. Alternative for development purposes is 'memory' (not persistent!)
|
||||
#
|
||||
dsn: postgres://postgres:postgres@ory-postgres:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
|
||||
|
||||
|
||||
#
|
||||
# Configure the base URLs for the public and admin API.
|
||||
# The public URL is used in emails for verification links.
|
||||
#
|
||||
serve:
|
||||
|
||||
public:
|
||||
cors:
|
||||
enabled: true
|
||||
debug: true
|
||||
allowed_origins:
|
||||
- http://localhost:3000
|
||||
|
||||
admin:
|
||||
cors:
|
||||
enabled: true
|
||||
debug: true
|
||||
allowed_origins:
|
||||
- http://localhost:3000
|
||||
|
||||
cookies:
|
||||
domain: http://localhost
|
||||
same_site_mode: Lax
|
||||
secure: false
|
||||
paths:
|
||||
session: /
|
||||
names:
|
||||
consent_csrf: ory_hydra_consent_csrf
|
||||
session: ory_hydra_session
|
||||
login_csrf: ory_hydra_login_csrf
|
||||
|
||||
|
||||
urls:
|
||||
|
||||
consent: http://localhost:3000/flow/consent
|
||||
login: http://localhost:3000/flow/login
|
||||
logout: http://localhost:3000/flow/logout
|
||||
post_logout_redirect: http://localhost:3000
|
||||
|
||||
identity_provider:
|
||||
url: http://kratos:4434
|
||||
|
||||
self:
|
||||
public: http://localhost:4444
|
||||
admin: http://localhost:4445
|
||||
issuer: http://localhost:4444
|
||||
|
||||
|
||||
#
|
||||
# Configure secrets and key rotation.
|
||||
# Documentation: https://www.ory.sh/docs/hydra/self-hosted/secrets-key-rotation
|
||||
#
|
||||
secrets:
|
||||
system:
|
||||
- youReallyNeedToChangeThis
|
||||
|
||||
|
||||
#
|
||||
# Configure the OAuth2 clients.
|
||||
# Documentation: https://www.ory.sh/docs/hydra/next/clients
|
||||
#
|
||||
oidc:
|
||||
subject_identifiers:
|
||||
supported_types:
|
||||
- pairwise
|
||||
- public
|
||||
pairwise:
|
||||
salt: youReallyNeedToChangeThis
|
13
docker/ory-dev/ory/kratos/discord.data-mapper.jsonnet
Normal file
13
docker/ory-dev/ory/kratos/discord.data-mapper.jsonnet
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
local claims = std.extVar('claims');
|
||||
|
||||
{
|
||||
identity: {
|
||||
traits: {
|
||||
[if 'email' in claims && claims.email_verified then 'email' else null]: claims.email,
|
||||
[if 'nickname' in claims then 'username' else null]: claims.nickname,
|
||||
[if 'nickname' in claims then 'name' else null]: claims.nickname,
|
||||
},
|
||||
metadata_public: claims,
|
||||
},
|
||||
}
|
43
docker/ory-dev/ory/kratos/identity.schema.json
Normal file
43
docker/ory-dev/ory/kratos/identity.schema.json
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"$id": "https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "User",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"traits": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"title": "Email",
|
||||
"ory.sh/kratos": {
|
||||
"credentials": {
|
||||
"password": {
|
||||
"identifier": true
|
||||
},
|
||||
"webauthn": {
|
||||
"identifier": true
|
||||
}
|
||||
},
|
||||
"recovery": {
|
||||
"via": "email"
|
||||
},
|
||||
"verification": {
|
||||
"via": "email"
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "Name"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"email",
|
||||
"name"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
135
docker/ory-dev/ory/kratos/kratos.yaml
Normal file
135
docker/ory-dev/ory/kratos/kratos.yaml
Normal file
|
@ -0,0 +1,135 @@
|
|||
#
|
||||
# Documentation: https://www.ory.sh/docs/kratos/reference/configuration
|
||||
# Configuration UI: https://www.ory.sh/docs/kratos/reference/configuration-editor
|
||||
#
|
||||
|
||||
#
|
||||
# Configure the Kratos logging
|
||||
#
|
||||
log:
|
||||
level: info
|
||||
format: text
|
||||
leak_sensitive_values: true
|
||||
|
||||
#
|
||||
# Configure the datasource. Alternative for development purposes is 'memory' (not persistent!)
|
||||
#
|
||||
dsn: postgres://postgres:postgres@ory-postgres:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4
|
||||
|
||||
#
|
||||
# Configure the base URLs for the public and admin API.
|
||||
# The public URL is used in emails for verification links.
|
||||
#
|
||||
serve:
|
||||
public:
|
||||
base_url: http://localhost:4433
|
||||
cors:
|
||||
enabled: true
|
||||
allowed_origins:
|
||||
- http://localhost:3000
|
||||
admin:
|
||||
base_url: http://localhost:4434
|
||||
|
||||
#
|
||||
# Configure the session cookie.
|
||||
#
|
||||
cookies:
|
||||
domain: http://localhost
|
||||
path: /
|
||||
same_site: Lax
|
||||
|
||||
#
|
||||
# Configure the self-service flows.session.
|
||||
# Probably most interesting are ui urls, return urls and hooks.session.
|
||||
# You can also activate authentication methods.
|
||||
#
|
||||
selfservice:
|
||||
default_browser_return_url: http://localhost:3000
|
||||
allowed_return_urls:
|
||||
- http://localhost:3000
|
||||
|
||||
methods:
|
||||
password:
|
||||
enabled: true
|
||||
totp:
|
||||
enabled: true
|
||||
config:
|
||||
issuer: ORY Template
|
||||
lookup_secret:
|
||||
enabled: true
|
||||
|
||||
flows:
|
||||
error:
|
||||
ui_url: http://localhost:3000/flow/error
|
||||
|
||||
settings:
|
||||
required_aal: highest_available
|
||||
ui_url: http://localhost:3000
|
||||
|
||||
recovery:
|
||||
enabled: true
|
||||
ui_url: http://localhost:3000/flow/recovery
|
||||
|
||||
verification:
|
||||
enabled: true
|
||||
ui_url: http://localhost:3000/flow/verification
|
||||
|
||||
login:
|
||||
ui_url: http://localhost:3000/flow/login
|
||||
lifespan: 10m
|
||||
after:
|
||||
hooks:
|
||||
- hook: require_verified_address
|
||||
|
||||
registration:
|
||||
lifespan: 10m
|
||||
ui_url: http://localhost:3000/flow/registration
|
||||
# after:
|
||||
# default_browser_return_url: http://localhost:3000
|
||||
# password:
|
||||
# hooks:
|
||||
# - hook: session # automatically sign-in after registration
|
||||
|
||||
#
|
||||
# Configure connection to hydra for oauth2 and oidc.
|
||||
# If set, the login and registration flows will handle the Ory OAuth 2.0 & OpenID `login_challenge` query parameter to serve as an OpenID Connect Provider.
|
||||
#
|
||||
oauth2_provider:
|
||||
override_return_to: false
|
||||
url: http://ory-hydra:4445
|
||||
|
||||
#
|
||||
# Configure secrets and key rotation.
|
||||
# Documentation: https://www.ory.sh/docs/kratos/guides/secret-key-rotation
|
||||
#
|
||||
secrets:
|
||||
cookie:
|
||||
- PLEASE-CHANGE-ME-I-AM-VERY-INSECURE
|
||||
cipher:
|
||||
- 32-LONG-SECRET-NOT-SECURE-AT-ALL
|
||||
|
||||
ciphers:
|
||||
algorithm: xchacha20-poly1305
|
||||
|
||||
hashers:
|
||||
algorithm: bcrypt
|
||||
bcrypt:
|
||||
cost: 8
|
||||
|
||||
#
|
||||
# The delivered identity schema shows how to use the schema system.
|
||||
# Documentation: https://www.ory.sh/docs/kratos/manage-identities/identity-schema
|
||||
#
|
||||
identity:
|
||||
default_schema_id: default
|
||||
schemas:
|
||||
- id: default
|
||||
url: file:///etc/config/kratos/identity.schema.json
|
||||
|
||||
#
|
||||
# Configure the mailing service.
|
||||
# Documentation: https://www.ory.sh/docs/kratos/self-hosted/mail-courier-selfhosted
|
||||
#
|
||||
courier:
|
||||
smtp:
|
||||
connection_uri: smtps://test:test@ory-mailslurper:1025/?skip_ssl_verify=true
|
11
docker/ory-dev/ory/kratos/twitch.data-mapper.jsonnet
Normal file
11
docker/ory-dev/ory/kratos/twitch.data-mapper.jsonnet
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
local claims = std.extVar('claims');
|
||||
|
||||
{
|
||||
identity: {
|
||||
traits: {
|
||||
[if 'email' in claims && claims.email_verified then 'email' else null]: claims.email
|
||||
},
|
||||
metadata_public: claims,
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue