From 94ed2f7e178235e81530db297cbae13192c06a88 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Wed, 17 Jul 2024 12:12:17 +0000 Subject: [PATCH 01/12] docs: bump to 0e1c50c4fcdae8029a0d776cc07419c880da5146 --- docs/reference/api.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/reference/api.json b/docs/reference/api.json index a03dea278..d90fa7024 100644 --- a/docs/reference/api.json +++ b/docs/reference/api.json @@ -3556,6 +3556,10 @@ "password": { "description": "The password in plain text if no hash is available.", "type": "string" + }, + "use_password_migration_hook": { + "description": "If set to true, the password will be migrated using the password migration hook.", + "type": "boolean" } }, "type": "object" From fc9e5482f158dd45540fb4f736e98bf5783f6901 Mon Sep 17 00:00:00 2001 From: hackerman <3372410+aeneasr@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:07:10 +0200 Subject: [PATCH 02/12] docs: oauth2 token prefixes (#1794) --- docs/self-hosted/oel/oauth2/token-prefix.mdx | 61 ++++++++++++++++++++ src/sidebar.js | 9 ++- 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 docs/self-hosted/oel/oauth2/token-prefix.mdx diff --git a/docs/self-hosted/oel/oauth2/token-prefix.mdx b/docs/self-hosted/oel/oauth2/token-prefix.mdx new file mode 100644 index 000000000..725d84171 --- /dev/null +++ b/docs/self-hosted/oel/oauth2/token-prefix.mdx @@ -0,0 +1,61 @@ +--- +id: token-prefix +title: Custom OAuth2 token prefix +sidebar_label: Custom token prefix +--- + +# Configurable token prefix for OAuth2 tokens + +This documentation explains how to configure the token prefix for OAuth2 access tokens, refresh tokens, and authorization codes. +By default, all tokens use the `ory_%s_` template, where `%s` is replaced with the token type. + +Customizing the token prefix is available only to customers on an Ory Enterprise plan (Ory Enterprise License / Ory Network +Enterprise). If you are interested in this feature, please [contact us](https://www.ory.sh/contact). + +## Default token prefix + +By default, OAuth2 tokens use the following template: `ory_%s_`. The `%s` is a placeholder that will be replaced by the specific +token type: + +- `rt` for refresh tokens +- `at` for access tokens +- `ac` for authorization codes + +### Examples + +- Refresh Token: `ory_rt_...` +- Access Token: `ory_at_...` +- Authorization Code: `ory_ac_...` + +## Customize the token prefix + +With the `oauth2.token_prefix` configuration key, you can customize the prefix for your OAuth2 tokens. This key is only available +to Ory Enterprise License customers. + +### How to configure + +1. **Locate the Configuration File**: Open your Ory configuration file. +2. **Set the `oauth2.token_prefix` Key**: Add or modify the `oauth2.token_prefix` key in your configuration file. + +### Example configuration + +```yaml +oauth2: + token_prefix: "acme_token_%s_" +``` + +In this example, tokens will use the `acme_token_%s_` template. The `%s` placeholder for the token type must always be included in +the template. + +### Resulting tokens + +- Refresh Token: `acme_token_rt_...` +- Access Token: `acme_token_at_...` +- Authorization Code: `acme_token_ac_...` + +## JSON Web Tokens exception + +JSON Web Tokens (JWTs) will never be prefixed because it would violate the JWT format. This applies to: + +- **ID Tokens**: These are always JWTs and will never be prefixed. +- **JWT Access Tokens**: If you are using JWTs as access tokens, they will also not be prefixed. diff --git a/src/sidebar.js b/src/sidebar.js index f15a4b54e..8243e209a 100644 --- a/src/sidebar.js +++ b/src/sidebar.js @@ -425,7 +425,14 @@ module.exports = { { type: "category", label: "Ory Enterprise License", - items: ["self-hosted/oel/quickstart"], + items: [ + "self-hosted/oel/quickstart", + { + type: "category", + label: "Ory Hydra (OAuth2 Server)", + items: ["self-hosted/oel/oauth2/token-prefix"], + }, + ], }, "self-hosted/deployment", "ecosystem/configuring", From e9f4d514480bba4df239531c7408323369df8c4c Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Thu, 18 Jul 2024 11:41:37 +0000 Subject: [PATCH 03/12] docs: bump to e874fc3a20489f47e947ef978f575ef24af33d8f --- docs/reference/api.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/api.json b/docs/reference/api.json index d90fa7024..768d504b9 100644 --- a/docs/reference/api.json +++ b/docs/reference/api.json @@ -9919,7 +9919,7 @@ "paths": { "/.well-known/jwks.json": { "get": { - "description": "This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and,\nif enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like\n[node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.", + "description": "This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and,\nif enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like\n[node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.\n\nAdding custom keys requires first creating a keyset via the createJsonWebKeySet operation,\nand then configuring the webfinger.jwks.broadcast_keys configuration value to include the keyset name.", "operationId": "discoverJsonWebKeys", "responses": { "200": { From f007da9cf7e64399c01fd276cad81f93ae8198ad Mon Sep 17 00:00:00 2001 From: ory-bot <60093411+ory-bot@users.noreply.github.com> Date: Thu, 18 Jul 2024 15:18:59 +0200 Subject: [PATCH 04/12] chore(docs): update of OEL images (#1796) chore(docs): update OEL image tag --- docs/self-hosted/oel/eol-image-tags.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/self-hosted/oel/eol-image-tags.md b/docs/self-hosted/oel/eol-image-tags.md index 576fa1ea8..fc7200a24 100644 --- a/docs/self-hosted/oel/eol-image-tags.md +++ b/docs/self-hosted/oel/eol-image-tags.md @@ -7,3 +7,4 @@ | f832e165e187e49657229902c13ad30c4cf10d0b | 2024-06-20 | | 1578667fa246c374ca85c5eadbf49cc53a296775 | 2024-06-26 | | 73a77968be31cbcba18b02918a8c11343a1fa038 | 2024-07-04 | +| 470aebc3ab2d4c225ca14ab8b1a12809f51b7eb3 | 2024-07-18 | From 9e765083a81b709e3d6be051915617cd4e93ff3d Mon Sep 17 00:00:00 2001 From: ory-bot <60093411+ory-bot@users.noreply.github.com> Date: Thu, 18 Jul 2024 14:56:34 +0000 Subject: [PATCH 05/12] autogen: update Keto protobuf docs --- docs/keto/reference/proto-api.mdx | 45 ++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/docs/keto/reference/proto-api.mdx b/docs/keto/reference/proto-api.mdx index 3b64df121..b43e7e3c7 100644 --- a/docs/keto/reference/proto-api.mdx +++ b/docs/keto/reference/proto-api.mdx @@ -27,8 +27,11 @@ title: Protocol buffers API - [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) - [ory/keto/relation_tuples/v1alpha2/check_service.proto](#ory_keto_relation_tuples_v1alpha2_check_service-proto) + - [BatchCheckRequest](#ory-keto-relation_tuples-v1alpha2-BatchCheckRequest) + - [BatchCheckResponse](#ory-keto-relation_tuples-v1alpha2-BatchCheckResponse) - [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) - [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) + - [CheckResponseWithError](#ory-keto-relation_tuples-v1alpha2-CheckResponseWithError) - [CheckService](#ory-keto-relation_tuples-v1alpha2-CheckService) - [ory/keto/relation_tuples/v1alpha2/expand_service.proto](#ory_keto_relation_tuples_v1alpha2_expand_service-proto) @@ -213,6 +216,29 @@ SubjectSet refers to all subjects who have the same `relation` on an `object`. ## ory/keto/relation_tuples/v1alpha2/check_service.proto + + +### BatchCheckRequest + +The request for a CheckService.BatchCheck RPC. Checks a batch of relations. + +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | | +| latest | [bool](#bool) | | This field is not implemented yet and has no effect.
| +| snaptoken | [string](#string) | | This field is not implemented yet and has no effect.
| +| max_depth | [int32](#int32) | | The maximum depth to search for a relation.

If the value is less than 1 or greater than the global
max-depth then the global max-depth will be used instead. | + + + +### BatchCheckResponse + +The response for a CheckService.BatchCheck rpc. + +| Field | Type | Label | Description | +| ------- | ----------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------- | +| results | [CheckResponseWithError](#ory-keto-relation_tuples-v1alpha2-CheckResponseWithError) | repeated | The results of the batch check. The order of these
results will match the order of the input. | + ### CheckRequest @@ -242,6 +268,18 @@ The response for a CheckService.Check rpc. | allowed | [bool](#bool) | | Whether the specified subject (id)
is related to the requested object.

It is false by default if no ACL matches. | | snaptoken | [string](#string) | | This field is not implemented yet and has no effect.
| + + +### CheckResponseWithError + +The response for an individual check in the CheckService.BatchCheck rpc. + +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| allowed | [bool](#bool) | | Whether the specified subject (id)
is related to the requested object.

It is false by default if no ACL matches. | +| error | [string](#string) | | If there was an error checking the tuple,
this will contain the error message.

If the check was performed successfully, this will be empty. | +| snaptoken | [string](#string) | | This field is not implemented yet and has no effect.
| + @@ -258,9 +296,10 @@ Control Lists. This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | --------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------- | -| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. | +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------- | +| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. | +| BatchCheck | [BatchCheckRequest](#ory-keto-relation_tuples-v1alpha2-BatchCheckRequest) | [BatchCheckResponse](#ory-keto-relation_tuples-v1alpha2-BatchCheckResponse) | | From 895e481ed4952a731af194ff8ad3699823038fb3 Mon Sep 17 00:00:00 2001 From: Jonas Hungershausen Date: Fri, 19 Jul 2024 15:46:35 +0200 Subject: [PATCH 06/12] fix: http email courier docs (#1798) * fix: http email courier docs * chore: describe variables --- docs/actions/require-verified-address.mdx | 2 +- .../emails-sms/01_sending-emails-smtp.mdx | 65 ++++++++++--------- 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/docs/actions/require-verified-address.mdx b/docs/actions/require-verified-address.mdx index ff1da222e..4d6bcef37 100644 --- a/docs/actions/require-verified-address.mdx +++ b/docs/actions/require-verified-address.mdx @@ -30,7 +30,7 @@ Follow these steps to toggle this action on or off: 1. Go to . 2. Toggle **Require Verified Address for Login**. -6. Click **Save**. +3. Click **Save**. diff --git a/docs/kratos/emails-sms/01_sending-emails-smtp.mdx b/docs/kratos/emails-sms/01_sending-emails-smtp.mdx index df8e974a9..e08ec9568 100644 --- a/docs/kratos/emails-sms/01_sending-emails-smtp.mdx +++ b/docs/kratos/emails-sms/01_sending-emails-smtp.mdx @@ -147,7 +147,17 @@ service that doesn't provide an SMTP server. ```mdx-code-block - + +``` + +1. Go to . +2. Select **HTTP Server**. +3. Configure your HTTP server. +4. Click **Save**. + +```mdx-code-block + + ``` 1. Download the Ory Identities config from your project and save it to a file: @@ -189,44 +199,41 @@ service that doesn't provide an SMTP server. ory update identity-config {project-id} --file updated_config.yaml ``` +```mdx-code-block + + +``` + ### Payload -The payload of the HTTP request is a JSON object that's generated using a Jsonnet template. By default, the following payload is -sent: +The payload of the HTTP request is a JSON object that's generated using a Jsonnet template. By default, the following Jsonnet +template is used: ```jsonnet function(ctx) { - recipient: ctx.Recipient, - template_type: ctx.TemplateType, - to: if "TemplateData" in ctx && "To" in ctx.TemplateData then ctx.TemplateData.To else null, - recovery_code: if "TemplateData" in ctx && "RecoveryCode" in ctx.TemplateData then ctx.TemplateData.RecoveryCode else null, - recovery_url: if "TemplateData" in ctx && "RecoveryURL" in ctx.TemplateData then ctx.TemplateData.RecoveryURL else null, - verification_url: if "TemplateData" in ctx && "VerificationURL" in ctx.TemplateData then ctx.TemplateData.VerificationURL else null, - verification_code: if "TemplateData" in ctx && "VerificationCode" in ctx.TemplateData then ctx.TemplateData.VerificationCode else null, - login_code: if "TemplateData" in ctx && "LoginCode" in ctx.TemplateData then ctx.TemplateData.LoginCode else null, - registration_code: if "TemplateData" in ctx && "RegistrationCode" in ctx.TemplateData then ctx.TemplateData.RegistrationCode else null, - subject: ctx.Subject, - body: ctx.Body + recipient: ctx.recipient, + template_type: ctx.template_type, + to: if "template_data" in ctx && "to" in ctx.template_data then ctx.template_data.to else null, + recovery_code: if "template_data" in ctx && "recovery_code" in ctx.template_data then ctx.template_data.recovery_code else null, + recovery_url: if "template_data" in ctx && "recovery_url" in ctx.template_data then ctx.template_data.recovery_url else null, + verification_url: if "template_data" in ctx && "verification_url" in ctx.template_data then ctx.template_data.verification_url else null, + verification_code: if "template_data" in ctx && "verification_code" in ctx.template_data then ctx.template_data.verification_code else null, + login_code: if "template_data" in ctx && "login_code" in ctx.template_data then ctx.template_data.login_code else null, + registration_code: if "template_data" in ctx && "registration_code" in ctx.template_data then ctx.template_data.registration_code else null, + subject: if "template_data" in ctx && "subject" in ctx.template_data then ctx.template_data.subject else null, + body: if "template_data" in ctx && "body" in ctx.template_data then ctx.template_data.body else null } ``` -The courier passes the `Recipient`, `TemplateType`, and `TemplateData` variables into the Jsonnet template. These variables are -available through the `ctx` object. `Recipient` will always be the email address of the user. `TemplateType` and the fields in -`TemplateData` are linked in the following way with each template type containing the fields listed below: - -This will produce a JSON object, that contains all data available in the email. You can customize the payload - -```mdx-code-block - - -``` +The courier passes the following object as the `ctx` parameter into the Jsonnet template: -The Ory Console doesn't support configuring this yet. Please use the Ory CLI instead. +| Variable | Type | Description | +| --------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `recipient` | String | The email address of the recipient. | +| `template_type` | String | The type of the template. See the [list of available templates for a full list](./05_custom-email-templates.mdx#built-in-templates) | +| `template_data` | Object | The data that should be included in the email. See the [list of variables for each template for a full list](./05_custom-email-templates.mdx#available-variables). | -```mdx-code-block - - -``` +In most cases, the default payload should be sufficient. ## Troubleshooting From 81d0e36b4912d82f9f0318487ce01f7c2f44a35a Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Tue, 23 Jul 2024 10:31:26 +0200 Subject: [PATCH 07/12] feat: manage organizations and SSO connections through the console (#1801) manage organizations and SSO connections through the API --- .../sign-in/social-sign-in/redirect-url.mdx | 15 +- docs/kratos/organizations/organizations.mdx | 154 +++++++++++++++++- 2 files changed, 156 insertions(+), 13 deletions(-) diff --git a/docs/identities/sign-in/social-sign-in/redirect-url.mdx b/docs/identities/sign-in/social-sign-in/redirect-url.mdx index 43f18ca0f..4ebb247b6 100644 --- a/docs/identities/sign-in/social-sign-in/redirect-url.mdx +++ b/docs/identities/sign-in/social-sign-in/redirect-url.mdx @@ -22,14 +22,18 @@ will initiate the OIDC flow with the new redirect URL. ::: +```mdx-code-block +``` To use a custom domain as the redirect URL, go to and add the domain to the **Base Redirect URI**. +```mdx-code-block +``` To change the redirect URL to your custom domain, you need to update the `base_redirect_uri`: @@ -42,18 +46,19 @@ ory patch identity-config \ --add '/selfservice/methods/oidc/config/base_redirect_uri="https://ory.example.org"' ``` +```mdx-code-block -```` +``` After changing the base redirect URI you need to update the redirect URL of social sign-in providers you want to use. This is done in the configuration of the social sign-in provider. To update an existing social sign in provider, follow these steps: 1. Open the Ory Console and navigate to the social sign-in configuration screen. -1. Choose the provider you want to fix and click on the configuration button. -1. Copy the **Redirect URI** from the form. -1. Replace the Ory Network URL `{project-slug}.projects.oryapis.com` with your custom hostname, such as `ory.example.org`. -1. Update the Redirect URI - also called Authorization callback URL - in the social sign-in provider configuration. +2. Choose the provider you want to fix and click on the configuration button. +3. Copy the **Redirect URI** from the form. +4. Replace the Ory Network URL `{project-slug}.projects.oryapis.com` with your custom hostname, such as `ory.example.org`. +5. Update the Redirect URI - also called Authorization callback URL - in the social sign-in provider configuration. :::info diff --git a/docs/kratos/organizations/organizations.mdx b/docs/kratos/organizations/organizations.mdx index c9253ea07..6955d7563 100644 --- a/docs/kratos/organizations/organizations.mdx +++ b/docs/kratos/organizations/organizations.mdx @@ -3,6 +3,14 @@ id: organizations title: Organizations and B2B Single Sign-On --- +:::info + +Organizations are only available in Ory Network and are not supported in self-hosted Ory Kratos. If you have any questions, or if +you would like more information about transitioning to Ory Network, please don't hesitate to +[reach out](https://www.ory.sh/contact/). + +::: + ```mdx-code-block import webm from './_static/organizations-ory-network.webm' import VideoEmbed from '@site/src/components/VideoEmbed' @@ -40,6 +48,8 @@ graph LR ## Manage organizations +### Manage organizations through the Ory Console + Organizations can be managed using the Ory Console.

@@ -47,18 +57,146 @@ Organizations can be managed using the Ory Console. .

+### Manage organizations through the API + +Organizations can also be managed using the Ory API. To authenticate your requests, create a +[workspace API key](/concepts/personal-access-token#authorizing-ory-network-workspace-admin-apis). + +All examples below use [curl](https://curl.se/) to make HTTP requests. You can use any HTTP client to make these requests. + +#### List organizations + +```shell +curl -X GET --location "https://api.console.ory.sh/projects/{{project_id}}/organizations" \ + -H "Authorization: Bearer ory_wak_..." +``` + +#### Create an organization + +```shell +curl -X POST --location "https://api.console.ory.sh/projects/{{project_id}}/organizations" \ + -H "Authorization: Bearer ory_wak_..." \ + -H "Content-Type: application/json" \ + -d '{ + "label": "Hello demo", + "domains": ["test.example.com"] + }' +``` + +#### Get an organization + +```shell +curl -X GET --location "https://api.console.ory.sh/projects/{{project_id}}/organizations/{{organization_id}}" \ + -H "Authorization: Bearer ory_wak_..." +``` + +#### Delete an organization + +```shell +curl -X DELETE --location "https://api.console.ory.sh/projects/{{project_id}}/organizations/{{organization_id}}" \ + -H "Authorization: Bearer ory_wak_..." +``` + ## Create SSO connections for an organization After creating an organization, continue by adding one or more SSO OIDC connections. -Next, go to your registration page. Entering an email that ends with the organization's domain, such as `@my.example.com` from the -example above, shows a **Sign in with SSO** button instead of the password field. Clicking it will take you to sign in with the -SSO connection. The SSO connection is not visible for email addresses that are not managed by the organization. +### Manage SSO connections through the Ory Console -:::info +Go to and continue by configuring the selected organization. -Organizations are only available in Ory Network and are not supported in self-hosted Ory Kratos. If you have any questions, or if -you would like more information about transitioning to Ory Network, please don't hesitate to -[reach out](https://www.ory.sh/contact/). +### Manage SSO connections through the API -::: +The SSO connections are part of the project configuration. To authenticate, use the same workspace API key as for managing +organizations. The examples use [curl](https://curl.se/) to make HTTP requests and [jq](https://jqlang.github.io/jq/) to parse +JSON response. + +#### Create an SSO connections + +```shell +curl -X PATCH --location "https://api.console.ory.sh/projects/{{project_id}}" \ + -H "Authorization: Bearer ory_wak_..." \ + -H "Content-Type: application/json" \ + -d '[ + { + "op": "add", + "path": "/services/identity/config/selfservice/methods/oidc/config/providers/-", + "value": { + "client_id": "...", + "client_secret": "...", + "id": "ory-GPx1yPH4", + "issuer_url": "https://example.org", + "label": "My OIDC provider", + "mapper_url": "base64://ZnVuY3Rpb24oY3R4KSBjdHg=", + "organization_id": "6bb1c7d1-3b3e-4995-9e09-35649dc45a2b", + "provider": "generic", + "scope": ["openid", "offline_access", "email"] + } + } + ]' \ + | jq ".project.services.identity.config.selfservice.methods.oidc.config.providers" +``` + +Some notes on the fields of the JSON payload: + +- `client_id` and `client_secret` are the credentials of the OIDC provider. +- `id` is a unique identifier for the connection, and part of the redirect URL. +- `organization_id` is the ID of the organization to which the connection belongs, and part of the redirect URL. +- `mapper_url` is the URL to a JSONnet file that maps the OIDC provider's claims to Ory's identity schema. You can use the + `base64` scheme to embed the JSONnet file directly in the JSON payload. + +The redirect URL to be set in the OIDC provider configuration is +`https://{{project slug}}.projects.oryapis.com/self-service/methods/oidc/organization/{{organization ID}}/callback/{{provider ID}}`. + +#### List SSO connections + +```shell +curl -X GET --location "https://api.console.ory.sh/projects/{{project_id}}" \ + -H "Authorization: Bearer ory_wak_..." \ + | jq ".services.identity.config.selfservice.methods.oidc.config.providers" +``` + +Result: + +```json +[ + { + "client_id": "...", + "client_secret": "...", + "id": "ory-GPx1yPH4", + "issuer_url": "https://example.org", + "label": "My OIDC provider", + "mapper_url": "https://storage.googleapis.com/bac-gcs-production/94292215dbabe405bebff988b5356663fcf5cba35b10fc6ca2cfea7bc7049e906e01d271a3daeb844203efdfbf2cff356274daa63d5afc2a379bbe93b8b40e63.jsonnet", + "organization_id": "6bb1c7d1-3b3e-4995-9e09-35649dc45a2b", + "provider": "generic", + "scope": ["openid", "offline_access", "email"] + } +] +``` + +#### Delete an SSO connection + +To delete an organization, you need to specify the index of the connection in the `path` field. The index is the position of the +SSO connection in the list of connections. + +```shell +curl -X PATCH --location "https://api.console.ory.sh/projects/{{project_id}}" \ + -H "Authorization: Bearer ory_wak_..." \ + -H "Content-Type: application/json" \ + -d '[ + { + "op": "remove", + "path": "/services/identity/config/selfservice/methods/oidc/config/providers/0" + } + ]' \ + | jq ".project.services.identity.config.selfservice.methods.oidc.config.providers" +``` + +Note that the `organization_id` field contains the organization ID to which the connection belongs. + +## See it live + +After having set up everything, go to your registration page. Entering an email that ends with the organization's domain, such as +`@my.example.com` from the example above, shows a **Sign in with SSO** button instead of the password field. Clicking it will take +you to sign in with the SSO connection. The SSO connection is not visible for email addresses that are not managed by the +organization. From 72c1cee35d64668f18831f5ccabda38c7cbae790 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 23 Jul 2024 12:51:50 +0200 Subject: [PATCH 08/12] Update 30_apple.mdx (#1800) * Update 30_apple.mdx Add a note about the CSRF middleware exemption for the Apple OIDC webbrowser flow. * chore: text --------- Co-authored-by: vinckr --- docs/kratos/social-signin/30_apple.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/kratos/social-signin/30_apple.mdx b/docs/kratos/social-signin/30_apple.mdx index e69395dda..41ec38bb3 100644 --- a/docs/kratos/social-signin/30_apple.mdx +++ b/docs/kratos/social-signin/30_apple.mdx @@ -93,6 +93,13 @@ Follow these steps to add Apple as a social sign-in provider to your project usi } ``` +:::note + +The provider ID for the web browser flow must be `apple`. This makes sure that the resulting callback URL will be exempt from CSRF +middleware, as Apple uses a POST form request that does not include the CSRF cookie. + +::: + ```mdx-code-block ``` From 164c08dbcf6fdd4a388e6afde4af39847936af0d Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 24 Jul 2024 15:08:55 +0200 Subject: [PATCH 09/12] fix: add Ory Actions to welcome (#1803) * fix: add Ory Actions to welcome * chore: format --- docs/welcome.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/welcome.mdx b/docs/welcome.mdx index a205e684f..3390059e2 100644 --- a/docs/welcome.mdx +++ b/docs/welcome.mdx @@ -104,6 +104,12 @@ Contrary to other vendors, Ory allows you to implement your own (login, registra Use the open-source [Ory Elements](https://github.com/ory/elements) components library for fast integration with frameworks like ExpressJS, React, or Preact. +### Ory Actions + +[Ory Actions](https://www.ory.sh/docs/kratos/hooks/configure-hooks) provide a flexible way to extend the capabilities of the Ory +Network by defining custom business logic, automating system behavior in response to events, and integrating with third-party +services such as CRM platforms, payment gateways, business analytics tools, and integration platforms. + ## Ory Open Source Ory is the largest open-source ecosystem in the area of authentication, authorization, access control, and zero-trust networking From 795e7e1831fed5ed63be7ea12dc06ec4bed8657c Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 24 Jul 2024 15:09:05 +0200 Subject: [PATCH 10/12] chore: indent list (#1802) --- docs/welcome.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/welcome.mdx b/docs/welcome.mdx index 3390059e2..fdb3e81a1 100644 --- a/docs/welcome.mdx +++ b/docs/welcome.mdx @@ -42,11 +42,11 @@ Ory differentiates from other vendors in the following key areas: - From designing Identity Schemas using JSON Schema, to webhooks, to advanced configuration options - Ory is the most customizable platform out there. - Ory spans the whole authentication and authorization universe with well-designed products and APIs: -- Identity Management with session management, flows for login, registration, account recovery & verification, MFA, and many more. -- Permission and Role Management. -- Delegation via OAuth2 and OpenID Connect. -- Zero Trust Networking. -- Modern API design with partial support for gRPC. + - Identity Management with session management & flows for login, registration, recovery, verification, MFA, and more. + - Permission and Role Management. + - Delegation via OAuth2 and OpenID Connect. + - Zero Trust Networking. + - Modern API design with partial support for gRPC. ## Ory Network From 5ca1bcf057486a982247c8c569c4aefd61daeeee Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Thu, 25 Jul 2024 08:21:30 +0200 Subject: [PATCH 11/12] feat: document webhook header allow list (#1790) fix: document webhook header allowlist --- ...egrate-with-ory-cloud-through-webhooks.mdx | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/docs/guides/integrate-with-ory-cloud-through-webhooks.mdx b/docs/guides/integrate-with-ory-cloud-through-webhooks.mdx index df01d5ebe..6ddfe1e5d 100644 --- a/docs/guides/integrate-with-ory-cloud-through-webhooks.mdx +++ b/docs/guides/integrate-with-ory-cloud-through-webhooks.mdx @@ -85,9 +85,36 @@ Webhooks trigger HTTP requests to the webhook URL. You can configure the request ### Customizing request body with Jsonnet Webhooks bind the `flow`, as well as request headers (`request_headers`), request method (`request_method`), and the request URL -(`request_url`) of the flow into the Jsonnet template for all methods and execution paths (before and after). For the `after` -execution path of all flows, it binds the `identity` and the `transient_payload` object into the Jsonnet template as well. These -objects are available through a `ctx` object. +(`request_url`) of the flow into the [Jsonnet](https://jsonnet.org) template for all methods and execution paths (before and +after). For the `after` execution path of all flows, it binds the `identity` and the `transient_payload` object into the Jsonnet +template as well. These objects are available through a `ctx` object. + +:::info + +After August 1st, 2024, we will remove all headers from `ctx.request_headers` of the webhook request context that do not match the +following allow-list: + +``` +Accept +Accept-Encoding +Accept-Language +Content-Length +Content-Type +Origin +Priority +Referer +Sec-Ch-Ua +Sec-Ch-Ua-Mobile +Sec-Ch-Ua-Platform +Sec-Fetch-Dest +Sec-Fetch-Mode +Sec-Fetch-Site +Sec-Fetch-User +True-Client-Ip +User-Agent +``` + +::: To send `{ user_id: {some-id} }` in the request body, create the following the [Jsonnet](https://jsonnet.org) template: From 0b31c94defbcfb322b2df041ac5558e2b76de0bb Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:56:49 +0000 Subject: [PATCH 12/12] docs: bump to 2a08e7fbc36f998bc7df8a6c15946a651228e369