snapshot of https://github.com/ory/kratos.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
CI / Run tests and lints (push) Failing after 29s
CI / Build CLI docs (push) Has been skipped
CI / Run Playwright end-to-end tests (mysql) (push) Failing after 3s
CI / Run Playwright end-to-end tests (postgres) (push) Failing after 2s
CI / Run Playwright end-to-end tests (sqlite) (push) Failing after 3s
CodeQL / Analyze (go) (push) Failing after 4s
CodeQL / Analyze (javascript) (push) Failing after 3s
Docker Image Scanners / scanners (push) Failing after 4s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Run end-to-end tests (postgres) (push) Failing after 19s
CI / Run end-to-end tests (sqlite) (push) Failing after 2s
CI / Run Playwright end-to-end tests (cockroach) (push) Failing after 2s
CI / Draft newsletter (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped

This commit is contained in:
upstream-mirror
2026-09-15 21:19:12 +05:00
commit c60cc7ca75
8092 changed files with 394160 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
{
"email": "someone@email.org",
"names": [
"peter",
"pan"
]
}

View File

@@ -0,0 +1,49 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"ory.sh/kratos": {
"mappings": {
"identity": {
"traits": [
{
"path": "email"
}
]
}
}
}
},
"names": {
"type": "array",
"items": {
"type": "string",
"ory.sh/kratos": {
"mappings": {
"identity": {
"traits": [
{
"path": "names.-1"
}
]
}
}
}
}
}
},
"required": [
"email"
],
"additionalProperties": false
}
}
}

View File

@@ -0,0 +1,14 @@
{
"p": "8Bh18gHHaVBWHgHX2s9eAsTHSgFq1kSvAuhvWpipsfbrDMBYZ2nwPCB1g3hb-L6cIMzxTmsv8bxwC0l316I8f77NgjSB4mlZAHjXZp861Z9xAFQ_Kx9ZcRldGmbUQ0NOQ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hR2lp-iZLJcnu3xAuHLEm5SwSnHxgXX1VwXUopq5Q6hmgVVtl4hyLAKn5Fdhz9qDzp5TCMMOeG8c6jiCkZZhBb8PydWPdCE6eFe59dyufvGHzk",
"n": "1BqatHWJWPTN4mnkrhns2pSk4LRe7W0cyjs8vp7INp3PtgzQ0-KuUibnE0v0k-6DQcu-3hkP88fUOGlYm2z0x9y2urMoAepBwiWybs1v0xqaQx_eLxtkCiElF3i9zYTqmR6cdAOb_duKpTeuTZm326UdpmDoU3TwcGBcszNkNfcNjeq-3z2bvS3GXvJIR9A-6j17xAXVVifUwjPIcNs21ajJVhNFcM9cM90OG9mivbE645KkqMT-WQxFPEQ-DqjijmXnLed9QabcfXcZdkT96O7x_zxHTgF46FlVyJtswuLRUO-h-48ai3-6NmfnR0tOCoVYhHJxndcQ0L_-uqFXkw"
}

View File

@@ -0,0 +1,12 @@
{
"keys": [
{
"kty": "RSA",
"e": "AQAB",
"use": "sig",
"kid": "RTSkc-Jk-iD1lx2TK9WtYDtBtWs0MSyCG0nQSR1mglU",
"alg": "RS256",
"n": "1BqatHWJWPTN4mnkrhns2pSk4LRe7W0cyjs8vp7INp3PtgzQ0-KuUibnE0v0k-6DQcu-3hkP88fUOGlYm2z0x9y2urMoAepBwiWybs1v0xqaQx_eLxtkCiElF3i9zYTqmR6cdAOb_duKpTeuTZm326UdpmDoU3TwcGBcszNkNfcNjeq-3z2bvS3GXvJIR9A-6j17xAXVVifUwjPIcNs21ajJVhNFcM9cM90OG9mivbE645KkqMT-WQxFPEQ-DqjijmXnLed9QabcfXcZdkT96O7x_zxHTgF46FlVyJtswuLRUO-h-48ai3-6NmfnR0tOCoVYhHJxndcQ0L_-uqFXkw"
}
]
}

View File

@@ -0,0 +1,12 @@
{
"keys": [
{
"kty": "RSA",
"e": "AQAB",
"use": "sig",
"kid": "swo5qZbZECb_alwFmwoleMN7nFw6Us-TP6f-sKIPDF0",
"alg": "RS256",
"n": "kOB5UX-fhCEesMn7BBRKCwkV33blQrD4xZhRK3rQDySNGwf9Uoeemm6SsO5E3WBnYQHWyH4X4jlwVNmkqBHyijKs3v2DBhIZTXa0dU2qp6dGJXQObSHKN51RzPX6yE3DiuzhKcl0ORlvjZk2nzPDl3l9y_Fl6opjFsnnCdHUovqdTBi9HcdocF7E5QeFvQG0QHs8zDC1myjs73m1F18IlTF6peXgFhgsiPKrXrgugh8vItpzr4dfA8fK3ND-NBLloNaZbtCAGmW6vxJnRae2PVBzSf8GamMBCuCNOJBRaQMRkZnZvkAIMGc9WngaHFhGBnW3IC__B0e-_fCyAVr4KQ"
}
]
}

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,24 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"foo": {
"type": "string"
},
"baz": {
"type": "string"
},
"bool": {
"type": "boolean"
},
"opv": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,24 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"foo": {
"type": "string"
},
"baz": {
"type": "string"
},
"bool": {
"type": "boolean"
},
"opv": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,24 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"foo": {
"type": "string"
},
"baz": {
"type": "string"
},
"bool": {
"type": "boolean"
},
"opv": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,13 @@
local claims = std.extVar('claims');
if std.length(claims.sub) == 0 then
error 'claim sub not set'
else
{
identity: {
traits: {
subject: claims.sub,
[if "email" in claims then "email" else null]: claims.email,
},
},
}

View File

@@ -0,0 +1,27 @@
local claims = std.extVar('claims');
local identity = std.extVar('identity');
// Keep the website if the user has set one.
local website = std.get(identity.traits, "website", std.get(claims, "website", ""));
if std.length(claims.sub) == 0 then
error 'claim sub not set'
else
{
identity: {
traits: {
subject: claims.sub,
[if website != "" then "website" else null]: website,
[if "groups" in claims.raw_claims then "groups" else null]: claims.raw_claims.groups,
},
metadata_public: {
[if "picture" in claims then "picture" else null]: claims.picture,
},
metadata_admin: {
[if "phone_number" in claims then "phone_number" else null]: claims.phone_number,
},
verified_addresses: [
{ via: "email", value: claims.sub },
],
},
}

View File

@@ -0,0 +1,7 @@
local claims = std.extVar('claims');
{
identity: {
traits: "this is not an object",
},
}

View File

@@ -0,0 +1,19 @@
local claims =
{
email_verified: false
} + std.extVar('claims');
{
identity:
{
traits:
{
email: claims.email,
[if "picture" in claims then "picture" else null]: claims.picture,
name:
{
first: claims.name,
last: claims.last_name,
}
},
},
}

View File

@@ -0,0 +1,9 @@
local claims = std.extVar('claims');
{
identity: {
traits: {
website: claims.website,
},
},
}

View File

@@ -0,0 +1,12 @@
local claims = std.extVar('claims');
if std.length(claims.sub) == 0 then
error 'claim sub not set'
else
{
identity: {
traits: {
subject: claims.sub,
},
},
}

View File

@@ -0,0 +1,13 @@
local claims = std.extVar('claims');
if std.length(claims.sub) == 0 then
error 'claim sub not set'
else
{
identity: {
traits: {
subject: claims.sub,
[if "website" in claims then "website" else null]: claims.website,
},
},
}

View File

@@ -0,0 +1,32 @@
local claims = std.extVar('claims');
local raw = claims.raw_claims;
if std.length(claims.sub) == 0 then
error 'claim sub not set'
else
{
identity: {
traits: {
subject: claims.sub,
[if "email" in claims && claims.email != '' then "email" else null]: claims.email,
[if "fullnameEN" in raw && raw.fullnameEN != '' then "name" else null]: {
full: raw.fullnameEN,
[if "firstnameEN" in raw && raw.firstnameEN != '' then "first" else null]: raw.firstnameEN,
[if "lastnameEN" in raw && raw.lastnameEN != '' then "last" else null]: raw.lastnameEN,
},
[if "fullnameAR" in raw && raw.fullnameAR != '' then "name_ar" else null]: {
full: raw.fullnameAR,
[if "firstnameAR" in raw && raw.firstnameAR != '' then "first" else null]: raw.firstnameAR,
[if "lastnameAR" in raw && raw.lastnameAR != '' then "last" else null]: raw.lastnameAR,
},
[if "uuid" in raw && raw.uuid != '' then "uuid" else null]: raw.uuid,
[if "unifiedId" in raw && raw.unifiedId != '' then "unified_id" else null]: raw.unifiedId,
[if "idn" in raw && raw.idn != '' then "idn" else null]: raw.idn,
[if "userType" in raw && raw.userType != '' then "user_type" else null]: raw.userType,
[if "nationalityEN" in raw && raw.nationalityEN != '' then "nationality" else null]: raw.nationalityEN,
[if "gender" in raw && raw.gender != '' then "gender" else null]: raw.gender,
[if "mobile" in raw && raw.mobile != '' then "phone" else null]: raw.mobile,
},
},
}

View File

@@ -0,0 +1,26 @@
local claims = std.extVar('claims');
local identity = std.extVar('identity');
if std.length(claims.sub) == 0 then
error 'claim sub not set'
else
{
identity: {
traits: {
subject: claims.sub,
[if "website" in claims then "website" else null]: claims.website,
// Keep existing groups if the claims don't provide them.
[if "groups" in claims.raw_claims then "groups" else null]:
claims.raw_claims.groups,
},
metadata_public: {
[if "picture" in claims then "picture" else null]: claims.picture,
// Preserve existing metadata that isn't in the claims.
[if "existing_field" in identity.metadata_public then "existing_field" else null]:
identity.metadata_public.existing_field,
},
metadata_admin: {
[if "phone_number" in claims then "phone_number" else null]: claims.phone_number,
},
},
}

View File

@@ -0,0 +1,25 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"format": "email",
"type": "string",
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
}
}
}
}
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,60 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"subject": {
"format": "email",
"type": "string",
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
}
}
},
"extra_data": {
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"minLength": 2
},
"website": {
"type": "string",
"format": "uri"
},
"groups": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["subject", "extra_data"]
},
"metadata_public": {
"type": "object",
"properties": {
"picture": {
"type": "string"
}
}
},
"metadata_admin": {
"type": "object",
"properties": {
"phone_number": {
"type": "string"
}
}
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,58 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"subject": {
"format": "email",
"type": "string",
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
}
}
},
"name": {
"type": "string",
"minLength": 2
},
"website": {
"type": "string",
"format": "uri"
},
"groups": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"subject"
]
},
"metadata_public": {
"type": "object",
"properties": {
"picture": {
"type": "string"
}
}
},
"metadata_admin": {
"type": "object",
"properties": {
"phone_number": {
"type": "string"
}
}
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,61 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"subject": {
"format": "email",
"type": "string",
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
},
"verification": {
"via": "email"
}
}
},
"name": {
"type": "string",
"minLength": 2
},
"website": {
"type": "string",
"format": "uri"
},
"groups": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"subject"
]
},
"metadata_public": {
"type": "object",
"properties": {
"picture": {
"type": "string"
}
}
},
"metadata_admin": {
"type": "object",
"properties": {
"phone_number": {
"type": "string"
}
}
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,44 @@
{
"$id": "https://example.com/person-with-verification.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"subject": {
"format": "email",
"type": "string",
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
},
"verification": {
"via": "email"
},
"recovery": {
"via": "email"
}
}
},
"website": {
"type": "string",
"format": "uri"
},
"groups": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"subject"
]
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,58 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"subject": {
"format": "email",
"type": "string",
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
}
}
},
"name": {
"type": "string",
"minLength": 2
},
"website": {
"type": "string",
"format": "uri"
},
"groups": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"subject"
]
},
"metadata_public": {
"type": "object",
"properties": {
"picture": {
"type": "string"
}
}
},
"metadata_admin": {
"type": "object",
"properties": {
"phone_number": {
"type": "string"
}
}
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,32 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"format": "email",
"type": "string",
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
}
}
}
},
"name": {
"type": "string",
"minLength": 2
}
},
"required": [
"email"
]
}
},
"additionalProperties": false
}

View File

@@ -0,0 +1,10 @@
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"traits": {}
},
"additionalProperties": false
}