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

20
script/add-down-migrations.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# This script adds empty down migrations for any migration that misses them.
# Adding them is necessary because if the down migration is missing, the
# migration will only be applied once, even if the database is completely
# rolled back.
# In newer versions of ory/x/popx, the migration box enforces that all up
# migrations have a down migration. Use this script to add them.
set -Eeuo pipefail
for f in $(find . -name "*.up.sql"); do
base=$(basename $f)
dir=$(dirname $f)
migra_name=$(echo $base | sed -e "s/\..*\.up\.sql//" | sed -e "s/\.up\.sql//")
if ! compgen -G "$dir/$migra_name*.down.sql" > /dev/null; then
echo "Adding empty down migration for $f"
touch $dir/$migra_name.down.sql
fi
done

75
script/debug-entrypoint.sh Executable file
View File

@@ -0,0 +1,75 @@
#!/usr/bin/env bash
FILE_CHANGE_LOG_FILE=/tmp/changes.log
SERVICE_ARGS="$@"
log() {
echo "***** $1 *****"
}
init() {
log "Initializing"
truncate -s 0 ${FILE_CHANGE_LOG_FILE}
tail -f ${FILE_CHANGE_LOG_FILE} &
}
build() {
log "Building ${SERVICE_NAME} binary"
go env -w GOPROXY="proxy.golang.org,direct"
go mod download
go build -buildvcs=false -gcflags "all=-N -l" -o /${SERVICE_NAME}
}
start() {
log "Starting Delve"
dlv --listen=:${DELVE_PORT} --headless=true --api-version=2 --accept-multiclient exec /${SERVICE_NAME} -- ${SERVICE_ARGS} &
}
restart() {
build
log "Killing old processes"
killall dlv
killall ${SERVICE_NAME}
start
}
watch() {
log "Watching for changes"
inotifywait -e "MODIFY,DELETE,MOVED_TO,MOVED_FROM" -m -r ${PWD} | (
while true; do
read path action file
ext=${file: -3}
if [[ "$ext" == ".go" ]]; then
echo "$file"
fi
done
) | (
WAITING=""
while true; do
file=""
read -t 1 file
if test -z "$file"; then
if test ! -z "$WAITING"; then
echo "CHANGED"
WAITING=""
fi
else
log "File ${file} changed" >> ${FILE_CHANGE_LOG_FILE}
WAITING=1
fi
done
) | (
while true; do
read TMP
restart
done
)
}
# main part
init
build
start
watch

13
script/render-schemas.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euxo pipefail
schema_version="${1:-$(git rev-parse --short HEAD)}"
sed "s!ory://tracing-config!https://raw.githubusercontent.com/ory/kratos/$schema_version/oryx/otelx/config.schema.json!g;" embedx/config.schema.json > .schemastore/config.schema.json
git config user.email "60093411+ory-bot@users.noreply.github.com"
git config user.name "ory-bot"
git add .schemastore/config.schema.json
git commit -m "autogen: render config schema" || true

5
script/test-envs.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
export TEST_DATABASE_MYSQL="mysql://root:secret@(127.0.0.1:3444)/mysql?parseTime=true&multiStatements=true"
export TEST_DATABASE_POSTGRESQL="postgres://postgres:secret@127.0.0.1:3445/postgres?sslmode=disable"
export TEST_DATABASE_COCKROACHDB="cockroach://root@127.0.0.1:3446/defaultdb?sslmode=disable"

10
script/testenv.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
docker rm -f kratos_test_database_mysql kratos_test_database_postgres kratos_test_database_cockroach kratos_test_hydra || true
docker run --name kratos_test_database_mysql -p 3444:3306 -e MYSQL_ROOT_PASSWORD=secret -d mysql:8.0
docker run --name kratos_test_database_postgres -p 3445:5432 -e POSTGRES_PASSWORD=secret -e POSTGRES_DB=postgres -d postgres:14 postgres -c log_statement=all
docker run --name kratos_test_database_cockroach -p 3446:26257 -p 3447:8080 -d cockroachdb/cockroach:latest-v25.4 start-single-node --insecure
docker run --name kratos_test_hydra -p 4444:4444 -p 4445:4445 -d -e DSN=memory -e URLS_SELF_ISSUER=http://localhost:4444/ -e URLS_LOGIN=http://localhost:4446/login -e URLS_CONSENT=http://localhost:4446/consent oryd/hydra:v2.0.2 serve all --dev
docker pull oryd/hydra:v2.2.0
source script/test-envs.sh

5
script/unset-e2e-uis.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
unset NODE_UI_PATH
unset RN_UI_PATH
unset REACT_UI_PATH