Skip to content

Commit 7f06c3b

Browse files
Merge branch 'master'
2 parents ae45d7b + b52f422 commit 7f06c3b

File tree

10 files changed

+169
-26
lines changed

10 files changed

+169
-26
lines changed

docs/hydra/guides/oauth2-webhooks.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ To accept the token exchange without modification, return a `204` or `200` HTTP
141141

142142
To deny the token exchange, reply with a `403` HTTP status code.
143143

144+
To keep the claims as is, return an empty body with a 204 status code.
145+
144146
To modify the claims of the issued tokens and instruct Hydra to proceed with the token exchange, return `200` with a JSON response
145147
body:
146148

docs/kratos/emails-sms/05_custom-email-templates.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ automatically uses the built-in template.
112112

113113
:::info
114114

115-
The recovery & verification templates only show the versions for the method (**One time code** or **link**) you have selected in
115+
The recovery & verification templates only show the versions for the method (**one-time code** or **link**) you have selected in
116116
the flow configuration.
117117

118118
- <ConsoleLink route="project.recovery" />

docs/kratos/manage-identities/25_import-user-accounts-identities.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,10 @@ The following steps are necessary to set up password migration using a web hook:
594594
After a successful response, the identity will be updated with the hashed password and the user will be logged in. The
595595
password migration hook will not be called again for this identity.
596596

597-
Any other response will be treated as an invalid password, and the user will be notified that the password is incorrect.
597+
If the password does not match, the webhook should return `403 Forbidden`, to indicate to the user that the password did not
598+
match.
599+
600+
Any other response will be treated as an unexpected error, and the user will not be logged in.
598601

599602
### Social sign-in connections
600603

docs/kratos/mfa/30_sms.mdx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
1010
import BrowserWindow from "@site/src/theme/BrowserWindow"
1111
```
1212

13-
SMS and email can be used to deliver one time codes to users. Ory will deliver a 6-digit code to an SMS / email gateway of your
13+
SMS and email can be used to deliver one-time codes to users. Ory will deliver a 6-digit code to an SMS / email gateway of your
1414
choice, such as Twilio, Amazon SNS, SMTP, or your own application. These codes are valid for a short amount of time, usually 15
1515
minutes or less. Once the user completes the challenge, by entering the code, the AAL of the session is upgraded to AAL2.
1616

@@ -30,6 +30,15 @@ To enable MFA via SMS, you need to configure an SMS channel in the Ory configura
3030

3131
```mdx-code-block
3232
<Tabs groupId="console-or-cli">
33+
<TabItem value="console" label="Ory Console" default>
34+
```
35+
36+
1. Go to <ConsoleLink route="project.mfa" />.
37+
2. Toggle **Enable one-time code multi factor authentication**.
38+
3. Click **Save**.
39+
40+
```mdx-code-block
41+
</TabItem>
3342
<TabItem value="cli" label="Ory CLI" default>
3443
```
3544

docs/kratos/organizations/organizations.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,14 @@ organization.
245245
</Tabs>
246246
```
247247

248+
## Pre-provisioning identities in an organization
249+
250+
After creating an organization, you can pre-provision identities in it. This is useful when you need to create related data in
251+
your system but need the identity to be created in Ory Network first, before the user logs in for the first time.
252+
253+
To achieve this, set the `organization_id` property to the ID of the created organization in the identity, either when creating
254+
the identity, or by updating the identity's data using the Ory APIs.
255+
248256
## SAML
249257

250258
SAML (Security Assertion Markup Language) is an XML-based open standard used for exchanging authentication and authorization data

docs/reference/api.json

Lines changed: 52 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2231,40 +2231,68 @@
22312231
},
22322232
"accountExperienceConfiguration": {
22332233
"properties": {
2234-
"account_experience_theme_stylesheet": {
2234+
"default_redirect_url": {
22352235
"type": "string"
22362236
},
2237-
"favicon_type": {
2237+
"error_ui_url": {
22382238
"type": "string"
22392239
},
2240-
"favicon_url": {
2240+
"favicon_dark_url": {
22412241
"type": "string"
22422242
},
2243-
"kratos_selfservice_default_browser_return_url": {
2243+
"favicon_light_url": {
22442244
"type": "string"
22452245
},
2246-
"kratos_selfservice_flows_recovery_enabled": {
2247-
"type": "boolean"
2246+
"login_ui_url": {
2247+
"type": "string"
22482248
},
2249-
"kratos_selfservice_flows_registration_enabled": {
2249+
"logo_dark_url": {
2250+
"type": "string"
2251+
},
2252+
"logo_light_url": {
2253+
"type": "string"
2254+
},
2255+
"name": {
2256+
"type": "string"
2257+
},
2258+
"recovery_enabled": {
22502259
"type": "boolean"
22512260
},
2252-
"kratos_selfservice_flows_verification_enabled": {
2261+
"recovery_ui_url": {
2262+
"type": "string"
2263+
},
2264+
"registration_enabled": {
22532265
"type": "boolean"
22542266
},
2255-
"logo_url": {
2267+
"registration_ui_url": {
22562268
"type": "string"
22572269
},
2258-
"name": {
2270+
"settings_ui_url": {
22592271
"type": "string"
22602272
},
2261-
"organization_map": {
2262-
"additionalProperties": {
2263-
"type": "string"
2264-
},
2265-
"type": "object"
2273+
"stylesheet": {
2274+
"type": "string"
2275+
},
2276+
"verification_enabled": {
2277+
"type": "boolean"
2278+
},
2279+
"verification_ui_url": {
2280+
"type": "string"
22662281
}
22672282
},
2283+
"required": [
2284+
"name",
2285+
"registration_enabled",
2286+
"verification_enabled",
2287+
"recovery_enabled",
2288+
"recovery_ui_url",
2289+
"registration_ui_url",
2290+
"verification_ui_url",
2291+
"login_ui_url",
2292+
"settings_ui_url",
2293+
"error_ui_url",
2294+
"default_redirect_url"
2295+
],
22682296
"type": "object"
22692297
},
22702298
"accountExperienceThemeVariables": {
@@ -2946,6 +2974,9 @@
29462974
"metadata_public": {
29472975
"description": "Store metadata about the identity which the identity itself can see when calling for example the\nsession endpoint. Do not store sensitive information (e.g. credit score) about the identity in this field."
29482976
},
2977+
"organization_id": {
2978+
"$ref": "#/components/schemas/NullUUID"
2979+
},
29492980
"recovery_addresses": {
29502981
"description": "RecoveryAddresses contains all the addresses that can be used to recover an identity.\n\nUse this structure to import recovery addresses for an identity. Please keep in mind\nthat the address needs to be represented in the Identity Schema or this field will be overwritten\non the next identity update.",
29512982
"items": {
@@ -6155,6 +6186,9 @@
61556186
"readOnly": true,
61566187
"type": "string"
61576188
},
6189+
"fedcm_config_url": {
6190+
"$ref": "#/components/schemas/String"
6191+
},
61586192
"id": {
61596193
"format": "uuid",
61606194
"type": "string"
@@ -6172,6 +6206,9 @@
61726206
"description": "Mapper specifies the JSONNet code snippet which uses the OpenID Connect Provider's data (e.g. GitHub or Google\nprofile information) to hydrate the identity's data.",
61736207
"type": "string"
61746208
},
6209+
"net_id_token_origin_header": {
6210+
"$ref": "#/components/schemas/String"
6211+
},
61756212
"organization_id": {
61766213
"$ref": "#/components/schemas/NullUUID"
61776214
},

docs/self-hosted/oel/eol-image-tags.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@
4040
| e879d83cd5cc0cba4a0ec3399ef32f252c220b0e | 2025-01-30 |
4141
| 35ba5a70b32d69c3b623f312f985f69a54f71029 | 2025-01-31 |
4242
| 29c1dd6b0b5d0b991019e2730f4efd4fce86fa48 | 2025-02-04 |
43+
| e17b2ea61cc69e70f252e384d5ccbac83e504ced | 2025-02-12 |
44+
| 569c06b47e9ccd9548afa71d22e7ba4e3b1d5b01 | 2025-02-14 |
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
id: migrate-postgresql-ttl
3+
title: PostgreSQL TTL jobs for Hydra OEL
4+
---
5+
6+
# PostgreSQL TTL jobs for Ory Hydra
7+
8+
This guide outlines the steps to enable and configure the PostgreSQL TTL jobs for Ory Hydra. The TTL jobs are executed
9+
periodically to remove expired data from the PostgreSQL database. They are essential for maintaining database performance and
10+
preventing uncontrolled growth.
11+
12+
This feature is available in Ory Hydra Enterprise License (OEL) and it requires the PostgreSQL database with the `pg_cron`
13+
extension installed.
14+
15+
By default, Postgresql TTL jobs are disabled. They can be installed by enabling an additional migration job, similar to the
16+
default migration job that introduces schema changes. This additional job populates the database with the necessary cron job
17+
definitions containing delete statements for expired data. The cron jobs are executed by the `pg_cron` extension at 00:00 UTC.
18+
19+
## Prerequisites
20+
21+
Before starting the upgrade process, ensure that you meet the following requirements:
22+
23+
1. **Ory Hydra Version**: Your current Ory Hydra OEL installation must be version `e17b2ea61cc69e70f252e384d5ccbac83e504ced` or
24+
newer.
25+
2. **PostgreSQL Database**: The PostgreSQL database must be installed and configured with the `pg_cron` extension.
26+
3. **Backup and Testing**: Create a backup of your current Ory Hydra database and test the migration on a test environment to
27+
ensure compatibility and minimize risks.
28+
29+
## Installation process
30+
31+
If you are using the official [Hydra helm chart](https://github.com/ory/k8s/tree/master/helm/charts/hydra) modify your values.yaml
32+
file to include the following configuration:
33+
34+
```yaml
35+
hydra:
36+
customMigrations:
37+
jobs:
38+
oel-postgresql-ttl:
39+
enabled: true
40+
```
41+
42+
This change enables the additional migration job that introduces the TTL jobs to the PostgreSQL database. By default, it executes
43+
the `hydra` binary with following arguments:
44+
45+
```
46+
migrate postgresql-addons up --hydra-db-name ory_hydra --pgcron-db-name postgres
47+
```
48+
49+
If you use a different database name, you can override it by setting the `--hydra-db-name` and `--pgcron-db-name` flags in the
50+
`values.yaml` file:
51+
52+
```yaml
53+
hydra:
54+
customMigrations:
55+
jobs:
56+
oel-postgresql-ttl:
57+
enabled: true
58+
customArgs:
59+
[
60+
"migrate",
61+
"postgresql-addons",
62+
"up",
63+
"--hydra-db-name",
64+
"<your hydra database>",
65+
"--pgcron-db-name",
66+
"<database where pg_cron is installed>",
67+
]
68+
```
69+
70+
## Possible issues
71+
72+
### pg_cron extension not installed
73+
74+
If the `pg_cron` extension is not installed in the PostgreSQL database, the migration job will fail with the following error:
75+
76+
```
77+
ERROR: schema "cron" does not exist (SQLSTATE 3F000)
78+
```
79+
80+
To resolve this issue, install the `pg_cron` extension and enable it in the postgres database.

src/sidebar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,7 @@ const selfhostingSidebar = [
852852
items: [
853853
"self-hosted/oel/oauth2/token-prefix",
854854
"self-hosted/oel/oauth2/upgrade",
855+
"self-hosted/oel/oauth2/migrate-postgresql-ttl",
855856
"self-hosted/oel/oauth2/changelog",
856857
],
857858
},

src/theme/Mermaid.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,16 @@ const Mermaid = ({ chart }) => {
4848

4949
useEffect(() => {
5050
// https://mermaid.js.org/config/theming.html#diagram-specific-themes
51-
mermaid.render(
52-
id,
53-
`%%{init: {'theme':'${
54-
colorMode === "light" ? "neutral" : "dark"
55-
}'}}%%\n${chart}`,
56-
(svg) => {
51+
mermaid
52+
.render(
53+
id,
54+
`%%{init: {'theme':'${
55+
colorMode === "light" ? "neutral" : "dark"
56+
}'}}%%\n${chart}`,
57+
)
58+
.then(({ svg }) => {
5759
setSvg(svg)
58-
},
59-
)
60+
})
6061
}, [])
6162

6263
return (

0 commit comments

Comments
 (0)