bland-finland-95044
03/04/2024, 9:30 PMchilly-king-10285
03/04/2024, 9:30 PMchilly-king-10285
03/04/2024, 9:31 PMbash ory create relationships relationships.json # Output: # NAMESPACE OBJECT RELATION NAME SUBJECT # Group developer members patrik # Group developer members User:Patrik # Group developer members User:Henning # Folder keto/ viewers Group:developer#members # File keto/README.md parents Folder:keto/ # Folder keto/src/ parents Folder:keto/ # File keto/src/main.go parents Folder:keto/src/ # File private owners User:Henning
In this example, the developer
group has a relationship with the keto/
folder, meaning that all members of the developer
group can view the files in the keto/
folder. For more information, you can refer to the [Ory Documentation](https://www.ory.sh/docs/keto/guides/simple-access-check-guide#understand-ory-permissions) and the [Ory CLI Documentation](https://www.ory.sh/docs/cli/ory-create#ory-create).bland-finland-95044
03/04/2024, 9:41 PMchilly-king-10285
03/04/2024, 9:41 PMchilly-king-10285
03/04/2024, 9:42 PMbland-finland-95044
03/04/2024, 9:52 PMchilly-king-10285
03/04/2024, 9:52 PMchilly-king-10285
03/04/2024, 9:52 PMemail
to email
in the identity schema: jsonnet local claims = std.extVar('claims'); { identity: { traits: { // The email might be empty if the user hasn't granted permissions for the email scope. [if 'email' in claims then 'email' else null]: claims.email, }, }, }
In this example, if the email
claim exists in the data returned by the sign-in provider, it is mapped to the email
trait in the identity schema. If the email
claim doesn't exist, null
is assigned to the email
trait. It's important to note that secrets such as API keys, credentials, or personal data should not be saved directly in Jsonnet code snippets. Jsonnet code snippets used for data mapping aren't stored in an encrypted format in Ory Network. For more information, you can refer to the [Ory Documentation](https://www.ory.sh/docs/kratos/social-signin/data-mapping).bland-finland-95044
03/04/2024, 9:54 PMchilly-king-10285
03/04/2024, 9:54 PMchilly-king-10285
03/04/2024, 9:54 PMjson //... # This is the default schema that's used for new identities "default_schema_id": "<preset://email>", # These are custom schemas that are available on your Ory Network project "schemas": [ { "id": "7d1cf71e-57ae-40be-bddf-1f4c323e2349", "url": "<https://storage.googleapis.com/bac-gcs-production/something.schema.json>" }, ], //...
In this example, the default schema is set to "preset://email". This means that when a new identity is created, this schema will be used to validate the identity data. For more information, you can refer to the [Ory Documentation](https://www.ory.sh/docs/kratos/manage-identities/identity-schema).