Skip to content

Commit

Permalink
docs: change model to schema (ory#1639)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinckr authored Aug 10, 2021
1 parent c9fb0d4 commit 09c403e
Show file tree
Hide file tree
Showing 34 changed files with 83 additions and 75 deletions.
5 changes: 2 additions & 3 deletions docs/docs/admin/managing-users-identities.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import TabItem from '@theme/TabItem'

This document walks you through the administrative identity management in Ory
Kratos. You should already be familiar with the
[Identity Data Model](../concepts/identity-data-model.mdx) before reading this
guide.
[Identity Schema](../concepts/identity-schema.mdx) before reading this guide.

## Creating an Identity

Expand Down Expand Up @@ -167,7 +166,7 @@ selfservice:
```
To specify that an identity's trait is a recovery email, use the following
Identity JSON Schema:
Identity Schema:
```diff
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ provider (for example [Ory Hydra](https://www.ory.sh/hydra)). "Social Sign In"
or "Sign in with ..." are common aliases for this flow.

This strategy expects that you've set up your
[Default Identity JSON Schema](../identity-data-model.mdx).
[Default Identity Schema](../identity-schema.mdx).

## Configuration

Expand Down
12 changes: 6 additions & 6 deletions docs/docs/concepts/credentials/username-email-password.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ hashers:
To determine the ideal parameters, head over to the
[setup guide](../../guides/setting-up-password-hashing-parameters).

When a user signs up using this method, the Default Identity JSON Schema (set
using `identity.default_schema_url`) is used:
When a user signs up using this method, the Default Identity Schema (set using
`identity.default_schema_url`) is used:

```yaml title="path/to/my/kratos/config.yml"
identity:
Expand All @@ -81,8 +81,8 @@ identity:
```

If you don't know what that means, please read the
[Identity Data Model Chapter](../../concepts/identity-data-model.mdx) in the
docs' concepts section.
[Identity Schema Chapter](../../concepts/identity-schema.mdx) in the docs'
concepts section.

For a complete reference, defaults, and description please check the
[Configuration Reference](../../reference/configuration.md).
Expand Down Expand Up @@ -146,7 +146,7 @@ special meaning for some E-Mail Providers (e.g. GMail) are not normalized:

You need to decide which route you want to take.

### Picking the right Identity JSON Schema
### Picking the right Identity Schema

When processing an identity and its traits, the method will use
[JSON Schema](../../reference/json-schema-json-paths.md) to extract one or more
Expand Down Expand Up @@ -298,7 +298,7 @@ You may also mix usernames and passwords:

## Example

Assuming your Identity JSON Schema is as follows:
Assuming your Identity Schema is as follows:

```json
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: identity-data-model
title: Identity Data Model
id: identity-schema
title: Identity Schema
---

import Mermaid from '@theme/Mermaid'
Expand Down Expand Up @@ -119,8 +119,8 @@ in the following situations:
support or staff;
- the system includes both users and robots sometimes also known as named
service accounts;
- the system needs to ingest another company's identity model, and
- the system's identity model changes or grows over time and requires
- the system needs to ingest another company's Identity Schema, and
- the system's Identity Schema changes or grows over time and requires
versioning.
The following example illustrates a usage scenario with three types of
Expand Down Expand Up @@ -174,10 +174,10 @@ switch (session.Identity.SchemaID) {

:::warning

Please keep in mind that the Identity Model is not a place to store sensitive
Please keep in mind that the Identity Schema is not a place to store sensitive
information that should not be visible to the end-user! Users can see traits and
other data - except credentials - using the `sessions/whoami` endpoint. The
Identity Model is not the right place to store data that should be obfuscated
Identity Schema is not the right place to store data that should be obfuscated
from the user!

:::
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/concepts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ very easy to get started there is a reference implementation
For more details about each individual flow, consult the
[Self-Service Flows Chapter](../self-service.mdx).

### Bring your own Identity Model(s)
### Bring your own Identity Schema(s)

Sometimes it is necessary to store more than one type of identity in your
system:
Expand All @@ -271,7 +271,7 @@ system:
attached to the profile.

Ory Kratos implements both scenarios by using
[JSON Schemas for Identities](./identity-data-model.mdx)
[Identity Schemas](./identity-schema.mdx)

### Forget passport-js, oidc-client, ...

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/concepts/ui-user-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ use for the labels:

#### Node Order and Labels

For all traits, the labels and orders are taken from the Identity JSON Schema. A
JSON Schema such as
For all traits, the labels and orders are taken from the Identity Schema. A JSON
Schema such as

```json
{
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/guides/account-activation-email-verification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ title: Setting up Account Activation and E-Mail Verification
To send emails, you need to [setup the mail courier](../concepts/email-sms.md)

To set up email verification, your
[Identity JSON Schema](../concepts/identity-data-model.mdx) must have an email
in its traits and add
[Identity Schema](../concepts/identity-schema.mdx) must have an email in its
traits and add

```json
{
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/guides/account-recovery-password-reset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: Setting up Account Recovery and Password Reset
---

To set up account recovery, your
[Identity JSON Schema](../concepts/identity-data-model.mdx) must have an email
in its traits and add
[Identity Schema](../concepts/identity-schema.mdx) must have an email in its
traits and add

```json
{
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Kubernetes) most:
- The workflow engine allows you to fully customize your user experience.
Whether your users need to activate their account after registration, or have
a multi-step (progressive) registration - it's all possible!
- One Identity Data Model does not fit all - you may have customers that need a
- One Identity Schema does not fit all - you may have customers that need a
billing address, internal support staff that is assigned to a cost center, and
that smart fridge on floor 4. You can express the different data models using
[JSON Schema](https://json-schema.org/) and make the system work for you - not
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/reference/html-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ title: HTML Form Parser
If you're using HTML Forms to sign users up or update profiles, Ory Kratos needs
to assert the type of each field, as HTML Form Field Values are untyped.

Ory Kratos uses the Identity JSON Schema to assert form field types. There are a
few tricks you should know when using this feature.
Ory Kratos uses the Identity Schema to assert form field types. There are a few
tricks you should know when using this feature.

## Nesting

Assuming this Identity JSON Schema:
Assuming this Identity Schema:

```json
{
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/reference/json-schema-json-paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ payloads.

We rely on JSON Schema heavily internally, from configuration validation to
generating OpenAPI Spec to writing documentation. By using Ory Kratos, you will
be exposed to JSON Schema as it is used for defining Identity data models and
other things.
be exposed to JSON Schema as it is used for defining Identity Schemas and other
things.

To learn more about JSON Schema, head over to
[json-schema.org/learn/](https://json-schema.org/learn/).
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/self-service/flows/account-recovery.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ selfservice:
</Tabs>
To specify that an identity's trait is a recovery email, use the following
Identity JSON Schema:
Identity Schema:
```diff
{
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/self-service/flows/user-registration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ first.
:::

When the `password` method is enabled, it will be part of the `methods` payload
in the Registration Flow. Ory Kratos uses the Identity JSON Schema defined in
in the Registration Flow. Ory Kratos uses the Identity Schema defined in
`identity.default_schema_url` to generate a list of form fields and add it to
the Registration Flow. Assuming we are using the Identity JSON Schema from the
the Registration Flow. Assuming we are using the Identity Schema from the
Quickstart

<CodeFromRemote
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/self-service/flows/user-settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ Currently, three settings methods are supported:
- `oidc` for un-/linking from social sign in providers such as Google or
Facebook;
- `profile` for updating an identity's traits (e.g. change the first name). The
updated traits must be valid against the Identity JSON Schema defined for its
[Identity Traits](../../concepts/identity-data-model.mdx).
updated traits must be valid against the Identity Schema defined for its
[Identity Traits](../../concepts/identity-schema.mdx).

<Tabs
defaultValue="oss"
Expand Down Expand Up @@ -513,7 +513,7 @@ $ curl -s -X GET \
```

The form fields depend on the
[Identity's Schema JSON](../../concepts/identity-data-model.mdx).
[Identity Schema](../../concepts/identity-schema.mdx).

### Update Password

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ template IDs are:
- Known email address: `verification_valid`

You must define at least one Identity Traits field as a verification field. You
can do so by defining the following section in your Identity JSON Schema:
can do so by defining the following section in your Identity Schema:

```diff
{
Expand Down
2 changes: 1 addition & 1 deletion docs/faq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
What is the correct flow to sanitize the username and make sure it satisfies
a specific regex (e.g. only alphanumeric characters)?
a: |
In the identity json schema using [Regular Expressions](https://json-schema.org/understanding-json-schema/reference/string.html#regular-expressions).
In the Identity Schema using [Regular Expressions](https://json-schema.org/understanding-json-schema/reference/string.html#regular-expressions).
To sanitize usernames coming from third-party OIDC providers like Google or GitHub
you write [jsonnet code](https://jsonnet.org).
- tags:
Expand Down
2 changes: 1 addition & 1 deletion docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"concepts/index",
"concepts/terminology",
"concepts/ui-user-interface",
"concepts/identity-data-model",
"concepts/identity-schema",
{
"label": "Identity Credentials",
"type": "category",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import TabItem from '@theme/TabItem'

This document walks you through the administrative identity management in Ory
Kratos. You should already be familiar with the
[Identity Data Model](../concepts/identity-data-model.mdx) before reading this
[Identity Schema](../concepts/identity-schema.mdx) before reading this
guide.

## Creating an Identity
Expand Down Expand Up @@ -167,7 +167,7 @@ selfservice:
```
To specify that an identity's trait is a recovery email, use the following
Identity JSON Schema:
Identity Schema:
```diff
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ provider (for example [Ory Hydra](https://www.ory.sh/hydra)). "Social Sign In"
or "Sign in with ..." are common aliases for this flow.

This strategy expects that you've set up your
[Default Identity JSON Schema](../identity-data-model.mdx).
[Default Identity Schema](../identity-schema.mdx).

## Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ hashers:
To determine the ideal parameters, head over to the
[setup guide](../../guides/setting-up-password-hashing-parameters).

When a user signs up using this method, the Default Identity JSON Schema (set
When a user signs up using this method, the Default Identity Schema (set
using `identity.default_schema_url`) is used:

```yaml title="path/to/my/kratos/config.yml"
Expand All @@ -81,7 +81,7 @@ identity:
```

If you don't know what that means, please read the
[Identity Data Model Chapter](../../concepts/identity-data-model.mdx) in the
[Identity Schema Chapter](../../concepts/identity-schema.mdx) in the
docs' concepts section.

For a complete reference, defaults, and description please check the
Expand Down Expand Up @@ -146,7 +146,7 @@ special meaning for some E-Mail Providers (e.g. GMail) are not normalized:

You need to decide which route you want to take.

### Picking the right Identity JSON Schema
### Picking the right Identity Schema

When processing an identity and its traits, the method will use
[JSON Schema](../../reference/json-schema-json-paths.md) to extract one or more
Expand Down Expand Up @@ -298,7 +298,7 @@ You may also mix usernames and passwords:

## Example

Assuming your Identity JSON Schema is as follows:
Assuming your Identity Schema is as follows:

```json
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: identity-data-model
title: Identity Data Model
id: identity-schema
title: Identity Schema
---

import Mermaid from '@theme/Mermaid'
Expand Down Expand Up @@ -119,8 +119,8 @@ in the following situations:
support or staff;
- the system includes both users and robots sometimes also known as named
service accounts;
- the system needs to ingest another company's identity model, and
- the system's identity model changes or grows over time and requires
- the system needs to ingest another company's Identity Schema, and
- the system's Identity Schema changes or grows over time and requires
versioning.
The following example illustrates a usage scenario with three types of
Expand Down Expand Up @@ -171,13 +171,22 @@ switch (session.Identity.SchemaID) {
// ...
}
```
:::warning

Please keep in mind that the Identity Schema is not a place to store sensitive
information that should not be visible to the end-user! Users can see traits and
other data - except credentials - using the `sessions/whoami` endpoint. The
Identity Schema is not the right place to store data that should be obfuscated
from the user!

:::

:::warning

Please keep in mind that the Identity Model is not a place to store sensitive
Please keep in mind that the Identity Schema is not a place to store sensitive
information that should not be visible to the end-user! Users can see traits and
other data - except credentials - using the `/sessions/whoami` endpoint. The
Identity Model is not the right place to store data that should be obfuscated
Identity Schema is not the right place to store data that should be obfuscated
from the user!

:::
Expand Down
4 changes: 2 additions & 2 deletions docs/versioned_docs/version-v0.7/concepts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ very easy to get started there is a reference implementation
For more details about each individual flow, consult the
[Self-Service Flows Chapter](../self-service.mdx).

### Bring your own Identity Model(s)
### Bring your own Identity Schema(s)

Sometimes it is necessary to store more than one type of identity in your
system:
Expand All @@ -271,7 +271,7 @@ system:
attached to the profile.

Ory Kratos implements both scenarios by using
[JSON Schemas for Identities](./identity-data-model.mdx)
[Identity Schema](./identity-schema.mdx)

### Forget passport-js, oidc-client, ...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ use for the labels:

#### Node Order and Labels

For all traits, the labels and orders are taken from the Identity JSON Schema. A
For all traits, the labels and orders are taken from the Identity Schema. A
JSON Schema such as

```json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: Setting up Account Activation and E-Mail Verification
To send emails, you need to [setup the mail courier](../concepts/email-sms.md)

To set up email verification, your
[Identity JSON Schema](../concepts/identity-data-model.mdx) must have an email
[Identity Schema](../concepts/identity-schema.mdx) must have an email
in its traits and add

```json
Expand Down
Loading

0 comments on commit 09c403e

Please sign in to comment.