feat: import upstream ZITADEL Login V2 v4.20.4 source workspace

This commit is contained in:
Vib Tools committed 2026-11-22 04:15:54 -08:00
1 parent eadd0e558b
commit 4404849fc4
644 files changed
+153201 -10

No files matched your search

+75
View File
@@ -0,0 +1,75 @@
# ==============================================
# ZITADEL LOGIN THEME CONFIGURATION
# ==============================================
# This file contains all available theme options for customizing the login experience.
# Copy the variables you want to customize to your .env.local file.
# Theme Roundness Options
# ----------------------
# Controls the border radius of UI elements
# Options: "edgy" | "mid" | "full"
# - edgy: Sharp corners (rounded-none)
# - mid: Medium rounded corners (rounded-lg)
# - full: Fully rounded corners (rounded-full)
NEXT_PUBLIC_THEME_ROUNDNESS=mid
# Layout Options
# --------------
# Controls the overall layout structure
# Options: "side-by-side" | "top-to-bottom"
# - side-by-side: Brand section on left, form on right (desktop)
# - top-to-bottom: Brand section on top, form below
NEXT_PUBLIC_THEME_LAYOUT=side-by-side
# Spacing Options
# ---------------
# Controls spacing and padding throughout the interface
# Options: "regular" | "compact"
# - regular: Standard spacing with comfortable padding (p-6, space-y-6)
# - compact: Tighter spacing for information-dense layouts (p-4, space-y-4)
NEXT_PUBLIC_THEME_SPACING=regular
# Appearance Options
# ------------------
# Complete design philosophies
# Options: "flat" | "material"
# - flat: Minimal flat design with cards matching background color, subtle borders, and normal typography
# - material: Material Design inspired with elevated cards, proper contrast, and medium typography
NEXT_PUBLIC_THEME_APPEARANCE=flat
# Background Image
# ---------------
# Path to a background image (optional)
# Can be a relative path from /public or an absolute URL
# Example: NEXT_PUBLIC_THEME_BACKGROUND_IMAGE=/images/login-bg.jpg
# NEXT_PUBLIC_THEME_BACKGROUND_IMAGE=
# ==============================================
# EXAMPLE COMBINATIONS
# ==============================================
# Modern Tech Startup
# NEXT_PUBLIC_THEME_ROUNDNESS=full
# NEXT_PUBLIC_THEME_LAYOUT=side-by-side
# NEXT_PUBLIC_THEME_SPACING=regular
# NEXT_PUBLIC_THEME_APPEARANCE=material
# NEXT_PUBLIC_THEME_BACKGROUND_IMAGE=/images/tech-bg.jpg
# Corporate Banking
# NEXT_PUBLIC_THEME_ROUNDNESS=edgy
# NEXT_PUBLIC_THEME_LAYOUT=top-to-bottom
# NEXT_PUBLIC_THEME_SPACING=regular
# NEXT_PUBLIC_THEME_APPEARANCE=material
# Minimal SaaS
# NEXT_PUBLIC_THEME_ROUNDNESS=mid
# NEXT_PUBLIC_THEME_LAYOUT=side-by-side
# NEXT_PUBLIC_THEME_SPACING=compact
# NEXT_PUBLIC_THEME_APPEARANCE=flat
# Creative Agency
# NEXT_PUBLIC_THEME_ROUNDNESS=full
# NEXT_PUBLIC_THEME_LAYOUT=top-to-bottom
# NEXT_PUBLIC_THEME_SPACING=regular
# NEXT_PUBLIC_THEME_APPEARANCE=material
# NEXT_PUBLIC_THEME_BACKGROUND_IMAGE=/images/creative-bg.jpg
+17
View File
@@ -0,0 +1,17 @@
custom-config.js
.env*.local
standalone
tsconfig.tsbuildinfo
cypress
.DS_Store
node_modules
*.log
.next
dist
dist-ssr
*.local
.vscode
/blob-report/
# Dockerized test output (generated by integration tests)
dockerized/*/output/
+9
View File
@@ -0,0 +1,9 @@
*
!constants
!constants/**
!src
!src/**
!locales
!locales/**
!scripts
!scripts/**
+38
View File
@@ -0,0 +1,38 @@
# ZITADEL Login App Guide for AI Agents
## Context
The **Login App** (`apps/login`) provides the user interface for authentication flows (Login, Register, MFA, etc.). It is built with Next.js and React.
## Key Technology
- **Framework**: Next.js (React).
- **Styling**: TailwindCSS, configured via `apps/login/tailwind.config.mjs`.
- **Data Fetching**: Primarily server-side interaction with ZITADEL APIs via `@zitadel/client` or direct gRPC calls where applicable.
- **Language**: TypeScript.
## Architecture & Conventions
- **Routing**: Uses the Next.js App Router (routes are defined under `src/app/`).
- **Composability**: Components should be small and reusable.
- **State**: Critical authentication state is often managed via URL parameters (Auth Requests) and cookies/sessions.
- **Scope Rule**: For shared API typings and client behavior, also read `packages/AGENTS.md` and `proto/AGENTS.md`.
## Server Actions & Server-Only Code (critical — read before adding or changing a server function)
- **`src/lib/actions/`**: only Server Actions. Every file starts with `"use server"`, and **every export is a public, unauthenticated POST endpoint**, whether or not a component calls it. Treat every argument as attacker-controlled: derive the user, session and policy (lifetimes, link hosts, IdP identities) on the server from the caller's signed cookie and ZITADEL, never from the arguments.
- **`src/lib/server/`**: server-only code. Every file imports `"server-only"`. Helpers that take identity, links or lifetimes as parameters belong here.
- **`src/lib/` (top level)**: code shared with client components only.
- `"use server"` is not allowed anywhere else, inline directives included. The `login/module-boundaries` ESLint rule (`checks/eslint-module-boundaries.mjs`) enforces the layout.
- The build fails when the published actions differ from `checks/server-actions.allowlist.json` (`checks/server-actions.mjs`). Adding an action means reviewing it and adding it there.
## Base Path & Redirects (critical — read before touching any redirect logic)
- **The login app is served under a non-root base path in production.** ZITADEL Cloud and the official container image are built with `NEXT_PUBLIC_BASE_PATH=/ui/v2/login` (see `apps/login/.env`; the value is inlined at build time by Next.js). Never assume the app lives at the domain root.
- **`constructUrl()` (`src/lib/server/service-url.ts`) prepends the base path and must ONLY ever receive root-relative paths** (`/loginname`, `/password?...`). Passing an absolute URL glues the base path onto it and produces a broken redirect like `https://<host>/ui/v2/loginhttps://login.microsoftonline.com/...`.
- **Some redirect targets ARE absolute URLs**: IdP authorize URLs returned by `startIdentityProviderFlow`, OIDC callback URLs from `createCallback`, and SAML endpoints from `createResponse`. When handling a redirect value that could be absolute, branch on `isExternalUrl()` first, validate absolute URLs with `isSafeRedirectUri()`, and pass them to `NextResponse.redirect` (server) / `window.location.href` (client) untouched. Canonical pattern: `resolveLoginHint` in `src/lib/server/flow-initiation.ts` and `handleServerActionResponse` in `src/lib/client-utils.ts`.
- **An empty base path masks this whole bug class**: with `NEXT_PUBLIC_BASE_PATH` unset, `new URL("" + absoluteUrl, origin)` still parses the absolute URL correctly, so local setups without the base path won't reproduce base-path bugs. Always test redirect changes with `NEXT_PUBLIC_BASE_PATH=/ui/v2/login` set, and verify the raw `Location` header (e.g. `curl -I`), not just browser behavior.
## Verified Nx Targets
- **Dev Server**: `pnpm nx run @zitadel/login:dev`
- **Build**: `pnpm nx run @zitadel/login:build`
- **Lint**: `pnpm nx run @zitadel/login:lint`
- **Test (all)**: `pnpm nx run @zitadel/login:test`
- **Test (unit)**: `pnpm nx run @zitadel/login:test-unit`
- **Test (integration)**: `pnpm nx run @zitadel/login:test-integration`
- **Pack (Docker)**: `pnpm nx run @zitadel/login:pack` — builds a local Docker image `zitadel/zitadel-login:local`. Requires Docker daemon.
+22
View File
@@ -0,0 +1,22 @@
FROM node:24-alpine
WORKDIR /app
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs
# If /.env-file/.env is mounted into the container, its variables are made available to the server before it starts up.
RUN mkdir -p /.env-file && touch /.env-file/.env && chown -R nextjs:nodejs /.env-file
COPY --chown=nextjs:nodejs .next/standalone ./
USER nextjs
ENV HOSTNAME="::" \
PORT="3000" \
NODE_ENV="production" \
NODE_OPTIONS="--use-openssl-ca --require /app/load-ssl-cert-dir.cjs" \
SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt" \
ZITADEL_TLS_ENABLED="false" \
OTEL_SERVICE_NAME="zitadel-login" \
OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD ["/usr/local/bin/node", "/app/healthcheck.mjs", "/ui/v2/login/ready"]
ENTRYPOINT ["/app/entrypoint.sh", "node", "apps/login/server.js"]
+23
View File
@@ -0,0 +1,23 @@
FROM registry.access.redhat.com/ubi9/nodejs-24
USER root
RUN update-crypto-policies --set FIPS
WORKDIR /app
# If /.env-file/.env is mounted into the container, its variables are made available to the server before it starts up.
RUN mkdir -p /.env-file && touch /.env-file/.env && chown -R 1001:0 /.env-file
COPY --chown=1001:0 .next/standalone ./
USER 1001
ENV HOSTNAME="::" \
PORT="3000" \
NODE_ENV="production" \
NODE_OPTIONS="--use-openssl-ca --openssl-shared-config --enable-fips --require /app/load-ssl-cert-dir.cjs" \
SSL_CERT_FILE="/etc/pki/tls/certs/ca-bundle.crt" \
ZITADEL_TLS_ENABLED="false" \
ZITADEL_FIPS_REQUIRED="true" \
OTEL_SERVICE_NAME="zitadel-login" \
OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD ["node", "/app/healthcheck.mjs", "/ui/v2/login/ready"]
ENTRYPOINT ["/app/entrypoint.sh", "node", "apps/login/server.js"]
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 ZITADEL
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+212
View File
@@ -0,0 +1,212 @@
# Current Theme System Architecture
Our theme system provides a simple, environment variable-driven approach for consistent component styling and responsive layout switching.
## 🏗️ **Current Implementation**
### **Environment Variable Configuration**
```bash
# .env.local
NEXT_PUBLIC_THEME_ROUNDNESS=mid # edgy | mid | full
NEXT_PUBLIC_THEME_LAYOUT=side-by-side # side-by-side | top-to-bottom
NEXT_PUBLIC_THEME_APPEARANCE=material # flat | material
NEXT_PUBLIC_THEME_SPACING=regular # regular | compact
```
### **Core Theme Functions**
```tsx
// Server-safe theme configuration
import { getThemeConfig, getComponentRoundness } from "@/lib/theme";
// Get full theme settings
const themeConfig = getThemeConfig();
// Returns: { roundness: 'mid', layout: 'side-by-side', appearance: 'material', ... }
// Get component-specific styling
const buttonRoundness = getComponentRoundness("button");
// Returns: "rounded-md" (CSS class)
```
### **Responsive Layout Hook**
```tsx
// Client-side responsive layout detection
import { useResponsiveLayout } from "@/lib/theme-hooks";
function MyComponent() {
const { isSideBySide, isResponsiveOverride } = useResponsiveLayout();
return <div className={isSideBySide ? "flex" : "flex-col"}>{/* Layout adapts automatically */}</div>;
}
```
## 🎨 **Component Integration Patterns**
### **Pattern 1: Direct Function Calls** (Current Standard)
```tsx
import { getComponentRoundness } from "@/lib/theme";
export function Button({ children, variant = "primary" }) {
const roundness = getComponentRoundness("button");
return (
<button className={`${roundness} px-4 py-2 ${variant === "primary" ? "bg-blue-500" : "bg-gray-500"}`}>{children}</button>
);
}
```
### **Pattern 2: Component-Specific Helper Functions**
```tsx
import { getComponentRoundness } from "@/lib/theme";
// Helper function for UserAvatar
function getUserAvatarRoundness(): string {
return getComponentRoundness("avatarContainer");
}
export function UserAvatar({ loginName, displayName }) {
const roundness = getUserAvatarRoundness();
return <div className={`flex border p-1 ${roundness}`}>{/* Avatar content */}</div>;
}
```
### **Pattern 3: Theme-Aware Layout Components**
```tsx
import { useResponsiveLayout } from "@/lib/theme-hooks";
export function DynamicTheme({ children, branding }) {
const { isSideBySide } = useResponsiveLayout();
return (
<ThemeWrapper branding={branding}>
{isSideBySide ? (
// Side-by-side layout for desktop
<div className="flex max-w-[1200px]">
<div className="w-1/2">{/* Left content */}</div>
<div className="w-1/2">{/* Right content */}</div>
</div>
) : (
// Top-to-bottom layout for mobile
<div className="flex-col max-w-[440px]">{children}</div>
)}
</ThemeWrapper>
);
}
```
## 🎯 **Theme Configuration Structure**
### **Component Roundness Mapping**
```tsx
export interface ComponentRoundnessConfig {
card: ThemeRoundness; // "rounded-lg" | "rounded-none" | "rounded-3xl"
button: ThemeRoundness; // "rounded-md" | "rounded-none" | "rounded-full"
input: ThemeRoundness; // "rounded-md" | "rounded-none" | "rounded-full pl-4"
image: ThemeRoundness; // "rounded-lg" | "rounded-none" | "rounded-full"
avatar: ThemeRoundness; // "rounded-lg" | "rounded-none" | "rounded-full"
avatarContainer: ThemeRoundness; // "rounded-md" | "rounded-none" | "rounded-full"
themeSwitch: ThemeRoundness; // "rounded-md" | "rounded-none" | "rounded-full"
}
```
### **Responsive Layout Logic**
```tsx
// Automatic layout switching based on screen size
const isSideBySide = themeConfig.layout === "side-by-side" && !isMdOrSmaller;
// md breakpoint: 768px (Tailwind default)
// Below 768px: Always use top-to-bottom layout
// Above 768px: Use configured layout (side-by-side or top-to-bottom)
```
## � **File Structure**
```
src/lib/
├── theme.ts # Server-safe theme functions
├── theme-hooks.ts # Client-side responsive hooks
└── themeUtils.tsx # Legacy utility functions
src/components/
├── dynamic-theme.tsx # Main responsive layout component
├── theme-wrapper.tsx # Theme application wrapper
├── button.tsx # Example themed component
├── card.tsx # Example themed component
└── user-avatar.tsx # Example themed component
```
## � **Usage Examples**
### **Adding Theme Support to New Components**
```tsx
import { getComponentRoundness } from "@/lib/theme";
export function NewComponent() {
// Get theme-appropriate styling
const roundness = getComponentRoundness("card");
return <div className={`p-4 ${roundness} bg-white`}>{/* Component content */}</div>;
}
```
### **Using Responsive Layout**
```tsx
import { useResponsiveLayout } from "@/lib/theme-hooks";
export function ResponsiveComponent() {
const { isSideBySide } = useResponsiveLayout();
return <div className={isSideBySide ? "text-left" : "text-center"}>Content adapts to layout</div>;
}
```
### **Page Layout Integration**
```tsx
import { DynamicTheme } from "@/components/dynamic-theme";
export default function LoginPage() {
return (
<DynamicTheme branding={branding}>
<div className="flex flex-col space-y-4">
<h1>Login Title</h1>
<p>Description text</p>
</div>
<div className="w-full">
<LoginForm />
</div>
</DynamicTheme>
);
}
```
## ⚡ **Key Features**
1. **Environment Variable Configuration**: Simple `.env.local` setup
2. **Server-Safe Functions**: Work in both SSR and client components
3. **Responsive Layout Switching**: Automatic mobile/desktop adaptation
4. **Component-Specific Styling**: Different roundness per component type
5. **Type Safety**: Full TypeScript support
6. **Zero Runtime Dependencies**: No context providers or complex state
7. **SSR Compatible**: No hydration mismatches
## 🔄 **Architecture Benefits**
- **Simple**: Environment variables → CSS classes
- **Fast**: No runtime theme calculations or context switching
- **Reliable**: Server-side rendering compatible
- **Scalable**: Easy to add new theme properties
- **Maintainable**: Clear separation between layout and styling concerns
This architecture provides a solid foundation for environment-driven theming while keeping the implementation simple and performant!
@@ -0,0 +1,138 @@
# Login App Theme Customization Guide
This guide helps you customize the appearance of your ZITADEL login application for a personalized user experience.
## Quick Start
1. Copy the theme variables you want to customize from `.env.theme.example` to your `.env.local` file
2. Restart your application
3. Your theme changes will be applied automatically
## Theme Options
### 🔄 Roundness (`NEXT_PUBLIC_THEME_ROUNDNESS`)
Controls how rounded the UI elements appear:
- **`edgy`** - Sharp, rectangular corners (modern tech, corporate)
- **`mid`** - Medium rounded corners (balanced, professional)
- **`full`** - Fully rounded corners (friendly, approachable)
### 📱 Layout (`NEXT_PUBLIC_THEME_LAYOUT`)
Controls the overall page structure:
- **`side-by-side`** - Brand section on left, form on right (desktop view)
- **`top-to-bottom`** - Brand section on top, form below (mobile-first)
### 📏 Spacing (`NEXT_PUBLIC_THEME_SPACING`)
Controls spacing and padding throughout the interface:
- **`regular`** - Standard spacing with comfortable padding (p-6, space-y-6)
- **`compact`** - Tighter spacing for information-dense layouts (p-4, space-y-4)
### 🎨 Appearance (`NEXT_PUBLIC_THEME_APPEARANCE`)
Complete design philosophies:
- **`flat`** - Minimal flat design with cards matching background color, subtle borders, and normal typography
- **`material`** - Material Design inspired with elevated cards, proper contrast, and medium typography
### 🖼️ Background Image (`NEXT_PUBLIC_THEME_BACKGROUND_IMAGE`)
Add a custom background image:
- Use local images: `/images/my-background.jpg` (place in `public/images/`)
- Use external URLs: `https://example.com/background.jpg`
- Leave empty for solid color backgrounds
## Example Settings
### Tech Startup
```env
NEXT_PUBLIC_THEME_ROUNDNESS=full
NEXT_PUBLIC_THEME_LAYOUT=side-by-side
NEXT_PUBLIC_THEME_SPACING=regular
NEXT_PUBLIC_THEME_APPEARANCE=material
NEXT_PUBLIC_THEME_BACKGROUND_IMAGE=/images/tech-gradient.jpg
```
### Corporate Bank
```env
NEXT_PUBLIC_THEME_ROUNDNESS=edgy
NEXT_PUBLIC_THEME_LAYOUT=top-to-bottom
NEXT_PUBLIC_THEME_SPACING=regular
NEXT_PUBLIC_THEME_APPEARANCE=material
```
### Minimal SaaS
```env
NEXT_PUBLIC_THEME_ROUNDNESS=mid
NEXT_PUBLIC_THEME_LAYOUT=side-by-side
NEXT_PUBLIC_THEME_SPACING=compact
NEXT_PUBLIC_THEME_APPEARANCE=flat
```
### Creative Agency
```env
NEXT_PUBLIC_THEME_ROUNDNESS=full
NEXT_PUBLIC_THEME_LAYOUT=top-to-bottom
NEXT_PUBLIC_THEME_SPACING=regular
NEXT_PUBLIC_THEME_APPEARANCE=material
NEXT_PUBLIC_THEME_BACKGROUND_IMAGE=/images/creative-workspace.jpg
```
### Flat Design App
```env
NEXT_PUBLIC_THEME_ROUNDNESS=mid
NEXT_PUBLIC_THEME_LAYOUT=side-by-side
NEXT_PUBLIC_THEME_SPACING=compact
NEXT_PUBLIC_THEME_APPEARANCE=flat
```
### Material Design System
```env
NEXT_PUBLIC_THEME_ROUNDNESS=mid
NEXT_PUBLIC_THEME_LAYOUT=side-by-side
NEXT_PUBLIC_THEME_SPACING=regular
NEXT_PUBLIC_THEME_APPEARANCE=material
```
## Advanced Customization
For more detailed customization beyond these presets, you can:
1. **Custom CSS**: Add your own CSS files in the `src/styles/` directory
2. **Component Override**: Modify the theme settings in `src/lib/theme.ts`
3. **Custom Appearances**: Add new appearance options to the `APPEARANCE_STYLES` or `SPACING_STYLES` objects
## Troubleshooting
### Theme not applying
- Ensure you're using `NEXT_PUBLIC_` prefix for all theme variables (`NEXT_PUBLIC_THEME_ROUNDNESS`, `NEXT_PUBLIC_THEME_SPACING`, `NEXT_PUBLIC_THEME_APPEARANCE`, etc.)
- Restart your development server after changing environment variables
- Check that your `.env.local` file is in the root of the login app directory
### Background image not loading
- Verify the image path is correct
- For external URLs, ensure the domain is accessible
- Check browser console for any loading errors
### Layout issues on mobile
- Test your theme on different screen sizes
- The `top-to-bottom` layout is generally more mobile-friendly
- Some combinations work better on certain screen sizes
## Support
For additional customization needs or questions, please refer to the ZITADEL documentation or community forums.
@@ -0,0 +1 @@
go-command
@@ -0,0 +1,30 @@
import js from "@eslint/js";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import prettierConfig from "eslint-config-prettier/flat";
export default [
{ ignores: ["node_modules/**"] },
js.configs.recommended,
{
files: ["**/*.ts"],
plugins: {
"@typescript-eslint": tsPlugin,
},
languageOptions: {
parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
...tsPlugin.configs.recommended.rules,
"no-unused-vars": "off",
"no-undef": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_" },
],
},
},
prettierConfig,
];
@@ -0,0 +1,11 @@
ARG LOGIN_TEST_ACCEPTANCE_GOLANG_TAG="golang:1.24-alpine"
FROM ${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG}
RUN apk add curl jq
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o /go-command .
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s \
CMD curl -f http://localhost:${PORT}/healthy || exit 1
ENTRYPOINT [ "/go-command" ]
@@ -0,0 +1,27 @@
module github.com/zitadel/typescript/acceptance/idp/oidc
go 1.24.1
require github.com/zitadel/oidc/v3 v3.37.0
require (
github.com/bmatcuk/doublestar/v4 v4.8.1 // indirect
github.com/go-chi/chi/v5 v5.4.0 // indirect
github.com/go-jose/go-jose/v4 v4.1.7 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/muhlemmer/gu v0.3.1 // indirect
github.com/muhlemmer/httpforwarded v0.1.0 // indirect
github.com/rs/cors v1.11.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/zitadel/logging v0.6.2 // indirect
github.com/zitadel/schema v1.3.1 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
golang.org/x/oauth2 v0.28.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.23.0 // indirect
)
@@ -0,0 +1,69 @@
github.com/bmatcuk/doublestar/v4 v4.8.1 h1:54Bopc5c2cAvhLRAzqOGCYHYyhcDHsFF4wWIR5wKP38=
github.com/bmatcuk/doublestar/v4 v4.8.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-chi/chi/v5 v5.4.0 h1:+ufzvFTGKyin26Or5DLrlIDq4ygIDBVcj7oVNeeaYFE=
github.com/go-chi/chi/v5 v5.4.0/go.mod h1:d1IG7GtKPSjPyBP365PH8sAGVHk3qfB/IhjFNRH1wWM=
github.com/go-jose/go-jose/v4 v4.1.7 h1:Nac/98uT5LPkfbiFuYa8ktf62a2VxwQ4xbq1GK8pV5E=
github.com/go-jose/go-jose/v4 v4.1.7/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA=
github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/muhlemmer/gu v0.3.1 h1:7EAqmFrW7n3hETvuAdmFmn4hS8W+z3LgKtrnow+YzNM=
github.com/muhlemmer/gu v0.3.1/go.mod h1:YHtHR+gxM+bKEIIs7Hmi9sPT3ZDUvTN/i88wQpZkrdM=
github.com/muhlemmer/httpforwarded v0.1.0 h1:x4DLrzXdliq8mprgUMR0olDvHGkou5BJsK/vWUetyzY=
github.com/muhlemmer/httpforwarded v0.1.0/go.mod h1:yo9czKedo2pdZhoXe+yDkGVbU0TJ0q9oQ90BVoDEtw0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA=
github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/zitadel/logging v0.6.2 h1:MW2kDDR0ieQynPZ0KIZPrh9ote2WkxfBif5QoARDQcU=
github.com/zitadel/logging v0.6.2/go.mod h1:z6VWLWUkJpnNVDSLzrPSQSQyttysKZ6bCRongw0ROK4=
github.com/zitadel/oidc/v3 v3.37.0 h1:nYATWlnP7f18XiAbw6upUruBaqfB1kUrXrSTf1EYGO8=
github.com/zitadel/oidc/v3 v3.37.0/go.mod h1:/xDan4OUQhguJ4Ur73OOJrtugvR164OMnidXP9xfVNw=
github.com/zitadel/schema v1.3.1 h1:QT3kwiRIRXXLVAs6gCK/u044WmUVh6IlbLXUsn6yRQU=
github.com/zitadel/schema v1.3.1/go.mod h1:071u7D2LQacy1HAN+YnMd/mx1qVE2isb0Mjeqg46xnU=
go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw=
go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8=
go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc=
go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8=
go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4=
go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ=
golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc=
golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
@@ -0,0 +1,186 @@
package main
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"log"
"log/slog"
"net/http"
"os"
"os/signal"
"strings"
"syscall"
"time"
"github.com/zitadel/oidc/v3/example/server/exampleop"
"github.com/zitadel/oidc/v3/example/server/storage"
)
func main() {
apiURL := os.Getenv("API_URL")
pat := readPAT(os.Getenv("PAT_FILE"))
domain := os.Getenv("API_DOMAIN")
schema := os.Getenv("SCHEMA")
host := os.Getenv("HOST")
port := os.Getenv("PORT")
logger := slog.New(
slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{
AddSource: true,
Level: slog.LevelDebug,
}),
)
issuer := fmt.Sprintf("%s://%s:%s/", schema, host, port)
redirectURI := fmt.Sprintf("%s/idps/callback", apiURL)
clientID := "web"
clientSecret := "secret"
storage.RegisterClients(
storage.WebClient(clientID, clientSecret, redirectURI),
)
storage := storage.NewStorage(storage.NewUserStore(issuer))
router := exampleop.SetupServer(issuer, storage, logger, false)
server := &http.Server{
Addr: ":" + port,
Handler: router,
}
go func() {
if err := server.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) {
log.Fatalf("HTTP server error: %v", err)
}
log.Println("Stopped serving new connections.")
}()
createZitadelResources(apiURL, pat, domain, issuer, clientID, clientSecret)
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
<-sigChan
shutdownCtx, shutdownRelease := context.WithTimeout(context.Background(), 10*time.Second)
defer shutdownRelease()
if err := server.Shutdown(shutdownCtx); err != nil {
log.Fatalf("HTTP shutdown error: %v", err)
}
}
func readPAT(path string) string {
f, err := os.Open(path)
if err != nil {
panic(err)
}
pat, err := io.ReadAll(f)
if err != nil {
panic(err)
}
return strings.Trim(string(pat), "\n")
}
func createZitadelResources(apiURL, pat, domain, issuer, clientID, clientSecret string) error {
idpID, err := CreateIDP(apiURL, pat, domain, issuer, clientID, clientSecret)
if err != nil {
return err
}
return ActivateIDP(apiURL, pat, domain, idpID)
}
type createIDP struct {
Name string `json:"name"`
Issuer string `json:"issuer"`
ClientId string `json:"clientId"`
ClientSecret string `json:"clientSecret"`
Scopes []string `json:"scopes"`
ProviderOptions providerOptions `json:"providerOptions"`
IsIdTokenMapping bool `json:"isIdTokenMapping"`
UsePkce bool `json:"usePkce"`
}
type providerOptions struct {
IsLinkingAllowed bool `json:"isLinkingAllowed"`
IsCreationAllowed bool `json:"isCreationAllowed"`
IsAutoCreation bool `json:"isAutoCreation"`
IsAutoUpdate bool `json:"isAutoUpdate"`
AutoLinking string `json:"autoLinking"`
}
type idp struct {
ID string `json:"id"`
}
func CreateIDP(apiURL, pat, domain string, issuer, clientID, clientSecret string) (string, error) {
createIDP := &createIDP{
Name: "OIDC",
Issuer: issuer,
ClientId: clientID,
ClientSecret: clientSecret,
Scopes: []string{"openid", "profile", "email"},
ProviderOptions: providerOptions{
IsLinkingAllowed: true,
IsCreationAllowed: true,
IsAutoCreation: true,
IsAutoUpdate: true,
AutoLinking: "AUTO_LINKING_OPTION_USERNAME",
},
IsIdTokenMapping: false,
UsePkce: false,
}
resp, err := doRequestWithHeaders(apiURL+"/admin/v1/idps/generic_oidc", pat, domain, createIDP)
if err != nil {
return "", err
}
data, err := io.ReadAll(resp.Body)
if err != nil {
return "", err
}
defer resp.Body.Close()
idp := new(idp)
if err := json.Unmarshal(data, idp); err != nil {
return "", err
}
return idp.ID, nil
}
type activateIDP struct {
IdpId string `json:"idpId"`
}
func ActivateIDP(apiURL, pat, domain string, idpID string) error {
activateIDP := &activateIDP{
IdpId: idpID,
}
_, err := doRequestWithHeaders(apiURL+"/admin/v1/policies/login/idps", pat, domain, activateIDP)
return err
}
func doRequestWithHeaders(apiURL, pat, domain string, body any) (*http.Response, error) {
data, err := json.Marshal(body)
if err != nil {
return nil, err
}
req, err := http.NewRequest(http.MethodPost, apiURL, io.NopCloser(bytes.NewReader(data)))
if err != nil {
return nil, err
}
values := http.Header{}
values.Add("Authorization", "Bearer "+pat)
values.Add("x-forwarded-host", domain)
values.Add("Content-Type", "application/json")
req.Header = values
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, err
}
return resp, nil
}
@@ -0,0 +1,16 @@
module github.com/zitadel/typescript/acceptance/idp/saml
go 1.25.0
require (
github.com/crewjam/saml v0.4.14
github.com/mattermost/xml-roundtrip-validator v0.1.0
github.com/zenazn/goji v1.0.1
golang.org/x/crypto v0.52.0
)
require (
github.com/beevik/etree v1.1.0 // indirect
github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/russellhaering/goxmldsig v1.3.0 // indirect
)
@@ -0,0 +1,49 @@
github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs=
github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c=
github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU=
github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ=
github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattermost/xml-roundtrip-validator v0.1.0 h1:RXbVD2UAl7A7nOTR4u7E3ILa4IbtvKBHw64LDsmu9hU=
github.com/mattermost/xml-roundtrip-validator v0.1.0/go.mod h1:qccnGMcpgwcNaBnxqpJpWWUiPNr5H3O8eDgGV9gT5To=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/russellhaering/goxmldsig v1.3.0 h1:DllIWUgMy0cRUMfGiASiYEa35nsieyD3cigIwLonTPM=
github.com/russellhaering/goxmldsig v1.3.0/go.mod h1:gM4MDENBQf7M+V824SGfyIUVFWydB7n0KkEubVJl+Tw=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/zenazn/goji v1.0.1 h1:4lbD8Mx2h7IvloP7r2C0D6ltZP6Ufip8Hn0wmSK5LR8=
github.com/zenazn/goji v1.0.1/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988=
golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
@@ -0,0 +1,328 @@
package main
import (
"bytes"
"crypto"
"crypto/x509"
"encoding/base64"
"encoding/json"
"encoding/pem"
"encoding/xml"
"errors"
"io"
"log"
"net/http"
"net/http/httptest"
"net/url"
"os"
"os/signal"
"strings"
"syscall"
"github.com/crewjam/saml"
"github.com/crewjam/saml/logger"
"github.com/crewjam/saml/samlidp"
xrv "github.com/mattermost/xml-roundtrip-validator"
"github.com/zenazn/goji"
"github.com/zenazn/goji/bind"
"github.com/zenazn/goji/web"
"golang.org/x/crypto/bcrypt"
)
var key = func() crypto.PrivateKey {
b, _ := pem.Decode([]byte(`-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA0OhbMuizgtbFOfwbK7aURuXhZx6VRuAs3nNibiuifwCGz6u9
yy7bOR0P+zqN0YkjxaokqFgra7rXKCdeABmoLqCC0U+cGmLNwPOOA0PaD5q5xKhQ
4Me3rt/R9C4Ca6k3/OnkxnKwnogcsmdgs2l8liT3qVHP04Oc7Uymq2v09bGb6nPu
fOrkXS9F6mSClxHG/q59AGOWsXK1xzIRV1eu8W2SNdyeFVU1JHiQe444xLoPul5t
InWasKayFsPlJfWNc8EoU8COjNhfo/GovFTHVjh9oUR/gwEFVwifIHihRE0Hazn2
EQSLaOr2LM0TsRsQroFjmwSGgI+X2bfbMTqWOQIDAQABAoIBAFWZwDTeESBdrLcT
zHZe++cJLxE4AObn2LrWANEv5AeySYsyzjRBYObIN9IzrgTb8uJ900N/zVr5VkxH
xUa5PKbOcowd2NMfBTw5EEnaNbILLm+coHdanrNzVu59I9TFpAFoPavrNt/e2hNo
NMGPSdOkFi81LLl4xoadz/WR6O/7N2famM+0u7C2uBe+TrVwHyuqboYoidJDhO8M
w4WlY9QgAUhkPyzZqrl+VfF1aDTGVf4LJgaVevfFCas8Ws6DQX5q4QdIoV6/0vXi
B1M+aTnWjHuiIzjBMWhcYW2+I5zfwNWRXaxdlrYXRukGSdnyO+DH/FhHePJgmlkj
NInADDkCgYEA6MEQFOFSCc/ELXYWgStsrtIlJUcsLdLBsy1ocyQa2lkVUw58TouW
RciE6TjW9rp31pfQUnO2l6zOUC6LT9Jvlb9PSsyW+rvjtKB5PjJI6W0hjX41wEO6
fshFELMJd9W+Ezao2AsP2hZJ8McCF8no9e00+G4xTAyxHsNI2AFTCQcCgYEA5cWZ
JwNb4t7YeEajPt9xuYNUOQpjvQn1aGOV7KcwTx5ELP/Hzi723BxHs7GSdrLkkDmi
Gpb+mfL4wxCt0fK0i8GFQsRn5eusyq9hLqP/bmjpHoXe/1uajFbE1fZQR+2LX05N
3ATlKaH2hdfCJedFa4wf43+cl6Yhp6ZA0Yet1r8CgYEAwiu1j8W9G+RRA5/8/DtO
yrUTOfsbFws4fpLGDTA0mq0whf6Soy/96C90+d9qLaC3srUpnG9eB0CpSOjbXXbv
kdxseLkexwOR3bD2FHX8r4dUM2bzznZyEaxfOaQypN8SV5ME3l60Fbr8ajqLO288
wlTmGM5Mn+YCqOg/T7wjGmcCgYBpzNfdl/VafOROVbBbhgXWtzsz3K3aYNiIjbp+
MunStIwN8GUvcn6nEbqOaoiXcX4/TtpuxfJMLw4OvAJdtxUdeSmEee2heCijV6g3
ErrOOy6EqH3rNWHvlxChuP50cFQJuYOueO6QggyCyruSOnDDuc0BM0SGq6+5g5s7
H++S/wKBgQDIkqBtFr9UEf8d6JpkxS0RXDlhSMjkXmkQeKGFzdoJcYVFIwq8jTNB
nJrVIGs3GcBkqGic+i7rTO1YPkquv4dUuiIn+vKZVoO6b54f+oPBXd4S0BnuEqFE
rdKNuCZhiaE2XD9L/O9KP1fh5bfEcKwazQ23EvpJHBMm8BGC+/YZNw==
-----END RSA PRIVATE KEY-----`))
k, _ := x509.ParsePKCS1PrivateKey(b.Bytes)
return k
}()
var cert = func() *x509.Certificate {
b, _ := pem.Decode([]byte(`-----BEGIN CERTIFICATE-----
MIIDBzCCAe+gAwIBAgIJAPr/Mrlc8EGhMA0GCSqGSIb3DQEBBQUAMBoxGDAWBgNV
BAMMD3d3dy5leGFtcGxlLmNvbTAeFw0xNTEyMjgxOTE5NDVaFw0yNTEyMjUxOTE5
NDVaMBoxGDAWBgNVBAMMD3d3dy5leGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBANDoWzLos4LWxTn8Gyu2lEbl4WcelUbgLN5zYm4ron8A
hs+rvcsu2zkdD/s6jdGJI8WqJKhYK2u61ygnXgAZqC6ggtFPnBpizcDzjgND2g+a
ucSoUODHt67f0fQuAmupN/zp5MZysJ6IHLJnYLNpfJYk96lRz9ODnO1Mpqtr9PWx
m+pz7nzq5F0vRepkgpcRxv6ufQBjlrFytccyEVdXrvFtkjXcnhVVNSR4kHuOOMS6
D7pebSJ1mrCmshbD5SX1jXPBKFPAjozYX6PxqLxUx1Y4faFEf4MBBVcInyB4oURN
B2s59hEEi2jq9izNE7EbEK6BY5sEhoCPl9m32zE6ljkCAwEAAaNQME4wHQYDVR0O
BBYEFB9ZklC1Ork2zl56zg08ei7ss/+iMB8GA1UdIwQYMBaAFB9ZklC1Ork2zl56
zg08ei7ss/+iMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAVoTSQ5
pAirw8OR9FZ1bRSuTDhY9uxzl/OL7lUmsv2cMNeCB3BRZqm3mFt+cwN8GsH6f3uv
NONIhgFpTGN5LEcXQz89zJEzB+qaHqmbFpHQl/sx2B8ezNgT/882H2IH00dXESEf
y/+1gHg2pxjGnhRBN6el/gSaDiySIMKbilDrffuvxiCfbpPN0NRRiPJhd2ay9KuL
/RxQRl1gl9cHaWiouWWba1bSBb2ZPhv2rPMUsFo98ntkGCObDX6Y1SpkqmoTbrsb
GFsTG2DLxnvr4GdN1BSr0Uu/KV3adj47WkXVPeMYQti/bQmxQB8tRFhrw80qakTL
UzreO96WzlBBMtY=
-----END CERTIFICATE-----`))
c, _ := x509.ParseCertificate(b.Bytes)
return c
}()
// Example from https://github.com/crewjam/saml/blob/main/example/idp/idp.go
func main() {
apiURL := os.Getenv("API_URL")
pat := readPAT(os.Getenv("PAT_FILE"))
domain := os.Getenv("API_DOMAIN")
schema := os.Getenv("SCHEMA")
host := os.Getenv("HOST")
port := os.Getenv("PORT")
baseURL, err := url.Parse(schema + "://" + host + ":" + port)
if err != nil {
panic(err)
}
idpServer, err := samlidp.New(samlidp.Options{
URL: *baseURL,
Logger: logger.DefaultLogger,
Key: key,
Certificate: cert,
Store: &samlidp.MemoryStore{},
})
if err != nil {
panic(err)
}
metadata, err := xml.MarshalIndent(idpServer.IDP.Metadata(), "", " ")
if err != nil {
panic(err)
}
idpID, err := createZitadelResources(apiURL, pat, domain, metadata)
if err != nil {
panic(err)
}
lis := bind.Socket(":" + baseURL.Port())
goji.Handle("/*", idpServer)
go func() {
goji.ServeListener(lis)
}()
addService(idpServer, apiURL+"/idps/"+idpID+"/saml/metadata")
addUsers(idpServer)
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
<-sigChan
if err := lis.Close(); err != nil {
log.Fatalf("HTTP shutdown error: %v", err)
}
}
func readPAT(path string) string {
f, err := os.Open(path)
if err != nil {
panic(err)
}
pat, err := io.ReadAll(f)
if err != nil {
panic(err)
}
return strings.Trim(string(pat), "\n")
}
func addService(idpServer *samlidp.Server, spURLStr string) {
metadataResp, err := http.Get(spURLStr)
if err != nil {
panic(err)
}
defer metadataResp.Body.Close()
idpServer.HandlePutService(
web.C{URLParams: map[string]string{"id": spURLStr}},
httptest.NewRecorder(),
httptest.NewRequest(http.MethodPost, spURLStr, metadataResp.Body),
)
}
func getSPMetadata(r io.Reader) (spMetadata *saml.EntityDescriptor, err error) {
var data []byte
if data, err = io.ReadAll(r); err != nil {
return nil, err
}
spMetadata = &saml.EntityDescriptor{}
if err := xrv.Validate(bytes.NewBuffer(data)); err != nil {
return nil, err
}
if err := xml.Unmarshal(data, &spMetadata); err != nil {
if err.Error() == "expected element type <EntityDescriptor> but have <EntitiesDescriptor>" {
entities := &saml.EntitiesDescriptor{}
if err := xml.Unmarshal(data, &entities); err != nil {
return nil, err
}
for _, e := range entities.EntityDescriptors {
if len(e.SPSSODescriptors) > 0 {
return &e, nil
}
}
// there were no SPSSODescriptors in the response
return nil, errors.New("metadata contained no service provider metadata")
}
return nil, err
}
return spMetadata, nil
}
func addUsers(idpServer *samlidp.Server) {
hashedPassword, _ := bcrypt.GenerateFromPassword([]byte("hunter2"), bcrypt.DefaultCost)
err := idpServer.Store.Put("/users/alice", samlidp.User{Name: "alice",
HashedPassword: hashedPassword,
Groups: []string{"Administrators", "Users"},
Email: "alice@example.com",
CommonName: "Alice Smith",
Surname: "Smith",
GivenName: "Alice",
})
if err != nil {
panic(err)
}
err = idpServer.Store.Put("/users/bob", samlidp.User{
Name: "bob",
HashedPassword: hashedPassword,
Groups: []string{"Users"},
Email: "bob@example.com",
CommonName: "Bob Smith",
Surname: "Smith",
GivenName: "Bob",
})
if err != nil {
panic(err)
}
}
func createZitadelResources(apiURL, pat, domain string, metadata []byte) (string, error) {
idpID, err := CreateIDP(apiURL, pat, domain, metadata)
if err != nil {
return "", err
}
return idpID, ActivateIDP(apiURL, pat, domain, idpID)
}
type createIDP struct {
Name string `json:"name"`
MetadataXml string `json:"metadataXml"`
Binding string `json:"binding"`
WithSignedRequest bool `json:"withSignedRequest"`
ProviderOptions providerOptions `json:"providerOptions"`
NameIdFormat string `json:"nameIdFormat"`
}
type providerOptions struct {
IsLinkingAllowed bool `json:"isLinkingAllowed"`
IsCreationAllowed bool `json:"isCreationAllowed"`
IsAutoCreation bool `json:"isAutoCreation"`
IsAutoUpdate bool `json:"isAutoUpdate"`
AutoLinking string `json:"autoLinking"`
}
type idp struct {
ID string `json:"id"`
}
func CreateIDP(apiURL, pat, domain string, idpMetadata []byte) (string, error) {
encoded := make([]byte, base64.URLEncoding.EncodedLen(len(idpMetadata)))
base64.URLEncoding.Encode(encoded, idpMetadata)
createIDP := &createIDP{
Name: "CREWJAM",
MetadataXml: string(encoded),
Binding: "SAML_BINDING_REDIRECT",
WithSignedRequest: false,
ProviderOptions: providerOptions{
IsLinkingAllowed: true,
IsCreationAllowed: true,
IsAutoCreation: true,
IsAutoUpdate: true,
AutoLinking: "AUTO_LINKING_OPTION_USERNAME",
},
NameIdFormat: "SAML_NAME_ID_FORMAT_PERSISTENT",
}
resp, err := doRequestWithHeaders(apiURL+"/admin/v1/idps/saml", pat, domain, createIDP)
if err != nil {
return "", err
}
data, err := io.ReadAll(resp.Body)
if err != nil {
return "", err
}
defer resp.Body.Close()
idp := new(idp)
if err := json.Unmarshal(data, idp); err != nil {
return "", err
}
return idp.ID, nil
}
type activateIDP struct {
IdpId string `json:"idpId"`
}
func ActivateIDP(apiURL, pat, domain string, idpID string) error {
activateIDP := &activateIDP{
IdpId: idpID,
}
_, err := doRequestWithHeaders(apiURL+"/admin/v1/policies/login/idps", pat, domain, activateIDP)
return err
}
func doRequestWithHeaders(apiURL, pat, domain string, body any) (*http.Response, error) {
data, err := json.Marshal(body)
if err != nil {
return nil, err
}
req, err := http.NewRequest(http.MethodPost, apiURL, io.NopCloser(bytes.NewReader(data)))
if err != nil {
return nil, err
}
values := http.Header{}
values.Add("Authorization", "Bearer "+pat)
values.Add("x-forwarded-host", domain)
values.Add("Content-Type", "application/json")
req.Header = values
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, err
}
return resp, nil
}
@@ -0,0 +1,25 @@
module github.com/zitadel/typescript/acceptance/oidc
go 1.24.1
require (
github.com/google/uuid v1.6.0
github.com/sirupsen/logrus v1.9.3
github.com/zitadel/logging v0.6.1
github.com/zitadel/oidc/v3 v3.36.1
)
require (
github.com/go-jose/go-jose/v4 v4.1.7 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/muhlemmer/gu v0.3.1 // indirect
github.com/zitadel/schema v1.3.0 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
golang.org/x/oauth2 v0.28.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.22.0 // indirect
)
@@ -0,0 +1,65 @@
github.com/bmatcuk/doublestar/v4 v4.8.1 h1:54Bopc5c2cAvhLRAzqOGCYHYyhcDHsFF4wWIR5wKP38=
github.com/bmatcuk/doublestar/v4 v4.8.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-chi/chi/v5 v5.2.1 h1:KOIHODQj58PmL80G2Eak4WdvUzjSJSm0vG72crDCqb8=
github.com/go-chi/chi/v5 v5.2.1/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
github.com/go-jose/go-jose/v4 v4.1.7 h1:Nac/98uT5LPkfbiFuYa8ktf62a2VxwQ4xbq1GK8pV5E=
github.com/go-jose/go-jose/v4 v4.1.7/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA=
github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo=
github.com/jeremija/gosubmit v0.2.8 h1:mmSITBz9JxVtu8eqbN+zmmwX7Ij2RidQxhcwRVI4wqA=
github.com/jeremija/gosubmit v0.2.8/go.mod h1:Ui+HS073lCFREXBbdfrJzMB57OI/bdxTiLtrDHHhFPI=
github.com/muhlemmer/gu v0.3.1 h1:7EAqmFrW7n3hETvuAdmFmn4hS8W+z3LgKtrnow+YzNM=
github.com/muhlemmer/gu v0.3.1/go.mod h1:YHtHR+gxM+bKEIIs7Hmi9sPT3ZDUvTN/i88wQpZkrdM=
github.com/muhlemmer/httpforwarded v0.1.0 h1:x4DLrzXdliq8mprgUMR0olDvHGkou5BJsK/vWUetyzY=
github.com/muhlemmer/httpforwarded v0.1.0/go.mod h1:yo9czKedo2pdZhoXe+yDkGVbU0TJ0q9oQ90BVoDEtw0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA=
github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/zitadel/logging v0.6.1 h1:Vyzk1rl9Kq9RCevcpX6ujUaTYFX43aa4LkvV1TvUk+Y=
github.com/zitadel/logging v0.6.1/go.mod h1:Y4CyAXHpl3Mig6JOszcV5Rqqsojj+3n7y2F591Mp/ow=
github.com/zitadel/oidc/v3 v3.36.1 h1:1AT1NqKKEqAwx4GmKJZ9fYkWH2WIn/VKMfQ46nBtRf0=
github.com/zitadel/oidc/v3 v3.36.1/go.mod h1:dApGZLvWZTHRuxmcbQlW5d2XVjVYR3vGOdq536igmTs=
github.com/zitadel/schema v1.3.0 h1:kQ9W9tvIwZICCKWcMvCEweXET1OcOyGEuFbHs4o5kg0=
github.com/zitadel/schema v1.3.0/go.mod h1:NptN6mkBDFvERUCvZHlvWmmME+gmZ44xzwRXwhzsbtc=
go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw=
go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8=
go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc=
go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8=
go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4=
go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ=
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc=
golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
@@ -0,0 +1,322 @@
package main
import (
"bytes"
"context"
"crypto/tls"
"encoding/json"
"errors"
"fmt"
"io"
"log"
"log/slog"
"net/http"
"os"
"os/signal"
"strings"
"sync/atomic"
"syscall"
"time"
"github.com/google/uuid"
"github.com/sirupsen/logrus"
"github.com/zitadel/logging"
"github.com/zitadel/oidc/v3/pkg/client/rp"
httphelper "github.com/zitadel/oidc/v3/pkg/http"
"github.com/zitadel/oidc/v3/pkg/oidc"
)
var (
callbackPath = "/auth/callback"
key = []byte("test1234test1234")
)
func main() {
apiURL := os.Getenv("API_URL")
pat := readPAT(os.Getenv("PAT_FILE"))
domain := os.Getenv("API_DOMAIN")
loginURL := os.Getenv("LOGIN_URL")
issuer := os.Getenv("ISSUER")
port := os.Getenv("PORT")
scopeList := strings.Split(os.Getenv("SCOPES"), " ")
redirectURI := fmt.Sprintf("%s%s", issuer, callbackPath)
cookieHandler := httphelper.NewCookieHandler(key, key, httphelper.WithUnsecure())
clientID, clientSecret, err := createZitadelResources(apiURL, pat, domain, redirectURI, loginURL)
if err != nil {
panic(err)
}
logger := slog.New(
slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{
AddSource: true,
Level: slog.LevelDebug,
}),
)
client := &http.Client{
Timeout: time.Minute,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
},
}
// enable outgoing request logging
logging.EnableHTTPClient(client,
logging.WithClientGroup("client"),
)
options := []rp.Option{
rp.WithCookieHandler(cookieHandler),
rp.WithVerifierOpts(rp.WithIssuedAtOffset(5 * time.Second)),
rp.WithHTTPClient(client),
rp.WithLogger(logger),
rp.WithSigningAlgsFromDiscovery(),
rp.WithCustomDiscoveryUrl(issuer + "/.well-known/openid-configuration"),
}
if clientSecret == "" {
options = append(options, rp.WithPKCE(cookieHandler))
}
// One can add a logger to the context,
// pre-defining log attributes as required.
ctx := logging.ToContext(context.TODO(), logger)
provider, err := rp.NewRelyingPartyOIDC(ctx, issuer, clientID, clientSecret, redirectURI, scopeList, options...)
if err != nil {
logrus.Fatalf("error creating provider %s", err.Error())
}
// generate some state (representing the state of the user in your application,
// e.g. the page where he was before sending him to login
state := func() string {
return uuid.New().String()
}
urlOptions := []rp.URLParamOpt{
rp.WithPromptURLParam("Welcome back!"),
}
// register the AuthURLHandler at your preferred path.
// the AuthURLHandler creates the auth request and redirects the user to the auth server.
// including state handling with secure cookie and the possibility to use PKCE.
// Prompts can optionally be set to inform the server of
// any messages that need to be prompted back to the user.
http.Handle("/login", rp.AuthURLHandler(
state,
provider,
urlOptions...,
))
// for demonstration purposes the returned userinfo response is written as JSON object onto response
marshalUserinfo := func(w http.ResponseWriter, r *http.Request, tokens *oidc.Tokens[*oidc.IDTokenClaims], state string, rp rp.RelyingParty, info *oidc.UserInfo) {
fmt.Println("access token", tokens.AccessToken)
fmt.Println("refresh token", tokens.RefreshToken)
fmt.Println("id token", tokens.IDToken)
data, err := json.Marshal(info)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.Header().Set("content-type", "application/json")
w.Write(data)
}
// register the CodeExchangeHandler at the callbackPath
// the CodeExchangeHandler handles the auth response, creates the token request and calls the callback function
// with the returned tokens from the token endpoint
// in this example the callback function itself is wrapped by the UserinfoCallback which
// will call the Userinfo endpoint, check the sub and pass the info into the callback function
http.Handle(callbackPath, rp.CodeExchangeHandler(rp.UserinfoCallback(marshalUserinfo), provider))
// if you would use the callback without calling the userinfo endpoint, simply switch the callback handler for:
//
// http.Handle(callbackPath, rp.CodeExchangeHandler(marshalToken, provider))
// simple counter for request IDs
var counter atomic.Int64
// enable incomming request logging
mw := logging.Middleware(
logging.WithLogger(logger),
logging.WithGroup("server"),
logging.WithIDFunc(func() slog.Attr {
return slog.Int64("id", counter.Add(1))
}),
)
http.Handle("/healthy", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { return }))
fmt.Println("/healthy returns 200 OK")
server := &http.Server{
Addr: ":" + port,
Handler: mw(http.DefaultServeMux),
}
go func() {
if err := server.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) {
log.Fatalf("HTTP server error: %v", err)
}
log.Println("Stopped serving new connections.")
}()
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
<-sigChan
shutdownCtx, shutdownRelease := context.WithTimeout(context.Background(), 10*time.Second)
defer shutdownRelease()
if err := server.Shutdown(shutdownCtx); err != nil {
log.Fatalf("HTTP shutdown error: %v", err)
}
}
func readPAT(path string) string {
f, err := os.Open(path)
if err != nil {
panic(err)
}
pat, err := io.ReadAll(f)
if err != nil {
panic(err)
}
return strings.Trim(string(pat), "\n")
}
func createZitadelResources(apiURL, pat, domain, redirectURI, loginURL string) (string, string, error) {
projectID, err := CreateProject(apiURL, pat, domain)
if err != nil {
return "", "", err
}
return CreateApp(apiURL, pat, domain, projectID, redirectURI, loginURL)
}
type project struct {
ID string `json:"id"`
}
type createProject struct {
Name string `json:"name"`
ProjectRoleAssertion bool `json:"projectRoleAssertion"`
ProjectRoleCheck bool `json:"projectRoleCheck"`
HasProjectCheck bool `json:"hasProjectCheck"`
PrivateLabelingSetting string `json:"privateLabelingSetting"`
}
func CreateProject(apiURL, pat, domain string) (string, error) {
createProject := &createProject{
Name: "OIDC",
ProjectRoleAssertion: false,
ProjectRoleCheck: false,
HasProjectCheck: false,
PrivateLabelingSetting: "PRIVATE_LABELING_SETTING_UNSPECIFIED",
}
resp, err := doRequestWithHeaders(apiURL+"/management/v1/projects", pat, domain, createProject)
if err != nil {
return "", err
}
data, err := io.ReadAll(resp.Body)
if err != nil {
return "", err
}
defer resp.Body.Close()
p := new(project)
if err := json.Unmarshal(data, p); err != nil {
return "", err
}
fmt.Printf("projectID: %+v\n", p.ID)
return p.ID, nil
}
type createApp struct {
Name string `json:"name"`
RedirectUris []string `json:"redirectUris"`
ResponseTypes []string `json:"responseTypes"`
GrantTypes []string `json:"grantTypes"`
AppType string `json:"appType"`
AuthMethodType string `json:"authMethodType"`
PostLogoutRedirectUris []string `json:"postLogoutRedirectUris"`
Version string `json:"version"`
DevMode bool `json:"devMode"`
AccessTokenType string `json:"accessTokenType"`
AccessTokenRoleAssertion bool `json:"accessTokenRoleAssertion"`
IdTokenRoleAssertion bool `json:"idTokenRoleAssertion"`
IdTokenUserinfoAssertion bool `json:"idTokenUserinfoAssertion"`
ClockSkew string `json:"clockSkew"`
AdditionalOrigins []string `json:"additionalOrigins"`
SkipNativeAppSuccessPage bool `json:"skipNativeAppSuccessPage"`
BackChannelLogoutUri []string `json:"backChannelLogoutUri"`
LoginVersion version `json:"loginVersion"`
}
type version struct {
LoginV2 loginV2 `json:"loginV2"`
}
type loginV2 struct {
BaseUri string `json:"baseUri"`
}
type app struct {
ClientID string `json:"clientId"`
ClientSecret string `json:"clientSecret"`
}
func CreateApp(apiURL, pat, domain, projectID string, redirectURI, loginURL string) (string, string, error) {
createApp := &createApp{
Name: "OIDC",
RedirectUris: []string{redirectURI},
ResponseTypes: []string{"OIDC_RESPONSE_TYPE_CODE"},
GrantTypes: []string{"OIDC_GRANT_TYPE_AUTHORIZATION_CODE"},
AppType: "OIDC_APP_TYPE_WEB",
AuthMethodType: "OIDC_AUTH_METHOD_TYPE_BASIC",
Version: "OIDC_VERSION_1_0",
DevMode: true,
AccessTokenType: "OIDC_TOKEN_TYPE_BEARER",
AccessTokenRoleAssertion: true,
IdTokenRoleAssertion: true,
IdTokenUserinfoAssertion: true,
ClockSkew: "1s",
SkipNativeAppSuccessPage: true,
LoginVersion: version{
LoginV2: loginV2{
BaseUri: loginURL,
},
},
}
resp, err := doRequestWithHeaders(apiURL+"/management/v1/projects/"+projectID+"/apps/oidc", pat, domain, createApp)
data, err := io.ReadAll(resp.Body)
if err != nil {
return "", "", err
}
defer resp.Body.Close()
a := new(app)
if err := json.Unmarshal(data, a); err != nil {
return "", "", err
}
return a.ClientID, a.ClientSecret, err
}
func doRequestWithHeaders(apiURL, pat, domain string, body any) (*http.Response, error) {
data, err := json.Marshal(body)
if err != nil {
return nil, err
}
req, err := http.NewRequest(http.MethodPost, apiURL, io.NopCloser(bytes.NewReader(data)))
if err != nil {
return nil, err
}
values := http.Header{}
values.Add("Authorization", "Bearer "+pat)
values.Add("x-forwarded-host", domain)
values.Add("Content-Type", "application/json")
req.Header = values
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, err
}
return resp, nil
}
@@ -0,0 +1,3 @@
*
!.gitignore
!.gitkeep
Whitespace-only changes.
@@ -0,0 +1,3 @@
*
!.gitignore
!.gitkeep
Whitespace-only changes.
@@ -0,0 +1,78 @@
import { defineConfig, devices } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
dotenv.config({ path: path.resolve(__dirname, "../login/.env.test.local") });
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
expect: {
timeout: 10_000, // 10 seconds
},
timeout: 300 * 1000, // 5 minutes
globalTimeout: 30 * 60_000, // 30 minutes
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [
["line"],
["html", { open: process.env.CI ? "never" : "on-failure", host: "0.0.0.0", outputFolder: "./playwright-report/html" }],
],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: process.env.LOGIN_BASE_URL || "http://127.0.0.1:3000",
trace: "retain-on-failure",
headless: true,
screenshot: "only-on-failure",
video: "retain-on-failure",
ignoreHTTPSErrors: true,
},
outputDir: "test-results/results",
/* Configure projects for major browsers */
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
/*
{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},
TODO: webkit fails. Is this a bug?
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
*/
/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },
/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],
});
@@ -0,0 +1,18 @@
module github.com/zitadel/typescript/acceptance/saml
go 1.25.0
require github.com/crewjam/saml v0.4.14
require (
github.com/beevik/etree v1.5.0 // indirect
github.com/crewjam/httperr v0.2.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/jonboulle/clockwork v0.5.0 // indirect
github.com/mattermost/xml-roundtrip-validator v0.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/russellhaering/goxmldsig v1.5.0 // indirect
github.com/stretchr/testify v1.10.0 // indirect
golang.org/x/crypto v0.52.0 // indirect
)
@@ -0,0 +1,38 @@
github.com/beevik/etree v1.5.0 h1:iaQZFSDS+3kYZiGoc9uKeOkUY3nYMXOKLl6KIJxiJWs=
github.com/beevik/etree v1.5.0/go.mod h1:gPNJNaBGVZ9AwsidazFZyygnd+0pAU38N4D+WemwKNs=
github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo=
github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4=
github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c=
github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI=
github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I=
github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60=
github.com/mattermost/xml-roundtrip-validator v0.1.0 h1:RXbVD2UAl7A7nOTR4u7E3ILa4IbtvKBHw64LDsmu9hU=
github.com/mattermost/xml-roundtrip-validator v0.1.0/go.mod h1:qccnGMcpgwcNaBnxqpJpWWUiPNr5H3O8eDgGV9gT5To=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russellhaering/goxmldsig v1.5.0 h1:AU2UkkYIUOTyZRbe08XMThaOCelArgvNfYapcmSjBNw=
github.com/russellhaering/goxmldsig v1.5.0/go.mod h1:x98CjQNFJcWfMxeOrMnMKg70lvDP6tE0nTaeUnjXDmk=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/crypto v0.52.0 h1:RMs7fP2rXdep0CftQlK8Uf+kibLm7qkCcradZWYz988=
golang.org/x/crypto v0.52.0/go.mod h1:1QgfPxDqh0T2M/elOJtp9RvuR95kVjir0e6/BvEmGbc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
@@ -0,0 +1,271 @@
package main
import (
"bytes"
"context"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"encoding/base64"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"io"
"log"
"net/http"
"net/url"
"os"
"os/signal"
"strings"
"syscall"
"time"
"github.com/crewjam/saml/samlsp"
)
var keyPair = func() tls.Certificate {
cert := []byte(`-----BEGIN CERTIFICATE-----
MIIDITCCAgmgAwIBAgIUKjAUmxsHO44X+/TKBNciPgNl1GEwDQYJKoZIhvcNAQEL
BQAwIDEeMBwGA1UEAwwVbXlzZXJ2aWNlLmV4YW1wbGUuY29tMB4XDTI0MTIxOTEz
Mzc1MVoXDTI1MTIxOTEzMzc1MVowIDEeMBwGA1UEAwwVbXlzZXJ2aWNlLmV4YW1w
bGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0QYuJsayILRI
hVT7G1DlitVSXnt1iw3gEXJZfe81Egz06fUbvXF6Yo1LJmwYpqe/rm+hf4FNUb8e
2O+LH2FieA9FkVe4P2gKOzw87A/KxvpV8stgNgl4LlqRCokbc1AzeE/NiLr5TcTD
RXm3DUcYxXxinprtDu2jftFysaOZmNAukvE/iL6qS3X6ggVEDDM7tY9n5FV2eJ4E
p0ImKfypi2aZYROxOK+v5x9ryFRMl4y07lMDvmtcV45uXYmfGNCgG9PNf91Kk/mh
JxEQbxycJwFoSi9XWljR8ahPdO11LXG7Dsj/RVbY8k2LdKNstl6Ae3aCpbe9u2Pj
vxYs1bVJuQIDAQABo1MwUTAdBgNVHQ4EFgQU+mRVN5HYJWgnpopReaLhf2cMcoYw
HwYDVR0jBBgwFoAU+mRVN5HYJWgnpopReaLhf2cMcoYwDwYDVR0TAQH/BAUwAwEB
/zANBgkqhkiG9w0BAQsFAAOCAQEABJpHVuc9tGhD04infRVlofvqXIUizTlOrjZX
vozW9pIhSWEHX8o+sJP8AMZLnrsdq+bm0HE0HvgYrw7Lb8pd4FpR46TkFHjeukoj
izqfgckjIBl2nwPGlynbKA0/U/rTCSxVt7XiAn+lgYUGIpOzNdk06/hRMitrMNB7
t2C97NseVC4b1ZgyFrozsefCfUmD8IJF0+XJ4Wzmsh0jRrI8koCtVmPYnKn6vw1b
cZprg/97CWHYrsavd406wOB60CMtYl83Q16ucOF1dretDFqJC5kY+aFLvuqfag2+
kIaoPV1MnGsxveQyyHdOsEatS5XOv/1OWcmnvePDPxcvb9jCcw==
-----END CERTIFICATE-----
`)
key := []byte(`-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDRBi4mxrIgtEiF
VPsbUOWK1VJee3WLDeARcll97zUSDPTp9Ru9cXpijUsmbBimp7+ub6F/gU1Rvx7Y
74sfYWJ4D0WRV7g/aAo7PDzsD8rG+lXyy2A2CXguWpEKiRtzUDN4T82IuvlNxMNF
ebcNRxjFfGKemu0O7aN+0XKxo5mY0C6S8T+IvqpLdfqCBUQMMzu1j2fkVXZ4ngSn
QiYp/KmLZplhE7E4r6/nH2vIVEyXjLTuUwO+a1xXjm5diZ8Y0KAb081/3UqT+aEn
ERBvHJwnAWhKL1daWNHxqE907XUtcbsOyP9FVtjyTYt0o2y2XoB7doKlt727Y+O/
FizVtUm5AgMBAAECggEACak+l5f6Onj+u5vrjc4JyAaXW6ra6loSM9g8Uu3sHukW
plwoA7Pzp0u20CAxrP1Gpqw984/hSCCcb0Q2ItWMWLaC/YZni5W2WFnOyo3pzlPa
hmH4UNMT+ReCSfF/oW8w69QLcNEMjhfEu0i2iWBygIlA4SoRwC2Db6yEX7nLMwUB
6AICid9hfeACNRz/nq5ytdcHdmcB7Ptgb9jLiXr6RZw26g5AsRPHU3LdcyZAOXjP
aUHriHuHQFKAVkoEUxslvCB6ePCTCpB0bSAuzQbeGoY8fmvmNSCvJ1vrH5hiSUYp
Axtl5iNgFl5o9obb0eBYlY9x3pMSz0twdbCwfR7HAQKBgQDtWhmFm0NaJALoY+tq
lIIC0EOMSrcRIlgeXr6+g8womuDOMi5m/Nr5Mqt4mPOdP4HytrQb+a/ZmEm17KHh
mQb1vwH8ffirCBHbPNC1vwSNoxDKv9E6OysWlKiOzxPFSVZr3dKl2EMX6qi17n0l
LBrGXXaNPgYiHSmwBA5CZvvouQKBgQDhclGJfZfuoubQkUuz8yOA2uxalh/iUmQ/
G8ac6/w7dmnL9pXehqCWh06SeC3ZvW7yrf7IIGx4sTJji2FzQ+8Ta6pPELMyBEXr
1VirIFrlNVMlMQEbZcbzdzEhchM1RUpZJtl3b4amvH21UcRB69d9klcDRisKoFRm
k0P9QLHpAQKBgQDh5J9nphZa4u0ViYtTW1XFIbs3+R/0IbCl7tww67TRbF3KQL4i
7EHna88ALumkXf3qJvKRsXgoaqS0jSqgUAjst8ZHLQkOldaQxneIkezedDSWEisp
9YgTrJYjnHefiyXB8VL63jE0wPOiewEF8Mzmv6sFz+L8cq7rQ2Di16qmmQKBgQDH
bvCwVxkrMpJK2O2GH8U9fOzu6bUE6eviY/jb4mp8U7EdjGJhuuieoM2iBoxQ/SID
rmYftYcfcWlo4+juJZ99p5W+YcCTs3IDQPUyVOnzr6uA0Avxp6RKxhsBQj+5tTUj
Dpn77P3JzB7MYqvhwPcdD3LH46+5s8FWCFpx02RPAQKBgARbngtggfifatcsMC7n
lSv/FVLH7LYQAHdoW/EH5Be7FeeP+eQvGXwh1dgl+u0VZO8FvI8RwFganpBRR2Nc
ZSBRIb0fSUlTvIsckSWjpEvUJUomJXyi4PIZAfNvd9/u1uLInQiCDtObwb6hnLTU
FHHEZ+dR4eMaJp6PhNm8hu2O
-----END PRIVATE KEY-----
`)
kp, err := tls.X509KeyPair(cert, key)
if err != nil {
panic(err)
}
kp.Leaf, err = x509.ParseCertificate(kp.Certificate[0])
if err != nil {
panic(err)
}
return kp
}()
func hello(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, %s!", samlsp.AttributeFromContext(r.Context(), "UserName"))
}
func main() {
apiURL := os.Getenv("API_URL")
pat := readPAT(os.Getenv("PAT_FILE"))
domain := os.Getenv("API_DOMAIN")
loginURL := os.Getenv("LOGIN_URL")
idpURL := os.Getenv("IDP_URL")
host := os.Getenv("HOST")
port := os.Getenv("PORT")
idpMetadataURL, err := url.Parse(idpURL)
if err != nil {
panic(err)
}
idpMetadata, err := samlsp.FetchMetadata(context.Background(), http.DefaultClient,
*idpMetadataURL)
if err != nil {
panic(fmt.Errorf("failed to fetch IDP metadata from %s: %w", idpURL, err))
}
fmt.Printf("idpMetadata: %+v\n", idpMetadata)
rootURL, err := url.Parse(host + ":" + port)
if err != nil {
panic(err)
}
samlSP, err := samlsp.New(samlsp.Options{
URL: *rootURL,
Key: keyPair.PrivateKey.(*rsa.PrivateKey),
Certificate: keyPair.Leaf,
IDPMetadata: idpMetadata,
})
if err != nil {
panic(err)
}
server := &http.Server{
Addr: ":" + port,
}
app := http.HandlerFunc(hello)
http.Handle("/hello", samlSP.RequireAccount(app))
http.Handle("/saml/", samlSP)
go func() {
if err := server.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) {
log.Fatalf("HTTP server error: %v", err)
}
log.Println("Stopped serving new connections.")
}()
metadata, err := xml.MarshalIndent(samlSP.ServiceProvider.Metadata(), "", " ")
if err != nil {
panic(err)
}
if err := createZitadelResources(apiURL, pat, domain, metadata, loginURL); err != nil {
panic(err)
}
http.Handle("/healthy", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { return }))
fmt.Println("/healthy returns 200 OK")
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
<-sigChan
shutdownCtx, shutdownRelease := context.WithTimeout(context.Background(), 10*time.Second)
defer shutdownRelease()
if err := server.Shutdown(shutdownCtx); err != nil {
log.Fatalf("HTTP shutdown error: %v", err)
}
}
func readPAT(path string) string {
f, err := os.Open(path)
if err != nil {
panic(err)
}
pat, err := io.ReadAll(f)
if err != nil {
panic(err)
}
return strings.Trim(string(pat), "\n")
}
func createZitadelResources(apiURL, pat, domain string, metadata []byte, loginURL string) error {
projectID, err := CreateProject(apiURL, pat, domain)
if err != nil {
return err
}
return CreateApp(apiURL, pat, domain, projectID, metadata, loginURL)
}
type project struct {
ID string `json:"id"`
}
type createProject struct {
Name string `json:"name"`
ProjectRoleAssertion bool `json:"projectRoleAssertion"`
ProjectRoleCheck bool `json:"projectRoleCheck"`
HasProjectCheck bool `json:"hasProjectCheck"`
PrivateLabelingSetting string `json:"privateLabelingSetting"`
}
func CreateProject(apiURL, pat, domain string) (string, error) {
createProject := &createProject{
Name: "SAML",
ProjectRoleAssertion: false,
ProjectRoleCheck: false,
HasProjectCheck: false,
PrivateLabelingSetting: "PRIVATE_LABELING_SETTING_UNSPECIFIED",
}
resp, err := doRequestWithHeaders(apiURL+"/management/v1/projects", pat, domain, createProject)
if err != nil {
return "", err
}
data, err := io.ReadAll(resp.Body)
if err != nil {
return "", err
}
defer resp.Body.Close()
p := new(project)
if err := json.Unmarshal(data, p); err != nil {
return "", err
}
return p.ID, nil
}
type createApp struct {
Name string `json:"name"`
MetadataXml string `json:"metadataXml"`
LoginVersion version `json:"loginVersion"`
}
type version struct {
LoginV2 loginV2 `json:"loginV2"`
}
type loginV2 struct {
BaseUri string `json:"baseUri"`
}
func CreateApp(apiURL, pat, domain, projectID string, spMetadata []byte, loginURL string) error {
encoded := make([]byte, base64.URLEncoding.EncodedLen(len(spMetadata)))
base64.URLEncoding.Encode(encoded, spMetadata)
createApp := &createApp{
Name: "SAML",
MetadataXml: string(encoded),
LoginVersion: version{
LoginV2: loginV2{
BaseUri: loginURL,
},
},
}
_, err := doRequestWithHeaders(apiURL+"/management/v1/projects/"+projectID+"/apps/saml", pat, domain, createApp)
if err != nil {
return fmt.Errorf("error creating saml app with request %+v: %v", *createApp, err)
}
return err
}
func doRequestWithHeaders(apiURL, pat, domain string, body any) (*http.Response, error) {
data, err := json.Marshal(body)
if err != nil {
return nil, err
}
req, err := http.NewRequest(http.MethodPost, apiURL, io.NopCloser(bytes.NewReader(data)))
if err != nil {
return nil, err
}
values := http.Header{}
values.Add("Authorization", "Bearer "+pat)
values.Add("x-forwarded-host", domain)
values.Add("Content-Type", "application/json")
req.Header = values
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, err
}
return resp, nil
}
@@ -0,0 +1,3 @@
module github.com/zitadel/typescript/apps/login-test-acceptance/setup
go 1.23.3
Whitespace-only changes.
@@ -0,0 +1,3 @@
package main
func main() {}
@@ -0,0 +1,139 @@
#!/bin/sh
set -e pipefail
PAT_FILE=${PAT_FILE:-./pat/zitadel-admin-sa.pat}
LOGIN_BASE_URL=${LOGIN_BASE_URL:-"http://localhost:3000"}
ZITADEL_API_PROTOCOL="${ZITADEL_API_PROTOCOL:-http}"
ZITADEL_API_DOMAIN="${ZITADEL_API_DOMAIN:-localhost}"
ZITADEL_API_PORT="${ZITADEL_API_PORT:-8080}"
ZITADEL_API_URL="${ZITADEL_API_URL:-${ZITADEL_API_PROTOCOL}://${ZITADEL_API_DOMAIN}:${ZITADEL_API_PORT}}"
ZITADEL_API_INTERNAL_URL="${ZITADEL_API_INTERNAL_URL:-${ZITADEL_API_URL}}"
SINK_EMAIL_INTERNAL_URL="${SINK_EMAIL_INTERNAL_URL:-"http://sink:3333/email"}"
SINK_SMS_INTERNAL_URL="${SINK_SMS_INTERNAL_URL:-"http://sink:3333/sms"}"
SINK_NOTIFICATION_URL="${SINK_NOTIFICATION_URL:-"http://localhost:3333/notification"}"
WRITE_ENVIRONMENT_FILE=${WRITE_ENVIRONMENT_FILE:-$(dirname "$0")/../apps/login/.env.test.local}
if [ -z "${PAT}" ]; then
echo "Reading PAT from file ${PAT_FILE}"
PAT=$(cat ${PAT_FILE})
fi
#################################################################
# ServiceAccount as Login Client
#################################################################
SERVICEACCOUNT_RESPONSE=$(curl -s --request POST \
--url "${ZITADEL_API_INTERNAL_URL}/management/v1/users/machine" \
--header "Authorization: Bearer ${PAT}" \
--header "Host: ${ZITADEL_API_DOMAIN}" \
--header "Content-Type: application/json" \
-d "{\"userName\": \"login\", \"name\": \"Login v2\", \"description\": \"Serviceaccount for Login v2\", \"accessTokenType\": \"ACCESS_TOKEN_TYPE_BEARER\"}")
echo "Received ServiceAccount response: ${SERVICEACCOUNT_RESPONSE}"
SERVICEACCOUNT_ID=$(echo ${SERVICEACCOUNT_RESPONSE} | jq -r '. | .userId')
echo "Received ServiceAccount ID: ${SERVICEACCOUNT_ID}"
MEMBER_RESPONSE=$(curl -s --request POST \
--url "${ZITADEL_API_INTERNAL_URL}/admin/v1/members" \
--header "Authorization: Bearer ${PAT}" \
--header "Host: ${ZITADEL_API_DOMAIN}" \
--header "Content-Type: application/json" \
-d "{\"userId\": \"${SERVICEACCOUNT_ID}\", \"roles\": [\"IAM_LOGIN_CLIENT\"]}")
echo "Received Member response: ${MEMBER_RESPONSE}"
SA_PAT_RESPONSE=$(curl -s --request POST \
--url "${ZITADEL_API_INTERNAL_URL}/management/v1/users/${SERVICEACCOUNT_ID}/pats" \
--header "Authorization: Bearer ${PAT}" \
--header "Host: ${ZITADEL_API_DOMAIN}" \
--header "Content-Type: application/json" \
-d "{\"expirationDate\": \"2519-04-01T08:45:00.000000Z\"}")
echo "Received Member response: ${MEMBER_RESPONSE}"
SA_PAT=$(echo ${SA_PAT_RESPONSE} | jq -r '. | .token')
echo "Received ServiceAccount Token: ${SA_PAT}"
#################################################################
# Environment files
#################################################################
echo "Writing environment file ${WRITE_ENVIRONMENT_FILE}."
echo "ZITADEL_API_URL=${ZITADEL_API_URL}
ZITADEL_SERVICE_USER_TOKEN=${SA_PAT}
ZITADEL_ADMIN_TOKEN=${PAT}
SINK_NOTIFICATION_URL=${SINK_NOTIFICATION_URL}
EMAIL_VERIFICATION=true
DEBUG=false
LOGIN_BASE_URL=${LOGIN_BASE_URL}
NODE_TLS_REJECT_UNAUTHORIZED=0
ZITADEL_ADMIN_USER=${ZITADEL_ADMIN_USER:-"zitadel-admin@zitadel.localhost"}
NEXT_PUBLIC_BASE_PATH=/ui/v2/login
" > ${WRITE_ENVIRONMENT_FILE}
echo "Wrote environment file ${WRITE_ENVIRONMENT_FILE}"
cat ${WRITE_ENVIRONMENT_FILE}
#################################################################
# SMS provider with HTTP
#################################################################
SMSHTTP_RESPONSE=$(curl -s --request POST \
--url "${ZITADEL_API_INTERNAL_URL}/admin/v1/sms/http" \
--header "Authorization: Bearer ${PAT}" \
--header "Host: ${ZITADEL_API_DOMAIN}" \
--header "Content-Type: application/json" \
-d "{\"endpoint\": \"${SINK_SMS_INTERNAL_URL}\", \"description\": \"test\"}")
echo "Received SMS HTTP response: ${SMSHTTP_RESPONSE}"
SMSHTTP_ID=$(echo ${SMSHTTP_RESPONSE} | jq -r '. | .id')
echo "Received SMS HTTP ID: ${SMSHTTP_ID}"
SMS_ACTIVE_RESPONSE=$(curl -s --request POST \
--url "${ZITADEL_API_INTERNAL_URL}/admin/v1/sms/${SMSHTTP_ID}/_activate" \
--header "Authorization: Bearer ${PAT}" \
--header "Host: ${ZITADEL_API_DOMAIN}" \
--header "Content-Type: application/json")
echo "Received SMS active response: ${SMS_ACTIVE_RESPONSE}"
#################################################################
# Email provider with HTTP
#################################################################
EMAILHTTP_RESPONSE=$(curl -s --request POST \
--url "${ZITADEL_API_INTERNAL_URL}/admin/v1/email/http" \
--header "Authorization: Bearer ${PAT}" \
--header "Host: ${ZITADEL_API_DOMAIN}" \
--header "Content-Type: application/json" \
-d "{\"endpoint\": \"${SINK_EMAIL_INTERNAL_URL}\", \"description\": \"test\"}")
echo "Received Email HTTP response: ${EMAILHTTP_RESPONSE}"
EMAILHTTP_ID=$(echo ${EMAILHTTP_RESPONSE} | jq -r '. | .id')
echo "Received Email HTTP ID: ${EMAILHTTP_ID}"
EMAIL_ACTIVE_RESPONSE=$(curl -s --request POST \
--url "${ZITADEL_API_INTERNAL_URL}/admin/v1/email/${EMAILHTTP_ID}/_activate" \
--header "Authorization: Bearer ${PAT}" \
--header "Host: ${ZITADEL_API_DOMAIN}" \
--header "Content-Type: application/json")
echo "Received Email active response: ${EMAIL_ACTIVE_RESPONSE}"
#################################################################
# Wait for projection of default organization in ZITADEL
#################################################################
DEFAULTORG_RESPONSE_RESULTS=0
# waiting for default organization
until [ ${DEFAULTORG_RESPONSE_RESULTS} -eq 1 ]
do
DEFAULTORG_RESPONSE=$(curl -s --request POST \
--url "${ZITADEL_API_INTERNAL_URL}/v2/organizations/_search" \
--header "Authorization: Bearer ${PAT}" \
--header "Host: ${ZITADEL_API_DOMAIN}" \
--header "Content-Type: application/json" \
-d "{\"queries\": [{\"defaultQuery\":{}}]}" )
echo "Received default organization response: ${DEFAULTORG_RESPONSE}"
DEFAULTORG_RESPONSE_RESULTS=$(echo $DEFAULTORG_RESPONSE | jq -r '.result | length')
echo "Received default organization response result: ${DEFAULTORG_RESPONSE_RESULTS}"
done
@@ -0,0 +1,3 @@
module github.com/zitadel/typescript/acceptance/sink
go 1.24.0
Whitespace-only changes.
@@ -0,0 +1,111 @@
package main
import (
"encoding/json"
"flag"
"fmt"
"io"
"net/http"
)
type serializableData struct {
ContextInfo map[string]interface{} `json:"contextInfo,omitempty"`
Args map[string]interface{} `json:"args,omitempty"`
}
type response struct {
Recipient string `json:"recipient,omitempty"`
}
func main() {
port := flag.String("port", "3333", "used port for the sink")
email := flag.String("email", "/email", "path for a sent email")
emailKey := flag.String("email-key", "recipientEmailAddress", "value in the sent context info of the email used as key to retrieve the notification")
sms := flag.String("sms", "/sms", "path for a sent sms")
smsKey := flag.String("sms-key", "recipientPhoneNumber", "value in the sent context info of the sms used as key to retrieve the notification")
notification := flag.String("notification", "/notification", "path to receive the notification")
flag.Parse()
messages := make(map[string]serializableData)
http.HandleFunc(*email, func(w http.ResponseWriter, r *http.Request) {
data, err := io.ReadAll(r.Body)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
serializableData := serializableData{}
if err := json.Unmarshal(data, &serializableData); err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
email, ok := serializableData.ContextInfo[*emailKey].(string)
if !ok {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
fmt.Println(email + ": " + string(data))
messages[email] = serializableData
io.WriteString(w, "Email!\n")
})
http.HandleFunc(*sms, func(w http.ResponseWriter, r *http.Request) {
data, err := io.ReadAll(r.Body)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
serializableData := serializableData{}
if err := json.Unmarshal(data, &serializableData); err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
phone, ok := serializableData.ContextInfo[*smsKey].(string)
if !ok {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
fmt.Println(phone + ": " + string(data))
messages[phone] = serializableData
io.WriteString(w, "SMS!\n")
})
http.HandleFunc(*notification, func(w http.ResponseWriter, r *http.Request) {
data, err := io.ReadAll(r.Body)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
response := response{}
if err := json.Unmarshal(data, &response); err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
msg, ok := messages[response.Recipient]
if !ok {
http.Error(w, "No messages found for recipient: "+response.Recipient, http.StatusNotFound)
return
}
serializableData, err := json.Marshal(msg)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "application/json")
io.WriteString(w, string(serializableData))
})
fmt.Println("Starting server on", *port)
fmt.Println(*email, " for email handling")
fmt.Println(*sms, " for sms handling")
fmt.Println(*notification, " for retrieving notifications")
http.Handle("/healthy", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { return }))
fmt.Println("/healthy returns 200 OK")
err := http.ListenAndServe(":"+*port, nil)
if err != nil {
panic("Server could not be started: " + err.Error())
}
}
@@ -0,0 +1,3 @@
*
!.gitignore
!.gitkeep
Whitespace-only changes.
@@ -0,0 +1,7 @@
import { test } from "@playwright/test";
import { loginScreenExpect, loginWithPassword } from "./login";
test("admin login", async ({ page }) => {
await loginWithPassword(page, process.env["ZITADEL_ADMIN_USER"], "Password1!");
await loginScreenExpect(page, "ZITADEL Admin");
});
@@ -0,0 +1,13 @@
import { expect, Page } from "@playwright/test";
import en from "../../locales/en.json";
const codeTextInput = "code-text-input";
export async function codeScreen(page: Page, code: string) {
await page.getByTestId(codeTextInput).pressSequentially(code);
}
export async function codeScreenExpect(page: Page, code: string) {
await expect(page.getByTestId(codeTextInput)).toHaveValue(code);
await expect(page.getByTestId("error").locator("div")).toContainText(en.otp.errors.couldNotVerifyCode);
}
@@ -0,0 +1,17 @@
import { Page } from "@playwright/test";
import { codeScreen } from "./code-screen";
import { getOtpFromSink } from "./sink";
export async function otpFromSink(page: Page, key: string) {
const c = await getOtpFromSink(key);
await code(page, c);
}
export async function code(page: Page, code: string) {
await codeScreen(page, code);
await page.getByTestId("submit-button").click();
}
export async function codeResend(page: Page) {
await page.getByTestId("resend-button").click();
}
@@ -0,0 +1,12 @@
import { expect, Page } from "@playwright/test";
const codeTextInput = "code-text-input";
export async function emailVerifyScreen(page: Page, code: string) {
await page.getByTestId(codeTextInput).pressSequentially(code);
}
export async function emailVerifyScreenExpect(page: Page, code: string) {
await expect(page.getByTestId(codeTextInput)).toHaveValue(code);
await expect(page.getByTestId("error").locator("div")).toContainText("Could not verify email");
}
@@ -0,0 +1,69 @@
import { faker } from "@faker-js/faker";
import { test as base } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import { emailVerify, emailVerifyResend } from "./email-verify";
import { emailVerifyScreenExpect } from "./email-verify-screen";
import { loginScreenExpect, loginWithPassword } from "./login";
import { getCodeFromSink } from "./sink";
import { PasswordUser } from "./user";
// Read from ".env" file.
dotenv.config({ path: path.resolve(__dirname, "../../login/.env.test.local") });
const test = base.extend<{ user: PasswordUser }>({
user: async ({ page }, use) => {
const user = new PasswordUser({
email: faker.internet.email(),
isEmailVerified: false,
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
organization: "",
phone: faker.phone.number(),
isPhoneVerified: false,
password: "Password1!",
passwordChangeRequired: false,
});
await user.ensure(page);
await use(user);
await user.cleanup();
},
});
test("user email not verified, verify", async ({ user, page }) => {
await loginWithPassword(page, user.getUsername(), user.getPassword());
const c = await getCodeFromSink(user.getUsername());
await emailVerify(page, c);
// wait for resend of the code
await page.waitForTimeout(2000);
await loginScreenExpect(page, user.getFullName());
});
test("user email not verified, resend, verify", async ({ user, page }) => {
await loginWithPassword(page, user.getUsername(), user.getPassword());
// auto-redirect on /verify
await emailVerifyResend(page);
const c = await getCodeFromSink(user.getUsername());
// wait for resend of the code
await page.waitForTimeout(2000);
await emailVerify(page, c);
await loginScreenExpect(page, user.getFullName());
});
test("user email not verified, resend, old code", async ({ user, page }) => {
await loginWithPassword(page, user.getUsername(), user.getPassword());
const c = await getCodeFromSink(user.getUsername());
await emailVerifyResend(page);
// wait for resend of the code
await page.waitForTimeout(2000);
await emailVerify(page, c);
await emailVerifyScreenExpect(page, c);
});
test("user email not verified, wrong code", async ({ user, page }) => {
await loginWithPassword(page, user.getUsername(), user.getPassword());
// auto-redirect on /verify
const code = "wrong";
await emailVerify(page, code);
await emailVerifyScreenExpect(page, code);
});
@@ -0,0 +1,15 @@
import { Page } from "@playwright/test";
import { emailVerifyScreen } from "./email-verify-screen";
export async function startEmailVerify(page: Page, loginname: string) {
await page.goto("./verify");
}
export async function emailVerify(page: Page, code: string) {
await emailVerifyScreen(page, code);
await page.getByTestId("submit-button").click();
}
export async function emailVerifyResend(page: Page) {
await page.getByTestId("resend-button").click();
}
@@ -0,0 +1,102 @@
// Note for all tests, in case Apple doesn't deliver all relevant information per default
// We should add an action in the needed cases
import test from "@playwright/test";
test("login with Apple IDP", async ({ page }) => {
test.skip();
// Given an Apple IDP is configured on the organization
// Given the user has an Apple added as auth method
// User authenticates with Apple
// User is redirected back to login
// User is redirected to the app
});
test("login with Apple IDP - error", async ({ page }) => {
test.skip();
// Given an Apple IDP is configured on the organization
// Given the user has an Apple added as auth method
// User is redirected to Apple
// User authenticates with Apple and gets an error
// User is redirect back to login
// An error is shown to the user "Something went wrong in Apple Login"
});
test("login with Apple IDP, no user existing - auto register", async ({ page }) => {
test.skip();
// Given idp Apple is configure on the organization as only authencation method
// Given idp Apple is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Apple
// User authenticates in Apple
// User is redirect to ZITADEL login
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Apple IDP, no user existing - auto register not possible", async ({ page }) => {
test.skip();
// Given idp Apple is configure on the organization as only authencation method
// Given idp Apple is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Apple
// User authenticates in Apple
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// User will see the registration page with pre filled user information
// User fills missing information
// User clicks register button
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Apple IDP, no user existing - auto register enabled - manual creation disabled, creation not possible", async ({
page,
}) => {
test.skip();
// Given idp Apple is configure on the organization as only authencation method
// Given idp Apple is configure with account creation not allowed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Apple
// User authenticates in Apple
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// Error message is shown, that registration of the user was not possible due to missing information
});
test("login with Apple IDP, no user linked - auto link", async ({ page }) => {
test.skip();
// Given idp Apple is configure on the organization as only authencation method
// Given idp Apple is configure with account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com exists
// User is automatically redirected to Apple
// User authenticates in Apple with user@zitadel.com
// User is redirect to ZITADEL login
// User is linked with existing user in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Apple IDP, no user linked, linking not possible", async ({ page }) => {
test.skip();
// Given idp Apple is configure on the organization as only authencation method
// Given idp Apple is configure with manually account linking not allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Apple
// User authenticates in Apple with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User will get an error message that account linking wasn't possible
});
test("login with Apple IDP, no user linked, user link successful", async ({ page }) => {
test.skip();
// Given idp Apple is configure on the organization as only authencation method
// Given idp Apple is configure with manually account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Apple
// User authenticates in Apple with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User is prompted to link the account manually
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,99 @@
import test from "@playwright/test";
test("login with Generic JWT IDP", async ({ page }) => {
test.skip();
// Given a Generic JWT IDP is configured on the organization
// Given the user has Generic JWT IDP added as auth method
// User authenticates with the Generic JWT IDP
// User is redirected back to login
// User is redirected to the app
});
test("login with Generic JWT IDP - error", async ({ page }) => {
test.skip();
// Given the Generic JWT IDP is configured on the organization
// Given the user has Generic JWT IDP added as auth method
// User is redirected to the Generic JWT IDP
// User authenticates with the Generic JWT IDP and gets an error
// User is redirected back to login
// An error is shown to the user "Something went wrong"
});
test("login with Generic JWT IDP, no user existing - auto register", async ({ page }) => {
test.skip();
// Given idp Generic JWT is configure on the organization as only authencation method
// Given idp Generic JWT is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Generic JWT
// User authenticates in Generic JWT
// User is redirect to ZITADEL login
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Generic JWT IDP, no user existing - auto register not possible", async ({ page }) => {
test.skip();
// Given idp Generic JWT is configure on the organization as only authencation method
// Given idp Generic JWT is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Generic JWT
// User authenticates in Generic JWT
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// User will see the registration page with pre filled user information
// User fills missing information
// User clicks register button
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Generic JWT IDP, no user existing - auto register enabled - manual creation disabled, creation not possible", async ({
page,
}) => {
test.skip();
// Given idp Generic JWT is configure on the organization as only authencation method
// Given idp Generic JWT is configure with account creation not allowed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Generic JWT
// User authenticates in Generic JWT
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// Error message is shown, that registration of the user was not possible due to missing information
});
test("login with Generic JWT IDP, no user linked - auto link", async ({ page }) => {
test.skip();
// Given idp Generic JWT is configure on the organization as only authencation method
// Given idp Generic JWT is configure with account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com exists
// User is automatically redirected to Generic JWT
// User authenticates in Generic JWT with user@zitadel.com
// User is redirect to ZITADEL login
// User is linked with existing user in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Generic JWT IDP, no user linked, linking not possible", async ({ page }) => {
test.skip();
// Given idp Generic JWT is configure on the organization as only authencation method
// Given idp Generic JWT is configure with manually account linking not allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Generic JWT
// User authenticates in Generic JWT with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User will get an error message that account linking wasn't possible
});
test("login with Generic JWT IDP, no user linked, linking successful", async ({ page }) => {
test.skip();
// Given idp Generic JWT is configure on the organization as only authencation method
// Given idp Generic JWT is configure with manually account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Generic JWT
// User authenticates in Generic JWT with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User is prompted to link the account manually
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,99 @@
import test from "@playwright/test";
test("login with Generic OAuth IDP", async ({ page }) => {
test.skip();
// Given a Generic OAuth IDP is configured on the organization
// Given the user has Generic OAuth IDP added as auth method
// User authenticates with the Generic OAuth IDP
// User is redirected back to login
// User is redirected to the app
});
test("login with Generic OAuth IDP - error", async ({ page }) => {
test.skip();
// Given the Generic OAuth IDP is configured on the organization
// Given the user has Generic OAuth IDP added as auth method
// User is redirected to the Generic OAuth IDP
// User authenticates with the Generic OAuth IDP and gets an error
// User is redirected back to login
// An error is shown to the user "Something went wrong"
});
test("login with Generic OAuth IDP, no user existing - auto register", async ({ page }) => {
test.skip();
// Given idp Generic OAuth is configure on the organization as only authencation method
// Given idp Generic OAuth is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Generic OAuth
// User authenticates in Generic OAuth
// User is redirect to ZITADEL login
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Generic OAuth IDP, no user existing - auto register not possible", async ({ page }) => {
test.skip();
// Given idp Generic OAuth is configure on the organization as only authencation method
// Given idp Generic OAuth is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Generic OAuth
// User authenticates in Generic OAuth
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// User will see the registration page with pre filled user information
// User fills missing information
// User clicks register button
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Generic OAuth IDP, no user existing - auto register enabled - manual creation disabled, creation not possible", async ({
page,
}) => {
test.skip();
// Given idp Generic OAuth is configure on the organization as only authencation method
// Given idp Generic OAuth is configure with account creation not allowed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Generic OAuth
// User authenticates in Generic OAuth
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// Error message is shown, that registration of the user was not possible due to missing information
});
test("login with Generic OAuth IDP, no user linked - auto link", async ({ page }) => {
test.skip();
// Given idp Generic OAuth is configure on the organization as only authencation method
// Given idp Generic OAuth is configure with account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com exists
// User is automatically redirected to Generic OAuth
// User authenticates in Generic OAuth with user@zitadel.com
// User is redirect to ZITADEL login
// User is linked with existing user in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Generic OAuth IDP, no user linked, linking not possible", async ({ page }) => {
test.skip();
// Given idp Generic OAuth is configure on the organization as only authencation method
// Given idp Generic OAuth is configure with manually account linking not allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Generic OAuth
// User authenticates in Generic OAuth with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User will get an error message that account linking wasn't possible
});
test("login with Generic OAuth IDP, no user linked, linking successful", async ({ page }) => {
test.skip();
// Given idp Generic OAuth is configure on the organization as only authencation method
// Given idp Generic OAuth is configure with manually account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Generic OAuth
// User authenticates in Generic OAuth with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User is prompted to link the account manually
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,101 @@
// Note, we should use a provider such as Google to test this, where we know OIDC standard is properly implemented
import test from "@playwright/test";
test("login with Generic OIDC IDP", async ({ page }) => {
test.skip();
// Given a Generic OIDC IDP is configured on the organization
// Given the user has Generic OIDC IDP added as auth method
// User authenticates with the Generic OIDC IDP
// User is redirected back to login
// User is redirected to the app
});
test("login with Generic OIDC IDP - error", async ({ page }) => {
test.skip();
// Given the Generic OIDC IDP is configured on the organization
// Given the user has Generic OIDC IDP added as auth method
// User is redirected to the Generic OIDC IDP
// User authenticates with the Generic OIDC IDP and gets an error
// User is redirected back to login
// An error is shown to the user "Something went wrong"
});
test("login with Generic OIDC IDP, no user existing - auto register", async ({ page }) => {
test.skip();
// Given idp Generic OIDC is configure on the organization as only authencation method
// Given idp Generic OIDC is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Generic OIDC
// User authenticates in Generic OIDC
// User is redirect to ZITADEL login
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Generic OIDC IDP, no user existing - auto register not possible", async ({ page }) => {
test.skip();
// Given idp Generic OIDC is configure on the organization as only authencation method
// Given idp Generic OIDC is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Generic OIDC
// User authenticates in Generic OIDC
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// User will see the registration page with pre filled user information
// User fills missing information
// User clicks register button
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Generic OIDC IDP, no user existing - auto register enabled - manual creation disabled, creation not possible", async ({
page,
}) => {
test.skip();
// Given idp Generic OIDC is configure on the organization as only authencation method
// Given idp Generic OIDC is configure with account creation not allowed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Generic OIDC
// User authenticates in Generic OIDC
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// Error message is shown, that registration of the user was not possible due to missing information
});
test("login with Generic OIDC IDP, no user linked - auto link", async ({ page }) => {
test.skip();
// Given idp Generic OIDC is configure on the organization as only authencation method
// Given idp Generic OIDC is configure with account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com exists
// User is automatically redirected to Generic OIDC
// User authenticates in Generic OIDC with user@zitadel.com
// User is redirect to ZITADEL login
// User is linked with existing user in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Generic OIDC IDP, no user linked, linking not possible", async ({ page }) => {
test.skip();
// Given idp Generic OIDC is configure on the organization as only authencation method
// Given idp Generic OIDC is configure with manually account linking not allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Generic OIDC
// User authenticates in Generic OIDC with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User will get an error message that account linking wasn't possible
});
test("login with Generic OIDC IDP, no user linked, linking successful", async ({ page }) => {
test.skip();
// Given idp Generic OIDC is configure on the organization as only authencation method
// Given idp Generic OIDC is configure with manually account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Generic OIDC
// User authenticates in Generic OIDC with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User is prompted to link the account manually
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,103 @@
import test from "@playwright/test";
test("login with GitHub Enterprise IDP", async ({ page }) => {
test.skip();
// Given a GitHub Enterprise IDP is configured on the organization
// Given the user has GitHub Enterprise IDP added as auth method
// User authenticates with the GitHub Enterprise IDP
// User is redirected back to login
// User is redirected to the app
});
test("login with GitHub Enterprise IDP - error", async ({ page }) => {
test.skip();
// Given the GitHub Enterprise IDP is configured on the organization
// Given the user has GitHub Enterprise IDP added as auth method
// User is redirected to the GitHub Enterprise IDP
// User authenticates with the GitHub Enterprise IDP and gets an error
// User is redirected back to login
// An error is shown to the user "Something went wrong"
});
test("login with GitHub Enterprise IDP, no user existing - auto register", async ({ page }) => {
test.skip();
// Given idp GitHub Enterprise is configure on the organization as only authencation method
// Given idp GitHub Enterprise is configure with account creation alloweed, and automatic creation enabled
// Given ZITADEL Action is added to autofill missing user information
// Given no user exists yet
// User is automatically redirected to GitHub Enterprise
// User authenticates in GitHub Enterprise
// User is redirect to ZITADEL login
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with GitHub Enterprise IDP, no user existing - auto register not possible", async ({ page }) => {
test.skip();
// Given idp GitHub Enterprise is configure on the organization as only authencation method
// Given idp GitHub Enterprise is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to GitHub Enterprise
// User authenticates in GitHub Enterprise
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// User will see the registration page with pre filled user information
// User fills missing information
// User clicks register button
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with GitHub Enterprise IDP, no user existing - auto register enabled - manual creation disabled, creation not possible", async ({
page,
}) => {
test.skip();
// Given idp GitHub Enterprise is configure on the organization as only authencation method
// Given idp GitHub Enterprise is configure with account creation not allowed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to GitHub Enterprise
// User authenticates in GitHub Enterprise
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// Error message is shown, that registration of the user was not possible due to missing information
});
test("login with GitHub Enterprise IDP, no user linked - auto link", async ({ page }) => {
test.skip();
// Given idp GitHub Enterprise is configure on the organization as only authencation method
// Given idp GitHub Enterprise is configure with account linking allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com exists
// User is automatically redirected to GitHub Enterprise
// User authenticates in GitHub Enterprise with user@zitadel.com
// User is redirect to ZITADEL login
// User is linked with existing user in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with GitHub Enterprise IDP, no user linked, linking not possible", async ({ page }) => {
test.skip();
// Given idp GitHub Enterprise is configure on the organization as only authencation method
// Given idp GitHub Enterprise is configure with manually account linking not allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to GitHub Enterprise
// User authenticates in GitHub Enterprise with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User will get an error message that account linking wasn't possible
});
test("login with GitHub Enterprise IDP, no user linked, linking successful", async ({ page }) => {
test.skip();
// Given idp GitHub Enterprise is configure on the organization as only authencation method
// Given idp GitHub Enterprise is configure with manually account linking allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to GitHub Enterprise
// User authenticates in GitHub Enterprise with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User is prompted to link the account manually
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,103 @@
import test from "@playwright/test";
test("login with GitHub IDP", async ({ page }) => {
test.skip();
// Given a GitHub IDP is configured on the organization
// Given the user has GitHub IDP added as auth method
// User authenticates with the GitHub IDP
// User is redirected back to login
// User is redirected to the app
});
test("login with GitHub IDP - error", async ({ page }) => {
test.skip();
// Given the GitHub IDP is configured on the organization
// Given the user has GitHub IDP added as auth method
// User is redirected to the GitHub IDP
// User authenticates with the GitHub IDP and gets an error
// User is redirected back to login
// An error is shown to the user "Something went wrong"
});
test("login with GitHub IDP, no user existing - auto register", async ({ page }) => {
test.skip();
// Given idp GitHub is configure on the organization as only authencation method
// Given idp GitHub is configure with account creation alloweed, and automatic creation enabled
// Given ZITADEL Action is added to autofill missing user information
// Given no user exists yet
// User is automatically redirected to GitHub
// User authenticates in GitHub
// User is redirect to ZITADEL login
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with GitHub IDP, no user existing - auto register not possible", async ({ page }) => {
test.skip();
// Given idp GitHub is configure on the organization as only authencation method
// Given idp GitHub is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to GitHub
// User authenticates in GitHub
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// User will see the registration page with pre filled user information
// User fills missing information
// User clicks register button
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with GitHub IDP, no user existing - auto register enabled - manual creation disabled, creation not possible", async ({
page,
}) => {
test.skip();
// Given idp GitHub is configure on the organization as only authencation method
// Given idp GitHub is configure with account creation not allowed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to GitHub
// User authenticates in GitHub
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// Error message is shown, that registration of the user was not possible due to missing information
});
test("login with GitHub IDP, no user linked - auto link", async ({ page }) => {
test.skip();
// Given idp GitHub is configure on the organization as only authencation method
// Given idp GitHub is configure with account linking allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com exists
// User is automatically redirected to GitHub
// User authenticates in GitHub with user@zitadel.com
// User is redirect to ZITADEL login
// User is linked with existing user in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with GitHub IDP, no user linked, linking not possible", async ({ page }) => {
test.skip();
// Given idp GitHub is configure on the organization as only authencation method
// Given idp GitHub is configure with manually account linking not allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to GitHub
// User authenticates in GitHub with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User will get an error message that account linking wasn't possible
});
test("login with GitHub IDP, no user linked, linking successful", async ({ page }) => {
test.skip();
// Given idp GitHub is configure on the organization as only authencation method
// Given idp GitHub is configure with manually account linking allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to GitHub
// User authenticates in GitHub with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User is prompted to link the account manually
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,103 @@
import test from "@playwright/test";
test("login with GitLab Self-Hosted IDP", async ({ page }) => {
test.skip();
// Given a GitLab Self-Hosted IDP is configured on the organization
// Given the user has GitLab Self-Hosted IDP added as auth method
// User authenticates with the GitLab Self-Hosted IDP
// User is redirected back to login
// User is redirected to the app
});
test("login with GitLab Self-Hosted IDP - error", async ({ page }) => {
test.skip();
// Given the GitLab Self-Hosted IDP is configured on the organization
// Given the user has GitLab Self-Hosted IDP added as auth method
// User is redirected to the GitLab Self-Hosted IDP
// User authenticates with the GitLab Self-Hosted IDP and gets an error
// User is redirected back to login
// An error is shown to the user "Something went wrong"
});
test("login with Gitlab Self-Hosted IDP, no user existing - auto register", async ({ page }) => {
test.skip();
// Given idp Gitlab Self-Hosted is configure on the organization as only authencation method
// Given idp Gitlab Self-Hosted is configure with account creation alloweed, and automatic creation enabled
// Given ZITADEL Action is added to autofill missing user information
// Given no user exists yet
// User is automatically redirected to Gitlab Self-Hosted
// User authenticates in Gitlab Self-Hosted
// User is redirect to ZITADEL login
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Gitlab Self-Hosted IDP, no user existing - auto register not possible", async ({ page }) => {
test.skip();
// Given idp Gitlab Self-Hosted is configure on the organization as only authencation method
// Given idp Gitlab Self-Hosted is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Gitlab Self-Hosted
// User authenticates in Gitlab Self-Hosted
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// User will see the registration page with pre filled user information
// User fills missing information
// User clicks register button
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Gitlab Self-Hosted IDP, no user existing - auto register enabled - manual creation disabled, creation not possible", async ({
page,
}) => {
test.skip();
// Given idp Gitlab Self-Hosted is configure on the organization as only authencation method
// Given idp Gitlab Self-Hosted is configure with account creation not allowed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Gitlab Self-Hosted
// User authenticates in Gitlab Self-Hosted
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// Error message is shown, that registration of the user was not possible due to missing information
});
test("login with Gitlab Self-Hosted IDP, no user linked - auto link", async ({ page }) => {
test.skip();
// Given idp Gitlab Self-Hosted is configure on the organization as only authencation method
// Given idp Gitlab Self-Hosted is configure with account linking allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com exists
// User is automatically redirected to Gitlab Self-Hosted
// User authenticates in Gitlab Self-Hosted with user@zitadel.com
// User is redirect to ZITADEL login
// User is linked with existing user in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Gitlab Self-Hosted IDP, no user linked, linking not possible", async ({ page }) => {
test.skip();
// Given idp Gitlab Self-Hosted is configure on the organization as only authencation method
// Given idp Gitlab Self-Hosted is configure with manually account linking not allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Gitlab Self-Hosted
// User authenticates in Gitlab Self-Hosted with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User will get an error message that account linking wasn't possible
});
test("login with Gitlab Self-Hosted IDP, no user linked, linking successful", async ({ page }) => {
test.skip();
// Given idp Gitlab Self-Hosted is configure on the organization as only authencation method
// Given idp Gitlab Self-Hosted is configure with manually account linking allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Gitlab Self-Hosted
// User authenticates in Gitlab Self-Hosted with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User is prompted to link the account manually
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,103 @@
import test from "@playwright/test";
test("login with GitLab IDP", async ({ page }) => {
test.skip();
// Given a GitLab IDP is configured on the organization
// Given the user has GitLab IDP added as auth method
// User authenticates with the GitLab IDP
// User is redirected back to login
// User is redirected to the app
});
test("login with GitLab IDP - error", async ({ page }) => {
test.skip();
// Given the GitLab IDP is configured on the organization
// Given the user has GitLab IDP added as auth method
// User is redirected to the GitLab IDP
// User authenticates with the GitLab IDP and gets an error
// User is redirected back to login
// An error is shown to the user "Something went wrong"
});
test("login with Gitlab IDP, no user existing - auto register", async ({ page }) => {
test.skip();
// Given idp Gitlab is configure on the organization as only authencation method
// Given idp Gitlab is configure with account creation alloweed, and automatic creation enabled
// Given ZITADEL Action is added to autofill missing user information
// Given no user exists yet
// User is automatically redirected to Gitlab
// User authenticates in Gitlab
// User is redirect to ZITADEL login
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Gitlab IDP, no user existing - auto register not possible", async ({ page }) => {
test.skip();
// Given idp Gitlab is configure on the organization as only authencation method
// Given idp Gitlab is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Gitlab
// User authenticates in Gitlab
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// User will see the registration page with pre filled user information
// User fills missing information
// User clicks register button
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Gitlab IDP, no user existing - auto register enabled - manual creation disabled, creation not possible", async ({
page,
}) => {
test.skip();
// Given idp Gitlab is configure on the organization as only authencation method
// Given idp Gitlab is configure with account creation not allowed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Gitlab
// User authenticates in Gitlab
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// Error message is shown, that registration of the user was not possible due to missing information
});
test("login with Gitlab IDP, no user linked - auto link", async ({ page }) => {
test.skip();
// Given idp Gitlab is configure on the organization as only authencation method
// Given idp Gitlab is configure with account linking allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com exists
// User is automatically redirected to Gitlab
// User authenticates in Gitlab with user@zitadel.com
// User is redirect to ZITADEL login
// User is linked with existing user in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Gitlab IDP, no user linked, linking not possible", async ({ page }) => {
test.skip();
// Given idp Gitlab is configure on the organization as only authencation method
// Given idp Gitlab is configure with manually account linking not allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Gitlab
// User authenticates in Gitlab with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User will get an error message that account linking wasn't possible
});
test("login with Gitlab IDP, no user linked, linking successful", async ({ page }) => {
test.skip();
// Given idp Gitlab is configure on the organization as only authencation method
// Given idp Gitlab is configure with manually account linking allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Gitlab
// User authenticates in Gitlab with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User is prompted to link the account manually
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,99 @@
import test from "@playwright/test";
test("login with Google IDP", async ({ page }) => {
test.skip();
// Given a Google IDP is configured on the organization
// Given the user has Google IDP added as auth method
// User authenticates with the Google IDP
// User is redirected back to login
// User is redirected to the app
});
test("login with Google IDP - error", async ({ page }) => {
test.skip();
// Given the Google IDP is configured on the organization
// Given the user has Google IDP added as auth method
// User is redirected to the Google IDP
// User authenticates with the Google IDP and gets an error
// User is redirected back to login
// An error is shown to the user "Something went wrong"
});
test("login with Google IDP, no user existing - auto register", async ({ page }) => {
test.skip();
// Given idp Google is configure on the organization as only authencation method
// Given idp Google is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Google
// User authenticates in Google
// User is redirect to ZITADEL login
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Google IDP, no user existing - auto register not possible", async ({ page }) => {
test.skip();
// Given idp Google is configure on the organization as only authencation method
// Given idp Google is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Google
// User authenticates in Google
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// User will see the registration page with pre filled user information
// User fills missing information
// User clicks register button
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Google IDP, no user existing - auto register enabled - manual creation disabled, creation not possible", async ({
page,
}) => {
test.skip();
// Given idp Google is configure on the organization as only authencation method
// Given idp Google is configure with account creation not allowed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Google
// User authenticates in Google
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// Error message is shown, that registration of the user was not possible due to missing information
});
test("login with Google IDP, no user linked - auto link", async ({ page }) => {
test.skip();
// Given idp Google is configure on the organization as only authencation method
// Given idp Google is configure with account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com exists
// User is automatically redirected to Google
// User authenticates in Google with user@zitadel.com
// User is redirect to ZITADEL login
// User is linked with existing user in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Google IDP, no user linked, linking not possible", async ({ page }) => {
test.skip();
// Given idp Google is configure on the organization as only authencation method
// Given idp Google is configure with manually account linking not allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Google
// User authenticates in Google with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User will get an error message that account linking wasn't possible
});
test("login with Google IDP, no user linked, linking successful", async ({ page }) => {
test.skip();
// Given idp Google is configure on the organization as only authencation method
// Given idp Google is configure with manually account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Google
// User authenticates in Google with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User is prompted to link the account manually
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,99 @@
import test from "@playwright/test";
test("login with LDAP IDP", async ({ page }) => {
test.skip();
// Given a LDAP IDP is configured on the organization
// Given the user has LDAP IDP added as auth method
// User authenticates with the LDAP IDP
// User is redirected back to login
// User is redirected to the app
});
test("login with LDAP IDP - error", async ({ page }) => {
test.skip();
// Given the LDAP IDP is configured on the organization
// Given the user has LDAP IDP added as auth method
// User is redirected to the LDAP IDP
// User authenticates with the LDAP IDP and gets an error
// User is redirected back to login
// An error is shown to the user "Something went wrong"
});
test("login with LDAP IDP, no user existing - auto register", async ({ page }) => {
test.skip();
// Given idp LDAP is configure on the organization as only authencation method
// Given idp LDAP is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to LDAP
// User authenticates in LDAP
// User is redirect to ZITADEL login
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with LDAP IDP, no user existing - auto register not possible", async ({ page }) => {
test.skip();
// Given idp LDAP is configure on the organization as only authencation method
// Given idp LDAP is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to LDAP
// User authenticates in LDAP
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// User will see the registration page with pre filled user information
// User fills missing information
// User clicks register button
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with LDAP IDP, no user existing - auto register enabled - manual creation disabled, creation not possible", async ({
page,
}) => {
test.skip();
// Given idp LDAP is configure on the organization as only authencation method
// Given idp LDAP is configure with account creation not allowed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to LDAP
// User authenticates in LDAP
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// Error message is shown, that registration of the user was not possible due to missing information
});
test("login with LDAP IDP, no user linked - auto link", async ({ page }) => {
test.skip();
// Given idp LDAP is configure on the organization as only authencation method
// Given idp LDAP is configure with account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com exists
// User is automatically redirected to LDAP
// User authenticates in LDAP with user@zitadel.com
// User is redirect to ZITADEL login
// User is linked with existing user in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with LDAP IDP, no user linked, linking not possible", async ({ page }) => {
test.skip();
// Given idp LDAP is configure on the organization as only authencation method
// Given idp LDAP is configure with manually account linking not allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to LDAP
// User authenticates in LDAP with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User will get an error message that account linking wasn't possible
});
test("login with LDAP IDP, no user linked, linking successful", async ({ page }) => {
test.skip();
// Given idp LDAP is configure on the organization as only authencation method
// Given idp LDAP is configure with manually account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to LDAP
// User authenticates in LDAP with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User is prompted to link the account manually
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,102 @@
// Note for all tests, in case Microsoft doesn't deliver all relevant information per default
// We should add an action in the needed cases
import test from "@playwright/test";
test("login with Microsoft IDP", async ({ page }) => {
test.skip();
// Given a Microsoft IDP is configured on the organization
// Given the user has Microsoft IDP added as auth method
// User authenticates with the Microsoft IDP
// User is redirected back to login
// User is redirected to the app
});
test("login with Microsoft IDP - error", async ({ page }) => {
test.skip();
// Given the Microsoft IDP is configured on the organization
// Given the user has Microsoft IDP added as auth method
// User is redirected to the Microsoft IDP
// User authenticates with the Microsoft IDP and gets an error
// User is redirected back to login
// An error is shown to the user "Something went wrong"
});
test("login with Microsoft IDP, no user existing - auto register", async ({ page }) => {
test.skip();
// Given idp Microsoft is configure on the organization as only authencation method
// Given idp Microsoft is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Microsoft
// User authenticates in Microsoft
// User is redirect to ZITADEL login
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Microsoft IDP, no user existing - auto register not possible", async ({ page }) => {
test.skip();
// Given idp Microsoft is configure on the organization as only authencation method
// Given idp Microsoft is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Microsoft
// User authenticates in Microsoft
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// User will see the registration page with pre filled user information
// User fills missing information
// User clicks register button
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Microsoft IDP, no user existing - auto register enabled - manual creation disabled, creation not possible", async ({
page,
}) => {
test.skip();
// Given idp Microsoft is configure on the organization as only authencation method
// Given idp Microsoft is configure with account creation not allowed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to Microsoft
// User authenticates in Microsoft
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// Error message is shown, that registration of the user was not possible due to missing information
});
test("login with Microsoft IDP, no user linked - auto link", async ({ page }) => {
test.skip();
// Given idp Microsoft is configure on the organization as only authencation method
// Given idp Microsoft is configure with account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com exists
// User is automatically redirected to Microsoft
// User authenticates in Microsoft with user@zitadel.com
// User is redirect to ZITADEL login
// User is linked with existing user in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with Microsoft IDP, no user linked, linking not possible", async ({ page }) => {
test.skip();
// Given idp Microsoft is configure on the organization as only authencation method
// Given idp Microsoft is configure with manually account linking not allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Microsoft
// User authenticates in Microsoft with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User will get an error message that account linking wasn't possible
});
test("login with Microsoft IDP, no user linked, linking successful", async ({ page }) => {
test.skip();
// Given idp Microsoft is configure on the organization as only authencation method
// Given idp Microsoft is configure with manually account linking allowed, and linking set to existing email
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to Microsoft
// User authenticates in Microsoft with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User is prompted to link the account manually
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,103 @@
import test from "@playwright/test";
test("login with SAML IDP", async ({ page }) => {
test.skip();
// Given a SAML IDP is configured on the organization
// Given the user has SAML IDP added as auth method
// User authenticates with the SAML IDP
// User is redirected back to login
// User is redirected to the app
});
test("login with SAML IDP - error", async ({ page }) => {
test.skip();
// Given the SAML IDP is configured on the organization
// Given the user has SAML IDP added as auth method
// User is redirected to the SAML IDP
// User authenticates with the SAML IDP and gets an error
// User is redirected back to login
// An error is shown to the user "Something went wrong"
});
test("login with SAML IDP, no user existing - auto register", async ({ page }) => {
test.skip();
// Given idp SAML is configure on the organization as only authencation method
// Given idp SAML is configure with account creation alloweed, and automatic creation enabled
// Given ZITADEL Action is added to autofill missing user information
// Given no user exists yet
// User is automatically redirected to SAML
// User authenticates in SAML
// User is redirect to ZITADEL login
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with SAML IDP, no user existing - auto register not possible", async ({ page }) => {
test.skip();
// Given idp SAML is configure on the organization as only authencation method
// Given idp SAML is configure with account creation alloweed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to SAML
// User authenticates in SAML
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// User will see the registration page with pre filled user information
// User fills missing information
// User clicks register button
// User is created in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with SAML IDP, no user existing - auto register enabled - manual creation disabled, creation not possible", async ({
page,
}) => {
test.skip();
// Given idp SAML is configure on the organization as only authencation method
// Given idp SAML is configure with account creation not allowed, and automatic creation enabled
// Given no user exists yet
// User is automatically redirected to SAML
// User authenticates in SAML
// User is redirect to ZITADEL login
// Because of missing informaiton on the user auto creation is not possible
// Error message is shown, that registration of the user was not possible due to missing information
});
test("login with SAML IDP, no user linked - auto link", async ({ page }) => {
test.skip();
// Given idp SAML is configure on the organization as only authencation method
// Given idp SAML is configure with account linking allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com exists
// User is automatically redirected to SAML
// User authenticates in SAML with user@zitadel.com
// User is redirect to ZITADEL login
// User is linked with existing user in ZITADEL
// User is redirected to the app (default redirect url)
});
test("login with SAML IDP, no user linked, linking not possible", async ({ page }) => {
test.skip();
// Given idp SAML is configure on the organization as only authencation method
// Given idp SAML is configure with manually account linking not allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to SAML
// User authenticates in SAML with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User will get an error message that account linking wasn't possible
});
test("login with SAML IDP, no user linked, linking successful", async ({ page }) => {
test.skip();
// Given idp SAML is configure on the organization as only authencation method
// Given idp SAML is configure with manually account linking allowed, and linking set to existing email
// Given ZITADEL Action is added to autofill missing user information
// Given user with email address user@zitadel.com doesn't exists
// User is automatically redirected to SAML
// User authenticates in SAML with user@zitadel.com
// User is redirect to ZITADEL login
// User with email address user@zitadel.com can not be found
// User is prompted to link the account manually
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,57 @@
import test from "@playwright/test";
test("login with mfa setup, mfa setup prompt", async ({ page }) => {
test.skip();
// Given the organization has enabled at least one mfa types
// Given the user has a password but no mfa registered
// User authenticates with login name and password
// User is prompted to setup a mfa, mfa providers are listed, the user can choose the provider
});
test("login with mfa setup, no mfa setup prompt", async ({ page }) => {
test.skip();
// Given the organization has set "multifactor init check time" to 0
// Given the organization has enabled mfa types
// Given the user has a password but no mfa registered
// User authenticates with loginname and password
// user is directly loged in and not prompted to setup mfa
});
test("login with mfa setup, force mfa for local authenticated users", async ({ page }) => {
test.skip();
// Given the organization has enabled force mfa for local authentiacted users
// Given the organization has enabled all possible mfa types
// Given the user has a password but no mfa registered
// User authenticates with loginname and password
// User is prompted to setup a mfa, all possible mfa providers are listed, the user can choose the provider
});
test("login with mfa setup, force mfa - local user", async ({ page }) => {
test.skip();
// Given the organization has enabled force mfa for local authentiacted users
// Given the organization has enabled all possible mfa types
// Given the user has a password but no mfa registered
// User authenticates with loginname and password
// User is prompted to setup a mfa, all possible mfa providers are listed, the user can choose the provider
});
test("login with mfa setup, force mfa - external user", async ({ page }) => {
test.skip();
// Given the organization has enabled force mfa
// Given the organization has enabled all possible mfa types
// Given the user has an idp but no mfa registered
// enter login name
// redirect to configured external idp
// User is prompted to setup a mfa, all possible mfa providers are listed, the user can choose the provider
});
test("login with mfa setup, force mfa - local user, wrong password", async ({ page }) => {
test.skip();
// Given the organization has a password lockout policy set to 1 on the max password attempts
// Given the user has only a password as auth methos
// enter login name
// enter wrong password
// User will get an error "Wrong password"
// enter password
// User will get an error "Max password attempts reached - user is locked. Please reach out to your administrator"
});
@@ -0,0 +1,41 @@
import { expect, Page } from "@playwright/test";
import { code, otpFromSink } from "./code";
import { loginname } from "./loginname";
import { password } from "./password";
import { totp } from "./zitadel";
export async function startLogin(page: Page) {
await page.goto(`./loginname`);
}
export async function loginWithPassword(page: Page, username: string, pw: string) {
await startLogin(page);
await loginname(page, username);
await password(page, pw);
}
export async function loginWithPasskey(page: Page, authenticatorId: string, username: string) {
await startLogin(page);
await loginname(page, username);
// await passkey(page, authenticatorId);
}
export async function loginScreenExpect(page: Page, fullName: string) {
await expect(page).toHaveURL(/.*signedin.*/);
await expect(page.getByRole("heading")).toContainText(fullName);
}
export async function loginWithPasswordAndEmailOTP(page: Page, username: string, password: string, email: string) {
await loginWithPassword(page, username, password);
await otpFromSink(page, email);
}
export async function loginWithPasswordAndPhoneOTP(page: Page, username: string, password: string, phone: string) {
await loginWithPassword(page, username, password);
await otpFromSink(page, phone);
}
export async function loginWithPasswordAndTOTP(page: Page, username: string, password: string, secret: string) {
await loginWithPassword(page, username, password);
await code(page, totp(secret));
}
@@ -0,0 +1,12 @@
import { expect, Page } from "@playwright/test";
const usernameTextInput = "username-text-input";
export async function loginnameScreen(page: Page, username: string) {
await page.getByTestId(usernameTextInput).pressSequentially(username);
}
export async function loginnameScreenExpect(page: Page, username: string) {
await expect(page.getByTestId(usernameTextInput)).toHaveValue(username);
await expect(page.getByTestId("error").locator("div")).toContainText("User not found in the system");
}
@@ -0,0 +1,7 @@
import { Page } from "@playwright/test";
import { loginnameScreen } from "./loginname-screen";
export async function loginname(page: Page, username: string) {
await loginnameScreen(page, username);
await page.getByTestId("submit-button").click();
}
@@ -0,0 +1,109 @@
import { expect, Page } from "@playwright/test";
import { CDPSession } from "playwright-core";
interface session {
client: CDPSession;
authenticatorId: string;
}
async function client(page: Page): Promise<session> {
const cdpSession = await page.context().newCDPSession(page);
await cdpSession.send("WebAuthn.enable", { enableUI: false });
const result = await cdpSession.send("WebAuthn.addVirtualAuthenticator", {
options: {
protocol: "ctap2",
transport: "internal",
hasResidentKey: true,
hasUserVerification: true,
isUserVerified: true,
automaticPresenceSimulation: true,
},
});
return { client: cdpSession, authenticatorId: result.authenticatorId };
}
export async function passkeyRegister(page: Page): Promise<string> {
const session = await client(page);
await passkeyNotExisting(session.client, session.authenticatorId);
await simulateSuccessfulPasskeyRegister(session.client, session.authenticatorId, () =>
page.getByTestId("submit-button").click(),
);
await passkeyRegistered(session.client, session.authenticatorId);
return session.authenticatorId;
}
export async function passkey(page: Page, authenticatorId: string) {
const cdpSession = await page.context().newCDPSession(page);
await cdpSession.send("WebAuthn.enable", { enableUI: false });
const signCount = await passkeyExisting(cdpSession, authenticatorId);
await simulateSuccessfulPasskeyInput(cdpSession, authenticatorId, () => page.getByTestId("submit-button").click());
await passkeyUsed(cdpSession, authenticatorId, signCount);
}
async function passkeyNotExisting(client: CDPSession, authenticatorId: string) {
const result = await client.send("WebAuthn.getCredentials", { authenticatorId });
expect(result.credentials).toHaveLength(0);
}
async function passkeyRegistered(client: CDPSession, authenticatorId: string) {
const result = await client.send("WebAuthn.getCredentials", { authenticatorId });
expect(result.credentials).toHaveLength(1);
await passkeyUsed(client, authenticatorId, 0);
}
async function passkeyExisting(client: CDPSession, authenticatorId: string): Promise<number> {
const result = await client.send("WebAuthn.getCredentials", { authenticatorId });
expect(result.credentials).toHaveLength(1);
return result.credentials[0].signCount;
}
async function passkeyUsed(client: CDPSession, authenticatorId: string, signCount: number) {
const result = await client.send("WebAuthn.getCredentials", { authenticatorId });
expect(result.credentials).toHaveLength(1);
expect(result.credentials[0].signCount).toBeGreaterThan(signCount);
}
async function simulateSuccessfulPasskeyRegister(
client: CDPSession,
authenticatorId: string,
operationTrigger: () => Promise<void>,
) {
// initialize event listeners to wait for a successful passkey input event
const operationCompleted = new Promise<void>((resolve) => {
client.on("WebAuthn.credentialAdded", () => {
console.log("Credential Added!");
resolve();
});
});
// perform a user action that triggers passkey prompt
await operationTrigger();
// wait to receive the event that the passkey was successfully registered or verified
await operationCompleted;
}
async function simulateSuccessfulPasskeyInput(
client: CDPSession,
authenticatorId: string,
operationTrigger: () => Promise<void>,
) {
// initialize event listeners to wait for a successful passkey input event
const operationCompleted = new Promise<void>((resolve) => {
client.on("WebAuthn.credentialAsserted", () => {
console.log("Credential Asserted!");
resolve();
});
});
// perform a user action that triggers passkey prompt
await operationTrigger();
// wait to receive the event that the passkey was successfully registered or verified
await operationCompleted;
}
@@ -0,0 +1,98 @@
import { expect, Page } from "@playwright/test";
import { getCodeFromSink } from "./sink";
const codeField = "code-text-input";
const passwordField = "password-text-input";
const passwordChangeField = "password-change-text-input";
const passwordChangeConfirmField = "password-change-confirm-text-input";
const passwordSetField = "password-set-text-input";
const passwordSetConfirmField = "password-set-confirm-text-input";
const lengthCheck = "length-check";
const symbolCheck = "symbol-check";
const numberCheck = "number-check";
const uppercaseCheck = "uppercase-check";
const lowercaseCheck = "lowercase-check";
const equalCheck = "equal-check";
const matchText = "Matches";
const noMatchText = "Doesn't match";
export async function changePasswordScreen(page: Page, password1: string, password2: string) {
await page.getByTestId(passwordChangeField).pressSequentially(password1);
await page.getByTestId(passwordChangeConfirmField).pressSequentially(password2);
}
export async function passwordScreen(page: Page, password: string) {
await page.getByTestId(passwordField).pressSequentially(password);
}
export async function passwordScreenExpect(page: Page, password: string) {
await expect(page.getByTestId(passwordField)).toHaveValue(password);
await expect(page.getByTestId("error").locator("div")).toContainText("Failed to authenticate.");
}
export async function changePasswordScreenExpect(
page: Page,
password1: string,
password2: string,
length: boolean,
symbol: boolean,
number: boolean,
uppercase: boolean,
lowercase: boolean,
equals: boolean,
) {
await expect(page.getByTestId(passwordChangeField)).toHaveValue(password1);
await expect(page.getByTestId(passwordChangeConfirmField)).toHaveValue(password2);
await checkComplexity(page, length, symbol, number, uppercase, lowercase, equals);
}
async function checkComplexity(
page: Page,
length: boolean,
symbol: boolean,
number: boolean,
uppercase: boolean,
lowercase: boolean,
equals: boolean,
) {
await checkContent(page, lengthCheck, length);
await checkContent(page, symbolCheck, symbol);
await checkContent(page, numberCheck, number);
await checkContent(page, uppercaseCheck, uppercase);
await checkContent(page, lowercaseCheck, lowercase);
await checkContent(page, equalCheck, equals);
}
async function checkContent(page: Page, testid: string, match: boolean) {
if (match) {
await expect(page.getByTestId(testid)).toContainText(matchText);
} else {
await expect(page.getByTestId(testid)).toContainText(noMatchText);
}
}
export async function resetPasswordScreen(page: Page, username: string, password1: string, password2: string) {
const c = await getCodeFromSink(username);
await page.getByTestId(codeField).pressSequentially(c);
await page.getByTestId(passwordSetField).pressSequentially(password1);
await page.getByTestId(passwordSetConfirmField).pressSequentially(password2);
}
export async function resetPasswordScreenExpect(
page: Page,
password1: string,
password2: string,
length: boolean,
symbol: boolean,
number: boolean,
uppercase: boolean,
lowercase: boolean,
equals: boolean,
) {
await expect(page.getByTestId(passwordSetField)).toHaveValue(password1);
await expect(page.getByTestId(passwordSetConfirmField)).toHaveValue(password2);
await checkComplexity(page, length, symbol, number, uppercase, lowercase, equals);
}
@@ -0,0 +1,29 @@
import { Page } from "@playwright/test";
import { changePasswordScreen, passwordScreen, resetPasswordScreen } from "./password-screen";
const passwordSubmitButton = "submit-button";
const passwordResetButton = "reset-button";
export async function startChangePassword(page: Page, loginname: string) {
await page.goto("./password/change?" + new URLSearchParams({ loginName: loginname }));
}
export async function changePassword(page: Page, password: string) {
await changePasswordScreen(page, password, password);
await page.getByTestId(passwordSubmitButton).click();
}
export async function password(page: Page, password: string) {
await passwordScreen(page, password);
await page.getByTestId(passwordSubmitButton).click();
}
export async function startResetPassword(page: Page) {
await page.getByTestId(passwordResetButton).click();
}
export async function resetPassword(page: Page, username: string, password: string) {
await startResetPassword(page);
await resetPasswordScreen(page, username, password, password);
await page.getByTestId(passwordSubmitButton).click();
}
@@ -0,0 +1,27 @@
import { Page } from "@playwright/test";
const passwordField = "password-text-input";
const passwordConfirmField = "password-confirm-text-input";
export async function registerUserScreenPassword(page: Page, firstname: string, lastname: string, email: string) {
await registerUserScreen(page, firstname, lastname, email);
await page.getByTestId("password-radio").click();
}
export async function registerUserScreenPasskey(page: Page, firstname: string, lastname: string, email: string) {
await registerUserScreen(page, firstname, lastname, email);
await page.getByTestId("passkey-radio").click();
}
export async function registerPasswordScreen(page: Page, password1: string, password2: string) {
await page.getByTestId(passwordField).pressSequentially(password1);
await page.getByTestId(passwordConfirmField).pressSequentially(password2);
}
export async function registerUserScreen(page: Page, firstname: string, lastname: string, email: string) {
await page.getByTestId("firstname-text-input").pressSequentially(firstname);
await page.getByTestId("lastname-text-input").pressSequentially(lastname);
await page.getByTestId("email-text-input").pressSequentially(email);
await page.getByTestId("privacy-policy-checkbox").check();
await page.getByTestId("tos-checkbox").check();
}
@@ -0,0 +1,183 @@
import { faker } from "@faker-js/faker";
import { test } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import { loginScreenExpect } from "./login";
import { registerWithPasskey, registerWithPassword } from "./register";
import { removeUserByUsername } from "./zitadel";
// Read from ".env" file.
dotenv.config({ path: path.resolve(__dirname, "../../login/.env.test.local") });
test("register with password", async ({ page }) => {
const username = faker.internet.email();
const password = "Password1!";
const firstname = faker.person.firstName();
const lastname = faker.person.lastName();
await registerWithPassword(page, firstname, lastname, username, password, password);
await loginScreenExpect(page, firstname + " " + lastname);
// wait for projection of user
await page.waitForTimeout(10000);
await removeUserByUsername(username);
});
test("register with passkey", async ({ page }) => {
const username = faker.internet.email();
const firstname = faker.person.firstName();
const lastname = faker.person.lastName();
await registerWithPasskey(page, firstname, lastname, username);
await loginScreenExpect(page, firstname + " " + lastname);
// wait for projection of user
await page.waitForTimeout(10000);
await removeUserByUsername(username);
});
test("register with username and password - only password enabled", async ({ page }) => {
test.skip();
// Given on the default organization "username and password is allowed" is enabled
// Given on the default organization "username registeration allowed" is enabled
// Given on the default organization no idp is configured and enabled
// Given on the default organization passkey is not enabled
// Given user doesn't exist
// Click on button "register new user"
// User is redirected to registration page
// Only password is shown as an option - no passkey
// User enters "firstname", "lastname", "username" and "password"
// User is redirected to app (default redirect url)
});
test("register with username and password - wrong password not enough characters", async ({ page }) => {
test.skip();
// Given on the default organization "username and password is allowed" is enabled
// Given on the default organization "username registeration allowed" is enabled
// Given on the default organization no idp is configured and enabled
// Given on the default organization passkey is not enabled
// Given password policy is set to 8 characters and must include number, symbol, lower and upper letter
// Given user doesn't exist
// Click on button "register new user"
// User is redirected to registration page
// Only password is shown as an option - no passkey
// User enters "firstname", "lastname", "username" and a password thats to short
// Error is shown "Password doesn't match the policy - it must have at least 8 characters"
});
test("register with username and password - wrong password number missing", async ({ page }) => {
test.skip();
// Given on the default organization "username and password is allowed" is enabled
// Given on the default organization "username registeration allowed" is enabled
// Given on the default organization no idp is configured and enabled
// Given on the default organization passkey is not enabled
// Given password policy is set to 8 characters and must include number, symbol, lower and upper letter
// Given user doesn't exist
// Click on button "register new user"
// User is redirected to registration page
// Only password is shown as an option - no passkey
// User enters "firstname", "lastname", "username" and a password without a number
// Error is shown "Password doesn't match the policy - number missing"
});
test("register with username and password - wrong password upper case missing", async ({ page }) => {
test.skip();
// Given on the default organization "username and password is allowed" is enabled
// Given on the default organization "username registeration allowed" is enabled
// Given on the default organization no idp is configured and enabled
// Given on the default organization passkey is not enabled
// Given password policy is set to 8 characters and must include number, symbol, lower and upper letter
// Given user doesn't exist
// Click on button "register new user"
// User is redirected to registration page
// Only password is shown as an option - no passkey
// User enters "firstname", "lastname", "username" and a password without an upper case
// Error is shown "Password doesn't match the policy - uppercase letter missing"
});
test("register with username and password - wrong password lower case missing", async ({ page }) => {
test.skip();
// Given on the default organization "username and password is allowed" is enabled
// Given on the default organization "username registeration allowed" is enabled
// Given on the default organization no idp is configured and enabled
// Given on the default organization passkey is not enabled
// Given password policy is set to 8 characters and must include number, symbol, lower and upper letter
// Given user doesn't exist
// Click on button "register new user"
// User is redirected to registration page
// Only password is shown as an option - no passkey
// User enters "firstname", "lastname", "username" and a password without an lower case
// Error is shown "Password doesn't match the policy - lowercase letter missing"
});
test("register with username and password - wrong password symboo missing", async ({ page }) => {
test.skip();
// Given on the default organization "username and password is allowed" is enabled
// Given on the default organization "username registeration allowed" is enabled
// Given on the default organization no idp is configured and enabled
// Given on the default organization passkey is not enabled
// Given password policy is set to 8 characters and must include number, symbol, lower and upper letter
// Given user doesn't exist
// Click on button "register new user"
// User is redirected to registration page
// Only password is shown as an option - no passkey
// User enters "firstname", "lastname", "username" and a password without an symbol
// Error is shown "Password doesn't match the policy - symbol missing"
});
test("register with username and password - password and passkey enabled", async ({ page }) => {
test.skip();
// Given on the default organization "username and password is allowed" is enabled
// Given on the default organization "username registeration allowed" is enabled
// Given on the default organization no idp is configured and enabled
// Given on the default organization passkey is enabled
// Given user doesn't exist
// Click on button "register new user"
// User is redirected to registration page
// User enters "firstname", "lastname", "username"
// Password and passkey are shown as authentication option
// User clicks password
// User enters password
// User is redirected to app (default redirect url)
});
test("register with username and passkey - password and passkey enabled", async ({ page }) => {
test.skip();
// Given on the default organization "username and password is allowed" is enabled
// Given on the default organization "username registeration allowed" is enabled
// Given on the default organization no idp is configured and enabled
// Given on the default organization passkey is enabled
// Given user doesn't exist
// Click on button "register new user"
// User is redirected to registration page
// User enters "firstname", "lastname", "username"
// Password and passkey are shown as authentication option
// User clicks passkey
// Passkey is opened automatically
// User verifies passkey
// User is redirected to app (default redirect url)
});
test("register with username and password - registration disabled", async ({ page }) => {
test.skip();
// Given on the default organization "username and password is allowed" is enabled
// Given on the default organization "username registeration allowed" is enabled
// Given on the default organization no idp is configured and enabled
// Given user doesn't exist
// Button "register new user" is not available
});
test("register with username and password - multiple registration options", async ({ page }) => {
test.skip();
// Given on the default organization "username and password is allowed" is enabled
// Given on the default organization "username registeration allowed" is enabled
// Given on the default organization one idp is configured and enabled
// Given user doesn't exist
// Click on button "register new user"
// User is redirected to registration options
// Local User and idp button are shown
// User clicks idp button
// User enters "firstname", "lastname", "username" and "password"
// User clicks next
// User is redirected to app (default redirect url)
});
@@ -0,0 +1,39 @@
import { Page } from "@playwright/test";
import { emailVerify } from "./email-verify";
import { passkeyRegister } from "./passkey";
import { registerPasswordScreen, registerUserScreenPasskey, registerUserScreenPassword } from "./register-screen";
import { getCodeFromSink } from "./sink";
export async function registerWithPassword(
page: Page,
firstname: string,
lastname: string,
email: string,
password1: string,
password2: string,
) {
await page.goto("./register");
await registerUserScreenPassword(page, firstname, lastname, email);
await page.getByTestId("submit-button").click();
await registerPasswordScreen(page, password1, password2);
await page.getByTestId("submit-button").click();
await verifyEmail(page, email);
}
export async function registerWithPasskey(page: Page, firstname: string, lastname: string, email: string): Promise<string> {
await page.goto("./register");
await registerUserScreenPasskey(page, firstname, lastname, email);
await page.getByTestId("submit-button").click();
// wait for projection of user
await page.waitForTimeout(10000);
const authId = await passkeyRegister(page);
await verifyEmail(page, email);
return authId;
}
async function verifyEmail(page: Page, email: string) {
const c = await getCodeFromSink(email);
await emailVerify(page, c);
}
@@ -0,0 +1,5 @@
import { Page } from "@playwright/test";
export async function selectNewAccount(page: Page) {
await page.getByRole("link", { name: "Add another account" }).click();
}
@@ -0,0 +1,43 @@
import { Gaxios, GaxiosResponse } from "gaxios";
const awaitNotification = new Gaxios({
url: process.env.SINK_NOTIFICATION_URL,
method: "POST",
retryConfig: {
httpMethodsToRetry: ["POST"],
statusCodesToRetry: [[404, 404]],
retry: Number.MAX_SAFE_INTEGER, // totalTimeout limits the number of retries
totalTimeout: 10000, // 10 seconds
onRetryAttempt: (error) => {
console.warn(`Retrying request to sink notification service: ${error.message}`);
},
},
});
export async function getOtpFromSink(recipient: string): Promise<any> {
return awaitNotification.request({ data: { recipient } }).then((response) => {
expectSuccess(response);
const otp = response?.data?.args?.otp;
if (!otp) {
throw new Error(`Response does not contain an otp property: ${JSON.stringify(response.data, null, 2)}`);
}
return otp;
});
}
export async function getCodeFromSink(recipient: string): Promise<any> {
return awaitNotification.request({ data: { recipient } }).then((response) => {
expectSuccess(response);
const code = response?.data?.args?.code;
if (!code) {
throw new Error(`Response does not contain a code property: ${JSON.stringify(response.data, null, 2)}`);
}
return code;
});
}
function expectSuccess(response: GaxiosResponse): void {
if (response.status !== 200) {
throw new Error(`Expected HTTP status 200, but got: ${response.status} - ${response.statusText}`);
}
}
@@ -0,0 +1,177 @@
import { Page } from "@playwright/test";
import { registerWithPasskey } from "./register";
import { activateOTP, addTOTP, addUser, eventualNewUser, getUserByUsername, removeUser } from "./zitadel";
export interface userProps {
email: string;
isEmailVerified?: boolean;
firstName: string;
lastName: string;
organization: string;
password: string;
passwordChangeRequired?: boolean;
phone: string;
isPhoneVerified?: boolean;
}
class User {
private readonly props: userProps;
private user: string;
constructor(userProps: userProps) {
this.props = userProps;
}
async ensure(page: Page) {
const response = await addUser(this.props);
this.setUserId(response.userId);
}
async cleanup() {
await removeUser(this.getUserId());
}
public setUserId(userId: string) {
this.user = userId;
}
public getUserId() {
return this.user;
}
public getUsername() {
return this.props.email;
}
public getPassword() {
return this.props.password;
}
public getFirstname() {
return this.props.firstName;
}
public getLastname() {
return this.props.lastName;
}
public getPhone() {
return this.props.phone;
}
public getFullName() {
return `${this.props.firstName} ${this.props.lastName}`;
}
}
export class PasswordUser extends User {
async ensure(page: Page) {
await super.ensure(page);
await eventualNewUser(this.getUserId());
}
}
export enum OtpType {
sms = "sms",
email = "email",
}
export interface otpUserProps {
email: string;
isEmailVerified?: boolean;
firstName: string;
lastName: string;
organization: string;
password: string;
passwordChangeRequired?: boolean;
phone: string;
isPhoneVerified?: boolean;
type: OtpType;
}
export class PasswordUserWithOTP extends User {
private type: OtpType;
constructor(props: otpUserProps) {
super({
email: props.email,
firstName: props.firstName,
lastName: props.lastName,
organization: props.organization,
password: props.password,
phone: props.phone,
isEmailVerified: props.isEmailVerified,
isPhoneVerified: props.isPhoneVerified,
passwordChangeRequired: props.passwordChangeRequired,
});
this.type = props.type;
}
async ensure(page: Page) {
await super.ensure(page);
await activateOTP(this.getUserId(), this.type);
await eventualNewUser(this.getUserId());
}
}
export class PasswordUserWithTOTP extends User {
private secret: string;
async ensure(page: Page) {
await super.ensure(page);
this.secret = await addTOTP(this.getUserId());
await eventualNewUser(this.getUserId());
}
public getSecret(): string {
return this.secret;
}
}
export interface passkeyUserProps {
email: string;
firstName: string;
lastName: string;
organization: string;
phone: string;
isEmailVerified?: boolean;
isPhoneVerified?: boolean;
}
export class PasskeyUser extends User {
private authenticatorId: string;
constructor(props: passkeyUserProps) {
super({
email: props.email,
firstName: props.firstName,
lastName: props.lastName,
organization: props.organization,
password: "",
phone: props.phone,
isEmailVerified: props.isEmailVerified,
isPhoneVerified: props.isPhoneVerified,
});
}
public async ensure(page: Page) {
const authId = await registerWithPasskey(page, this.getFirstname(), this.getLastname(), this.getUsername());
this.authenticatorId = authId;
// wait for projection of user
await page.waitForTimeout(10000);
}
async cleanup() {
const resp: any = await getUserByUsername(this.getUsername());
if (!resp || !resp.result || !resp.result[0]) {
return;
}
await removeUser(resp.result[0].userId);
}
public getAuthenticatorId(): string {
return this.authenticatorId;
}
}
@@ -0,0 +1,43 @@
import { faker } from "@faker-js/faker";
import { test as base } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import { loginScreenExpect, loginWithPasskey } from "./login";
import { PasskeyUser } from "./user";
// Read from ".env" file.
dotenv.config({ path: path.resolve(__dirname, "../../login/.env.test.local") });
const test = base.extend<{ user: PasskeyUser }>({
user: async ({ page }, use) => {
const user = new PasskeyUser({
email: faker.internet.email(),
isEmailVerified: true,
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
organization: "",
phone: faker.phone.number(),
isPhoneVerified: false,
});
await user.ensure(page);
await use(user);
await user.cleanup();
},
});
test("username and passkey login", async ({ user, page }) => {
await loginWithPasskey(page, user.getAuthenticatorId(), user.getUsername());
await loginScreenExpect(page, user.getFullName());
});
test("username and passkey login, multiple auth methods", async ({ page }) => {
test.skip();
// Given passkey and password is enabled on the organization of the user
// Given the user has password and passkey registered
// enter username
// passkey popup is directly shown
// user aborts passkey authentication
// user switches to password authentication
// user enters password
// user is redirected to app
});
@@ -0,0 +1,41 @@
import { faker } from "@faker-js/faker";
import { test as base } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import { loginScreenExpect, loginWithPassword } from "./login";
import { changePassword } from "./password";
import { PasswordUser } from "./user";
// Read from ".env" file.
dotenv.config({ path: path.resolve(__dirname, "../../login/.env.test.local") });
const test = base.extend<{ user: PasswordUser }>({
user: async ({ page }, use) => {
const user = new PasswordUser({
email: faker.internet.email(),
isEmailVerified: true,
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
organization: "",
phone: faker.phone.number(),
isPhoneVerified: false,
password: "Password1!",
passwordChangeRequired: true,
});
await user.ensure(page);
await use(user);
await user.cleanup();
},
});
test("username and password login, change required", async ({ user, page }) => {
const changedPw = "ChangedPw1!";
await loginWithPassword(page, user.getUsername(), user.getPassword());
await page.waitForTimeout(10000);
await changePassword(page, changedPw);
await loginScreenExpect(page, user.getFullName());
await loginWithPassword(page, user.getUsername(), changedPw);
await loginScreenExpect(page, user.getFullName());
});
@@ -0,0 +1,54 @@
import { faker } from "@faker-js/faker";
import { test as base } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import { loginScreenExpect, loginWithPassword } from "./login";
import { changePassword, startChangePassword } from "./password";
import { changePasswordScreen, changePasswordScreenExpect } from "./password-screen";
import { PasswordUser } from "./user";
// Read from ".env" file.
dotenv.config({ path: path.resolve(__dirname, "../../login/.env.test.local") });
const test = base.extend<{ user: PasswordUser }>({
user: async ({ page }, use) => {
const user = new PasswordUser({
email: faker.internet.email(),
isEmailVerified: true,
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
organization: "",
phone: faker.phone.number(),
isPhoneVerified: false,
password: "Password1!",
passwordChangeRequired: false,
});
await user.ensure(page);
await use(user);
await user.cleanup();
},
});
test("username and password changed login", async ({ user, page }) => {
const changedPw = "ChangedPw1!";
await loginWithPassword(page, user.getUsername(), user.getPassword());
// wait for projection of token
await page.waitForTimeout(10000);
await startChangePassword(page, user.getUsername());
await changePassword(page, changedPw);
await loginScreenExpect(page, user.getFullName());
await loginWithPassword(page, user.getUsername(), changedPw);
await loginScreenExpect(page, user.getFullName());
});
test("password change not with desired complexity", async ({ user, page }) => {
const changedPw1 = "change";
const changedPw2 = "chang";
await loginWithPassword(page, user.getUsername(), user.getPassword());
await startChangePassword(page, user.getUsername());
await changePasswordScreen(page, changedPw1, changedPw2);
await changePasswordScreenExpect(page, changedPw1, changedPw2, false, false, false, false, true, false);
});
@@ -0,0 +1,98 @@
import { faker } from "@faker-js/faker";
import { test as base } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import { code, codeResend, otpFromSink } from "./code";
import { codeScreenExpect } from "./code-screen";
import { loginScreenExpect, loginWithPassword, loginWithPasswordAndEmailOTP } from "./login";
import { OtpType, PasswordUserWithOTP } from "./user";
// Read from ".env" file.
dotenv.config({ path: path.resolve(__dirname, "../../login/.env.test.local") });
const test = base.extend<{ user: PasswordUserWithOTP; sink: any }>({
user: async ({ page }, use) => {
const user = new PasswordUserWithOTP({
email: faker.internet.email(),
isEmailVerified: true,
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
organization: "",
phone: faker.phone.number(),
isPhoneVerified: false,
password: "Password1!",
passwordChangeRequired: false,
type: OtpType.email,
});
await user.ensure(page);
await use(user);
await user.cleanup();
},
});
test.skip("DOESN'T WORK: username, password and email otp login, enter code manually", async ({ user, page }) => {
// Given email otp is enabled on the organization of the user
// Given the user has only email otp configured as second factor
// User enters username
// User enters password
// User receives an email with a verification code
// User enters the code into the ui
// User is redirected to the app (default redirect url)
await loginWithPasswordAndEmailOTP(page, user.getUsername(), user.getPassword(), user.getUsername());
await loginScreenExpect(page, user.getFullName());
});
test("username, password and email otp login, click link in email", async ({ page }) => {
base.skip();
// Given email otp is enabled on the organization of the user
// Given the user has only email otp configured as second factor
// User enters username
// User enters password
// User receives an email with a verification code
// User clicks link in the email
// User is redirected to the app (default redirect url)
});
test.skip("DOESN'T WORK: username, password and email otp login, resend code", async ({ user, page }) => {
// Given email otp is enabled on the organization of the user
// Given the user has only email otp configured as second factor
// User enters username
// User enters password
// User receives an email with a verification code
// User clicks resend code
// User receives a new email with a verification code
// User enters the new code in the ui
// User is redirected to the app (default redirect url)
await loginWithPassword(page, user.getUsername(), user.getPassword());
await codeResend(page);
await otpFromSink(page, user.getUsername());
await loginScreenExpect(page, user.getFullName());
});
test("username, password and email otp login, wrong code", async ({ user, page }) => {
// Given email otp is enabled on the organization of the user
// Given the user has only email otp configured as second factor
// User enters username
// User enters password
// User receives an email with a verification code
// User enters a wrong code
// Error message - "Invalid code" is shown
const c = "wrongcode";
await loginWithPassword(page, user.getUsername(), user.getPassword());
await code(page, c);
await codeScreenExpect(page, c);
});
test("username, password and email otp login, multiple mfa options", async ({ page }) => {
base.skip();
// Given OTP Email and OTP SMS is enabled on the organization of the user
// Given the user has OTP Email and OTP SMS configured as second factor
// User enters username
// User enters password
// User receives an email with a verification code
// User clicks button to use OTP SMS as second factor
// User receives a sms with a verification code
// User enters code in ui
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,71 @@
import { faker } from "@faker-js/faker";
import { test as base } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import { code } from "./code";
import { codeScreenExpect } from "./code-screen";
import { loginScreenExpect, loginWithPassword, loginWithPasswordAndPhoneOTP } from "./login";
import { OtpType, PasswordUserWithOTP } from "./user";
// Read from ".env" file.
dotenv.config({ path: path.resolve(__dirname, "../../login/.env.test.local") });
const test = base.extend<{ user: PasswordUserWithOTP; sink: any }>({
user: async ({ page }, use) => {
const user = new PasswordUserWithOTP({
email: faker.internet.email(),
isEmailVerified: true,
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
organization: "",
phone: faker.phone.number({ style: "international" }),
isPhoneVerified: true,
password: "Password1!",
passwordChangeRequired: false,
type: OtpType.sms,
});
await user.ensure(page);
await use(user);
await user.cleanup();
},
});
test.skip("DOESN'T WORK: username, password and OTP SMS login, enter code manually", async ({ user, page }) => {
// Given OTP SMS is enabled on the organization of the user
// Given the user has only OTP SMS configured as second factor
// User enters username
// User enters password
// User receives a sms with a verification code
// User enters the code into the ui
// User is redirected to the app (default redirect url)
await loginWithPasswordAndPhoneOTP(page, user.getUsername(), user.getPassword(), user.getPhone());
await loginScreenExpect(page, user.getFullName());
});
test.skip("DOESN'T WORK: username, password and OTP SMS login, resend code", async ({ user, page }) => {
// Given OTP SMS is enabled on the organization of the user
// Given the user has only OTP SMS configured as second factor
// User enters username
// User enters password
// User receives a sms with a verification code
// User clicks resend code
// User receives a new sms with a verification code
// User is redirected to the app (default redirect url)
await loginWithPasswordAndPhoneOTP(page, user.getUsername(), user.getPassword(), user.getPhone());
await loginScreenExpect(page, user.getFullName());
});
test("username, password and OTP SMS login, wrong code", async ({ user, page }) => {
// Given OTP SMS is enabled on the organization of the user
// Given the user has only OTP SMS configured as second factor
// User enters username
// User enters password
// User receives a sms with a verification code
// User enters a wrong code
// Error message - "Invalid code" is shown
const c = "wrongcode";
await loginWithPassword(page, user.getUsername(), user.getPassword());
await code(page, c);
await codeScreenExpect(page, c);
});
@@ -0,0 +1,52 @@
import { faker } from "@faker-js/faker";
import { test as base } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import { loginScreenExpect, loginWithPassword, startLogin } from "./login";
import { loginname } from "./loginname";
import { resetPassword, startResetPassword } from "./password";
import { resetPasswordScreen, resetPasswordScreenExpect } from "./password-screen";
import { PasswordUser } from "./user";
// Read from ".env" file.
dotenv.config({ path: path.resolve(__dirname, "../../login/.env.test.local") });
const test = base.extend<{ user: PasswordUser }>({
user: async ({ page }, use) => {
const user = new PasswordUser({
email: faker.internet.email(),
isEmailVerified: true,
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
organization: "",
phone: faker.phone.number(),
isPhoneVerified: false,
password: "Password1!",
passwordChangeRequired: false,
});
await user.ensure(page);
await use(user);
await user.cleanup();
},
});
test("username and password set login", async ({ user, page }) => {
const changedPw = "ChangedPw1!";
await startLogin(page);
await loginname(page, user.getUsername());
await resetPassword(page, user.getUsername(), changedPw);
await loginScreenExpect(page, user.getFullName());
await loginWithPassword(page, user.getUsername(), changedPw);
await loginScreenExpect(page, user.getFullName());
});
test("password set not with desired complexity", async ({ user, page }) => {
const changedPw1 = "change";
const changedPw2 = "chang";
await startLogin(page);
await loginname(page, user.getUsername());
await startResetPassword(page);
await resetPasswordScreen(page, user.getUsername(), changedPw1, changedPw2);
await resetPasswordScreenExpect(page, changedPw1, changedPw2, false, false, false, false, true, false);
});
@@ -0,0 +1,71 @@
import { faker } from "@faker-js/faker";
import { test as base } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import { code } from "./code";
import { codeScreenExpect } from "./code-screen";
import { loginScreenExpect, loginWithPassword, loginWithPasswordAndTOTP } from "./login";
import { PasswordUserWithTOTP } from "./user";
// Read from ".env" file.
dotenv.config({ path: path.resolve(__dirname, "../../login/.env.test.local") });
const test = base.extend<{ user: PasswordUserWithTOTP; sink: any }>({
user: async ({ page }, use) => {
const user = new PasswordUserWithTOTP({
email: faker.internet.email(),
isEmailVerified: true,
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
organization: "",
phone: faker.phone.number({ style: "international" }),
isPhoneVerified: true,
password: "Password1!",
passwordChangeRequired: false,
});
await user.ensure(page);
await use(user);
await user.cleanup();
},
});
test("username, password and totp login", async ({ user, page }) => {
// Given totp is enabled on the organization of the user
// Given the user has only totp configured as second factor
// User enters username
// User enters password
// Screen for entering the code is shown directly
// User enters the code into the ui
// User is redirected to the app (default redirect url)
await loginWithPasswordAndTOTP(page, user.getUsername(), user.getPassword(), user.getSecret());
await loginScreenExpect(page, user.getFullName());
});
test("username, password and totp otp login, wrong code", async ({ user, page }) => {
// Given totp is enabled on the organization of the user
// Given the user has only totp configured as second factor
// User enters username
// User enters password
// Screen for entering the code is shown directly
// User enters a wrond code
// Error message - "Invalid code" is shown
const c = "wrongcode";
await loginWithPassword(page, user.getUsername(), user.getPassword());
await code(page, c);
await codeScreenExpect(page, c);
});
test("username, password and totp login, multiple mfa options", async ({ page }) => {
test.skip();
// Given totp and email otp is enabled on the organization of the user
// Given the user has totp and email otp configured as second factor
// User enters username
// User enters password
// Screen for entering the code is shown directly
// Button to switch to email otp is shown
// User clicks button to use email otp instead
// User receives an email with a verification code
// User enters code in ui
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,26 @@
import { test } from "@playwright/test";
test("username, password and u2f login", async ({ page }) => {
test.skip();
// Given u2f is enabled on the organization of the user
// Given the user has only u2f configured as second factor
// User enters username
// User enters password
// Popup for u2f is directly opened
// User verifies u2f
// User is redirected to the app (default redirect url)
});
test("username, password and u2f login, multiple mfa options", async ({ page }) => {
test.skip();
// Given u2f and semailms otp is enabled on the organization of the user
// Given the user has u2f and email otp configured as second factor
// User enters username
// User enters password
// Popup for u2f is directly opened
// User aborts u2f verification
// User clicks button to use email otp as second factor
// User receives an email with a verification code
// User enters code in ui
// User is redirected to the app (default redirect url)
});
@@ -0,0 +1,157 @@
import { faker } from "@faker-js/faker";
import { test as base } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import { loginScreenExpect, loginWithPassword, startLogin } from "./login";
import { loginname } from "./loginname";
import { loginnameScreenExpect } from "./loginname-screen";
import { password } from "./password";
import { passwordScreenExpect } from "./password-screen";
import { PasswordUser } from "./user";
// Read from ".env" file.
dotenv.config({ path: path.resolve(__dirname, "../../login/.env.test.local") });
const test = base.extend<{ user: PasswordUser }>({
user: async ({ page }, use) => {
const user = new PasswordUser({
email: faker.internet.email(),
isEmailVerified: true,
firstName: faker.person.firstName(),
lastName: faker.person.lastName(),
organization: "",
phone: faker.phone.number(),
isPhoneVerified: false,
password: "Password1!",
passwordChangeRequired: false,
});
await user.ensure(page);
await use(user);
await user.cleanup();
},
});
test("username and password login", async ({ user, page }) => {
await loginWithPassword(page, user.getUsername(), user.getPassword());
await loginScreenExpect(page, user.getFullName());
});
test("username and password login, unknown username", async ({ page }) => {
const username = "unknown";
await startLogin(page);
await loginname(page, username);
await loginnameScreenExpect(page, username);
});
test("username and password login, wrong password", async ({ user, page }) => {
await startLogin(page);
await loginname(page, user.getUsername());
await password(page, "wrong");
await passwordScreenExpect(page, "wrong");
});
test("username and password login, wrong username, ignore unknown usernames", async ({ user, page }) => {
test.skip();
// Given user doesn't exist but ignore unknown usernames setting is set to true
// Given username password login is enabled on the users organization
// enter login name
// enter password
// redirect to loginname page --> error message username or password wrong
});
test("username and password login, initial password change", async ({ user, page }) => {
test.skip();
// Given user is created and has changePassword set to true
// Given username password login is enabled on the users organization
// enter login name
// enter password
// create new password
});
test("username and password login, reset password hidden", async ({ user, page }) => {
test.skip();
// Given the organization has enabled "Password reset hidden" in the login policy
// Given username password login is enabled on the users organization
// enter login name
// password reset link should not be shown on password screen
});
test("username and password login, reset password - enter code manually", async ({ user, page }) => {
test.skip();
// Given user has forgotten password and clicks the forgot password button
// Given username password login is enabled on the users organization
// enter login name
// click password forgotten
// enter code from email
// user is redirected to app (default redirect url)
});
test("username and password login, reset password - click link", async ({ user, page }) => {
test.skip();
// Given user has forgotten password and clicks the forgot password button, and then the link in the email
// Given username password login is enabled on the users organization
// enter login name
// click password forgotten
// click link in email
// set new password
// redirect to app (default redirect url)
});
test("username and password login, reset password, resend code", async ({ user, page }) => {
test.skip();
// Given user has forgotten password and clicks the forgot password button and then resend code
// Given username password login is enabled on the users organization
// enter login name
// click password forgotten
// click resend code
// enter code from second email
// user is redirected to app (default redirect url)
});
test("email login enabled", async ({ user, page }) => {
test.skip();
// Given user with the username "testuser", email test@zitadel.com and phone number 0711111111 exists
// Given no other user with the same email address exists
// enter email address "test@zitadel.com " in login screen
// user will get to password screen
});
test("email login disabled", async ({ user, page }) => {
test.skip();
// Given user with the username "testuser", email test@zitadel.com and phone number 0711111111 exists
// Given no other user with the same email address exists
// enter email address "test@zitadel.com" in login screen
// user will see error message "user not found"
});
test("email login enabled - multiple users", async ({ user, page }) => {
test.skip();
// Given user with the username "testuser", email test@zitadel.com and phone number 0711111111 exists
// Given a second user with the username "testuser2", email test@zitadel.com and phone number 0711111111 exists
// enter email address "test@zitadel.com" in login screen
// user will see error message "user not found"
});
test("phone login enabled", async ({ user, page }) => {
test.skip();
// Given user with the username "testuser", email test@zitadel.com and phone number 0711111111 exists
// Given no other user with the same phon number exists
// enter phone number "0711111111" in login screen
// user will get to password screen
});
test("phone login disabled", async ({ user, page }) => {
test.skip();
// Given user with the username "testuser", email test@zitadel.com and phone number 0711111111 exists
// Given no other user with the same phone number exists
// enter phone number "0711111111" in login screen
// user will see error message "user not found"
});
test("phone login enabled - multiple users", async ({ user, page }) => {
test.skip();
// Given user with the username "testuser", email test@zitadel.com and phone number 0711111111 exists
// Given a second user with the username "testuser2", email test@zitadel.com and phone number 0711111111 exists
// enter phone number "0711111111" in login screen
// user will see error message "user not found"
});
@@ -0,0 +1,6 @@
import { test } from "@playwright/test";
test("login is accessible", async ({ page }) => {
await page.goto("./");
await page.getByRole("heading", { name: "Welcome back!" }).isVisible();
});
@@ -0,0 +1,190 @@
import { Authenticator } from "@otplib/core";
import { createDigest, createRandomBytes } from "@otplib/plugin-crypto";
import { keyDecoder, keyEncoder } from "@otplib/plugin-thirty-two"; // use your chosen base32 plugin
import axios from "axios";
import dotenv from "dotenv";
import { request } from "gaxios";
import path from "path";
import { OtpType, userProps } from "./user";
dotenv.config({ path: path.resolve(__dirname, "../../login/.env.test.local") });
export async function addUser(props: userProps) {
const body = {
username: props.email,
organization: {
orgId: props.organization,
},
profile: {
givenName: props.firstName,
familyName: props.lastName,
},
email: {
email: props.email,
isVerified: true,
},
phone: {
phone: props.phone,
isVerified: true,
},
password: {
password: props.password,
changeRequired: props.passwordChangeRequired ?? false,
},
};
if (!props.isEmailVerified) {
delete body.email.isVerified;
}
if (!props.isPhoneVerified) {
delete body.phone.isVerified;
}
return await listCall(`${process.env.ZITADEL_API_URL}/v2/users/human`, body);
}
export async function removeUserByUsername(username: string) {
const resp = await getUserByUsername(username);
if (!resp || !resp.result || !resp.result[0]) {
return;
}
await removeUser(resp.result[0].userId);
}
export async function removeUser(id: string) {
await deleteCall(`${process.env.ZITADEL_API_URL}/v2/users/${id}`);
}
async function deleteCall(url: string) {
try {
const response = await axios.delete(url, {
headers: {
Authorization: `Bearer ${process.env.ZITADEL_ADMIN_TOKEN}`,
},
});
if (response.status >= 400 && response.status !== 404) {
const error = `HTTP Error: ${response.status} - ${response.statusText}`;
console.error(error);
throw new Error(error);
}
} catch (error) {
console.error("Error making request:", error);
throw error;
}
}
export async function getUserByUsername(username: string): Promise<any> {
const listUsersBody = {
queries: [
{
userNameQuery: {
userName: username,
},
},
],
};
return await listCall(`${process.env.ZITADEL_API_URL}/v2/users`, listUsersBody);
}
async function listCall(url: string, data: any): Promise<any> {
try {
const response = await axios.post(url, data, {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.ZITADEL_ADMIN_TOKEN}`,
},
});
if (response.status >= 400) {
const error = `HTTP Error: ${response.status} - ${response.statusText}`;
console.error(error);
throw new Error(error);
}
return response.data;
} catch (error) {
console.error("Error making request:", error);
throw error;
}
}
export async function activateOTP(userId: string, type: OtpType) {
let url = "otp_";
switch (type) {
case OtpType.sms:
url = url + "sms";
break;
case OtpType.email:
url = url + "email";
break;
}
await pushCall(`${process.env.ZITADEL_API_URL}/v2/users/${userId}/${url}`, {});
}
async function pushCall(url: string, data: any) {
try {
const response = await axios.post(url, data, {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.ZITADEL_ADMIN_TOKEN}`,
},
});
if (response.status >= 400) {
const error = `HTTP Error: ${response.status} - ${response.statusText}`;
console.error(error);
throw new Error(error);
}
} catch (error) {
console.error("Error making request:", error);
throw error;
}
}
export async function addTOTP(userId: string): Promise<string> {
const response = await listCall(`${process.env.ZITADEL_API_URL}/v2/users/${userId}/totp`, {});
const code = totp(response.secret);
await pushCall(`${process.env.ZITADEL_API_URL}/v2/users/${userId}/totp/verify`, { code: code });
return response.secret;
}
export function totp(secret: string) {
const authenticator = new Authenticator({
createDigest,
createRandomBytes,
keyDecoder,
keyEncoder,
});
// google authenticator usage
const token = authenticator.generate(secret);
// check if token can be used
if (!authenticator.verify({ token: token, secret: secret })) {
const error = `Generated token could not be verified`;
console.error(error);
throw new Error(error);
}
return token;
}
export async function eventualNewUser(id: string) {
return request({
url: `${process.env.ZITADEL_API_URL}/v2/users/${id}`,
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ZITADEL_ADMIN_TOKEN}`,
"Content-Type": "application/json",
},
retryConfig: {
statusCodesToRetry: [[404, 404]],
retry: Number.MAX_SAFE_INTEGER, // totalTimeout limits the number of retries
totalTimeout: 10000, // 10 seconds
onRetryAttempt: (error) => {
console.warn(`Retrying to query new user ${id}: ${error.message}`);
},
},
});
}
@@ -0,0 +1,65 @@
ExternalSecure: false
TLS.Enabled: false
FirstInstance:
PatPath: /pat/zitadel-admin-sa.pat
Org:
Human:
UserName: zitadel-admin
FirstName: ZITADEL
LastName: Admin
Password: Password1!
PasswordChangeRequired: false
PreferredLanguage: en
Machine:
Machine:
Username: zitadel-admin-sa
Name: Admin
Pat.ExpirationDate: 2099-01-01T00:00:00Z
LoginClient:
Machine:
Username: login-client-sa
Name: Login Client
Pat.ExpirationDate: 2099-01-01T00:00:00Z
DefaultInstance:
LoginPolicy:
AllowUsernamePassword: true # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_ALLOWUSERNAMEPASSWORD
AllowRegister: true # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_ALLOWREGISTER
AllowExternalIDP: true # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_ALLOWEXTERNALIDP
ForceMFA: false # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_FORCEMFA
HidePasswordReset: false # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_HIDEPASSWORDRESET
IgnoreUnknownUsernames: false # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_IGNOREUNKNOWNUSERNAMES
AllowDomainDiscovery: true # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_ALLOWDOMAINDISCOVERY
# 1 is allowed, 0 is not allowed
PasswordlessType: 1 # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_PASSWORDLESSTYPE
# DefaultRedirectURL is empty by default because we use the Management Console UI
DefaultRedirectURI: # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_DEFAULTREDIRECTURI
# 240h = 10d
PasswordCheckLifetime: 240h # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_PASSWORDCHECKLIFETIME
# 240h = 10d
ExternalLoginCheckLifetime: 240h # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_EXTERNALLOGINCHECKLIFETIME
# 720h = 30d
MfaInitSkipLifetime: 0h # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_MFAINITSKIPLIFETIME
SecondFactorCheckLifetime: 18h # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_SECONDFACTORCHECKLIFETIME
MultiFactorCheckLifetime: 12h # ZITADEL_DEFAULTINSTANCE_LOGINPOLICY_MULTIFACTORCHECKLIFETIME
PrivacyPolicy:
TOSLink: "https://zitadel.com/docs/legal/terms-of-service"
PrivacyLink: "https://zitadel.com/docs/legal/policies/privacy-policy"
HelpLink: "https://zitadel.com/docs"
SupportEmail: "support@zitadel.com"
DocsLink: "https://zitadel.com/docs"
Database:
EventPushConnRatio: 0.2 # 4
ProjectionSpoolerConnRatio: 0.3 # 6
postgres:
Host: db
MaxOpenConns: 20
MaxIdleConns: 20
MaxConnLifetime: 1h
MaxConnIdleTime: 5m
User.Password: zitadel
Logstore.Access.Stdout.Enabled: true
Log.Formatter.Format: json
@@ -0,0 +1,82 @@
// Keeps Server Actions and server-only code in separate, recognizable places.
//
// - src/lib/actions/: only Server Actions. Every file starts with "use server", and every export is a
// public, unauthenticated endpoint, so its arguments must be treated as attacker-controlled.
// - src/lib/server/: server-only code. Every file imports "server-only" and none is a Server Action.
// - "use server" is not allowed anywhere else, neither as a file directive nor inline in a function.
// - Client components must not import from src/lib/server/.
//
// The build additionally checks the published actions against checks/server-actions.allowlist.json.
const ACTIONS_DIR = "/src/lib/actions/";
const SERVER_DIR = "/src/lib/server/";
const SERVER_IMPORT = /^@\/lib\/server(\/|$)/;
function directivesOf(program) {
return program.body
.filter((statement) => statement.type === "ExpressionStatement" && typeof statement.directive === "string")
.map((statement) => statement.directive);
}
const moduleBoundaries = {
meta: {
type: "problem",
docs: { description: "Keep Server Actions in src/lib/actions and server-only code in src/lib/server" },
messages: {
useServerOutsideActions:
'"use server" is only allowed in src/lib/actions/. Every export of such a module is a public endpoint; put the action there and the implementation in src/lib/server/.',
missingUseServer: 'Files in src/lib/actions/ must start with "use server".',
missingServerOnly: 'Files in src/lib/server/ must import "server-only".',
serverImportInClient:
"Client components must not import from src/lib/server/. Call a Server Action from src/lib/actions/ instead.",
},
schema: [],
},
create(context) {
const filename = context.filename.replaceAll("\\", "/");
const isTest = /\.test\.tsx?$/.test(filename);
const inActions = filename.includes(ACTIONS_DIR);
const inServer = filename.includes(SERVER_DIR);
return {
Program(program) {
if (isTest) {
return;
}
const directives = directivesOf(program);
if (inActions && !directives.includes("use server")) {
context.report({ node: program, messageId: "missingUseServer" });
}
if (
inServer &&
!program.body.some((statement) => statement.type === "ImportDeclaration" && statement.source.value === "server-only")
) {
context.report({ node: program, messageId: "missingServerOnly" });
}
if (directives.includes("use client")) {
for (const statement of program.body) {
if (statement.type === "ImportDeclaration" && SERVER_IMPORT.test(statement.source.value)) {
context.report({ node: statement, messageId: "serverImportInClient" });
}
}
}
},
// file-level and function-level directives are both ExpressionStatements with a `directive`
"ExpressionStatement[directive='use server']"(node) {
if (!inActions) {
context.report({ node, messageId: "useServerOutsideActions" });
}
},
};
},
};
export default {
rules: {
"module-boundaries": moduleBoundaries,
},
};
@@ -0,0 +1,58 @@
{
"src/lib/actions/device.ts": [
"approveDeviceAuthorization",
"denyDeviceAuthorization"
],
"src/lib/actions/flow.ts": [
"completeFlowOrGetUrl"
],
"src/lib/actions/idp-intent.ts": [
"processIDPCallback"
],
"src/lib/actions/idp.ts": [
"createNewSessionForLDAP",
"redirectToIdp"
],
"src/lib/actions/language.ts": [
"setLanguageCookie"
],
"src/lib/actions/loginname.ts": [
"sendLoginname"
],
"src/lib/actions/oidc.ts": [
"getDeviceAuthorizationRequest"
],
"src/lib/actions/otp.ts": [
"addOTP"
],
"src/lib/actions/passkeys.ts": [
"registerPasskeyLink",
"sendPasskey",
"verifyPasskeyRegistration"
],
"src/lib/actions/password.ts": [
"changePassword",
"checkSessionAndSetPassword",
"resetPassword",
"sendPassword"
],
"src/lib/actions/register.ts": [
"registerUser",
"registerUserAndLinkToIDP"
],
"src/lib/actions/session.ts": [
"clearSession",
"continueWithSession",
"skipMFAAndContinueWithNextUrl",
"updateOrCreateSession"
],
"src/lib/actions/u2f.ts": [
"addU2F",
"verifyU2F"
],
"src/lib/actions/verify.ts": [
"resendVerification",
"sendVerification",
"verifyTOTP"
]
}
@@ -0,0 +1,77 @@
#!/usr/bin/env node
// Fails the build when a published Server Action lives outside src/lib/actions/, or when the set of
// published Server Actions differs from server-actions.allowlist.json.
//
// Next.js publishes every export of a "use server" module that the build graph reaches as a public,
// unauthenticated POST endpoint, whether or not a client component calls it. Internal helpers that
// trust their arguments must therefore never end up in that set. Any change to it has to be a
// deliberate, reviewed edit of the allowlist.
//
// Usage: node checks/server-actions.mjs [path/to/server-reference-manifest.json]
import { readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const here = dirname(fileURLToPath(import.meta.url));
const manifestPath = process.argv[2] ?? join(here, "..", ".next", "server", "server-reference-manifest.json");
const allowlistPath = join(here, "server-actions.allowlist.json");
const ACTIONS_DIR = "src/lib/actions/";
function normalizeFilename(filename) {
// the manifest stores paths relative to the workspace root (e.g. apps/login/src/lib/actions/flow.ts)
const index = filename.indexOf("src/");
return index === -1 ? filename : filename.slice(index);
}
function published(manifest) {
const actions = new Set();
for (const runtime of ["node", "edge"]) {
for (const entry of Object.values(manifest[runtime] ?? {})) {
actions.add(`${normalizeFilename(entry.filename)}#${entry.exportedName}`);
}
}
return actions;
}
function allowed(allowlist) {
const actions = new Set();
for (const [filename, names] of Object.entries(allowlist)) {
for (const name of names) {
actions.add(`${filename}#${name}`);
}
}
return actions;
}
const actual = published(JSON.parse(readFileSync(manifestPath, "utf8")));
const expected = allowed(JSON.parse(readFileSync(allowlistPath, "utf8")));
const outsideActionsDir = [...actual].filter((action) => !action.startsWith(ACTIONS_DIR)).sort();
const unexpected = [...actual].filter((action) => !expected.has(action)).sort();
const missing = [...expected].filter((action) => !actual.has(action)).sort();
if (outsideActionsDir.length || unexpected.length || missing.length) {
if (outsideActionsDir.length) {
console.error(`These Server Actions are published from outside ${ACTIONS_DIR}:`);
outsideActionsDir.forEach((action) => console.error(` ! ${action}`));
console.error(
`Only modules in ${ACTIONS_DIR} may use "use server". Move the implementation to src/lib/server/ (import "server-only").`,
);
}
if (unexpected.length) {
console.error("These exports are published as Server Actions but are not in checks/server-actions.allowlist.json:");
unexpected.forEach((action) => console.error(` + ${action}`));
console.error(
'Every argument of a Server Action is attacker-controlled. Move internal helpers to a module without "use server"',
'(add import "server-only"), or add the action to the allowlist after reviewing that it derives identity and policy on the server.',
);
}
if (missing.length) {
console.error("These allowlisted Server Actions are no longer published, remove them from the allowlist:");
missing.forEach((action) => console.error(` - ${action}`));
}
process.exit(1);
}
console.log(`Server Actions match the allowlist (${actual.size} published).`);
+2
View File
@@ -0,0 +1,2 @@
export const DEFAULT_CSP =
"default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self'; frame-ancestors 'none'; object-src 'none'";
@@ -0,0 +1,176 @@
import * as path from "path";
import { fileURLToPath } from "node:url";
import type { StartedNetwork } from "testcontainers";
import { GenericContainer, Network, Wait, type StartedTestContainer } from "testcontainers";
import { afterAll, beforeAll, describe, expect, it } from "vitest";
const TEST_DIR = path.dirname(fileURLToPath(import.meta.url));
const LOGIN_APP_DIR = path.join(TEST_DIR, "../..");
const LOGIN_IMAGE_TAG = `zitadel-login-test:${process.env.GITHUB_SHA || "local"}`;
const DOCKER_TIMEOUT = 180_000;
/**
* Integration tests for ZITADEL_API_AWAITINITIALCONN support.
*
* When this environment variable is set (e.g. "30s", "5m"), the login
* container polls the ZITADEL API's /debug/ready endpoint before starting
* the Next.js server. This replaces the wait4x init container that was
* previously used in the Helm chart.
*
* The test suite uses a mock Zitadel server that returns 503 on /debug/ready
* for a configurable duration before switching to 200. Three scenarios are
* verified: the API becomes ready within the timeout, the timeout expires
* before the API is ready, and the variable is not set at all.
*/
describe("ZITADEL_API_AWAITINITIALCONN", () => {
beforeAll(async () => {
await GenericContainer.fromDockerfile(LOGIN_APP_DIR).build(LOGIN_IMAGE_TAG);
}, DOCKER_TIMEOUT);
describe("when the API becomes ready before the timeout", () => {
let network: StartedNetwork;
let mockZitadel: StartedTestContainer;
let container: StartedTestContainer;
let appUrl: string;
beforeAll(async () => {
network = await new Network().start();
mockZitadel = await new GenericContainer("node:20-alpine")
.withNetwork(network)
.withNetworkAliases("mock-zitadel")
.withCopyFilesToContainer([
{ source: path.join(TEST_DIR, "mock-zitadel-server.js"), target: "/app/server.js" },
])
.withEnvironment({ PORT: "8080", READY_AFTER_MS: "5000" })
.withCommand(["node", "/app/server.js"])
.withExposedPorts(8080)
.withWaitStrategy(Wait.forLogMessage("Mock Zitadel server listening"))
.start();
container = await new GenericContainer(LOGIN_IMAGE_TAG)
.withNetwork(network)
.withExposedPorts(3000)
.withEnvironment({
ZITADEL_API_URL: "http://mock-zitadel:8080",
ZITADEL_SERVICE_USER_TOKEN: "test-token",
ZITADEL_API_AWAITINITIALCONN: "60s",
})
.withStartupTimeout(120_000)
.withWaitStrategy(Wait.forHttp("/ui/v2/login/healthy", 3000))
.start();
appUrl = `http://${container.getHost()}:${container.getMappedPort(3000)}`;
}, DOCKER_TIMEOUT);
afterAll(async () => {
await container?.stop().catch(() => {});
await mockZitadel?.stop().catch(() => {});
await network?.stop().catch(() => {});
}, DOCKER_TIMEOUT);
it("starts successfully after the API becomes ready", async () => {
const response = await fetch(`${appUrl}/ui/v2/login/healthy`);
expect(response.status).toBe(200);
});
});
describe("when the API does not become ready before the timeout", () => {
let network: StartedNetwork;
let mockZitadel: StartedTestContainer;
let container: StartedTestContainer;
beforeAll(async () => {
network = await new Network().start();
mockZitadel = await new GenericContainer("node:20-alpine")
.withNetwork(network)
.withNetworkAliases("mock-zitadel")
.withCopyFilesToContainer([
{ source: path.join(TEST_DIR, "mock-zitadel-server.js"), target: "/app/server.js" },
])
.withEnvironment({ PORT: "8080", READY_AFTER_MS: "600000" })
.withCommand(["node", "/app/server.js"])
.withExposedPorts(8080)
.withWaitStrategy(Wait.forLogMessage("Mock Zitadel server listening"))
.start();
container = await new GenericContainer(LOGIN_IMAGE_TAG)
.withNetwork(network)
.withExposedPorts(3000)
.withEnvironment({
ZITADEL_API_URL: "http://mock-zitadel:8080",
ZITADEL_SERVICE_USER_TOKEN: "test-token",
ZITADEL_API_AWAITINITIALCONN: "5s",
})
.withStartupTimeout(30_000)
.withWaitStrategy(Wait.forLogMessage(/Timed out after 5s/))
.start();
}, DOCKER_TIMEOUT);
afterAll(async () => {
await container?.stop().catch(() => {});
await mockZitadel?.stop().catch(() => {});
await network?.stop().catch(() => {});
}, DOCKER_TIMEOUT);
it("logs the timeout error before exiting", async () => {
const stream = await container.logs();
const logs = await new Promise<string>((resolve) => {
let output = "";
stream.on("data", (chunk: Buffer) => { output += chunk.toString(); });
stream.on("end", () => resolve(output));
setTimeout(() => { stream.destroy(); resolve(output); }, 5_000);
});
expect(logs).toContain("Timed out after 5s waiting for API readiness");
});
});
describe("when the variable is not set", () => {
let network: StartedNetwork;
let mockZitadel: StartedTestContainer;
let container: StartedTestContainer;
let appUrl: string;
beforeAll(async () => {
network = await new Network().start();
mockZitadel = await new GenericContainer("node:20-alpine")
.withNetwork(network)
.withNetworkAliases("mock-zitadel")
.withCopyFilesToContainer([
{ source: path.join(TEST_DIR, "mock-zitadel-server.js"), target: "/app/server.js" },
])
.withEnvironment({ PORT: "8080", READY_AFTER_MS: "0" })
.withCommand(["node", "/app/server.js"])
.withExposedPorts(8080)
.withWaitStrategy(Wait.forLogMessage("Mock Zitadel server listening"))
.start();
container = await new GenericContainer(LOGIN_IMAGE_TAG)
.withNetwork(network)
.withExposedPorts(3000)
.withEnvironment({
ZITADEL_API_URL: "http://mock-zitadel:8080",
ZITADEL_SERVICE_USER_TOKEN: "test-token",
})
.withStartupTimeout(120_000)
.withWaitStrategy(Wait.forHttp("/ui/v2/login/healthy", 3000))
.start();
appUrl = `http://${container.getHost()}:${container.getMappedPort(3000)}`;
}, DOCKER_TIMEOUT);
afterAll(async () => {
await container?.stop().catch(() => {});
await mockZitadel?.stop().catch(() => {});
await network?.stop().catch(() => {});
}, DOCKER_TIMEOUT);
it("starts without waiting", async () => {
const response = await fetch(`${appUrl}/ui/v2/login/healthy`);
expect(response.status).toBe(200);
});
});
});
@@ -0,0 +1,66 @@
/**
* Mock Zitadel server for testing ZITADEL_API_AWAITINITIALCONN.
*
* Returns 503 on /debug/ready until READY_AFTER_MS milliseconds have elapsed,
* then switches to 200. All other endpoints return minimal ConnectRPC-compatible
* responses so the login app can start normally once the readiness gate passes.
*/
const http = require("http");
const PORT = process.env.PORT || 8080;
const READY_AFTER_MS = parseInt(process.env.READY_AFTER_MS || "5000", 10);
const startTime = Date.now();
const sendResponse = (res, statusCode, body) => {
res.writeHead(statusCode, { "Content-Type": "application/json" });
res.end(JSON.stringify(body));
};
const server = http.createServer((req, res) => {
const { method, url } = req;
console.log(`[${new Date().toISOString()}] ${method} ${url}`);
if (url === "/debug/ready") {
const elapsed = Date.now() - startTime;
if (elapsed < READY_AFTER_MS) {
console.log(` -> 503 (not ready, ${elapsed}ms / ${READY_AFTER_MS}ms)`);
sendResponse(res, 503, { status: "not ready" });
} else {
console.log(` -> 200 (ready after ${elapsed}ms)`);
sendResponse(res, 200, { status: "ok" });
}
return;
}
if (url.includes("GetLoginSettings") || url.includes("SettingsService")) {
sendResponse(res, 200, { settings: {} });
} else if (url.includes("GetBrandingSettings")) {
sendResponse(res, 200, { settings: {} });
} else if (url.includes("SessionService") || url.includes("Session")) {
sendResponse(res, 200, { session: {} });
} else if (url.includes("UserService") || url.includes("User")) {
sendResponse(res, 200, { user: {} });
} else if (url.includes("OrganizationService") || url.includes("Organization")) {
sendResponse(res, 200, { result: [] });
} else if (url.includes("IdentityProviderService") || url.includes("IdentityProvider")) {
sendResponse(res, 200, { identityProviders: [] });
} else {
sendResponse(res, 200, {});
}
});
server.on("error", (err) => console.error("Server error:", err));
server.listen(PORT, "0.0.0.0", () => {
console.log(`Mock Zitadel server listening on port ${PORT}`);
console.log(`Will become ready after ${READY_AFTER_MS}ms`);
});
process.on("SIGTERM", () => {
console.log("Shutting down mock server...");
server.close(() => {
console.log("Mock server stopped");
process.exit(0);
});
});
@@ -0,0 +1,182 @@
import { describe, it, expect, beforeAll, afterAll } from "vitest";
import {
GenericContainer,
type StartedTestContainer,
Network,
Wait,
} from "testcontainers";
import type { StartedNetwork } from "testcontainers";
import * as fs from "fs";
import * as os from "os";
import * as path from "path";
import { generateCertificates } from "./utils/tls.ts";
const TEST_DIR = path.dirname(new URL(import.meta.url).pathname);
const LOGIN_APP_DIR = path.join(TEST_DIR, "../..");
const SMOCKER_MOCK_PORT = 443;
const SMOCKER_ADMIN_PORT = 8081;
/**
* Integration tests for custom CA certificate support in the login application.
*
* These tests verify that the Dockerfile correctly configures Node.js to trust
* custom Certificate Authorities via SSL_CERT_FILE, SSL_CERT_DIR, and the
* load-ssl-cert-dir.cjs preload script.
*
* OpenSSL (used by Node with --use-openssl-ca) only reads certs from
* SSL_CERT_DIR when they have hashed filenames (e.g. "9d66eef0.0"). Go's
* crypto/x509 reads any file. The preload script bridges this gap so that
* operators get the same behaviour with both the Go backend and the login
* container.
*
* We use Smocker as a TLS server whose certificate is signed by a test CA
* that is NOT in the system trust store. Each test block configures the
* login container differently and asserts whether the TLS handshake to
* Smocker succeeds or fails — verifying actual trust-store behaviour, not
* just environment variable values.
*/
const LOGIN_IMAGE_TAG = `zitadel-login-test:${process.env.GITHUB_SHA || "local"}`;
async function testTlsConnection(
container: StartedTestContainer,
url: string,
): Promise<{ exitCode: number; output: string }> {
return container.exec([
"node",
"-e",
`fetch('${url}').then(() => process.exit(0)).catch(() => process.exit(1))`,
]);
}
describe("Custom CA Certificate Integration", () => {
let network: StartedNetwork;
let mockServer: StartedTestContainer;
let certsDir: string;
beforeAll(async () => {
certsDir = fs.mkdtempSync(path.join(os.tmpdir(), "ca-test-certs-"));
const certs = generateCertificates();
fs.writeFileSync(path.join(certsDir, "ca.crt"), certs.ca.cert);
fs.writeFileSync(path.join(certsDir, "server.key"), certs.server.key);
fs.writeFileSync(path.join(certsDir, "server.crt"), certs.server.cert);
network = await new Network().start();
mockServer = await new GenericContainer("ghcr.io/smocker-dev/smocker")
.withNetwork(network)
.withNetworkAliases("mock-zitadel")
.withBindMounts([{ source: certsDir, target: "/certs", mode: "ro" }])
.withEnvironment({
SMOCKER_MOCK_SERVER_LISTEN_PORT: "443",
SMOCKER_CONFIG_LISTEN_PORT: "8081",
SMOCKER_TLS_ENABLE: "true",
SMOCKER_TLS_CERT_FILE: "/certs/server.crt",
SMOCKER_TLS_PRIVATE_KEY_FILE: "/certs/server.key",
})
.withExposedPorts(SMOCKER_MOCK_PORT, SMOCKER_ADMIN_PORT)
.withStartupTimeout(120_000)
.withWaitStrategy(Wait.forLogMessage(/Starting mock server/))
.start();
try {
await GenericContainer.fromDockerfile(LOGIN_APP_DIR).build(LOGIN_IMAGE_TAG);
} catch (err) {
throw new Error(`Failed to build login Docker image: ${err instanceof Error ? err.message : err}`);
}
}, 180_000);
afterAll(async () => {
await mockServer?.stop().catch(() => {});
await network?.stop().catch(() => {});
});
describe("when custom CA is provided via SSL_CERT_FILE", () => {
let container: StartedTestContainer;
beforeAll(async () => {
container = await new GenericContainer(LOGIN_IMAGE_TAG)
.withNetwork(network)
.withExposedPorts(3000)
.withEnvironment({
SSL_CERT_FILE: "/etc/ssl/certs/custom-ca.crt",
})
.withCopyFilesToContainer([
{
source: path.join(certsDir, "ca.crt"),
target: "/etc/ssl/certs/custom-ca.crt",
},
])
.withStartupTimeout(180_000)
.withWaitStrategy(Wait.forHttp("/ui/v2/login/healthy", 3000))
.start();
}, 180_000);
afterAll(async () => {
await container?.stop().catch(() => {});
});
it("can establish TLS connection to server with custom CA", async () => {
const result = await testTlsConnection(container, "https://mock-zitadel/");
expect(result.exitCode).toBe(0);
});
});
describe("when custom CA is provided via SSL_CERT_DIR (non-hashed filename)", () => {
let container: StartedTestContainer;
let customCaDir: string;
beforeAll(async () => {
customCaDir = fs.mkdtempSync(path.join(os.tmpdir(), "ca-dir-test-"));
fs.writeFileSync(path.join(customCaDir, "corp-root.crt"), fs.readFileSync(path.join(certsDir, "ca.crt")));
container = await new GenericContainer(LOGIN_IMAGE_TAG)
.withNetwork(network)
.withExposedPorts(3000)
.withEnvironment({
SSL_CERT_DIR: "/custom-certs",
})
.withCopyFilesToContainer([
{
source: path.join(customCaDir, "corp-root.crt"),
target: "/custom-certs/corp-root.crt",
},
])
.withStartupTimeout(180_000)
.withWaitStrategy(Wait.forHttp("/ui/v2/login/healthy", 3000))
.start();
}, 180_000);
afterAll(async () => {
await container?.stop().catch(() => {});
});
it("can establish TLS connection with non-hashed cert in SSL_CERT_DIR", async () => {
const result = await testTlsConnection(container, "https://mock-zitadel/");
expect(result.exitCode).toBe(0);
});
});
describe("when custom CA certificate is not provided", () => {
let container: StartedTestContainer;
beforeAll(async () => {
container = await new GenericContainer(LOGIN_IMAGE_TAG)
.withNetwork(network)
.withExposedPorts(3000)
.withStartupTimeout(180_000)
.withWaitStrategy(Wait.forHttp("/ui/v2/login/healthy", 3000))
.start();
}, 180_000);
afterAll(async () => {
await container?.stop().catch(() => {});
});
it("cannot establish TLS connection without custom CA", async () => {
const result = await testTlsConnection(container, "https://mock-zitadel/");
expect(result.exitCode).not.toBe(0);
});
});
});
@@ -0,0 +1,87 @@
import forge from "node-forge";
/**
* Generates a self-signed CA certificate and a server certificate signed by
* that CA, returning both as PEM-encoded strings alongside their private keys.
*
* This is intended for test and development environments where a trusted
* certificate chain is needed without relying on the openssl binary. The
* server certificate includes Subject Alternative Names so that TLS clients
* can verify the connection against the expected hostnames and IP addresses.
*/
export function generateCertificates({
caCN = "Test CA",
serverCN = "mock-zitadel",
dns = ["mock-zitadel", "localhost"],
ips = ["127.0.0.1"],
days = 1,
} = {}) {
function createCert({
subject,
issuer,
publicKey,
signingKey,
extensions,
serial = "01",
}: {
subject: forge.pki.CertificateField[];
issuer: forge.pki.CertificateField[];
publicKey: forge.pki.rsa.PublicKey;
signingKey: forge.pki.rsa.PrivateKey;
extensions?: forge.pki.CertificateField[];
serial?: string;
}) {
const cert = forge.pki.createCertificate();
cert.publicKey = publicKey;
cert.serialNumber = serial;
cert.validity.notBefore = new Date();
cert.validity.notAfter = new Date(Date.now() + days * 86400000);
cert.setSubject(subject);
cert.setIssuer(issuer);
if (extensions) {
cert.setExtensions(extensions);
}
cert.sign(signingKey, forge.md.sha256.create());
return forge.pki.certificateToPem(cert);
}
const caKeys = forge.pki.rsa.generateKeyPair(2048);
const serverKeys = forge.pki.rsa.generateKeyPair(2048);
const caSubject = [{ name: "commonName", value: caCN }];
return {
ca: {
cert: createCert({
subject: caSubject,
issuer: caSubject,
publicKey: caKeys.publicKey,
signingKey: caKeys.privateKey,
extensions: [{ name: "basicConstraints", cA: true }],
}),
key: forge.pki.privateKeyToPem(caKeys.privateKey),
},
server: {
cert: createCert({
subject: [{ name: "commonName", value: serverCN }],
issuer: caSubject,
publicKey: serverKeys.publicKey,
signingKey: caKeys.privateKey,
serial: "02",
extensions: [
{
name: "subjectAltName",
altNames: [
...dns.map(function (value) {
return { type: 2, value };
}),
...ips.map(function (ip) {
return { type: 7, ip };
}),
],
},
],
}),
key: forge.pki.privateKeyToPem(serverKeys.privateKey),
},
};
}
@@ -0,0 +1,107 @@
/**
* Mock Zitadel ConnectRPC server for testing trace propagation.
* Captures incoming headers and writes them to a file for test assertions.
*/
const http = require("http");
const fs = require("fs");
const path = require("path");
const PORT = process.env.PORT || 8080;
const OUTPUT_DIR = process.env.OUTPUT_DIR || "/tmp/otel";
const HEADERS_FILE = path.join(OUTPUT_DIR, "captured-headers.json");
/**
* Safely stringify a value to JSON with XSS-preventing character escapes.
*
* Escapes `<`, `>`, `&`, and `/` to their Unicode equivalents to prevent
* script injection when the output is reflected in HTTP responses or
* embedded in HTML contexts.
*
* @param {unknown} value - The value to stringify
* @returns {string} JSON string with dangerous characters escaped
*/
function safeJsonStringify(value) {
return JSON.stringify(value, null, 2)
.replace(/</g, "\\u003c")
.replace(/>/g, "\\u003e")
.replace(/&/g, "\\u0026")
.replace(/\//g, "\\/");
}
// Store captured requests
const capturedRequests = [];
const server = http.createServer((req, res) => {
const { method, url } = req;
// Capture trace headers
const traceHeaders = {
timestamp: new Date().toISOString(),
method,
url,
traceparent: req.headers["traceparent"] || null,
tracestate: req.headers["tracestate"] || null,
baggage: req.headers["baggage"] || null,
contentType: req.headers["content-type"] || null,
};
capturedRequests.push(traceHeaders);
// Write to file for test assertions
fs.mkdirSync(OUTPUT_DIR, { recursive: true });
fs.writeFileSync(HEADERS_FILE, JSON.stringify(capturedRequests, null, 2));
console.log(`[${traceHeaders.timestamp}] ${method} ${url}`);
console.log(` traceparent: ${traceHeaders.traceparent || "(none)"}`);
const sendResponse = (statusCode, contentType, body) => {
res.writeHead(statusCode, { "Content-Type": contentType });
res.end(body);
};
// Health check
if (url.includes("/health") || url === "/") {
sendResponse(200, "application/json", safeJsonStringify({ status: "ok" }));
return;
}
// Return captured headers (for debugging)
if (url === "/captured-headers") {
sendResponse(200, "application/json", safeJsonStringify(capturedRequests));
return;
}
// Mock ConnectRPC responses
// These are minimal responses to prevent the login app from crashing
if (url.includes("GetLoginSettings") || url.includes("SettingsService")) {
sendResponse(200, "application/json", safeJsonStringify({ settings: {} }));
} else if (url.includes("GetBrandingSettings")) {
sendResponse(200, "application/json", safeJsonStringify({ settings: {} }));
} else if (url.includes("SessionService") || url.includes("Session")) {
sendResponse(200, "application/json", safeJsonStringify({ session: {} }));
} else if (url.includes("UserService") || url.includes("User")) {
sendResponse(200, "application/json", safeJsonStringify({ user: {} }));
} else if (url.includes("OrganizationService") || url.includes("Organization")) {
sendResponse(200, "application/json", safeJsonStringify({ result: [] }));
} else if (url.includes("IdentityProviderService") || url.includes("IdentityProvider")) {
sendResponse(200, "application/json", safeJsonStringify({ identityProviders: [] }));
} else {
sendResponse(200, "application/json", safeJsonStringify({}));
}
});
server.on("error", (err) => console.error("Server error:", err));
server.listen(PORT, "0.0.0.0", () => {
console.log(`Mock Zitadel server listening on port ${PORT}`);
console.log(`Captured headers will be written to: ${HEADERS_FILE}`);
});
// Graceful shutdown
process.on("SIGTERM", () => {
console.log("Shutting down mock server...");
server.close(() => {
console.log("Mock server stopped");
process.exit(0);
});
});
@@ -0,0 +1,43 @@
receivers:
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318
processors:
batch:
timeout: 1s
send_batch_size: 1024
exporters:
debug:
verbosity: detailed
file/traces:
path: /tmp/otel/traces.json
flush_interval: 1s
file/metrics:
path: /tmp/otel/metrics.json
flush_interval: 1s
file/logs:
path: /tmp/otel/logs.json
flush_interval: 1s
extensions:
health_check:
endpoint: 0.0.0.0:13133
service:
extensions: [health_check]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [debug, file/traces]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [debug, file/metrics]
logs:
receivers: [otlp]
processors: [batch]
exporters: [debug, file/logs]
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,119 @@
import { describe, it, expect, beforeAll, afterAll } from "vitest";
import { GenericContainer, type StartedTestContainer, Wait } from "testcontainers";
import * as https from "node:https";
import * as fs from "fs";
import * as path from "path";
import { fileURLToPath } from "node:url";
import { generateCertificates } from "../ca/utils/tls.ts";
const TEST_DIR = path.dirname(fileURLToPath(import.meta.url));
const OUTPUT_DIR = path.join(TEST_DIR, "output");
const CERTS_DIR = path.join(OUTPUT_DIR, "certs");
const LOGIN_APP_DIR = path.join(TEST_DIR, "../..");
const LOGIN_IMAGE_TAG = `zitadel-login-test:${process.env.GITHUB_SHA || "local"}`;
/**
* Integration tests for TLS support in the login application.
*
* These tests verify that the login container can serve traffic over HTTPS
* when configured with ZITADEL_TLS_ENABLED, ZITADEL_TLS_CERTPATH, and
* ZITADEL_TLS_KEYPATH environment variables. This is essential for deployments
* where the login application must terminate TLS itself rather than relying on
* a reverse proxy.
*
* The test suite builds the login container image and runs it in two modes:
* HTTP (default) and HTTPS (with TLS enabled). For HTTPS mode, a self-signed
* certificate is generated and mounted into the container. The tests verify
* that the application starts correctly and responds to health checks in both
* modes.
*/
describe("Login Container TLS Support", () => {
let loginImage: GenericContainer;
beforeAll(async () => {
if (fs.existsSync(OUTPUT_DIR)) {
fs.rmSync(OUTPUT_DIR, { recursive: true });
}
fs.mkdirSync(CERTS_DIR, { recursive: true });
const certs = generateCertificates({
serverCN: "localhost",
dns: ["localhost"],
ips: ["127.0.0.1"],
});
fs.writeFileSync(path.join(CERTS_DIR, "server.crt"), certs.server.cert);
fs.writeFileSync(path.join(CERTS_DIR, "server.key"), certs.server.key);
await GenericContainer.fromDockerfile(LOGIN_APP_DIR).build(LOGIN_IMAGE_TAG);
loginImage = new GenericContainer(LOGIN_IMAGE_TAG);
});
describe("when TLS is not enabled", () => {
let container: StartedTestContainer;
let appUrl: string;
beforeAll(async () => {
container = await loginImage
.withExposedPorts(3000)
.withWaitStrategy(Wait.forHttp("/ui/v2/login/healthy", 3000))
.start();
appUrl = `http://${container.getHost()}:${container.getMappedPort(3000)}`;
});
afterAll(async () => {
await container?.stop();
});
it("returns 200 from healthy endpoint", async () => {
const response = await fetch(`${appUrl}/ui/v2/login/healthy`);
expect(response.status).toBe(200);
});
});
describe("when TLS is enabled", () => {
let container: StartedTestContainer;
let appUrl: string;
beforeAll(async () => {
container = await loginImage
.withExposedPorts(3000)
.withEnvironment({
ZITADEL_TLS_ENABLED: "true",
ZITADEL_TLS_CERTPATH: "/certs/server.crt",
ZITADEL_TLS_KEYPATH: "/certs/server.key",
})
.withCopyFilesToContainer([
{
source: path.join(CERTS_DIR, "server.crt"),
target: "/certs/server.crt",
},
{
source: path.join(CERTS_DIR, "server.key"),
target: "/certs/server.key",
},
])
.withWaitStrategy(Wait.forLogMessage(/Ready on https/))
.start();
appUrl = `https://${container.getHost()}:${container.getMappedPort(3000)}`;
});
afterAll(async () => {
await container?.stop();
});
it("returns 200 from healthy endpoint over HTTPS", async () => {
const response = await new Promise<https.IncomingMessage>((resolve, reject) => {
https
.get(`${appUrl}/ui/v2/login/healthy`, { rejectUnauthorized: false }, (res) => {
res.resume();
resolve(res);
})
.on("error", reject);
});
expect(response.statusCode).toBe(200);
});
});
});
+160
View File
@@ -0,0 +1,160 @@
import js from "@eslint/js";
import nextPlugin from "@next/eslint-plugin-next";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import prettierConfig from "eslint-config-prettier/flat";
import importPlugin from "eslint-plugin-import";
import reactHooksPlugin from "eslint-plugin-react-hooks";
import globals from "globals";
import moduleBoundaries from "./checks/eslint-module-boundaries.mjs";
export default [
{
ignores: [
"node_modules/**",
".next/**",
"dockerized/**",
"cypress/**",
"acceptance/**",
"integration/**",
"vitest.config*.ts",
"next-env.d.ts",
],
},
js.configs.recommended,
nextPlugin.configs["core-web-vitals"],
{
files: ["**/*.{ts,tsx,jsx}"],
plugins: {
"react-hooks": reactHooksPlugin,
},
rules: {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
},
},
{
files: ["**/*.{js,mjs,cjs}"],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ["**/*.{ts,tsx}"],
plugins: {
"@typescript-eslint": tsPlugin,
import: importPlugin,
},
languageOptions: {
parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
parserOptions: {
ecmaFeatures: { jsx: true },
project: "./tsconfig.json",
},
},
settings: {
"import/resolver": {
typescript: true,
},
},
rules: {
...tsPlugin.configs.recommended.rules,
...importPlugin.configs.recommended.rules,
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"no-undef": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@next/next/no-img-element": "off",
"no-restricted-imports": [
"error",
{
paths: [
{
name: "next/image",
message:
"Use of next/image is forbidden. Use regular <img> elements instead.",
},
],
},
],
},
},
// Server Actions live in src/lib/actions, server-only code in src/lib/server
{
files: ["src/**/*.{ts,tsx}"],
plugins: {
login: moduleBoundaries,
},
rules: {
"login/module-boundaries": "error",
},
},
// Server components and server actions: must use logger, not console.*
{
files: [
"src/lib/server/**/*.ts",
"src/lib/actions/**/*.ts",
"src/app/**/route.ts",
"src/proxy.ts",
],
rules: {
"no-console": "warn",
},
},
// instrumentation.ts uses console.log during OTEL initialization (before logger is available)
{
files: ["src/instrumentation.ts"],
rules: {
"no-console": "off",
},
},
// Client components: logger import is forbidden (enforced by server-only at build time)
{
files: ["src/components/**/*.tsx"],
rules: {
"no-restricted-imports": [
"error",
{
paths: [
{
name: "next/image",
message:
"Use of next/image is forbidden. Use regular <img> elements instead.",
},
{
name: "@/lib/server/logger",
message:
"Cannot import logger in client components. Use console.* instead. The logger uses 'server-only' and will fail at build time.",
},
],
},
],
},
},
// Test files: allow console.*
{
files: [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.spec.ts",
"**/*.spec.tsx",
"**/tests/**/*",
],
rules: {
"no-console": "off",
},
},
prettierConfig,
];
+490
View File
@@ -0,0 +1,490 @@
{
"common": {
"back": "رجوع",
"title": "تسجيل الدخول باستخدام Zitadel"
},
"accounts": {
"title": "الحسابات",
"description": "حدد الحساب الذي تريد استخدامه.",
"addAnother": "إضافة حساب آخر",
"noResults": "لم يتم العثور على حسابات",
"verified": "تم التحقق",
"expired": "منتهي الصلاحية"
},
"logout": {
"title": "تسجيل الخروج",
"description": "انقر فوق حساب لإنهاء الجلسة",
"noResults": "لم يتم العثور على حسابات",
"clear": "إنهاء الجلسة",
"verifiedAt": "آخر نشاط: {time}",
"success": {
"title": "تم تسجيل الخروج بنجاح",
"description": "لقد قمت بتسجيل الخروج بنجاح."
}
},
"loginname": {
"title": "مرحباً بعودتك!",
"description": "أدخل بيانات الدخول الخاصة بك.",
"register": "تسجيل مستخدم جديد",
"submit": "متابعة",
"labels": {
"loginname": "اسم الدخول",
"username": "اسم المستخدم",
"usernameOrPhoneNumber": "اسم المستخدم أو رقم الهاتف",
"usernameOrEmail": "اسم المستخدم أو البريد الإلكتروني"
},
"required": {
"loginName": "هذا الحقل مطلوب"
},
"errors": {
"internalError": "حدث خطأ داخلي",
"couldNotGetLoginSettings": "تعذر الحصول على إعدادات تسجيل الدخول",
"couldNotSearchUsers": "تعذر البحث عن المستخدمين",
"couldNotGetDomain": "تعذر الحصول على النطاق",
"couldNotGetHost": "تعذر الحصول على المضيف",
"couldNotStartIDPFlow": "تعذر بدء تدفق مزود الهوية (IDP)",
"moreThanOneUserFound": "تم العثور على أكثر من مستخدم. يرجى تقديم معرف فريد.",
"userNotFound": "المستخدم غير موجود في النظام",
"couldNotCreateSession": "تعذر إنشاء جلسة للمستخدم",
"initialUserNotSupported": "المستخدم الأولي غير مدعوم",
"localAuthenticationNotAllowed": "المصادقة المحلية غير مسموح بها! اتصل بالمسؤول لمزيد من المعلومات.",
"passkeysNotAllowed": "مفاتيح المرور غير مسموح بها! اتصل بالمسؤول لمزيد من المعلومات.",
"couldNotFindIdentityProvider": "تعذر العثور على مزود الهوية.",
"userNotActive": "المستخدم غير نشط. اتصل بالمسؤول لمزيد من المعلومات."
}
},
"zitadel": {
"errors": {
"errorOccured": "حدث خطأ",
"multipleUsersFound": "تم العثور على مستخدمين متعددين",
"userNotFound": "المستخدم غير موجود في النظام"
}
},
"password": {
"verify": {
"title": "كلمة المرور",
"description": "أدخل كلمة المرور الخاصة بك.",
"resetPassword": "إعادة تعيين كلمة المرور",
"submit": "متابعة",
"labels": {
"password": "كلمة المرور"
},
"required": {
"password": "هذا الحقل مطلوب"
},
"errors": {
"couldNotVerifyPassword": "تعذر التحقق من كلمة المرور",
"couldNotResetPassword": "تعذر إعادة تعيين كلمة المرور"
},
"info": {
"passwordResetSent": "تمت إعادة تعيين كلمة المرور. يرجى التحقق من بريدك الإلكتروني"
}
},
"set": {
"title": "تعيين كلمة المرور",
"description": "تعيين كلمة المرور لحسابك",
"codeSent": "تم إرسال رمز جديد إلى عنوان بريدك الإلكتروني.",
"noCodeReceived": "لم تستلم رمزاً؟",
"resend": "إعادة إرسال الرمز",
"submit": "متابعة",
"labels": {
"code": "الرمز",
"newPassword": "كلمة المرور الجديدة",
"confirmPassword": "تأكيد كلمة المرور"
},
"required": {
"code": "هذا الحقل مطلوب",
"newPassword": "عليك تقديم كلمة مرور!",
"confirmPassword": "هذا الحقل مطلوب"
},
"errors": {
"couldNotSetPassword": "تعذر تعيين كلمة المرور",
"couldNotResetPassword": "تعذر إعادة تعيين كلمة المرور",
"couldNotVerifyPassword": "تعذر التحقق من كلمة المرور"
}
},
"change": {
"title": "تغيير كلمة المرور",
"description": "تعيين كلمة المرور لحسابك",
"submit": "متابعة",
"labels": {
"currentPassword": "كلمة المرور الحالية",
"newPassword": "كلمة المرور الجديدة",
"confirmPassword": "تأكيد كلمة المرور"
},
"required": {
"currentPassword": "عليك تقديم كلمة المرور الحالية!",
"newPassword": "عليك تقديم كلمة مرور جديدة!",
"confirmPassword": "هذا الحقل مطلوب"
},
"errors": {
"currentPasswordInvalid": "كلمة المرور الحالية غير صحيحة.",
"couldNotChangePassword": "تعذر تغيير كلمة المرور",
"couldNotVerifyPassword": "تعذر التحقق من كلمة المرور",
"unknownError": "خطأ غير معروف"
}
},
"complexity": {
"length": "يجب أن تكون على الأقل {minLength} حرفاً.",
"hasSymbol": "يجب أن تتضمن رمزاً.",
"hasNumber": "يجب أن تتضمن رقماً.",
"hasUppercase": "يجب أن تتضمن حرفاً كبيراً.",
"hasLowercase": "يجب أن تتضمن حرفاً صغيراً.",
"equals": "تأكيد كلمة المرور متطابق.",
"matches": "مطابق",
"doesNotMatch": "غير مطابق"
},
"errors": {
"noHostFound": "لم يتم العثور على مضيف",
"couldNotSendResetLink": "تعذر إرسال رابط إعادة تعيين كلمة المرور",
"couldNotCreateSessionForUser": "تعذر إنشاء جلسة للمستخدم",
"couldNotVerifyPassword": "تعذر التحقق من كلمة المرور",
"failedToAuthenticate": "فشلت المصادقة. لقد استهلكت {failedAttempts} من {maxPasswordAttempts} محاولة لكلمة المرور.{lockoutMessage}",
"failedToAuthenticateNoLimit": "فشلت المصادقة.",
"accountLockedContactAdmin": " اتصل بالمسؤول لفتح قفل حسابك",
"userNotFound": "المستخدم غير موجود في النظام",
"initialUserNotSupported": "المستخدم الأولي غير مدعوم",
"userInitialStateNotSupported": "حالة المستخدم الأولية غير مدعومة",
"codeOrVerificationRequired": "عليك تقديم رمز أو الحصول على فحص تحقق صالح للمستخدم",
"verificationRequired": "يجب إجراء فحص التحقق من المستخدم",
"couldNotLoadSession": "تعذر تحميل الجلسة",
"couldNotLoadAuthMethods": "تعذر تحميل طرق المصادقة",
"failedPrecondition": "فشل الشرط المسبق",
"sessionNotValid": "الجلسة غير صالحة",
"passwordVerificationMissing": "التحقق من كلمة المرور مفقود.",
"passwordVerificationTooOld": "التحقق من كلمة المرور قديم جدًا. يرجى التحقق من كلمة المرور مرة أخرى.",
"passwordResetNotAllowed": "إعادة تعيين كلمة المرور غير مسموح بها. اتصل بالمسؤول لمزيد من المعلومات.",
"localAuthenticationNotAllowed": "المصادقة المحلية غير مسموح بها! اتصل بالمسؤول لمزيد من المعلومات."
}
},
"idp": {
"title": "تسجيل الدخول باستخدام SSO",
"description": "حدد أحد المزودين التاليين لتسجيل الدخول",
"orSignInWith": "أو تسجيل الدخول باستخدام",
"signInWithApple": "تسجيل الدخول باستخدام Apple",
"signInWithGoogle": "تسجيل الدخول باستخدام Google",
"signInWithAzureAD": "تسجيل الدخول باستخدام AzureAD",
"signInWithGithub": "تسجيل الدخول باستخدام GitHub",
"signInWithGitlab": "تسجيل الدخول باستخدام GitLab",
"signInWithZitadel": "تسجيل الدخول باستخدام Zitadel",
"loginError": {
"title": "فشل تسجيل الدخول",
"description": "حدث خطأ أثناء محاولة تسجيل الدخول."
},
"linkingError": {
"title": "فشل ربط الحساب",
"description": "حدث خطأ أثناء محاولة ربط حسابك."
},
"completeRegister": {
"title": "أكمل بياناتك",
"description": "تحتاج إلى إكمال تسجيلك من خلال توفير عنوان بريدك الإلكتروني واسمك."
},
"accountNotFound": {
"title": "الحساب غير موجود",
"description": "لم نتمكن من العثور على حساب مرتبط ببيانات اعتماد مزود الهوية الخاص بك.",
"info": "لم يتم العثور على حساب موجود. يرجى تسجيل الدخول بحساب موجود أو الاتصال بالمسؤول للحصول على المساعدة.",
"backToLogin": "العودة إلى تسجيل الدخول"
},
"registrationFailed": {
"title": "التسجيل غير متاح",
"description": "لم نتمكن من إكمال عملية التسجيل.",
"info": "تعذر تحديد المنظمة للتسجيل. يرجى الاتصال بالمسؤول للحصول على المساعدة.",
"backToLogin": "العودة إلى تسجيل الدخول"
},
"processing": {
"message": "جاري معالجة المصادقة...",
"noRedirect": "لم يتم إرجاع إعادة توجيه أو خطأ من الخادم",
"unexpectedError": "حدث خطأ غير متوقع"
},
"errors": {
"missingParameters": "معلمات مطلوبة مفقودة",
"missingIdpInfo": "معلومات IDP مفقودة",
"idpNotFound": "مزود الهوية غير موجود",
"linkingNotAllowed": "الربط غير مسموح به لمزود الهوية هذا",
"linkingFailed": "فشل ربط مزود الهوية بالحساب",
"autoLinkingFailed": "فشل ربط الحساب تلقائياً",
"userCreationFailed": "فشل إنشاء حساب المستخدم",
"orgResolutionFailed": "تعذر تحديد المنظمة للتسجيل",
"sessionCreationFailed": "تعذر إنشاء الجلسة أو تحديد إعادة التوجيه",
"unknownError": "حدث خطأ غير معروف"
}
},
"ldap": {
"title": "تسجيل الدخول LDAP",
"description": "أدخل بيانات اعتماد LDAP الخاصة بك.",
"submit": "متابعة",
"labels": {
"username": "اسم المستخدم",
"password": "كلمة المرور"
},
"required": {
"username": "هذا الحقل مطلوب",
"password": "هذا الحقل مطلوب"
}
},
"mfa": {
"verify": {
"title": "التحقق من هويتك",
"description": "اختر أحد العوامل التالية.",
"noResults": "لا توجد عوامل ثانية متاحة للإعداد."
},
"set": {
"title": "إعداد المصادقة الثنائية",
"description": "اختر أحد العوامل الثانية التالية.",
"skip": "تخطي"
}
},
"otp": {
"verify": {
"title": "التحقق من المصادقة الثنائية",
"totpDescription": "أدخل الرمز من تطبيق المصادقة الخاص بك.",
"smsDescription": "أدخل الرمز الذي تلقيته عبر الرسائل القصيرة.",
"emailDescription": "أدخل الرمز الذي تلقيته عبر البريد الإلكتروني.",
"noCodeReceived": "لم تستلم رمزاً؟",
"resendCode": "إعادة إرسال الرمز",
"resendCodeIn": "إعادة إرسال الرمز ({seconds} ث)",
"submit": "متابعة",
"labels": {
"code": "الرمز"
},
"required": {
"code": "هذا الحقل مطلوب"
}
},
"set": {
"title": "إعداد المصادقة الثنائية",
"totpDescription": "امسح رمز الاستجابة السريعة باستخدام تطبيق المصادقة الخاص بك.",
"smsDescription": "أدخل رقم هاتفك لتلقي رمز عبر الرسائل القصيرة.",
"emailDescription": "أدخل عنوان بريدك الإلكتروني لتلقي رمز عبر البريد الإلكتروني.",
"totpRegisterDescription": "امسح رمز الاستجابة السريعة أو انتقل إلى عنوان URL يدوياً.",
"emailAddDescription": "استخدم رمزًا لمرة واحدة يُرسل إلى عنوان بريدك الإلكتروني الموثق كعامل ثانٍ.",
"smsAddDescription": "استخدم رمزًا لمرة واحدة يُرسل إلى رقم هاتفك الموثق كعامل ثانٍ.",
"add": "إضافة",
"emailAdded": "تمت إضافة الرمز عبر البريد الإلكتروني.",
"smsAdded": "تمت إضافة الرمز عبر الرسائل القصيرة.",
"submit": "متابعة",
"labels": {
"code": "الرمز"
},
"required": {
"code": "هذا الحقل مطلوب"
}
},
"errors": {
"couldNotRequestChallenge": "تعذر طلب تحدي OTP",
"couldNotVerifyCode": "تعذر التحقق من رمز OTP",
"couldNotGetSession": "تعذر تحميل جلستك. يرجى تسجيل الدخول مرة أخرى.",
"invalidMethod": "هذا العامل الثاني غير مدعوم.",
"couldNotAddEmail": "تعذرت إضافة الرمز عبر البريد الإلكتروني.",
"couldNotAddSms": "تعذرت إضافة الرمز عبر الرسائل القصيرة.",
"emailNotVerified": "وثّق عنوان بريدك الإلكتروني قبل إضافة الرموز عبر البريد الإلكتروني.",
"phoneNotVerified": "وثّق رقم هاتفك قبل إضافة الرموز عبر الرسائل القصيرة."
}
},
"passkey": {
"verify": {
"title": "المصادقة باستخدام مفتاح مرور",
"description": "سيطلب جهازك بصمة إصبعك، أو وجهك، أو قفل الشاشة",
"usePassword": "استخدم كلمة المرور",
"submit": "متابعة",
"errors": {
"couldNotRequestChallenge": "تعذر طلب تحدي مفتاح المرور",
"couldNotVerifyPasskey": "تعذر التحقق من مفتاح المرور",
"noResponseReceived": "فشل التحقق من مفتاح المرور - لم يتم استلام أي استجابة",
"noRedirectProvided": "اكتمل التحقق من مفتاح المرور ولكن لم يتم توفير إعادة توجيه",
"couldNotRetrievePasskey": "حدث خطأ أثناء استرداد مفتاح المرور",
"verificationCancelled": "تم إلغاء التحقق من مفتاح المرور",
"verificationFailed": "حدث خطأ أثناء التحقق من مفتاح المرور",
"couldNotFindSession": "تعذر العثور على الجلسة",
"couldNotUpdateSession": "تعذر تحديث الجلسة",
"userNotFound": "المستخدم غير موجود في النظام",
"couldNotDetermineRedirect": "تعذر تحديد عنوان URL لإعادة التوجيه بعد التحقق من مفتاح المرور"
}
},
"set": {
"title": "إعداد مفتاح مرور",
"description": "سيطلب جهازك بصمة إصبعك، أو وجهك، أو قفل الشاشة",
"info": {
"description": "مفتاح المرور هو طريقة مصادقة على جهاز مثل بصمة الإصبع، Apple FaceID أو ما شابه. ",
"link": "المصادقة بدون كلمة مرور"
},
"skip": "تخطي",
"submit": "متابعة"
}
},
"u2f": {
"verify": {
"title": "التحقق من المصادقة الثنائية",
"description": "تحقق من حسابك باستخدام جهازك."
},
"set": {
"title": "إعداد المصادقة الثنائية",
"description": "إعداد جهاز كعامل ثانٍ.",
"submit": "متابعة"
}
},
"register": {
"methods": {
"passkey": "مفتاح مرور",
"password": "كلمة المرور"
},
"disabled": {
"title": "التسجيل معطل",
"description": "التسجيل معطل. يرجى الاتصال بالمسؤول."
},
"missingdata": {
"title": "بيانات مفقودة",
"description": "قدم البريد الإلكتروني والاسم الأول والأخير للتسجيل."
},
"title": "تسجيل",
"description": "أنشئ حساب ZITADEL الخاص بك.",
"noMethodAvailableWarning": "لا توجد طريقة مصادقة متاحة. يرجى الاتصال بالمسؤول.",
"selectMethod": "حدد الطريقة التي ترغب في المصادقة بها",
"agreeTo": "للتسجيل يجب عليك الموافقة على الشروط والأحكام",
"termsOfService": "شروط الخدمة",
"privacyPolicy": "سياسة الخصوصية",
"submit": "متابعة",
"password": {
"title": "تعيين كلمة المرور",
"description": "تعيين كلمة المرور لحسابك",
"submit": "متابعة",
"labels": {
"password": "كلمة المرور",
"confirmPassword": "تأكيد كلمة المرور"
},
"required": {
"password": "عليك تقديم كلمة مرور!",
"confirmPassword": "هذا الحقل مطلوب"
}
},
"labels": {
"firstname": "الاسم الأول",
"lastname": "اسم العائلة",
"email": "البريد الإلكتروني"
},
"required": {
"firstname": "هذا الحقل مطلوب",
"lastname": "هذا الحقل مطلوب",
"email": "هذا الحقل مطلوب"
},
"errors": {
"couldNotCreateUser": "تعذر إنشاء المستخدم",
"couldNotCreateSession": "تعذر إنشاء الجلسة",
"userNotFound": "المستخدم غير موجود في النظام",
"couldNotLinkIDP": "تعذر ربط IDP بالمستخدم",
"couldNotRegisterUser": "تعذر تسجيل المستخدم",
"sessionMismatch": "بدأ التسجيل في متصفح آخر. يرجى تسجيل الدخول مرة أخرى باستخدام موفر الهوية الخاص بك."
}
},
"invite": {
"title": "دعوة مستخدم",
"description": "قدم عنوان البريد الإلكتروني واسم المستخدم الذي تريد دعوته.",
"info": "سيتلقى المستخدم بريداً إلكترونياً يحتوي على مزيد من التعليمات.",
"notAllowed": "إعداداتك لا تسمح لك بدعوة المستخدمين.",
"submit": "متابعة",
"success": {
"title": "تمت دعوة المستخدم",
"description": "تم إرسال البريد الإلكتروني بنجاح.",
"verified": "تمت دعوة المستخدم وقد تحقق بالفعل من بريده الإلكتروني.",
"notVerifiedYet": "تمت دعوة المستخدم. سيتلقى بريداً إلكترونياً يحتوي على مزيد من التعليمات.",
"submit": "دعوة مستخدم آخر"
}
},
"signedin": {
"title": "مرحباً {user}!",
"description": "أنت مسجل الدخول.",
"continue": "متابعة",
"error": {
"title": "خطأ",
"description": "حدث خطأ أثناء محاولة تسجيل الدخول."
}
},
"verify": {
"userIdMissing": "لم يتم تقديم userId!",
"successTitle": "تم التحقق من المستخدم",
"successDescription": "تم التحقق من المستخدم بنجاح.",
"successContinue": "متابعة",
"setupAuthenticator": "إعداد المصادق",
"verify": {
"title": "التحقق من المستخدم",
"description": "أدخل الرمز المقدم في البريد الإلكتروني للتحقق.",
"noCodeReceived": "لم تستلم رمزاً؟",
"resendCode": "إعادة إرسال الرمز",
"codeSent": "تم إرسال رمز للتو إلى عنوان بريدك الإلكتروني.",
"submit": "متابعة",
"labels": {
"code": "الرمز"
},
"required": {
"code": "هذا الحقل مطلوب"
}
},
"errors": {
"couldNotResendEmail": "تعذر إعادة إرسال البريد الإلكتروني",
"couldNotVerifyUser": "تعذر التحقق من المستخدم",
"couldNotVerifyInvite": "تعذر التحقق من الدعوة",
"couldNotVerifyEmail": "تعذر التحقق من البريد الإلكتروني",
"couldNotVerify": "تعذر التحقق",
"couldNotLoadUser": "تعذر تحميل المستخدم",
"couldNotLoadAuthenticators": "تعذر تحميل المصادقين المحتملين",
"couldNotCreateSession": "تعذر إنشاء الجلسة",
"noHostFound": "لم يتم العثور على مضيف",
"userAlreadyVerified": "تم التحقق من المستخدم بالفعل!",
"couldNotResendInvite": "تعذر إعادة إرسال الدعوة",
"inviteSendFailed": "فشل إرسال بريد الدعوة الإلكتروني",
"emailSendFailed": "فشل إرسال بريد التحقق الإلكتروني",
"contextMissing": "حدث خطأ. يرجى المحاولة مرة أخرى."
}
},
"authenticator": {
"title": "اختيار طريقة المصادقة",
"description": "حدد الطريقة التي ترغب في المصادقة بها",
"noMethodsAvailable": "لا توجد طرق مصادقة متاحة",
"allSetup": "لقد قمت بالفعل بإعداد مصادق!",
"linkWithIDP": "أو الربط مع مزود هوية",
"methods": {
"totp": "تطبيق المصادقة",
"u2f": "العامل الثاني العالمي",
"otpEmail": "رمز عبر البريد الإلكتروني",
"otpSms": "رمز عبر الرسائل القصيرة",
"passkey": "مفاتيح المرور",
"password": "كلمة المرور"
}
},
"device": {
"usercode": {
"title": "رمز الجهاز",
"description": "أدخل الرمز المعروض على تطبيقك أو جهازك.",
"submit": "متابعة",
"labels": {
"code": "الرمز"
},
"required": {
"code": "هذا الحقل مطلوب"
}
},
"request": {
"title": "{appName} يود الاتصال",
"description": "{appName} سيكون لديه حق الوصول إلى:",
"disclaimer": "بالنقر فوق سماح، فإنك تسمح لـ {appName} و Zitadel استخدام معلوماتك وفقاً لشروط الخدمة وسياسات الخصوصية الخاصة بكل منهما. يمكنك إلغاء هذا الوصول في أي وقت.",
"submit": "سماح",
"deny": "رفض"
},
"scope": {
"openid": "التحقق من هويتك.",
"email": "عرض عنوان بريدك الإلكتروني.",
"profile": "عرض معلومات ملفك الشخصي الكاملة.",
"offline_access": "السماح بالوصول دون اتصال إلى حسابك."
}
},
"error": {
"noUserCode": "لم يتم تقديم رمز مستخدم!",
"noDeviceRequest": "لم يتم العثور على طلب جهاز.",
"unknownContext": "تعذر الحصول على سياق المستخدم. تأكد من إدخال اسم المستخدم أولاً أو تقديم loginName كمعلمة بحث.",
"sessionExpired": "انتهت صلاحية جلستك أو تتطلب إعادة المصادقة. يرجى تسجيل الدخول مرة أخرى.",
"failedLoading": "فشل تحميل البيانات. يرجى المحاولة مرة أخرى.",
"tryagain": "حاول مرة أخرى",
"couldNotContinueSession": "تعذر المتابعة مع الجلسة - معلومات المستخدم مفقودة",
"couldNotClearSession": "تعذر إنهاء الجلسة. يرجى المحاولة مرة أخرى."
}
}
+490
View File
@@ -0,0 +1,490 @@
{
"common": {
"back": "Zurück",
"title": "Anmelden mit Zitadel"
},
"accounts": {
"title": "Konten",
"description": "Wählen Sie das Konto aus, das Sie verwenden möchten.",
"addAnother": "Ein weiteres Konto hinzufügen",
"noResults": "Keine Konten gefunden",
"verified": "verifiziert",
"expired": "abgelaufen"
},
"logout": {
"title": "Logout",
"description": "Wählen Sie den Account aus, das Sie entfernen möchten",
"noResults": "Keine Konten gefunden",
"clear": "Session beenden",
"verifiedAt": "Zuletzt aktiv: {time}",
"success": {
"title": "Logout erfolgreich",
"description": "Sie haben sich erfolgreich abgemeldet."
}
},
"loginname": {
"title": "Willkommen zurück!",
"description": "Geben Sie Ihre Anmeldedaten ein.",
"register": "Neuen Benutzer registrieren",
"submit": "Weiter",
"labels": {
"loginname": "Loginname",
"username": "Benutzername",
"usernameOrPhoneNumber": "Benutzername oder Telefonnummer",
"usernameOrEmail": "Benutzername oder E-Mail"
},
"required": {
"loginName": "Dieses Feld ist erforderlich"
},
"errors": {
"internalError": "Ein interner Fehler ist aufgetreten",
"couldNotGetLoginSettings": "Anmeldeeinstellungen konnten nicht abgerufen werden",
"couldNotSearchUsers": "Benutzer konnten nicht durchsucht werden",
"couldNotGetDomain": "Domain konnte nicht abgerufen werden",
"couldNotGetHost": "Host konnte nicht abgerufen werden",
"couldNotStartIDPFlow": "IDP-Ablauf konnte nicht gestartet werden",
"moreThanOneUserFound": "Mehr als ein Benutzer gefunden. Bitte geben Sie einen eindeutigen Identifikator an.",
"userNotFound": "Benutzer im System nicht gefunden",
"couldNotCreateSession": "Sitzung für Benutzer konnte nicht erstellt werden",
"initialUserNotSupported": "Initialer Benutzer wird nicht unterstützt",
"localAuthenticationNotAllowed": "Lokale Authentifizierung nicht zulässig! Wenden Sie sich für weitere Informationen an Ihren Administrator.",
"passkeysNotAllowed": "Passkeys nicht zulässig! Wenden Sie sich für weitere Informationen an Ihren Administrator.",
"couldNotFindIdentityProvider": "Identitätsanbieter konnte nicht gefunden werden.",
"userNotActive": "Das Benutzerkonto ist inaktiv. Wenden Sie sich für weitere Informationen an Ihren Administrator."
}
},
"zitadel": {
"errors": {
"errorOccured": "Ein Fehler ist aufgetreten",
"multipleUsersFound": "Mehrere Benutzer gefunden",
"userNotFound": "Benutzer im System nicht gefunden"
}
},
"password": {
"verify": {
"title": "Passwort",
"description": "Geben Sie Ihr Passwort ein.",
"resetPassword": "Passwort zurücksetzen",
"submit": "Weiter",
"labels": {
"password": "Passwort"
},
"required": {
"password": "Dieses Feld ist erforderlich"
},
"errors": {
"couldNotVerifyPassword": "Passwort konnte nicht verifiziert werden",
"couldNotResetPassword": "Passwort konnte nicht zurückgesetzt werden"
},
"info": {
"passwordResetSent": "Passwort wurde zurückgesetzt. Bitte prüfen Sie Ihre E-Mails"
}
},
"set": {
"title": "Passwort festlegen",
"description": "Legen Sie das Passwort für Ihr Konto fest",
"codeSent": "Ein neuer Code wurde an Ihre E-Mail-Adresse gesendet.",
"noCodeReceived": "Keinen Code erhalten?",
"resend": "Erneut senden",
"submit": "Weiter",
"labels": {
"code": "Code",
"newPassword": "Neues Passwort",
"confirmPassword": "Neues Passwort wiederholen"
},
"required": {
"code": "Dieses Feld ist erforderlich",
"newPassword": "Bitte geben Sie ein Passwort ein!",
"confirmPassword": "Dieses Feld ist erforderlich"
},
"errors": {
"couldNotSetPassword": "Passwort konnte nicht gesetzt werden",
"couldNotResetPassword": "Passwort konnte nicht zurückgesetzt werden",
"couldNotVerifyPassword": "Passwort konnte nicht verifiziert werden"
}
},
"change": {
"title": "Passwort ändern",
"description": "Legen Sie das Passwort für Ihr Konto fest",
"submit": "Weiter",
"labels": {
"currentPassword": "Aktuelles Passwort",
"newPassword": "Neues Passwort",
"confirmPassword": "Neues Passwort wiederholen"
},
"required": {
"currentPassword": "Bitte geben Sie Ihr aktuelles Passwort ein!",
"newPassword": "Bitte geben Sie ein neues Passwort ein!",
"confirmPassword": "Dieses Feld ist erforderlich"
},
"errors": {
"currentPasswordInvalid": "Das aktuelle Passwort ist falsch.",
"couldNotChangePassword": "Passwort konnte nicht geändert werden",
"couldNotVerifyPassword": "Passwort konnte nicht verifiziert werden",
"unknownError": "Unbekannter Fehler"
}
},
"complexity": {
"length": "Muss mindestens {minLength} Zeichen lang sein.",
"hasSymbol": "Muss ein Symbol enthalten.",
"hasNumber": "Muss eine Zahl enthalten.",
"hasUppercase": "Muss einen Großbuchstaben enthalten.",
"hasLowercase": "Muss einen Kleinbuchstaben enthalten.",
"equals": "Passwortbestätigung stimmt überein.",
"matches": "Stimmt überein",
"doesNotMatch": "Stimmt nicht überein"
},
"errors": {
"noHostFound": "Kein Host gefunden",
"couldNotSendResetLink": "Passwort-Zurücksetzungslink konnte nicht gesendet werden",
"couldNotCreateSessionForUser": "Sitzung für Benutzer konnte nicht erstellt werden",
"couldNotVerifyPassword": "Passwort konnte nicht verifiziert werden",
"failedToAuthenticate": "Authentifizierung fehlgeschlagen. Sie haben {failedAttempts} von {maxPasswordAttempts} Passwortversuchen.{lockoutMessage}",
"failedToAuthenticateNoLimit": "Authentifizierung fehlgeschlagen.",
"accountLockedContactAdmin": " Kontaktieren Sie Ihren Administrator, um Ihr Konto zu entsperren",
"userNotFound": "Benutzer nicht im System gefunden",
"initialUserNotSupported": "Initialbenutzer wird nicht unterstützt",
"userInitialStateNotSupported": "Anfangszustand des Benutzers wird nicht unterstützt",
"codeOrVerificationRequired": "Sie müssen einen Code angeben oder eine gültige Benutzerverifizierung durchführen",
"verificationRequired": "Die Benutzerverifizierung muss durchgeführt werden",
"couldNotLoadSession": "Sitzung konnte nicht geladen werden",
"couldNotLoadAuthMethods": "Authentifizierungsmethoden konnten nicht geladen werden",
"failedPrecondition": "Vorbedingung fehlgeschlagen",
"sessionNotValid": "Sitzung ist nicht gültig",
"passwordVerificationMissing": "Passwort-Verifizierung fehlt.",
"passwordVerificationTooOld": "Passwort-Verifizierung ist zu alt. Bitte verifizieren Sie Ihr Passwort erneut.",
"passwordResetNotAllowed": "Das Zurücksetzen des Passworts ist nicht zulässig. Wenden Sie sich für weitere Informationen an Ihren Administrator.",
"localAuthenticationNotAllowed": "Lokale Authentifizierung nicht zulässig! Wenden Sie sich für weitere Informationen an Ihren Administrator."
}
},
"idp": {
"title": "Mit SSO anmelden",
"description": "Wählen Sie einen der folgenden Anbieter, um sich anzumelden",
"orSignInWith": "oder melden Sie sich an mit",
"signInWithApple": "Mit Apple anmelden",
"signInWithGoogle": "Mit Google anmelden",
"signInWithAzureAD": "Mit AzureAD anmelden",
"signInWithGithub": "Mit GitHub anmelden",
"signInWithGitlab": "Mit GitLab anmelden",
"signInWithZitadel": "Mit Zitadel anmelden",
"loginError": {
"title": "Anmeldung fehlgeschlagen",
"description": "Beim Anmelden ist ein Fehler aufgetreten."
},
"linkingError": {
"title": "Konto-Verknüpfung fehlgeschlagen",
"description": "Beim Verknüpfen Ihres Kontos ist ein Fehler aufgetreten."
},
"completeRegister": {
"title": "Registrierung abschließen",
"description": "Bitte vervollständige die Registrierung, um dein Konto zu erstellen."
},
"accountNotFound": {
"title": "Konto nicht gefunden",
"description": "Wir konnten kein Konto finden, das mit Ihren Identitätsanbieter-Anmeldedaten verknüpft ist.",
"info": "Es wurde kein bestehendes Konto gefunden. Bitte melden Sie sich mit einem bestehenden Konto an oder wenden Sie sich an Ihren Administrator.",
"backToLogin": "Zurück zur Anmeldung"
},
"registrationFailed": {
"title": "Registrierung nicht verfügbar",
"description": "Wir konnten den Registrierungsprozess nicht abschließen.",
"info": "Die Organisation für die Registrierung konnte nicht ermittelt werden. Bitte wenden Sie sich an Ihren Administrator.",
"backToLogin": "Zurück zur Anmeldung"
},
"processing": {
"message": "Authentifizierung wird verarbeitet...",
"noRedirect": "Keine Weiterleitung oder Fehler vom Server erhalten",
"unexpectedError": "Ein unerwarteter Fehler ist aufgetreten"
},
"errors": {
"missingParameters": "Erforderliche Parameter fehlen",
"missingIdpInfo": "IDP-Informationen fehlen",
"idpNotFound": "Identitätsanbieter nicht gefunden",
"linkingNotAllowed": "Verknüpfung ist für diesen Identitätsanbieter nicht erlaubt",
"linkingFailed": "Verknüpfung des Identitätsanbieters zum Konto fehlgeschlagen",
"autoLinkingFailed": "Automatische Verknüpfung des Kontos fehlgeschlagen",
"userCreationFailed": "Erstellen des Benutzerkontos fehlgeschlagen",
"orgResolutionFailed": "Organisation für Registrierung konnte nicht ermittelt werden",
"sessionCreationFailed": "Sitzung konnte nicht erstellt oder Weiterleitung konnte nicht ermittelt werden",
"unknownError": "Ein unbekannter Fehler ist aufgetreten"
}
},
"ldap": {
"title": "LDAP Login",
"description": "Geben Sie Ihre LDAP-Anmeldedaten ein.",
"submit": "Weiter",
"labels": {
"username": "Benutzername",
"password": "Passwort"
},
"required": {
"username": "Dieses Feld ist erforderlich",
"password": "Dieses Feld ist erforderlich"
}
},
"mfa": {
"verify": {
"title": "Bestätigen Sie Ihre Identität",
"description": "Wählen Sie einen der folgenden Faktoren.",
"noResults": "Keine zweiten Faktoren verfügbar, um sie einzurichten."
},
"set": {
"title": "2-Faktor einrichten",
"description": "Wählen Sie einen der folgenden zweiten Faktoren.",
"skip": "Überspringen"
}
},
"otp": {
"verify": {
"title": "2-Faktor bestätigen",
"totpDescription": "Geben Sie den Code aus Ihrer Authentifizierungs-App ein.",
"smsDescription": "Geben Sie den Code ein, den Sie per SMS erhalten haben.",
"emailDescription": "Geben Sie den Code ein, den Sie per E-Mail erhalten haben.",
"noCodeReceived": "Keinen Code erhalten?",
"resendCode": "Code erneut senden",
"resendCodeIn": "Code erneut senden ({seconds}s)",
"submit": "Weiter",
"labels": {
"code": "Code"
},
"required": {
"code": "Dieses Feld ist erforderlich"
}
},
"set": {
"title": "2-Faktor einrichten",
"totpDescription": "Scannen Sie den QR-Code mit Ihrer Authentifizierungs-App.",
"smsDescription": "Geben Sie Ihre Telefonnummer ein, um einen Code per SMS zu erhalten.",
"emailDescription": "Geben Sie Ihre E-Mail-Adresse ein, um einen Code per E-Mail zu erhalten.",
"totpRegisterDescription": "Scannen Sie den QR-Code oder navigieren Sie manuell zur URL.",
"emailAddDescription": "Verwenden Sie einen Einmalcode, der an Ihre verifizierte E-Mail-Adresse gesendet wird, als zweiten Faktor.",
"smsAddDescription": "Verwenden Sie einen Einmalcode, der an Ihre verifizierte Telefonnummer gesendet wird, als zweiten Faktor.",
"add": "Hinzufügen",
"emailAdded": "Code per E-Mail hinzugefügt.",
"smsAdded": "Code per SMS hinzugefügt.",
"submit": "Weiter",
"labels": {
"code": "Code"
},
"required": {
"code": "Dieses Feld ist erforderlich"
}
},
"errors": {
"couldNotRequestChallenge": "OTP-Challenge konnte nicht angefordert werden",
"couldNotVerifyCode": "OTP-Code konnte nicht verifiziert werden",
"couldNotGetSession": "Ihre Sitzung konnte nicht geladen werden. Bitte melden Sie sich erneut an.",
"invalidMethod": "Dieser zweite Faktor wird nicht unterstützt.",
"couldNotAddEmail": "Code per E-Mail konnte nicht hinzugefügt werden.",
"couldNotAddSms": "Code per SMS konnte nicht hinzugefügt werden.",
"emailNotVerified": "Verifizieren Sie Ihre E-Mail-Adresse, bevor Sie Codes per E-Mail hinzufügen.",
"phoneNotVerified": "Verifizieren Sie Ihre Telefonnummer, bevor Sie Codes per SMS hinzufügen."
}
},
"passkey": {
"verify": {
"title": "Mit einem Passkey authentifizieren",
"description": "Ihr Gerät wird nach Ihrem Fingerabdruck, Gesicht oder Bildschirmsperre fragen",
"usePassword": "Passwort verwenden",
"submit": "Weiter",
"errors": {
"couldNotRequestChallenge": "Passkey-Challenge konnte nicht angefordert werden",
"couldNotVerifyPasskey": "Passkey konnte nicht verifiziert werden",
"noResponseReceived": "Passkey-Verifizierung fehlgeschlagen - keine Antwort erhalten",
"noRedirectProvided": "Passkey-Verifizierung abgeschlossen, aber keine Weiterleitung bereitgestellt",
"couldNotRetrievePasskey": "Fehler beim Abrufen des Passkeys",
"verificationCancelled": "Passkey-Verifizierung wurde abgebrochen",
"verificationFailed": "Fehler bei der Passkey-Verifizierung",
"couldNotFindSession": "Sitzung konnte nicht gefunden werden",
"couldNotUpdateSession": "Sitzung konnte nicht aktualisiert werden",
"userNotFound": "Benutzer nicht im System gefunden",
"couldNotDetermineRedirect": "Weiterleitungs-URL nach Passkey-Verifizierung konnte nicht ermittelt werden"
}
},
"set": {
"title": "Passkey einrichten",
"description": "Ihr Gerät wird nach Ihrem Fingerabdruck, Gesicht oder Bildschirmsperre fragen",
"info": {
"description": "Ein Passkey ist eine Authentifizierungsmethode auf einem Gerät wie Ihr Fingerabdruck, Apple FaceID oder ähnliches.",
"link": "Passkey-Authentifizierung"
},
"skip": "Überspringen",
"submit": "Weiter"
}
},
"u2f": {
"verify": {
"title": "2-Faktor bestätigen",
"description": "Bestätigen Sie Ihr Konto mit Ihrem Gerät."
},
"set": {
"title": "2-Faktor einrichten",
"description": "Richten Sie ein Gerät als zweiten Faktor ein.",
"submit": "Weiter"
}
},
"register": {
"methods": {
"passkey": "Passkey",
"password": "Passwort"
},
"disabled": {
"title": "Registrierung deaktiviert",
"description": "Die Registrierung ist deaktiviert. Bitte wenden Sie sich an den Administrator."
},
"missingdata": {
"title": "Registrierung fehlgeschlagen",
"description": "Einige Daten fehlen. Bitte überprüfen Sie Ihre Eingaben."
},
"title": "Registrieren",
"description": "Erstellen Sie Ihr Zitadel-Konto.",
"noMethodAvailableWarning": "Keine Authentifizierungsmethode verfügbar. Bitte wenden Sie sich an den Administrator.",
"selectMethod": "Wählen Sie die Methode, mit der Sie sich authentifizieren möchten",
"agreeTo": "Um sich zu registrieren, müssen Sie den Nutzungsbedingungen zustimmen",
"termsOfService": "Nutzungsbedingungen",
"privacyPolicy": "Datenschutzrichtlinie",
"submit": "Weiter",
"password": {
"title": "Passwort festlegen",
"description": "Legen Sie das Passwort für Ihr Konto fest",
"submit": "Weiter",
"labels": {
"password": "Passwort",
"confirmPassword": "Neues Passwort wiederholen"
},
"required": {
"password": "Bitte geben Sie ein Passwort ein!",
"confirmPassword": "Dieses Feld ist erforderlich"
}
},
"labels": {
"firstname": "Vorname",
"lastname": "Nachname",
"email": "E-Mail"
},
"required": {
"firstname": "Dieses Feld ist erforderlich",
"lastname": "Dieses Feld ist erforderlich",
"email": "Dieses Feld ist erforderlich"
},
"errors": {
"couldNotCreateUser": "Benutzer konnte nicht erstellt werden",
"couldNotCreateSession": "Sitzung konnte nicht erstellt werden",
"userNotFound": "Benutzer nicht im System gefunden",
"couldNotLinkIDP": "IDP konnte nicht mit dem Benutzer verknüpft werden",
"couldNotRegisterUser": "Benutzer konnte nicht registriert werden",
"sessionMismatch": "Die Registrierung wurde in einem anderen Browser gestartet. Bitte melden Sie sich erneut bei Ihrem Identitätsanbieter an."
}
},
"invite": {
"title": "Benutzer einladen",
"description": "Geben Sie die E-Mail-Adresse des Benutzers ein, den Sie einladen möchten.",
"info": "Der Benutzer erhält eine E-Mail mit einem Link, um sich zu registrieren.",
"notAllowed": "Sie haben keine Berechtigung, Benutzer einzuladen.",
"submit": "Einladen",
"success": {
"title": "Einladung erfolgreich",
"description": "Der Benutzer wurde erfolgreich eingeladen.",
"verified": "Der Benutzer wurde eingeladen und hat seine E-Mail bereits verifiziert.",
"notVerifiedYet": "Der Benutzer wurde eingeladen. Er erhält eine E-Mail mit weiteren Anweisungen.",
"submit": "Weiteren Benutzer einladen"
}
},
"signedin": {
"title": "Willkommen {user}!",
"description": "Sie sind angemeldet.",
"continue": "Weiter",
"error": {
"title": "Fehler",
"description": "Ein Fehler ist aufgetreten."
}
},
"verify": {
"userIdMissing": "Keine Benutzer-ID angegeben!",
"successTitle": "Benutzer verifiziert",
"successDescription": "Der Benutzer wurde erfolgreich verifiziert.",
"successContinue": "Weiter",
"setupAuthenticator": "Authentifikator einrichten",
"verify": {
"title": "Benutzer verifizieren",
"description": "Geben Sie den Code ein, der in der Bestätigungs-E-Mail angegeben ist.",
"noCodeReceived": "Keinen Code erhalten?",
"resendCode": "Code erneut senden",
"codeSent": "Ein Code wurde gerade an Ihre E-Mail-Adresse gesendet.",
"submit": "Weiter",
"labels": {
"code": "Code"
},
"required": {
"code": "Dieses Feld ist erforderlich"
}
},
"errors": {
"couldNotResendEmail": "E-Mail konnte nicht erneut gesendet werden",
"couldNotVerifyUser": "Benutzer konnte nicht verifiziert werden",
"couldNotVerifyInvite": "Einladung konnte nicht verifiziert werden",
"couldNotVerifyEmail": "E-Mail konnte nicht verifiziert werden",
"couldNotVerify": "Konnte nicht verifizieren",
"couldNotLoadUser": "Benutzer konnte nicht geladen werden",
"couldNotLoadAuthenticators": "Mögliche Authentifikatoren konnten nicht geladen werden",
"couldNotCreateSession": "Sitzung konnte nicht erstellt werden",
"noHostFound": "Kein Host gefunden",
"userAlreadyVerified": "Benutzer ist bereits verifiziert!",
"couldNotResendInvite": "Einladung konnte nicht erneut gesendet werden",
"inviteSendFailed": "Einladungs-E-Mail konnte nicht gesendet werden",
"emailSendFailed": "Verifizierungs-E-Mail konnte nicht gesendet werden",
"contextMissing": "Ein Fehler ist aufgetreten. Bitte versuchen Sie es erneut."
}
},
"authenticator": {
"title": "Authentifizierungsmethode auswählen",
"description": "Wählen Sie die Methode, mit der Sie sich authentifizieren möchten.",
"noMethodsAvailable": "Keine Authentifizierungsmethoden verfügbar",
"allSetup": "Sie haben bereits einen Authentifikator eingerichtet!",
"linkWithIDP": "oder verknüpfe mit einem Identitätsanbieter",
"methods": {
"totp": "Authentifizierungs-App",
"u2f": "Universeller zweiter Faktor",
"otpEmail": "Code per E-Mail",
"otpSms": "Code per SMS",
"passkey": "Passkeys",
"password": "Passwort"
}
},
"device": {
"usercode": {
"title": "Gerätecode",
"description": "Geben Sie den Code ein.",
"submit": "Weiter",
"labels": {
"code": "Code"
},
"required": {
"code": "Dieses Feld ist erforderlich"
}
},
"request": {
"title": "{appName} möchte eine Verbindung herstellen:",
"disclaimer": "{appName} hat Zugriff auf:",
"description": "Durch Klicken auf Zulassen erlauben Sie {appName} und Zitadel, Ihre Informationen gemäß ihren jeweiligen Nutzungsbedingungen und Datenschutzrichtlinien zu verwenden. Sie können diesen Zugriff jederzeit widerrufen.",
"submit": "Zulassen",
"deny": "Ablehnen"
},
"scope": {
"openid": "Überprüfen Ihrer Identität.",
"email": "Zugriff auf Ihre E-Mail-Adresse.",
"profile": "Zugriff auf Ihre vollständigen Profilinformationen.",
"offline_access": "Erlauben Sie den Offline-Zugriff auf Ihr Konto."
}
},
"error": {
"noUserCode": "Kein Benutzercode angegeben!",
"noDeviceRequest": " Es wurde keine Geräteanforderung gefunden. Bitte überprüfen Sie die URL.",
"unknownContext": "Der Kontext des Benutzers konnte nicht ermittelt werden. Stellen Sie sicher, dass Sie zuerst den Benutzernamen eingeben oder einen loginName als Suchparameter angeben.",
"sessionExpired": "Ihre Sitzung ist abgelaufen oder erfordert eine erneute Authentifizierung. Bitte melden Sie sich erneut an.",
"failedLoading": "Daten konnten nicht geladen werden. Bitte versuchen Sie es erneut.",
"tryagain": "Erneut versuchen",
"couldNotContinueSession": "Sitzung konnte nicht fortgesetzt werden - fehlende Benutzerinformationen",
"couldNotClearSession": "Die Sitzung konnte nicht beendet werden. Bitte versuchen Sie es erneut."
}
}
+491
View File
@@ -0,0 +1,491 @@
{
"common": {
"back": "Back",
"title": "Login with Zitadel"
},
"accounts": {
"title": "Accounts",
"description": "Select the account you want to use.",
"addAnother": "Add another account",
"noResults": "No accounts found",
"verified": "verified",
"expired": "expired"
},
"logout": {
"title": "Logout",
"description": "Click an account to end the session",
"noResults": "No accounts found",
"clear": "End Session",
"verifiedAt": "Last active: {time}",
"success": {
"title": "Logout successful",
"description": "You have successfully logged out."
}
},
"loginname": {
"title": "Welcome back!",
"description": "Enter your login details.",
"register": "Register new user",
"submit": "Continue",
"labels": {
"loginname": "Loginname",
"username": "Username",
"usernameOrPhoneNumber": "Username or phone number",
"usernameOrEmail": "Username or email"
},
"required": {
"loginName": "This field is required"
},
"errors": {
"internalError": "An internal error occurred",
"couldNotGetLoginSettings": "Could not get login settings",
"couldNotSearchUsers": "Could not search users",
"couldNotGetDomain": "Could not get domain",
"couldNotGetHost": "Could not get host",
"couldNotStartIDPFlow": "Could not start IDP flow",
"moreThanOneUserFound": "More than one user found. Provide a unique identifier.",
"userNotFound": "User not found in the system",
"couldNotCreateSession": "Could not create session for user",
"initialUserNotSupported": "Initial User not supported",
"localAuthenticationNotAllowed": "Local authentication is not allowed! Contact your administrator for more information.",
"passkeysNotAllowed": "Passkeys not allowed! Contact your administrator for more information.",
"couldNotFindIdentityProvider": "Could not find identity provider.",
"userNotActive": "User is not active. Contact your administrator for more information."
}
},
"zitadel": {
"errors": {
"errorOccured": "An error occurred",
"multipleUsersFound": "Multiple users found",
"userNotFound": "User not found in the system"
}
},
"password": {
"verify": {
"title": "Password",
"description": "Enter your password.",
"resetPassword": "Reset Password",
"submit": "Continue",
"labels": {
"password": "Password"
},
"required": {
"password": "This field is required"
},
"errors": {
"couldNotVerifyPassword": "Could not verify password",
"couldNotResetPassword": "Could not reset password"
},
"info": {
"passwordResetSent": "Password was reset. Please check your email"
}
},
"set": {
"title": "Set Password",
"description": "Set the password for your account",
"codeSent": "A new code has been sent to your email address.",
"noCodeReceived": "Didn't receive a code?",
"resend": "Resend code",
"submit": "Continue",
"labels": {
"code": "Code",
"newPassword": "New Password",
"confirmPassword": "Confirm Password"
},
"required": {
"code": "This field is required",
"newPassword": "You have to provide a password!",
"confirmPassword": "This field is required"
},
"errors": {
"couldNotSetPassword": "Could not set password",
"couldNotResetPassword": "Could not reset password",
"couldNotVerifyPassword": "Could not verify password"
}
},
"change": {
"title": "Change Password",
"description": "Set the password for your account",
"submit": "Continue",
"labels": {
"currentPassword": "Current Password",
"newPassword": "New Password",
"confirmPassword": "Confirm Password"
},
"required": {
"currentPassword": "You have to provide your current password!",
"newPassword": "You have to provide a new password!",
"confirmPassword": "This field is required"
},
"errors": {
"currentPasswordInvalid": "Current password is incorrect.",
"couldNotChangePassword": "Could not change password",
"couldNotVerifyPassword": "Could not verify password",
"unknownError": "Unknown error"
}
},
"complexity": {
"length": "Must be at least {minLength} characters long.",
"hasSymbol": "Must include a symbol.",
"hasNumber": "Must include a number.",
"hasUppercase": "Must include an uppercase letter.",
"hasLowercase": "Must include a lowercase letter.",
"equals": "Password confirmation matched.",
"matches": "Matches",
"doesNotMatch": "Doesn't match"
},
"errors": {
"noHostFound": "No host found",
"couldNotSendResetLink": "Could not send Password Reset Link",
"couldNotCreateSessionForUser": "Could not create session for user",
"couldNotVerifyPassword": "Could not verify password",
"failedToAuthenticate": "Failed to authenticate. You had {failedAttempts} of {maxPasswordAttempts} password attempts.{lockoutMessage}",
"failedToAuthenticateNoLimit": "Failed to authenticate.",
"accountLockedContactAdmin": " Contact your administrator to unlock your account",
"userNotFound": "User not found in the system",
"initialUserNotSupported": "Initial User not supported",
"userInitialStateNotSupported": "User Initial State is not supported",
"codeOrVerificationRequired": "You have to provide a code or have a valid User Verification Check",
"verificationRequired": "User Verification Check has to be done",
"couldNotLoadSession": "Could not load session",
"couldNotLoadAuthMethods": "Could not load auth methods",
"failedPrecondition": "Failed precondition",
"sessionNotValid": "Session is not valid",
"passwordVerificationMissing": "Password verification is missing.",
"passwordVerificationTooOld": "Password verification is too old. Please verify your password again.",
"passwordResetNotAllowed": "Password reset is not allowed. Contact your administrator for more information.",
"localAuthenticationNotAllowed": "Local authentication is not allowed! Contact your administrator for more information."
}
},
"idp": {
"title": "Sign in with SSO",
"description": "Select one of the following providers to sign in",
"orSignInWith": "or sign in with",
"signInWithApple": "Sign in with Apple",
"signInWithGoogle": "Sign in with Google",
"signInWithAzureAD": "Sign in with AzureAD",
"signInWithGithub": "Sign in with GitHub",
"signInWithGitlab": "Sign in with GitLab",
"signInWithZitadel": "Sign in with Zitadel",
"loginError": {
"title": "Login failed",
"description": "An error occurred while trying to login."
},
"linkingError": {
"title": "Account linking failed",
"description": "An error occurred while trying to link your account."
},
"completeRegister": {
"title": "Complete your data",
"description": "You need to complete your registration by providing your email address and name."
},
"accountNotFound": {
"title": "Account Not Found",
"description": "We couldn't find an account associated with your identity provider credentials.",
"info": "No existing account was found. Please sign in with an existing account or contact your administrator for assistance.",
"backToLogin": "Back to Login"
},
"registrationFailed": {
"title": "Registration Not Available",
"description": "We couldn't complete the registration process.",
"info": "Unable to determine the organization for registration. Please contact your administrator for assistance.",
"backToLogin": "Back to Login"
},
"processing": {
"message": "Processing authentication...",
"noRedirect": "No redirect or error returned from server",
"unexpectedError": "An unexpected error occurred"
},
"errors": {
"missingParameters": "Missing required parameters",
"missingIdpInfo": "IDP information missing",
"idpNotFound": "Identity provider not found",
"linkingNotAllowed": "Linking is not allowed for this identity provider",
"linkingFailed": "Failed to link identity provider to account",
"autoLinkingFailed": "Failed to automatically link account",
"userCreationFailed": "Failed to create user account",
"orgResolutionFailed": "Could not determine organization for registration",
"sessionCreationFailed": "Could not create session or determine redirect",
"unknownError": "An unknown error occurred"
}
},
"ldap": {
"title": "LDAP Login",
"description": "Enter your LDAP credentials.",
"submit": "Continue",
"labels": {
"username": "Username",
"password": "Password"
},
"required": {
"username": "This field is required",
"password": "This field is required"
}
},
"mfa": {
"verify": {
"title": "Verify your identity",
"description": "Choose one of the following factors.",
"noResults": "No second factors available to setup."
},
"set": {
"title": "Set up 2-Factor",
"description": "Choose one of the following second factors.",
"skip": "Skip"
}
},
"otp": {
"verify": {
"title": "Verify 2-Factor",
"totpDescription": "Enter the code from your authenticator app.",
"smsDescription": "Enter the code you received via SMS.",
"emailDescription": "Enter the code you received via email.",
"noCodeReceived": "Didn't receive a code?",
"resendCode": "Resend code",
"resendCodeIn": "Resend code ({seconds}s)",
"submit": "Continue",
"labels": {
"code": "Code"
},
"required": {
"code": "This field is required"
}
},
"set": {
"title": "Set up 2-Factor",
"totpDescription": "Scan the QR code with your authenticator app.",
"smsDescription": "Enter your phone number to receive a code via SMS.",
"emailDescription": "Enter your email address to receive a code via email.",
"totpRegisterDescription": "Scan the QR Code or navigate to the URL manually.",
"emailAddDescription": "Use a one-time code sent to your verified email address as a second factor.",
"smsAddDescription": "Use a one-time code sent to your verified phone number as a second factor.",
"add": "Add",
"emailAdded": "Code via email added.",
"smsAdded": "Code via SMS added.",
"submit": "Continue",
"labels": {
"code": "Code"
},
"required": {
"code": "This field is required"
}
},
"errors": {
"couldNotRequestChallenge": "Could not request OTP challenge",
"couldNotVerifyCode": "Could not verify OTP code",
"couldNotGetSession": "Your session could not be loaded. Please sign in again.",
"invalidMethod": "This second factor is not supported.",
"couldNotAddEmail": "Code via email could not be added.",
"couldNotAddSms": "Code via SMS could not be added.",
"emailNotVerified": "Verify your email address before adding codes via email.",
"phoneNotVerified": "Verify your phone number before adding codes via SMS."
}
},
"passkey": {
"verify": {
"title": "Authenticate with a passkey",
"description": "Your device will ask for your fingerprint, face, or screen lock",
"usePassword": "Use password",
"submit": "Continue",
"errors": {
"couldNotRequestChallenge": "Could not request passkey challenge",
"couldNotVerifyPasskey": "Could not verify passkey",
"noResponseReceived": "Passkey verification failed - no response received",
"noRedirectProvided": "Passkey verification completed but no redirect was provided",
"couldNotRetrievePasskey": "An error occurred while retrieving passkey",
"verificationCancelled": "Passkey verification was cancelled",
"verificationFailed": "An error occurred during passkey verification",
"couldNotFindSession": "Could not find session",
"couldNotUpdateSession": "Could not update session",
"userNotFound": "User not found in the system",
"couldNotDetermineRedirect": "Could not determine redirect URL after passkey verification"
}
},
"set": {
"title": "Setup a passkey",
"description": "Your device will ask for your fingerprint, face, or screen lock",
"info": {
"description": "A passkey is an authentication method on a device like your fingerprint, Apple FaceID or similar. ",
"link": "Passkey Authentication"
},
"skip": "Skip",
"submit": "Continue"
}
},
"u2f": {
"verify": {
"title": "Verify 2-Factor",
"description": "Verify your account with your device."
},
"set": {
"title": "Set up 2-Factor",
"description": "Set up a device as a second factor.",
"submit": "Continue"
}
},
"register": {
"methods": {
"passkey": "Passkey",
"password": "Password"
},
"disabled": {
"title": "Registration disabled",
"description": "The registration is disabled. Please contact your administrator."
},
"missingdata": {
"title": "Missing data",
"description": "Provide email, first and last name to register."
},
"title": "Register",
"description": "Create your Zitadel account.",
"noMethodAvailableWarning": "No authentication method available. Please contact your administrator.",
"selectMethod": "Select the method you would like to authenticate",
"agreeTo": "To register you must agree to the terms and conditions",
"termsOfService": "Terms of Service",
"privacyPolicy": "Privacy Policy",
"submit": "Continue",
"password": {
"title": "Set Password",
"description": "Set the password for your account",
"submit": "Continue",
"labels": {
"password": "Password",
"confirmPassword": "Confirm Password"
},
"required": {
"password": "You have to provide a password!",
"confirmPassword": "This field is required"
}
},
"labels": {
"firstname": "First name",
"lastname": "Last name",
"email": "E-mail"
},
"required": {
"firstname": "This field is required",
"lastname": "This field is required",
"email": "This field is required"
},
"errors": {
"couldNotCreateUser": "Could not create user",
"couldNotCreateSession": "Could not create session",
"userNotFound": "User not found in the system",
"couldNotLinkIDP": "Could not link IDP to user",
"couldNotRegisterUser": "Could not register user",
"sessionMismatch": "The registration was started in another browser. Please sign in with your identity provider again."
}
},
"invite": {
"title": "Invite User",
"description": "Provide the email address and the name of the user you want to invite.",
"info": "The user will receive an email with further instructions.",
"notAllowed": "Your settings do not allow you to invite users.",
"submit": "Continue",
"success": {
"title": "User invited",
"description": "The email has successfully been sent.",
"verified": "The user has been invited and has already verified his email.",
"notVerifiedYet": "The user has been invited. They will receive an email with further instructions.",
"submit": "Invite another user"
}
},
"signedin": {
"title": "Welcome {user}!",
"description": "You are signed in.",
"continue": "Continue",
"error": {
"title": "Error",
"description": "An error occurred while trying to sign in."
}
},
"verify": {
"userIdMissing": "No userId provided!",
"successTitle": "User verified",
"successDescription": "The user has been verified successfully.",
"successContinue": "Continue",
"setupAuthenticator": "Setup authenticator",
"verify": {
"title": "Verify user",
"description": "Enter the Code provided in the verification email.",
"noCodeReceived": "Didn't receive a code?",
"resendCode": "Resend code",
"codeSent": "A new code has just been sent to your email address.",
"submit": "Continue",
"labels": {
"code": "Code"
},
"required": {
"code": "This field is required"
}
},
"errors": {
"couldNotResendEmail": "Could not resend email",
"couldNotVerifyUser": "Could not verify user",
"couldNotVerifyInvite": "Could not verify invite",
"couldNotVerifyEmail": "Could not verify email",
"couldNotVerify": "Could not verify",
"couldNotLoadUser": "Could not load user",
"couldNotLoadAuthenticators": "Could not load possible authenticators",
"couldNotCreateSession": "Could not create session",
"noHostFound": "No host found",
"userAlreadyVerified": "User is already verified!",
"couldNotResendInvite": "Could not resend invite",
"inviteSendFailed": "Failed to send invitation email",
"emailSendFailed": "Failed to send verification email",
"contextMissing": "An error occurred. Please try again."
}
},
"authenticator": {
"title": "Choose authentication method",
"description": "Select the method you would like to authenticate",
"noMethodsAvailable": "No authentication methods available",
"allSetup": "You have already setup an authenticator!",
"linkWithIDP": "or link with an Identity Provider",
"methods": {
"totp": "Authenticator App",
"u2f": "Universal Second Factor",
"otpEmail": "Code via Email",
"otpSms": "Code via SMS",
"passkey": "Passkeys",
"password": "Password"
}
},
"device": {
"usercode": {
"title": "Device code",
"description": "Enter the code displayed on your app or device.",
"submit": "Continue",
"labels": {
"code": "Code"
},
"required": {
"code": "This field is required"
}
},
"request": {
"title": "{appName} would like to connect",
"description": "{appName} will have access to:",
"disclaimer": "By clicking Allow, you allow {appName} and Zitadel to use your information in accordance with their respective terms of service and privacy policies. You can revoke this access at any time.",
"usercode": "Code displayed on your device:",
"submit": "Allow",
"deny": "Deny"
},
"scope": {
"openid": "Verify your identity.",
"email": "View your email address.",
"profile": "View your full profile information.",
"offline_access": "Allow offline access to your account."
}
},
"error": {
"noUserCode": "No user code provided!",
"noDeviceRequest": "No device request found.",
"unknownContext": "Could not get the context of the user. Make sure to enter the username first or provide a loginName as searchParam.",
"sessionExpired": "Your session has expired or requires re-authentication. Please sign in again.",
"failedLoading": "Failed to load data. Please try again.",
"tryagain": "Try Again",
"couldNotContinueSession": "Could not continue with session - missing user information",
"couldNotClearSession": "Could not end the session. Please try again."
}
}
+490
View File
@@ -0,0 +1,490 @@
{
"common": {
"back": "Atrás",
"title": "Iniciar sesión con Zitadel"
},
"accounts": {
"title": "Cuentas",
"description": "Seleccione la cuenta que desea utilizar.",
"addAnother": "Agregar otra cuenta",
"noResults": "No se encontraron cuentas",
"verified": "verificado",
"expired": "expirado"
},
"logout": {
"title": "Cerrar sesión",
"description": "Selecciona la cuenta que deseas eliminar",
"noResults": "No se encontraron cuentas",
"clear": "Eliminar sesión",
"verifiedAt": "Última actividad: {time}",
"success": {
"title": "Cierre de sesión exitoso",
"description": "Has cerrado sesión correctamente."
}
},
"loginname": {
"title": "¡Bienvenido de nuevo!",
"description": "Introduce tus datos de acceso.",
"register": "Registrar nuevo usuario",
"submit": "Continuar",
"labels": {
"loginname": "Nombre de inicio de sesión",
"username": "Nombre de usuario",
"usernameOrPhoneNumber": "Nombre de usuario o número de teléfono",
"usernameOrEmail": "Nombre de usuario o correo electrónico"
},
"required": {
"loginName": "Este campo es obligatorio"
},
"errors": {
"internalError": "Se produjo un error interno",
"couldNotGetLoginSettings": "No se pudieron obtener los ajustes de inicio de sesión",
"couldNotSearchUsers": "No se pudieron buscar usuarios",
"couldNotGetDomain": "No se pudo obtener el dominio",
"couldNotGetHost": "No se pudo obtener el host",
"couldNotStartIDPFlow": "No se pudo iniciar el flujo de IDP",
"moreThanOneUserFound": "Se encontró más de un usuario. Proporcione un identificador único.",
"userNotFound": "Usuario no encontrado en el sistema",
"couldNotCreateSession": "No se pudo crear la sesión para el usuario",
"initialUserNotSupported": "Usuario inicial no admitido",
"localAuthenticationNotAllowed": "¡La autenticación local no está permitida! Contacte con su administrador para más información.",
"passkeysNotAllowed": "Las passkeys no están permitidas. Contacte con su administrador para más información.",
"couldNotFindIdentityProvider": "No se pudo encontrar el proveedor de identidad.",
"userNotActive": "El usuario no está activo. Contacte con su administrador para más información."
}
},
"zitadel": {
"errors": {
"errorOccured": "Ocurrió un error",
"multipleUsersFound": "Se encontraron varios usuarios",
"userNotFound": "Usuario no encontrado en el sistema"
}
},
"password": {
"verify": {
"title": "Contraseña",
"description": "Introduce tu contraseña.",
"resetPassword": "Restablecer contraseña",
"submit": "Continuar",
"labels": {
"password": "Contraseña"
},
"required": {
"password": "Este campo es obligatorio"
},
"errors": {
"couldNotVerifyPassword": "No se pudo verificar la contraseña",
"couldNotResetPassword": "No se pudo restablecer la contraseña"
},
"info": {
"passwordResetSent": "Se restableció la contraseña. Por favor, revise su correo electrónico"
}
},
"set": {
"title": "Establecer Contraseña",
"description": "Establece la contraseña para tu cuenta",
"codeSent": "Se ha enviado un nuevo código a su dirección de correo electrónico.",
"noCodeReceived": "¿No recibiste un código?",
"resend": "Reenviar código",
"submit": "Continuar",
"labels": {
"code": "Código",
"newPassword": "Nueva contraseña",
"confirmPassword": "Confirmar contraseña"
},
"required": {
"code": "Este campo es obligatorio",
"newPassword": "¡Debes proporcionar una contraseña!",
"confirmPassword": "Este campo es obligatorio"
},
"errors": {
"couldNotSetPassword": "No se pudo establecer la contraseña",
"couldNotResetPassword": "No se pudo restablecer la contraseña",
"couldNotVerifyPassword": "No se pudo verificar la contraseña"
}
},
"change": {
"title": "Cambiar Contraseña",
"description": "Establece la contraseña para tu cuenta",
"submit": "Continuar",
"labels": {
"currentPassword": "Contraseña actual",
"newPassword": "Nueva contraseña",
"confirmPassword": "Confirmar contraseña"
},
"required": {
"currentPassword": "¡Debes proporcionar tu contraseña actual!",
"newPassword": "¡Debes proporcionar una nueva contraseña!",
"confirmPassword": "Este campo es obligatorio"
},
"errors": {
"currentPasswordInvalid": "La contraseña actual es incorrecta.",
"couldNotChangePassword": "No se pudo cambiar la contraseña",
"couldNotVerifyPassword": "No se pudo verificar la contraseña",
"unknownError": "Error desconocido"
}
},
"complexity": {
"length": "Debe tener al menos {minLength} caracteres de longitud.",
"hasSymbol": "Debe incluir un símbolo.",
"hasNumber": "Debe incluir un número.",
"hasUppercase": "Debe incluir una letra mayúscula.",
"hasLowercase": "Debe incluir una letra minúscula.",
"equals": "La confirmación de la contraseña coincide.",
"matches": "Coincide",
"doesNotMatch": "No coincide"
},
"errors": {
"noHostFound": "No se encontró el host",
"couldNotSendResetLink": "No se pudo enviar el enlace de restablecimiento de contraseña",
"couldNotCreateSessionForUser": "No se pudo crear la sesión para el usuario",
"couldNotVerifyPassword": "No se pudo verificar la contraseña",
"failedToAuthenticate": "Error al autenticar. Tuvo {failedAttempts} de {maxPasswordAttempts} intentos de contraseña.{lockoutMessage}",
"failedToAuthenticateNoLimit": "Error al autenticar.",
"accountLockedContactAdmin": " Comuníquese con su administrador para desbloquear su cuenta",
"userNotFound": "Usuario no encontrado en el sistema",
"initialUserNotSupported": "Usuario inicial no compatible",
"userInitialStateNotSupported": "El estado inicial del usuario no es compatible",
"codeOrVerificationRequired": "Debe proporcionar un código o tener una verificación de usuario válida",
"verificationRequired": "Se debe realizar la verificación de usuario",
"couldNotLoadSession": "No se pudo cargar la sesión",
"couldNotLoadAuthMethods": "No se pudieron cargar los métodos de autenticación",
"failedPrecondition": "Precondición fallida",
"sessionNotValid": "La sesión no es válida",
"passwordVerificationMissing": "Falta la verificación de la contraseña.",
"passwordVerificationTooOld": "La verificación de la contraseña es demasiado antigua. Por favor, verifique su contraseña de nuevo.",
"passwordResetNotAllowed": "El restablecimiento de contraseña no está permitido. Contacte con su administrador para más información.",
"localAuthenticationNotAllowed": "¡La autenticación local no está permitida! Contacte con su administrador para más información."
}
},
"idp": {
"title": "Iniciar sesión con SSO",
"description": "Selecciona uno de los siguientes proveedores para iniciar sesión",
"orSignInWith": "o iniciar sesión con",
"signInWithApple": "Iniciar sesión con Apple",
"signInWithGoogle": "Iniciar sesión con Google",
"signInWithAzureAD": "Iniciar sesión con AzureAD",
"signInWithGithub": "Iniciar sesión con GitHub",
"signInWithGitlab": "Iniciar sesión con GitLab",
"signInWithZitadel": "Iniciar sesión con Zitadel",
"loginError": {
"title": "Error de inicio de sesión",
"description": "Ocurrió un error al intentar iniciar sesión."
},
"linkingError": {
"title": "Error al vincular la cuenta",
"description": "Ocurrió un error al intentar vincular tu cuenta."
},
"completeRegister": {
"title": "Completar registro",
"description": "Para completar el registro, debes establecer una contraseña."
},
"accountNotFound": {
"title": "Cuenta no encontrada",
"description": "No pudimos encontrar una cuenta asociada con tus credenciales del proveedor de identidad.",
"info": "No se encontró ninguna cuenta existente. Por favor, inicia sesión con una cuenta existente o contacta a tu administrador para obtener asistencia.",
"backToLogin": "Volver al inicio de sesión"
},
"registrationFailed": {
"title": "Registro no disponible",
"description": "No pudimos completar el proceso de registro.",
"info": "No se pudo determinar la organización para el registro. Por favor, contacta a tu administrador para obtener asistencia.",
"backToLogin": "Volver al inicio de sesión"
},
"processing": {
"message": "Procesando autenticación...",
"noRedirect": "No se recibió redirección ni error del servidor",
"unexpectedError": "Ocurrió un error inesperado"
},
"errors": {
"missingParameters": "Faltan parámetros requeridos",
"missingIdpInfo": "Falta información del IDP",
"idpNotFound": "Proveedor de identidad no encontrado",
"linkingNotAllowed": "La vinculación no está permitida para este proveedor de identidad",
"linkingFailed": "Error al vincular el proveedor de identidad con la cuenta",
"autoLinkingFailed": "Error al vincular automáticamente la cuenta",
"userCreationFailed": "Error al crear la cuenta de usuario",
"orgResolutionFailed": "No se pudo determinar la organización para el registro",
"sessionCreationFailed": "No se pudo crear la sesión o determinar la redirección",
"unknownError": "Ocurrió un error desconocido"
}
},
"ldap": {
"title": "Iniciar sesión con LDAP",
"description": "Introduce tus credenciales LDAP.",
"submit": "Continuar",
"labels": {
"username": "Nombre de usuario",
"password": "Contraseña"
},
"required": {
"username": "Este campo es obligatorio",
"password": "Este campo es obligatorio"
}
},
"mfa": {
"verify": {
"title": "Verifica tu identidad",
"description": "Elige uno de los siguientes factores.",
"noResults": "No hay factores secundarios disponibles para configurar."
},
"set": {
"title": "Configurar autenticación de 2 factores",
"description": "Elige uno de los siguientes factores secundarios.",
"skip": "Omitir"
}
},
"otp": {
"verify": {
"title": "Verificar autenticación de 2 factores",
"totpDescription": "Introduce el código de tu aplicación de autenticación.",
"smsDescription": "Introduce el código que recibiste por SMS.",
"emailDescription": "Introduce el código que recibiste por correo electrónico.",
"noCodeReceived": "¿No recibiste un código?",
"resendCode": "Reenviar código",
"resendCodeIn": "Reenviar código ({seconds}s)",
"submit": "Continuar",
"labels": {
"code": "Código"
},
"required": {
"code": "Este campo es obligatorio"
}
},
"set": {
"title": "Configurar autenticación de 2 factores",
"totpDescription": "Escanea el código QR con tu aplicación de autenticación.",
"smsDescription": "Introduce tu número de teléfono para recibir un código por SMS.",
"emailDescription": "Introduce tu dirección de correo electrónico para recibir un código por correo electrónico.",
"totpRegisterDescription": "Escanea el código QR o navega manualmente a la URL.",
"emailAddDescription": "Usa un código de un solo uso enviado a tu dirección de correo electrónico verificada como segundo factor.",
"smsAddDescription": "Usa un código de un solo uso enviado a tu número de teléfono verificado como segundo factor.",
"add": "Añadir",
"emailAdded": "Código por correo electrónico añadido.",
"smsAdded": "Código por SMS añadido.",
"submit": "Continuar",
"labels": {
"code": "Código"
},
"required": {
"code": "Este campo es obligatorio"
}
},
"errors": {
"couldNotRequestChallenge": "No se pudo solicitar el desafío OTP",
"couldNotVerifyCode": "No se pudo verificar el código OTP",
"couldNotGetSession": "No se pudo cargar tu sesión. Vuelve a iniciar sesión.",
"invalidMethod": "Este segundo factor no es compatible.",
"couldNotAddEmail": "No se pudo añadir el código por correo electrónico.",
"couldNotAddSms": "No se pudo añadir el código por SMS.",
"emailNotVerified": "Verifica tu dirección de correo electrónico antes de añadir códigos por correo electrónico.",
"phoneNotVerified": "Verifica tu número de teléfono antes de añadir códigos por SMS."
}
},
"passkey": {
"verify": {
"title": "Autenticar con una clave de acceso",
"description": "Tu dispositivo pedirá tu huella digital, rostro o bloqueo de pantalla",
"usePassword": "Usar contraseña",
"submit": "Continuar",
"errors": {
"couldNotRequestChallenge": "No se pudo solicitar el desafío de clave de acceso",
"couldNotVerifyPasskey": "No se pudo verificar la clave de acceso",
"noResponseReceived": "Verificación de clave de acceso fallida - no se recibió respuesta",
"noRedirectProvided": "Verificación de clave de acceso completada pero no se proporcionó redirección",
"couldNotRetrievePasskey": "Ocurrió un error al recuperar la clave de acceso",
"verificationCancelled": "La verificación de clave de acceso fue cancelada",
"verificationFailed": "Ocurrió un error durante la verificación de clave de acceso",
"couldNotFindSession": "No se pudo encontrar la sesión",
"couldNotUpdateSession": "No se pudo actualizar la sesión",
"userNotFound": "Usuario no encontrado en el sistema",
"couldNotDetermineRedirect": "No se pudo determinar la URL de redirección después de la verificación de clave de acceso"
}
},
"set": {
"title": "Configurar una clave de acceso",
"description": "Tu dispositivo pedirá tu huella digital, rostro o bloqueo de pantalla",
"info": {
"description": "Una clave de acceso es un método de autenticación en un dispositivo como tu huella digital, Apple FaceID o similar.",
"link": "Autenticación sin contraseña"
},
"skip": "Omitir",
"submit": "Continuar"
}
},
"u2f": {
"verify": {
"title": "Verificar autenticación de 2 factores",
"description": "Verifica tu cuenta con tu dispositivo."
},
"set": {
"title": "Configurar autenticación de 2 factores",
"description": "Configura un dispositivo como segundo factor.",
"submit": "Continuar"
}
},
"register": {
"methods": {
"passkey": "Clave de acceso",
"password": "Contraseña"
},
"disabled": {
"title": "Registro deshabilitado",
"description": "Registrarse está deshabilitado en este momento."
},
"missingdata": {
"title": "Datos faltantes",
"description": "No se proporcionaron datos suficientes para el registro."
},
"title": "Registrarse",
"description": "Crea tu cuenta Zitadel.",
"noMethodAvailableWarning": "No hay métodos de autenticación disponibles. Por favor, contacta a tu administrador.",
"selectMethod": "Selecciona el método con el que deseas autenticarte",
"agreeTo": "Para registrarte debes aceptar los términos y condiciones",
"termsOfService": "Términos de Servicio",
"privacyPolicy": "Política de Privacidad",
"submit": "Continuar",
"password": {
"title": "Establecer Contraseña",
"description": "Establece la contraseña para tu cuenta",
"submit": "Continuar",
"labels": {
"password": "Contraseña",
"confirmPassword": "Confirmar contraseña"
},
"required": {
"password": "¡Debes proporcionar una contraseña!",
"confirmPassword": "Este campo es obligatorio"
}
},
"labels": {
"firstname": "Nombre",
"lastname": "Apellidos",
"email": "Correo electrónico"
},
"required": {
"firstname": "Este campo es obligatorio",
"lastname": "Este campo es obligatorio",
"email": "Este campo es obligatorio"
},
"errors": {
"couldNotCreateUser": "No se pudo crear el usuario",
"couldNotCreateSession": "No se pudo crear la sesión",
"userNotFound": "Usuario no encontrado en el sistema",
"couldNotLinkIDP": "No se pudo vincular el IdP al usuario",
"couldNotRegisterUser": "No se pudo registrar el usuario",
"sessionMismatch": "El registro se inició en otro navegador. Vuelve a iniciar sesión con tu proveedor de identidad."
}
},
"invite": {
"title": "Invitar usuario",
"description": "Introduce el correo electrónico del usuario que deseas invitar.",
"info": "El usuario recibirá un correo electrónico con un enlace para completar el registro.",
"notAllowed": "No tienes permiso para invitar usuarios.",
"submit": "Invitar usuario",
"success": {
"title": "¡Usuario invitado!",
"description": "El usuario ha sido invitado.",
"verified": "El usuario ha sido invitado y ya ha verificado su correo electrónico.",
"notVerifiedYet": "El usuario ha sido invitado. Recibirá un correo electrónico con más instrucciones.",
"submit": "Invitar a otro usuario"
}
},
"signedin": {
"title": "¡Bienvenido {user}!",
"description": "Has iniciado sesión.",
"continue": "Continuar",
"error": {
"title": "Error",
"description": "Ocurrió un error al iniciar sesión."
}
},
"verify": {
"userIdMissing": "¡No se proporcionó userId!",
"successTitle": "Usuario verificado",
"successDescription": "El usuario ha sido verificado con éxito.",
"successContinue": "Continuar",
"setupAuthenticator": "Configurar autenticador",
"verify": {
"title": "Verificar usuario",
"description": "Introduce el código proporcionado en el correo electrónico de verificación.",
"noCodeReceived": "¿No recibiste un código?",
"resendCode": "Reenviar código",
"codeSent": "Se ha enviado un código a tu dirección de correo electrónico.",
"submit": "Continuar",
"labels": {
"code": "Código"
},
"required": {
"code": "Este campo es obligatorio"
}
},
"errors": {
"couldNotResendEmail": "No se pudo reenviar el correo electrónico",
"couldNotVerifyUser": "No se pudo verificar al usuario",
"couldNotVerifyInvite": "No se pudo verificar la invitación",
"couldNotVerifyEmail": "No se pudo verificar el correo electrónico",
"couldNotVerify": "No se pudo verificar",
"couldNotLoadUser": "No se pudo cargar al usuario",
"couldNotLoadAuthenticators": "No se pudieron cargar los autenticadores posibles",
"couldNotCreateSession": "No se pudo crear la sesión",
"noHostFound": "No se encontró el host",
"userAlreadyVerified": "¡El usuario ya está verificado!",
"couldNotResendInvite": "No se pudo reenviar la invitación",
"inviteSendFailed": "No se pudo enviar el correo de invitación",
"emailSendFailed": "No se pudo enviar el correo electrónico de verificación",
"contextMissing": "Ocurrió un error. Por favor inténtelo de nuevo."
}
},
"authenticator": {
"title": "Seleccionar método de autenticación",
"description": "Selecciona el método con el que deseas autenticarte",
"noMethodsAvailable": "No hay métodos de autenticación disponibles",
"allSetup": "¡Ya has configurado un autenticador!",
"linkWithIDP": "o vincúlalo con un proveedor de identidad",
"methods": {
"totp": "Aplicación de autenticación",
"u2f": "Segundo factor universal",
"otpEmail": "Código por correo electrónico",
"otpSms": "Código por SMS",
"passkey": "Clave de acceso",
"password": "Contraseña"
}
},
"device": {
"usercode": {
"title": "Código del dispositivo",
"description": "Introduce el código.",
"submit": "Continuar",
"labels": {
"code": "Código"
},
"required": {
"code": "Este campo es obligatorio"
}
},
"request": {
"title": "{appName} desea conectarse:",
"description": "{appName} tendrá acceso a:",
"disclaimer": "Al hacer clic en Permitir, autorizas a {appName} y a Zitadel a usar tu información de acuerdo con sus respectivos términos de servicio y políticas de privacidad. Puedes revocar este acceso en cualquier momento.",
"submit": "Permitir",
"deny": "Denegar"
},
"scope": {
"openid": "Verifica tu identidad.",
"email": "Accede a tu dirección de correo electrónico.",
"profile": "Accede a la información completa de tu perfil.",
"offline_access": "Permitir acceso sin conexión a tu cuenta."
}
},
"error": {
"noUserCode": "¡No se proporcionó código de usuario!",
"noDeviceRequest": "No se encontró ninguna solicitud de dispositivo.",
"unknownContext": "No se pudo obtener el contexto del usuario. Asegúrate de ingresar primero el nombre de usuario o proporcionar un loginName como parámetro de búsqueda.",
"sessionExpired": "Tu sesión ha expirado o requiere una nueva autenticación. Por favor, inicia sesión de nuevo.",
"failedLoading": "No se pudieron cargar los datos. Por favor, inténtalo de nuevo.",
"tryagain": "Intentar de nuevo",
"couldNotContinueSession": "No se pudo continuar con la sesión - falta información del usuario",
"couldNotClearSession": "No se pudo cerrar la sesión. Inténtelo de nuevo."
}
}
+490
View File
@@ -0,0 +1,490 @@
{
"common": {
"back": "Retour",
"title": "Connexion avec Zitadel"
},
"accounts": {
"title": "Comptes",
"description": "Choisissez le compte que vous souhaitez utiliser.",
"addAnother": "Ajouter un nouveau compte",
"noResults": "Pas de compte trouvé",
"verified": "vérifié",
"expired": "expiré"
},
"logout": {
"title": "Déconnexion",
"description": "Cliquez sur un compte pour terminer la session",
"noResults": "Pas de compte trouvé",
"clear": "Fin de session",
"verifiedAt": "Dernière connexion: {time}",
"success": {
"title": "Déconnexion réussie",
"description": "Vous vous êtes déconnecté avec succès."
}
},
"loginname": {
"title": "Bienvenue!",
"description": "Entrez vos données de connexion.",
"register": "Enregistrer un nouveau compte",
"submit": "Continuer",
"labels": {
"loginname": "Identifiant",
"username": "Nom d'utilisateur",
"usernameOrPhoneNumber": "Nom d'utilisateur ou numéro de téléphone",
"usernameOrEmail": "Nom d'utilisateur ou e-mail"
},
"required": {
"loginName": "Ce champ est requis"
},
"errors": {
"internalError": "Une erreur interne s'est produite",
"couldNotGetLoginSettings": "Impossible d'obtenir les paramètres de connexion",
"couldNotSearchUsers": "Impossible de rechercher des utilisateurs",
"couldNotGetDomain": "Impossible d'obtenir le domaine",
"couldNotGetHost": "Impossible d'obtenir l'hôte",
"couldNotStartIDPFlow": "Impossible de démarrer le flux IDP",
"moreThanOneUserFound": "Plus d'un utilisateur trouvé. Fournissez un identifiant unique.",
"userNotFound": "Utilisateur non trouvé dans le système",
"couldNotCreateSession": "Impossible de créer une session pour l'utilisateur",
"initialUserNotSupported": "Utilisateur initial non pris en charge",
"localAuthenticationNotAllowed": "L'authentification locale n'est pas autorisée ! Contactez votre administrateur pour plus d'informations.",
"passkeysNotAllowed": "Les clés d'accès ne sont pas autorisées ! Contactez votre administrateur pour plus d'informations.",
"couldNotFindIdentityProvider": "Impossible de trouver le fournisseur d'identité.",
"userNotActive": "L'utilisateur n'est pas actif. Contactez votre administrateur pour plus d'informations."
}
},
"zitadel": {
"errors": {
"errorOccured": "Une erreur s'est produite",
"multipleUsersFound": "Plusieurs utilisateurs trouvés",
"userNotFound": "Utilisateur non trouvé dans le système"
}
},
"password": {
"verify": {
"title": "Mot de passe",
"description": "Entrez votre mot de passe.",
"resetPassword": "Réinitialiser mot de passe",
"submit": "Continuer",
"labels": {
"password": "Mot de passe"
},
"required": {
"password": "Ce champ est requis"
},
"errors": {
"couldNotVerifyPassword": "Impossible de vérifier le mot de passe",
"couldNotResetPassword": "Impossible de réinitialiser le mot de passe"
},
"info": {
"passwordResetSent": "Le mot de passe a été réinitialisé. Veuillez vérifier vos e-mails."
}
},
"set": {
"title": "Définir le mot de passe",
"description": "Définissez le mot de passe de votre compte",
"codeSent": "Un nouveau code a été envoyé à votre adresse e-mail.",
"noCodeReceived": "Vous n'avez pas reçu de code ?",
"resend": "Renvoyer le code",
"submit": "Continuer",
"labels": {
"code": "Code",
"newPassword": "Nouveau mot de passe",
"confirmPassword": "Confirmez le mot de passe"
},
"required": {
"code": "Ce champ est requis",
"newPassword": "Vous devez fournir un mot de passe !",
"confirmPassword": "Ce champ est requis"
},
"errors": {
"couldNotSetPassword": "Impossible de définir le mot de passe",
"couldNotResetPassword": "Impossible de réinitialiser le mot de passe",
"couldNotVerifyPassword": "Impossible de vérifier le mot de passe"
}
},
"change": {
"title": "Changer le mot de passe",
"description": "Définissez le mot de passe de votre compte",
"submit": "Continuer",
"labels": {
"currentPassword": "Mot de passe actuel",
"newPassword": "Nouveau mot de passe",
"confirmPassword": "Confirmez le mot de passe"
},
"required": {
"currentPassword": "Vous devez fournir votre mot de passe actuel !",
"newPassword": "Vous devez fournir un nouveau mot de passe !",
"confirmPassword": "Ce champ est requis"
},
"errors": {
"currentPasswordInvalid": "Le mot de passe actuel est incorrect.",
"couldNotChangePassword": "Impossible de changer le mot de passe",
"couldNotVerifyPassword": "Impossible de vérifier le mot de passe",
"unknownError": "Erreur inconnue"
}
},
"complexity": {
"length": "Doit contenir au moins {minLength} caractères.",
"hasSymbol": "Doit inclure un symbole.",
"hasNumber": "Doit inclure un chiffre.",
"hasUppercase": "Doit inclure une lettre majuscule.",
"hasLowercase": "Doit inclure une lettre minuscule.",
"equals": "La confirmation du mot de passe correspond.",
"matches": "Correspond",
"doesNotMatch": "Ne correspond pas"
},
"errors": {
"noHostFound": "Aucun hôte trouvé",
"couldNotSendResetLink": "Impossible d'envoyer le lien de réinitialisation du mot de passe",
"couldNotCreateSessionForUser": "Impossible de créer une session pour l'utilisateur",
"couldNotVerifyPassword": "Impossible de vérifier le mot de passe",
"failedToAuthenticate": "Échec de l'authentification. Vous avez utilisé {failedAttempts} sur {maxPasswordAttempts} tentatives.{lockoutMessage}",
"failedToAuthenticateNoLimit": "Échec de l'authentification.",
"accountLockedContactAdmin": " Contactez votre administrateur pour déverrouiller votre compte",
"userNotFound": "Utilisateur non trouvé dans le système",
"initialUserNotSupported": "Utilisateur initial non pris en charge",
"userInitialStateNotSupported": "État initial de l'utilisateur non pris en charge",
"codeOrVerificationRequired": "Vous devez fournir un code ou avoir une vérification utilisateur valide",
"verificationRequired": "Une vérification utilisateur doit être effectuée",
"couldNotLoadSession": "Impossible de charger la session",
"couldNotLoadAuthMethods": "Impossible de charger les méthodes d'authentification",
"failedPrecondition": "Pré-condition non remplie",
"sessionNotValid": "La session n'est pas valide",
"passwordVerificationMissing": "La vérification du mot de passe est manquante.",
"passwordVerificationTooOld": "La vérification du mot de passe est trop ancienne. Veuillez vérifier à nouveau votre mot de passe.",
"passwordResetNotAllowed": "La réinitialisation du mot de passe n'est pas autorisée. Contactez votre administrateur pour plus d'informations.",
"localAuthenticationNotAllowed": "L'authentification locale n'est pas autorisée ! Contactez votre administrateur pour plus d'informations."
}
},
"idp": {
"title": "Se connecter avec SSO",
"description": "Sélectionnez un des fournisseurs suivants pour vous connecter",
"orSignInWith": "ou connectez-vous avec",
"signInWithApple": "Se connecter avec Apple",
"signInWithGoogle": "Se connecter avec Google",
"signInWithAzureAD": "Se connecter avec AzureAD",
"signInWithGithub": "Se connecter avec GitHub",
"signInWithGitlab": "Se connecter avec GitLab",
"signInWithZitadel": "Se connecter avec Zitadel",
"loginError": {
"title": "Échec de la connexion",
"description": "Une erreur est survenue lors de la tentative de connexion."
},
"linkingError": {
"title": "Échec de la liaison du compte",
"description": "Une erreur est survenue lors de la tentative de lier votre compte."
},
"completeRegister": {
"title": "Complétez vos informations",
"description": "Vous devez compléter votre inscription en fournissant votre adresse e-mail et votre nom."
},
"accountNotFound": {
"title": "Compte introuvable",
"description": "Nous n'avons pas trouvé de compte associé aux identifiants de votre fournisseur d'identité.",
"info": "Aucun compte existant n'a été trouvé. Veuillez vous connecter avec un compte existant ou contacter votre administrateur pour obtenir de l'aide.",
"backToLogin": "Retour à la connexion"
},
"registrationFailed": {
"title": "Inscription non disponible",
"description": "Nous n'avons pas pu terminer le processus d'inscription.",
"info": "Impossible de déterminer l'organisation pour l'inscription. Veuillez contacter votre administrateur pour obtenir de l'aide.",
"backToLogin": "Retour à la connexion"
},
"processing": {
"message": "Traitement de l'authentification...",
"noRedirect": "Aucune redirection ou erreur renvoyée par le serveur",
"unexpectedError": "Une erreur inattendue s'est produite"
},
"errors": {
"missingParameters": "Paramètres requis manquants",
"missingIdpInfo": "Informations du fournisseur d'identité manquantes",
"idpNotFound": "Fournisseur d'identité introuvable",
"linkingNotAllowed": "La liaison n'est pas autorisée pour ce fournisseur d'identité",
"linkingFailed": "Échec de la liaison du fournisseur d'identité au compte",
"autoLinkingFailed": "Échec de la liaison automatique du compte",
"userCreationFailed": "Échec de la création du compte utilisateur",
"orgResolutionFailed": "Impossible de déterminer l'organisation pour l'inscription",
"sessionCreationFailed": "Impossible de créer la session ou de déterminer la redirection",
"unknownError": "Une erreur inconnue s'est produite"
}
},
"ldap": {
"title": "Connexion LDAP",
"description": "Entrez vos identifiants LDAP.",
"submit": "Continuer",
"labels": {
"username": "Nom d'utilisateur",
"password": "Mot de passe"
},
"required": {
"username": "Ce champ est requis",
"password": "Ce champ est requis"
}
},
"mfa": {
"verify": {
"title": "Vérifiez votre identité",
"description": "Choisissez l'un des facteurs suivants.",
"noResults": "Aucun second facteur disponible à configurer."
},
"set": {
"title": "Configurer l'authentification à deux facteurs",
"description": "Choisissez l'un des seconds facteurs suivants.",
"skip": "Ignorer"
}
},
"otp": {
"verify": {
"title": "Vérification à deux facteurs",
"totpDescription": "Entrez le code de votre application d'authentification.",
"smsDescription": "Entrez le code reçu par SMS.",
"emailDescription": "Entrez le code reçu par e-mail.",
"noCodeReceived": "Vous n'avez pas reçu de code ?",
"resendCode": "Renvoyer le code",
"resendCodeIn": "Renvoyer le code ({seconds}s)",
"submit": "Continuer",
"labels": {
"code": "Code"
},
"required": {
"code": "Ce champ est requis"
}
},
"set": {
"title": "Configurer l'authentification à deux facteurs",
"totpDescription": "Scannez le QR code avec votre application d'authentification.",
"smsDescription": "Entrez votre numéro de téléphone pour recevoir un code par SMS.",
"emailDescription": "Entrez votre adresse e-mail pour recevoir un code par e-mail.",
"totpRegisterDescription": "Scannez le QR code ou saisissez l'URL manuellement.",
"emailAddDescription": "Utilisez un code à usage unique envoyé à votre adresse e-mail vérifiée comme second facteur.",
"smsAddDescription": "Utilisez un code à usage unique envoyé à votre numéro de téléphone vérifié comme second facteur.",
"add": "Ajouter",
"emailAdded": "Code par e-mail ajouté.",
"smsAdded": "Code par SMS ajouté.",
"submit": "Continuer",
"labels": {
"code": "Code"
},
"required": {
"code": "Ce champ est requis"
}
},
"errors": {
"couldNotRequestChallenge": "Impossible de demander le challenge OTP",
"couldNotVerifyCode": "Impossible de vérifier le code OTP",
"couldNotGetSession": "Votre session n'a pas pu être chargée. Veuillez vous reconnecter.",
"invalidMethod": "Ce second facteur n'est pas pris en charge.",
"couldNotAddEmail": "Le code par e-mail n'a pas pu être ajouté.",
"couldNotAddSms": "Le code par SMS n'a pas pu être ajouté.",
"emailNotVerified": "Vérifiez votre adresse e-mail avant d'ajouter des codes par e-mail.",
"phoneNotVerified": "Vérifiez votre numéro de téléphone avant d'ajouter des codes par SMS."
}
},
"passkey": {
"verify": {
"title": "S'authentifier avec une clé d'accès",
"description": "Votre appareil vous demandera votre empreinte digitale, votre visage ou votre verrouillage d'écran",
"usePassword": "Utiliser un mot de passe",
"submit": "Continuer",
"errors": {
"couldNotRequestChallenge": "Impossible de demander le défi de la clé d'accès",
"couldNotVerifyPasskey": "Impossible de vérifier la clé d'accès",
"noResponseReceived": "Échec de la vérification de la clé d'accès - aucune réponse reçue",
"noRedirectProvided": "La vérification de la clé d'accès est terminée mais aucune redirection n'a été fournie",
"couldNotRetrievePasskey": "Une erreur s'est produite lors de la récupération de la clé d'accès",
"verificationCancelled": "La vérification de la clé d'accès a été annulée",
"verificationFailed": "Une erreur s'est produite lors de la vérification de la clé d'accès",
"couldNotFindSession": "Session introuvable",
"couldNotUpdateSession": "Impossible de mettre à jour la session",
"userNotFound": "Utilisateur introuvable dans le système",
"couldNotDetermineRedirect": "Impossible de déterminer l'URL de redirection après la vérification de la clé d'accès"
}
},
"set": {
"title": "Configurer une clé d'accès",
"description": "Votre appareil vous demandera votre empreinte digitale, votre visage ou votre verrouillage d'écran",
"info": {
"description": "Une clé d'accès est une méthode d'authentification sur un appareil, comme votre empreinte digitale, Apple FaceID ou équivalent.",
"link": "Authentification par clé d'accès"
},
"skip": "Ignorer",
"submit": "Continuer"
}
},
"u2f": {
"verify": {
"title": "Vérification à deux facteurs",
"description": "Vérifiez votre compte avec votre appareil."
},
"set": {
"title": "Configurer la double authentification",
"description": "Configurez un appareil comme second facteur.",
"submit": "Continuer"
}
},
"register": {
"methods": {
"passkey": "Clé d'accès",
"password": "Mot de passe"
},
"disabled": {
"title": "Inscription désactivée",
"description": "L'inscription est désactivée. Veuillez contacter votre administrateur."
},
"missingdata": {
"title": "Données manquantes",
"description": "Fournissez un e-mail, un prénom et un nom pour vous inscrire."
},
"title": "S'inscrire",
"description": "Créez votre compte Zitadel.",
"noMethodAvailableWarning": "Aucune méthode d'authentification disponible. Veuillez contacter votre administrateur.",
"selectMethod": "Sélectionnez la méthode que vous souhaitez utiliser pour vous authentifier",
"agreeTo": "Pour vous inscrire, vous devez accepter les conditions d'utilisation",
"termsOfService": "Conditions d'utilisation",
"privacyPolicy": "Politique de confidentialité",
"submit": "Continuer",
"password": {
"title": "Définir un mot de passe",
"description": "Définissez le mot de passe de votre compte",
"submit": "Continuer",
"labels": {
"password": "Mot de passe",
"confirmPassword": "Confirmez le mot de passe"
},
"required": {
"password": "Vous devez fournir un mot de passe !",
"confirmPassword": "Ce champ est requis"
}
},
"labels": {
"firstname": "Prénom",
"lastname": "Nom",
"email": "E-mail"
},
"required": {
"firstname": "Ce champ est requis",
"lastname": "Ce champ est requis",
"email": "Ce champ est requis"
},
"errors": {
"couldNotCreateUser": "Impossible de créer l'utilisateur",
"couldNotCreateSession": "Impossible de créer la session",
"userNotFound": "Utilisateur non trouvé dans le système",
"couldNotLinkIDP": "Impossible de lier le fournisseur d'identité à l'utilisateur",
"couldNotRegisterUser": "Impossible d'inscrire l'utilisateur",
"sessionMismatch": "L'inscription a été commencée dans un autre navigateur. Veuillez vous reconnecter avec votre fournisseur d'identité."
}
},
"invite": {
"title": "Inviter un utilisateur",
"description": "Fournissez l'adresse e-mail et le nom de l'utilisateur que vous souhaitez inviter.",
"info": "L'utilisateur recevra un e-mail avec de plus amples instructions.",
"notAllowed": "Vos paramètres ne vous permettent pas d'inviter des utilisateurs.",
"submit": "Continuer",
"success": {
"title": "Utilisateur invité",
"description": "L'e-mail a été envoyé avec succès.",
"verified": "L'utilisateur a été invité et a déjà vérifié son e-mail.",
"notVerifiedYet": "L'utilisateur a été invité. Il recevra un e-mail avec de plus amples instructions.",
"submit": "Inviter un autre utilisateur"
}
},
"signedin": {
"title": "Bienvenue {user} !",
"description": "Vous êtes connecté.",
"continue": "Continuer",
"error": {
"title": "Erreur",
"description": "Une erreur est survenue lors de la connexion."
}
},
"verify": {
"userIdMissing": "Aucun identifiant utilisateur fourni !",
"successTitle": "Utilisateur vérifié",
"successDescription": "L'utilisateur a été vérifié avec succès.",
"successContinue": "Continuer",
"setupAuthenticator": "Configurer l'authentificateur",
"verify": {
"title": "Vérifier l'utilisateur",
"description": "Entrez le code fourni dans l'e-mail de vérification.",
"noCodeReceived": "Vous n'avez pas reçu de code ?",
"resendCode": "Renvoyer le code",
"codeSent": "Un code vient d'être envoyé à votre adresse e-mail.",
"submit": "Continuer",
"labels": {
"code": "Code"
},
"required": {
"code": "Ce champ est requis"
}
},
"errors": {
"couldNotResendEmail": "Impossible de renvoyer l'e-mail",
"couldNotVerifyUser": "Impossible de vérifier l'utilisateur",
"couldNotVerifyInvite": "Impossible de vérifier l'invitation",
"couldNotVerifyEmail": "Impossible de vérifier l'e-mail",
"couldNotVerify": "Impossible de vérifier",
"couldNotLoadUser": "Impossible de charger l'utilisateur",
"couldNotLoadAuthenticators": "Impossible de charger les authentificateurs disponibles",
"couldNotCreateSession": "Impossible de créer la session",
"noHostFound": "Aucun hôte trouvé",
"userAlreadyVerified": "L'utilisateur est déjà vérifié !",
"couldNotResendInvite": "Impossible de renvoyer l'invitation",
"inviteSendFailed": "Échec de l'envoi de l'e-mail d'invitation",
"emailSendFailed": "Échec de l'envoi de l'e-mail de vérification",
"contextMissing": "Une erreur s'est produite. Veuillez réessayer."
}
},
"authenticator": {
"title": "Choisir la méthode d'authentification",
"description": "Sélectionnez la méthode que vous souhaitez utiliser pour vous authentifier",
"noMethodsAvailable": "Aucune méthode d'authentification disponible",
"allSetup": "Vous avez déjà configuré un authentificateur !",
"linkWithIDP": "ou lier avec un fournisseur d'identité",
"methods": {
"totp": "Application d'authentification",
"u2f": "Second facteur universel",
"otpEmail": "Code par e-mail",
"otpSms": "Code par SMS",
"passkey": "Clés d'accès",
"password": "Mot de passe"
}
},
"device": {
"usercode": {
"title": "Code de l'appareil",
"description": "Entrez le code affiché sur votre application ou appareil.",
"submit": "Continuer",
"labels": {
"code": "Code"
},
"required": {
"code": "Ce champ est requis"
}
},
"request": {
"title": "{appName} souhaite se connecter",
"description": "{appName} aura accès à :",
"disclaimer": "En cliquant sur Autoriser, vous permettez à {appName} et à Zitadel d'utiliser vos informations conformément à leurs conditions d'utilisation et politiques de confidentialité respectives. Vous pouvez révoquer cet accès à tout moment.",
"submit": "Autoriser",
"deny": "Refuser"
},
"scope": {
"openid": "Vérifiez votre identité.",
"email": "Afficher votre adresse e-mail.",
"profile": "Afficher les informations complètes de votre profil.",
"offline_access": "Autoriser l'accès hors ligne à votre compte."
}
},
"error": {
"noUserCode": "Aucun code utilisateur fourni !",
"noDeviceRequest": "Aucune demande d'appareil trouvée.",
"unknownContext": "Impossible d'obtenir le contexte de l'utilisateur. Assurez-vous d'abord de saisir le nom d'utilisateur ou de fournir un loginName comme paramètre de recherche.",
"sessionExpired": "Votre session a expiré ou nécessite une nouvelle authentification. Veuillez vous reconnecter.",
"failedLoading": "Échec du chargement des données. Veuillez réessayer.",
"tryagain": "Réessayer",
"couldNotContinueSession": "Impossible de continuer la session - informations utilisateur manquantes",
"couldNotClearSession": "La session n'a pas pu être terminée. Veuillez réessayer."
}
}
+490
View File
@@ -0,0 +1,490 @@
{
"common": {
"back": "Vissza",
"title": "Bejelentkezés a Zitadel-lel"
},
"accounts": {
"title": "Fiókok",
"description": "Válaszd ki a használni kívánt fiókot.",
"addAnother": "Másik fiók hozzáadása",
"noResults": "Nem található fiók",
"verified": "ellenőrizve",
"expired": "lejárt"
},
"logout": {
"title": "Kijelentkezés",
"description": "Kattints egy fiókra a munkamenet befejezéséhez",
"noResults": "Nem található fiók",
"clear": "Munkamenet befejezése",
"verifiedAt": "Utoljára aktív: {time}",
"success": {
"title": "Sikeres kijelentkezés",
"description": "Sikeresen kijelentkeztél."
}
},
"loginname": {
"title": "Üdvözlünk újra!",
"description": "Add meg a bejelentkezési adataidat.",
"register": "Új felhasználó regisztrálása",
"submit": "Tovább",
"labels": {
"loginname": "Bejelentkezési név",
"username": "Felhasználónév",
"usernameOrPhoneNumber": "Felhasználónév vagy telefonszám",
"usernameOrEmail": "Felhasználónév vagy e-mail cím"
},
"required": {
"loginName": "Ez a mező kötelező"
},
"errors": {
"internalError": "Belső hiba történt",
"couldNotGetLoginSettings": "Nem sikerült lekérni a bejelentkezési beállításokat",
"couldNotSearchUsers": "Nem sikerült keresni a felhasználók között",
"couldNotGetDomain": "Nem sikerült lekérni a domaint",
"couldNotGetHost": "Nem sikerült lekérni a kiszolgálót (hostot)",
"couldNotStartIDPFlow": "Nem sikerült elindítani az IDP folyamatát",
"moreThanOneUserFound": "Több felhasználót találtunk. Adj meg egy egyedi azonosítót.",
"userNotFound": "A felhasználó nem található a rendszerben",
"couldNotCreateSession": "Nem sikerült munkamenetet létrehozni a felhasználóhoz",
"initialUserNotSupported": "A kezdeti felhasználó nem támogatott",
"localAuthenticationNotAllowed": "A helyi hitelesítés nem engedélyezett! További információért fordulj a rendszergazdához.",
"passkeysNotAllowed": "A jelkulcsok nem engedélyezettek! További információért fordulj a rendszergazdához.",
"couldNotFindIdentityProvider": "Nem található azonosítószolgáltató.",
"userNotActive": "A felhasználó nem aktív. További információért fordulj a rendszergazdához."
}
},
"zitadel": {
"errors": {
"errorOccured": "Hiba történt",
"multipleUsersFound": "Több felhasználó is található",
"userNotFound": "A felhasználó nem található a rendszerben"
}
},
"password": {
"verify": {
"title": "Jelszó",
"description": "Add meg a jelszavadat.",
"resetPassword": "Jelszó visszaállítása",
"submit": "Tovább",
"labels": {
"password": "Jelszó"
},
"required": {
"password": "Ez a mező kötelező"
},
"errors": {
"couldNotVerifyPassword": "Nem sikerült ellenőrizni a jelszót",
"couldNotResetPassword": "Nem sikerült visszaállítani a jelszót"
},
"info": {
"passwordResetSent": "A jelszó-visszaállító linket elküldtük. Ellenőrizd az e-mail fiókodat."
}
},
"set": {
"title": "Jelszó beállítása",
"description": "Állítsd be a fiókod jelszavát",
"codeSent": "Az új kódot elküldtük az e-mail címedre.",
"noCodeReceived": "Nem kaptál kódot?",
"resend": "Kód újraküldése",
"submit": "Tovább",
"labels": {
"code": "Kód",
"newPassword": "Új jelszó",
"confirmPassword": "Jelszó megerősítése"
},
"required": {
"code": "Ez a mező kötelező",
"newPassword": "Adj meg egy jelszót!",
"confirmPassword": "Ez a mező kötelező"
},
"errors": {
"couldNotSetPassword": "Nem sikerült beállítani a jelszót",
"couldNotResetPassword": "Nem sikerült visszaállítani a jelszót",
"couldNotVerifyPassword": "Nem sikerült ellenőrizni a jelszót"
}
},
"change": {
"title": "Jelszó módosítása",
"description": "Állítsd be a fiókod jelszavát",
"submit": "Tovább",
"labels": {
"currentPassword": "Jelenlegi jelszó",
"newPassword": "Új jelszó",
"confirmPassword": "Jelszó megerősítése"
},
"required": {
"currentPassword": "Add meg a jelenlegi jelszavadat!",
"newPassword": "Add meg az új jelszavadat!",
"confirmPassword": "Ez a mező kötelező"
},
"errors": {
"currentPasswordInvalid": "A jelenlegi jelszó helytelen.",
"couldNotChangePassword": "Nem sikerült módosítani a jelszót",
"couldNotVerifyPassword": "Nem sikerült ellenőrizni a jelszót",
"unknownError": "Ismeretlen hiba"
}
},
"complexity": {
"length": "Legalább {minLength} karakter hosszúnak kell lennie.",
"hasSymbol": "Tartalmaznia kell egy szimbólumot.",
"hasNumber": "Tartalmaznia kell egy számot.",
"hasUppercase": "Tartalmaznia kell egy nagybetűt.",
"hasLowercase": "Tartalmaznia kell egy kisbetűt.",
"equals": "A jelszavak megegyeznek.",
"matches": "Egyezik",
"doesNotMatch": "Nem egyezik"
},
"errors": {
"noHostFound": "Nem található kiszolgáló (host)",
"couldNotSendResetLink": "Nem sikerült elküldeni a jelszó visszaállító linket",
"couldNotCreateSessionForUser": "Nem sikerült munkamenetet létrehozni a felhasználóhoz",
"couldNotVerifyPassword": "Nem sikerült ellenőrizni a jelszót",
"failedToAuthenticate": "Sikertelen hitelesítés. Eddig {failedAttempts} sikertelen jelszópróbálkozása volt a megengedett {maxPasswordAttempts} próbálkozásból. {lockoutMessage}",
"failedToAuthenticateNoLimit": "A hitelesítés sikertelen.",
"accountLockedContactAdmin": " A fiókod feloldásához fordulj a rendszergazdához",
"userNotFound": "A felhasználó nem található a rendszerben",
"initialUserNotSupported": "A kezdeti felhasználó nem támogatott",
"userInitialStateNotSupported": "A felhasználó kezdeti állapota nem támogatott",
"codeOrVerificationRequired": "Meg kell adnod egy ellenőrző kódot, vagy érvényes felhasználó-ellenőrzéssel kell rendelkezned",
"verificationRequired": "El kell végezni a felhasználói ellenőrzést",
"couldNotLoadSession": "Nem sikerült betölteni a munkamenetet",
"couldNotLoadAuthMethods": "Nem sikerült betölteni a hitelesítési módszereket",
"failedPrecondition": "Az előfeltétel nem teljesült",
"sessionNotValid": "A munkamenet nem érvényes",
"passwordVerificationMissing": "A jelszó hitelesítés hiányzik.",
"passwordVerificationTooOld": "A jelszó hitelesítés túl régi. Kérjük, erősítsd meg újra a jelszavadat.",
"passwordResetNotAllowed": "A jelszó-visszaállítás nem engedélyezett. További információért fordulj a rendszergazdához.",
"localAuthenticationNotAllowed": "A helyi hitelesítés nem engedélyezett! További információért fordulj a rendszergazdához."
}
},
"idp": {
"title": "Bejelentkezés SSO-val",
"description": "Válaszd ki az egyik szolgáltatót a bejelentkezéshez",
"orSignInWith": "vagy jelentkezz be ezzel",
"signInWithApple": "Bejelentkezés Apple-lel",
"signInWithGoogle": "Bejelentkezés Google-lel",
"signInWithAzureAD": "Bejelentkezés AzureAD-vel",
"signInWithGithub": "Bejelentkezés GitHubbal",
"signInWithGitlab": "Bejelentkezés GitLabbal",
"signInWithZitadel": "Bejelentkezés Zitadel-lel",
"loginError": {
"title": "Sikertelen bejelentkezés",
"description": "Hiba történt a bejelentkezés során."
},
"linkingError": {
"title": "Sikertelen fiókösszekapcsolás",
"description": "Hiba történt a fiókod összekapcsolása során."
},
"completeRegister": {
"title": "Add meg az adataidat",
"description": "A regisztráció befejezéséhez add meg az e-mail címedet és a nevedet."
},
"accountNotFound": {
"title": "A fiók nem található",
"description": "Nem találtunk fiókot, amely az azonosítószolgáltatód hitelesítő adataihoz kapcsolódna.",
"info": "Nem található összekapcsolt fiók. Jelentkezz be egy már létező fiókkal, vagy fordulj segítségért a rendszergazdához.",
"backToLogin": "Vissza a bejelentkezéshez"
},
"registrationFailed": {
"title": "A regisztráció nem elérhető",
"description": "Nem sikerült befejezni a regisztrációs folyamatot.",
"info": "Nem sikerült meghatározni a szervezetet a regisztrációhoz. Fordulj segítségért a rendszergazdához.",
"backToLogin": "Vissza a bejelentkezéshez"
},
"processing": {
"message": "Hitelesítés folyamatban...",
"noRedirect": "A szerver nem adott vissza sem átirányítást, sem hibaüzenetet",
"unexpectedError": "Váratlan hiba történt"
},
"errors": {
"missingParameters": "Hiányzó kötelező paraméterek",
"missingIdpInfo": "Hiányoznak az azonosítószolgáltató (IDP) adatai",
"idpNotFound": "Az azonosítószolgáltató nem található",
"linkingNotAllowed": "Az összekapcsolás nem engedélyezett ennél az azonosítószolgáltatónál",
"linkingFailed": "Nem sikerült összekapcsolni az azonosítószolgáltatót a fiókkal",
"autoLinkingFailed": "Nem sikerült automatikusan összekapcsolni a fiókot",
"userCreationFailed": "Nem sikerült létrehozni a felhasználói fiókot",
"orgResolutionFailed": "Nem sikerült meghatározni a szervezetet a regisztrációhoz",
"sessionCreationFailed": "Nem sikerült létrehozni a munkamenetet vagy meghatározni az átirányítási címet",
"unknownError": "Ismeretlen hiba történt"
}
},
"ldap": {
"title": "LDAP bejelentkezés",
"description": "Add meg az LDAP hitelesítő adataidat.",
"submit": "Tovább",
"labels": {
"username": "Felhasználónév",
"password": "Jelszó"
},
"required": {
"username": "Ez a mező kötelező",
"password": "Ez a mező kötelező"
}
},
"mfa": {
"verify": {
"title": "Igazold a személyazonosságodat",
"description": "Válaszd ki az alábbi hitelesítési módok egyikét.",
"noResults": "Nincs beállítható hitelesítési mód."
},
"set": {
"title": "Kétlépcsős azonosítás beállítása",
"description": "Válaszd ki az alábbi hitelesítési módok egyikét.",
"skip": "Kihagyás"
}
},
"otp": {
"verify": {
"title": "Kétlépcsős azonosítás igazolása",
"totpDescription": "Add meg a hitelesítő alkalmazásodban megjelenő kódot.",
"smsDescription": "Add meg az SMS-ben kapott kódot.",
"emailDescription": "Add meg az e-mailben kapott kódot.",
"noCodeReceived": "Nem kaptál kódot?",
"resendCode": "Kód újraküldése",
"resendCodeIn": "Kód újraküldése ({seconds} mp)",
"submit": "Tovább",
"labels": {
"code": "Kód"
},
"required": {
"code": "Ez a mező kötelező"
}
},
"set": {
"title": "Kétlépcsős azonosítás beállítása",
"totpDescription": "Olvasd be a QR-kódot a hitelesítő alkalmazásoddal.",
"smsDescription": "Add meg a telefonszámodat, hogy SMS-ben elküldhessük az ellenőrző kódot.",
"emailDescription": "Add meg az e-mail címedet, hogy e-mailben elküldhessük az ellenőrző kódot.",
"totpRegisterDescription": "Olvasd be a QR-kódot, vagy navigálj az URL-re manuálisan.",
"emailAddDescription": "Használj az ellenőrzött e-mail-címedre küldött egyszer használatos kódot második faktorként.",
"smsAddDescription": "Használj az ellenőrzött telefonszámodra küldött egyszer használatos kódot második faktorként.",
"add": "Hozzáadás",
"emailAdded": "E-mailes kód hozzáadva.",
"smsAdded": "SMS-es kód hozzáadva.",
"submit": "Tovább",
"labels": {
"code": "Kód"
},
"required": {
"code": "Ez a mező kötelező"
}
},
"errors": {
"couldNotRequestChallenge": "Nem sikerült OTP-kihívást kérni",
"couldNotVerifyCode": "Nem sikerült ellenőrizni az OTP-kódot",
"couldNotGetSession": "A munkamenet nem tölthető be. Jelentkezz be újra.",
"invalidMethod": "Ez a második faktor nem támogatott.",
"couldNotAddEmail": "Az e-mailes kódot nem sikerült hozzáadni.",
"couldNotAddSms": "Az SMS-es kódot nem sikerült hozzáadni.",
"emailNotVerified": "Ellenőrizd az e-mail-címedet, mielőtt e-mailes kódokat adsz hozzá.",
"phoneNotVerified": "Ellenőrizd a telefonszámodat, mielőtt SMS-es kódokat adsz hozzá."
}
},
"passkey": {
"verify": {
"title": "Hitelesítés jelkulccsal (Passkey)",
"description": "A készüléked az ujjlenyomatodat, arcodat vagy a képernyőzárat fogja kérni",
"usePassword": "Jelszó használata",
"submit": "Tovább",
"errors": {
"couldNotRequestChallenge": "Nem sikerült elindítani a jelkulcsos azonosítást",
"couldNotVerifyPasskey": "Nem sikerült ellenőrizni a jelkulcsot",
"noResponseReceived": "A jelkulcs ellenőrzése sikertelen - nem érkezett válasz",
"noRedirectProvided": "A jelkulcs ellenőrzése befejeződött, de nem érkezett átirányítás",
"couldNotRetrievePasskey": "Hiba történt a jelkulcs lekérése közben",
"verificationCancelled": "A jelkulcs ellenőrzése megszakadt",
"verificationFailed": "Hiba történt a jelkulcs ellenőrzése közben",
"couldNotFindSession": "Nem található munkamenet",
"couldNotUpdateSession": "Nem sikerült frissíteni a munkamenetet",
"userNotFound": "A felhasználó nem található a rendszerben",
"couldNotDetermineRedirect": "Nem sikerült meghatározni az átirányítási címet a jelkulcs ellenőrzése után"
}
},
"set": {
"title": "Jelkulcs beállítása",
"description": "A készüléked az ujjlenyomatodat, arcodat vagy a képernyőzárat fogja kérni",
"info": {
"description": "A jelkulcs egy olyan hitelesítési módszer, amely az eszközödön használható, például ujjlenyomattal, Apple Face ID-val vagy más hasonló megoldással.",
"link": "Jelkulcsos hitelesítés"
},
"skip": "Kihagyás",
"submit": "Tovább"
}
},
"u2f": {
"verify": {
"title": "Kétlépcsős azonosítás igazolása",
"description": "Igazold a fiókodat a készülékeddel."
},
"set": {
"title": "Kétlépcsős azonosítás beállítása",
"description": "Állíts be egy készüléket második hitelesítési módként.",
"submit": "Tovább"
}
},
"register": {
"methods": {
"passkey": "Jelkulcs",
"password": "Jelszó"
},
"disabled": {
"title": "A regisztráció letiltva",
"description": "A regisztráció le van tiltva. Fordulj a rendszergazdához."
},
"missingdata": {
"title": "Hiányzó adatok",
"description": "A regisztrációhoz add meg az e-mail címedet, keresztneved és vezetékneved."
},
"title": "Regisztráció",
"description": "Hozd létre a Zitadel fiókodat.",
"noMethodAvailableWarning": "Nincs elérhető hitelesítési módszer. Fordulj a rendszergazdához.",
"selectMethod": "Válaszd ki, milyen módszerrel szeretnél hitelesíteni",
"agreeTo": "A regisztrációhoz el kell fogadnod a felhasználási feltételeket",
"termsOfService": "Felhasználási feltételek",
"privacyPolicy": "Adatvédelmi irányelvek",
"submit": "Tovább",
"password": {
"title": "Jelszó beállítása",
"description": "Állítsd be a fiókod jelszavát",
"submit": "Tovább",
"labels": {
"password": "Jelszó",
"confirmPassword": "Jelszó megerősítése"
},
"required": {
"password": "Adj meg egy jelszót!",
"confirmPassword": "Ez a mező kötelező"
}
},
"labels": {
"firstname": "Keresztnév",
"lastname": "Vezetéknév",
"email": "E-mail cím"
},
"required": {
"firstname": "Ez a mező kötelező",
"lastname": "Ez a mező kötelező",
"email": "Ez a mező kötelező"
},
"errors": {
"couldNotCreateUser": "Nem sikerült létrehozni a felhasználót",
"couldNotCreateSession": "Nem sikerült létrehozni a munkamenetet",
"userNotFound": "A felhasználó nem található a rendszerben",
"couldNotLinkIDP": "Nem sikerült összekapcsolni az azonosítószolgáltatót a felhasználóval",
"couldNotRegisterUser": "Nem sikerült regisztrálni a felhasználót",
"sessionMismatch": "A regisztráció egy másik böngészőben indult. Jelentkezz be újra az azonosítószolgáltatódnál."
}
},
"invite": {
"title": "Felhasználó meghívása",
"description": "Add meg a meghívni kívánt felhasználó e-mail címét és nevét.",
"info": "A felhasználó e-mailben kapja meg a további teendőket.",
"notAllowed": "A beállításaid nem teszik lehetővé felhasználók meghívását.",
"submit": "Tovább",
"success": {
"title": "Felhasználó meghívva",
"description": "Az e-mail sikeresen elküldve.",
"verified": "A felhasználót meghívtuk, és már ellenőrizte az e-mail címét.",
"notVerifiedYet": "A felhasználót meghívtuk. E-mailben kapja meg a további teendőket.",
"submit": "Másik felhasználó meghívása"
}
},
"signedin": {
"title": "Üdvözlünk, {user}!",
"description": "Sikeresen bejelentkeztél.",
"continue": "Tovább",
"error": {
"title": "Hiba",
"description": "Hiba történt a bejelentkezés során."
}
},
"verify": {
"userIdMissing": "Nincs megadva felhasználói azonosító!",
"successTitle": "Felhasználó ellenőrizve",
"successDescription": "A felhasználó ellenőrzése sikeresen megtörtént.",
"successContinue": "Tovább",
"setupAuthenticator": "Hitelesítő beállítása",
"verify": {
"title": "Felhasználó ellenőrzése",
"description": "Add meg az ellenőrző e-mailben kapott kódot.",
"noCodeReceived": "Nem kaptál kódot?",
"resendCode": "Kód újraküldése",
"codeSent": "Új kódot küldtünk az e-mail címedre.",
"submit": "Tovább",
"labels": {
"code": "Kód"
},
"required": {
"code": "Ez a mező kötelező"
}
},
"errors": {
"couldNotResendEmail": "Nem sikerült újraküldeni az e-mailt",
"couldNotVerifyUser": "Nem sikerült ellenőrizni a felhasználót",
"couldNotVerifyInvite": "Nem sikerült ellenőrizni a meghívást",
"couldNotVerifyEmail": "Nem sikerült ellenőrizni az e-mail címet",
"couldNotVerify": "Nem sikerült ellenőrizni",
"couldNotLoadUser": "Nem sikerült betölteni a felhasználót",
"couldNotLoadAuthenticators": "Nem sikerült betölteni a lehetséges hitelesítőket",
"couldNotCreateSession": "Nem sikerült létrehozni a munkamenetet",
"noHostFound": "Nem található kiszolgáló (host)",
"userAlreadyVerified": "A felhasználót már ellenőriztük!",
"couldNotResendInvite": "Nem sikerült újraküldeni a meghívást",
"inviteSendFailed": "Nem sikerült elküldeni a meghívó e-mailt",
"emailSendFailed": "Nem sikerült elküldeni az ellenőrző e-mailt",
"contextMissing": "Hiba történt. Kérjük, próbáld újra."
}
},
"authenticator": {
"title": "Válassz hitelesítési módszert",
"description": "Válaszd ki, milyen módszerrel szeretnél hitelesíteni",
"noMethodsAvailable": "Nincs elérhető hitelesítési módszer",
"allSetup": "Már beállítottál egy hitelesítőt!",
"linkWithIDP": "vagy kapcsold össze egy azonosítószolgáltatóval",
"methods": {
"totp": "Hitelesítő alkalmazás",
"u2f": "Univerzális második faktor",
"otpEmail": "Kód e-mailben",
"otpSms": "Kód SMS-ben",
"passkey": "Jelkulcs",
"password": "Jelszó"
}
},
"device": {
"usercode": {
"title": "Eszközkód",
"description": "Add meg az alkalmazásodban vagy eszközödön megjelenő kódot.",
"submit": "Tovább",
"labels": {
"code": "Kód"
},
"required": {
"code": "Ez a mező kötelező"
}
},
"request": {
"title": "A(z) {appName} kapcsolódni szeretne",
"description": "A(z) {appName} hozzáférést kap a következőkhöz:",
"disclaimer": "Az Engedélyezés gombra kattintva engedélyezed, hogy a(z) {appName} és a Zitadel a saját felhasználási feltételeik és adatvédelmi irányelveik szerint használja az adataidat. Ezt a hozzáférést bármikor visszavonhatod.",
"submit": "Engedélyezés",
"deny": "Elutasítás"
},
"scope": {
"openid": "A személyazonosságod igazolása.",
"email": "Az e-mail címed megtekintése.",
"profile": "A teljes profilinformációd megtekintése.",
"offline_access": "Offline hozzáférés engedélyezése a fiókodhoz."
}
},
"error": {
"noUserCode": "Nincs megadva felhasználói kód!",
"noDeviceRequest": "Nem található eszközkérés.",
"unknownContext": "Nem sikerült meghatározni a felhasználó kontextusát. Győződj meg róla, hogy előbb megadtad a felhasználónevet, vagy add meg a bejelentkezési nevet keresési paraméterként.",
"sessionExpired": "A munkameneted lejárt, vagy újbóli hitelesítést igényel. Kérjük, jelentkezz be újra.",
"failedLoading": "Nem sikerült betölteni az adatokat. Kérjük, próbáld újra.",
"tryagain": "Próbáld újra",
"couldNotContinueSession": "Nem sikerült folytatni a munkamenetet - hiányzó felhasználói információk",
"couldNotClearSession": "A munkamenetet nem sikerült befejezni. Kérjük, próbálja újra."
}
}
Loaded 100 of 644 files, more files were not shown because too many files have changed in this diff. Show more