<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Louis</title>
    <description>The latest articles on DEV Community by Louis (@optimod).</description>
    <link>https://dev.to/optimod</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4039614%2F0f613b29-1fb3-47cb-8438-53a7b65c745a.png</url>
      <title>DEV Community: Louis</title>
      <link>https://dev.to/optimod</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/optimod"/>
    <language>en</language>
    <item>
      <title>Kodema: run coding agents as a team, at scale, on your own Kubernetes</title>
      <dc:creator>Louis</dc:creator>
      <pubDate>Sat, 14 Nov 2026 22:47:46 +0000</pubDate>
      <link>https://dev.to/optimod/kodama-run-coding-agents-as-a-team-at-scale-on-your-own-kubernetes-28e1</link>
      <guid>https://dev.to/optimod/kodama-run-coding-agents-as-a-team-at-scale-on-your-own-kubernetes-28e1</guid>
      <description>&lt;h3&gt;
  
  
  Like OpenClaw, but for teams
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;A hands-on introduction to Kodema, a free and open-source software factory for teams. Ten minutes on one Linux machine, then the path to your company's Kubernetes.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A coding agent in a terminal is a single-player tool. It has one developer, one laptop, one set of credentials, and one conversation that is gone when the window closes.&lt;/p&gt;

&lt;p&gt;A company is not shaped like that. It has hundreds of repositories, some of which nobody wants to touch. It has people who may start work, others who must review it, and others who are called when it fails. It has teams, or customers, who must never see each other's code. And it has a Kubernetes cluster that already runs everything else.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/optimiware/kodema" rel="noopener noreferrer"&gt;Kodema&lt;/a&gt; is a software factory built for that shape. It is multi-tenant, role-based and API-first. It runs on the cluster you already operate. Its pipelines take a task to a tested, merged change, with a human at the points you choose, or at none. It is written in Go and licensed Apache-2.0, and this post is the first time we are introducing it.&lt;/p&gt;

&lt;p&gt;The usual word for all this is enterprise-grade, and it is usually an adjective with nothing behind it. So this post runs the thing first, then lists what is behind the word, and ends with what does not work yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  The whole model in one sentence
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;A pipeline is an ordered list of actions; an action runs a container or requests an answer; an execution runs a pipeline once; a task is a conversation that starts executions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you have used Drone, or any container CI, you know the first half already: containers run in order, share a workspace, and exit zero or do not. The second half is the new part. An action can run no container at all and ask a role for a decision instead. An agent is one more container.&lt;/p&gt;

&lt;p&gt;That is the factory. Engineers build the line (pipelines, credentials, rules). Anyone submits tasks: a person, a script, another system. Containers and agents do the work. Reviewers and operators each have an inbox.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Start a local Kodema
&lt;/h2&gt;

&lt;p&gt;You need Linux with rootless Podman 5 or newer and its user socket (&lt;code&gt;systemctl --user enable --now podman.socket&lt;/code&gt;), &lt;code&gt;curl&lt;/code&gt;, &lt;code&gt;tar&lt;/code&gt;, and port 8443 free.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/optimiware/kodema/master/install.sh &lt;span class="o"&gt;|&lt;/span&gt; sh
kodema up
&lt;span class="nb"&gt;source&lt;/span&gt; ~/.kodema/instances/default/env.sh
kodactl whoami
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If piping &lt;code&gt;curl&lt;/code&gt; into a shell bothers you, read &lt;a href="https://github.com/optimiware/kodema/blob/master/install.sh" rel="noopener noreferrer"&gt;install.sh&lt;/a&gt; first. It is about a hundred lines, checks both downloads against the release's &lt;code&gt;SHA256SUMS&lt;/code&gt;, installs into &lt;code&gt;~/.local/bin&lt;/code&gt;, and never asks for root.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kodema up&lt;/code&gt; starts PostgreSQL, NATS, the Kodema server and a Git service as containers. It creates a local CA, one tenant, one project and four people: an admin, an engineer, a reviewer and an operator. &lt;code&gt;whoami&lt;/code&gt; should end with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;roles   admin,engineer,reviewer,operator
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Run a container
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;podman pull docker.io/library/alpine:3.24@sha256:0f49f331d9212aff11b932863be4eb01cdf962969aa86dab7d1ee21ac6f5f52b

cat &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; hello.yaml &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s1"&gt;'EOF'&lt;/span&gt;
actions:
  - name: hello
    image: docker.io/library/alpine@sha256:0f49f331d9212aff11b932863be4eb01cdf962969aa86dab7d1ee21ac6f5f52b
    timeout: 2m
    commands:
      - &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"hello from a Kodema workload"&lt;/span&gt;
EOF

kodactl run hello.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;execution execution-… started
hello from a Kodema workload
execution execution-… succeeded
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The image is pinned by digest and you pull it yourself, because the local runtime never pulls on your behalf. No runner binary is injected into the container: Kodema replaces the entrypoint with a fail-fast script that the image's own shell runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Work as two people
&lt;/h2&gt;

&lt;p&gt;So far you were the admin, who holds every role. Become the engineer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;unset&lt;/span&gt; KODEMA_CREDENTIAL_FILE
kodactl login          &lt;span class="c"&gt;# choose Engineer; add --device on a machine without a browser&lt;/span&gt;
kodactl whoami
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;roles   engineer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pipeline drafts a change, asks a reviewer, and ships only after a yes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cat &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; ship.yaml &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s1"&gt;'EOF'&lt;/span&gt;
inputs: &lt;span class="o"&gt;[&lt;/span&gt;change&lt;span class="o"&gt;]&lt;/span&gt;
actions:
  - name: draft
    image: docker.io/library/alpine@sha256:0f49f331d9212aff11b932863be4eb01cdf962969aa86dab7d1ee21ac6f5f52b
    timeout: 2m
    commands:
      - cp /kodema/inputs/change /workspace/change.txt
      - &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"drafted $(wc -c &amp;lt; /workspace/change.txt) bytes in /workspace"&lt;/span&gt;

  - name: review
    request: role/reviewer
    timeout: 10m
    subject:
      operation: demo.ship
      resource: local-demo
      change: &lt;span class="o"&gt;{&lt;/span&gt;from: inputs.change&lt;span class="o"&gt;}&lt;/span&gt;

  - name: ship
    image: docker.io/library/alpine@sha256:0f49f331d9212aff11b932863be4eb01cdf962969aa86dab7d1ee21ac6f5f52b
    timeout: 2m
    commands:
      - &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"shipping -&amp;gt; $(cat /workspace/change.txt)"&lt;/span&gt;
EOF

kodactl run ship.yaml --input &lt;span class="nv"&gt;change&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"handle empty carts"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;execution execution-… started
execution execution-… is waiting for role/reviewer to answer request "review"; see 'kodactl inbox' and 'kodactl approve execution-…'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You started the work. Try to sign it off:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kodactl approve &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;execution-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error: forbidden: current authority check "membership" did not hold
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The request went to a role, and you do not hold it. It now sits in the inbox of everyone who does. No container runs while it waits, which can be up to thirty days: &lt;code&gt;podman ps&lt;/code&gt; shows the four containers of the stack and no workload. The workspace is kept, and the execution's credential is revoked until someone answers.&lt;/p&gt;

&lt;p&gt;Now be the second person. The local admin holds the Reviewer role:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;source&lt;/span&gt; ~/.kodema/instances/default/env.sh
kodactl inbox
kodactl approve &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;execution-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
kodactl watch &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;execution-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
kodactl logs &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;execution-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; --action ship
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KIND     TASK  EXECUTION    ACTION  PROMPT/SUMMARY
request  -     execution-…  act-…   [role/reviewer] change=handle empty carts operation=demo.ship resource=local-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;shipping -&amp;gt; handle empty carts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;ship&lt;/code&gt; ran in a new container and read the file &lt;code&gt;draft&lt;/code&gt; wrote before the wait. &lt;code&gt;kodactl inspect &amp;lt;execution-id&amp;gt;&lt;/code&gt; shows the decision, who made it and when. A rejection (&lt;code&gt;kodactl reject &amp;lt;execution-id&amp;gt; --reason "…"&lt;/code&gt;) fails the execution and &lt;code&gt;ship&lt;/code&gt; never starts. A request that times out fails too. Nothing in Kodema reads silence as approval.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Give the factory a task
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;run&lt;/code&gt; stores nothing. A team stores its pipelines and starts them from tasks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kodactl pipeline apply hello.yaml          &lt;span class="c"&gt;# prints the pipeline id&lt;/span&gt;
kodactl task run --title &lt;span class="s2"&gt;"First task"&lt;/span&gt; --pipeline &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;pipeline-id&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
kodactl task list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A task is the unit a team shares. It has a title, a description, a conversation and metadata of your own, and it keeps the history of every execution it started. Tasks arrive through one API with two edges, REST and MCP, so a person, a script, an email adapter or the agent in your editor (&lt;code&gt;kodactl mcp install claude --print&lt;/code&gt;) files work the same way and under the same authorization.&lt;/p&gt;

&lt;p&gt;Two things make a task more than a ticket:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;An agent can ask.&lt;/strong&gt; A workload that gets stuck puts a question on its task, addressed to a role or to a service. Kodema cancels the execution, the question lands in that inbox, and the reply starts a fresh execution with the whole conversation in &lt;code&gt;/kodema/task.json&lt;/code&gt;. Nobody keeps a container warm for three days.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failures have an owner.&lt;/strong&gt; A task whose execution failed appears in the operators' inbox, where someone starts a fresh attempt or cancels it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. A real line
&lt;/h2&gt;

&lt;p&gt;An agent is a container command. Claude Code, Codex, OpenCode, Pi or a shell script all run the same way. A pipeline that delivers a change looks like this; the images and commands are placeholders for your own:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;inputs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;target_ref&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;expected_base&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;actions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;implement&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;registry.example.com/coding-agent@sha256:…&lt;/span&gt;
    &lt;span class="na"&gt;outputs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;candidate&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;implement-and-push&lt;/span&gt;

  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;test&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;registry.example.com/test-tools@sha256:…&lt;/span&gt;
    &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;test-candidate "$(cat /kodema/outputs/implement/candidate)"&lt;/span&gt;

  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;review&lt;/span&gt;
    &lt;span class="na"&gt;request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;role/reviewer&lt;/span&gt;
    &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;72h&lt;/span&gt;
    &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;git.ref.update&lt;/span&gt;
      &lt;span class="na"&gt;resource&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;from:&lt;/span&gt; &lt;span class="s"&gt;inputs.repository&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;from:&lt;/span&gt; &lt;span class="s"&gt;inputs.target_ref&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;candidate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;from:&lt;/span&gt; &lt;span class="s"&gt;implement.outputs.candidate&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;expected_base&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;from:&lt;/span&gt; &lt;span class="s"&gt;inputs.expected_base&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;integrate&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;registry.example.com/git-tools@sha256:…&lt;/span&gt;
    &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;integrate-candidate&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;How much of this is automatic is your decision, and you make it per repository and per branch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A person decides.&lt;/strong&gt; Keep the &lt;code&gt;review&lt;/code&gt; action. The Git service refuses the push to &lt;code&gt;main&lt;/code&gt; unless this execution holds a passed review of that exact commit, on that ref, from that base.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A program decides.&lt;/strong&gt; Assign the request to &lt;code&gt;service/&amp;lt;id&amp;gt;&lt;/code&gt; and a validator, a merge queue or a policy engine answers it through the API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nobody decides.&lt;/strong&gt; Remove the request and the approval rule, and the pipeline runs from task to merge unattended.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rules that say which of these applies live in a Git repository, in the spirit of gitolite, so changing one is a commit with a name on it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;repo shop/web
    R                               = @all
    RW+  refs/heads/work/           = @engineer @execution
    RW   refs/heads/main            = @execution
    option approve.refs/heads/main  = reviewer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent never sees your model provider's API key. It points &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; or &lt;code&gt;OPENAI_BASE_URL&lt;/code&gt; at Kodema's model proxy and authenticates with its execution token. The key stays in the control plane, and the token dies with the execution. The recipe is in &lt;a href="https://github.com/optimiware/kodema/blob/master/examples/pipelines/external-harness.yaml" rel="noopener noreferrer"&gt;external-harness.yaml&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. What is behind "enterprise-grade"
&lt;/h2&gt;

&lt;p&gt;Kodema is multi-tenant by design. A tenant is an isolated organization: a business unit, a subsidiary, a customer. Projects live inside it. Isolation is the same boundary drawn again at every layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data.&lt;/strong&gt; Every record is owned by a tenant and a project. PostgreSQL enforces it with forced row-level security, under a runtime role that does not own the tables.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execution.&lt;/strong&gt; On Kubernetes each tenant has its own namespace, a default-deny NetworkPolicy and a LimitRange. A workload of one tenant cannot reach a workload of another, or the Kubernetes API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Credentials.&lt;/strong&gt; Each tenant has its own derivation key. An execution's token is derived from it, is valid for at most eight hours at a time, and is revoked while the execution waits and when it ends. Rotating one tenant's key invalidates that tenant's tokens and nobody else's.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secrets.&lt;/strong&gt; Values are envelope-encrypted under a key in your cloud KMS. The management API returns metadata, never the value. A container gets a secret as a file, and only if its action declares it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git.&lt;/strong&gt; Each tenant has its own Git workers and volumes. Workloads never mount them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logs and events.&lt;/strong&gt; Both are scoped by the same ownership, in the API and on the broker.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We check this on a deployed cluster, not only in unit tests. The qualification probes run a workload in one tenant that tries to reach a listener in another, and use one tenant's credentials against the other's pipelines, tasks, secret metadata and logs.&lt;/p&gt;

&lt;p&gt;The rest of what a company asks for is in the same place:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Identity.&lt;/strong&gt; People sign in through your OIDC provider. Five roles (Admin, Engineer, Reviewer, Operator, Viewer) are granted per tenant and per project. A role change applies on the next call. The Admin role grants no review authority.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit.&lt;/strong&gt; One function authorizes every operation. Decisions keep their actor and time. An execution keeps the exact pipeline bytes it was admitted with, their SHA-256 and the image digests, so you can say what ran.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recovery.&lt;/strong&gt; PostgreSQL records facts and NATS only distributes them, so a broker outage delays integrations and does not stop executions. After a crash the controller observes what it had started. It never reruns a command it cannot prove did not run.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Honest boundary: this is isolation around ordinary containers, for teams and business units that trust their own engineers. It is not a sandbox for running strangers' code.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. On your Kubernetes
&lt;/h2&gt;

&lt;p&gt;The laptop runs workloads on Podman. Production runs them on Kubernetes, with the primitives you already operate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each container action is a plain Job. Kodema adds no CRDs and no operator.&lt;/li&gt;
&lt;li&gt;The workspace is a volume claim, kept across the Jobs of one execution and across its approval waits.&lt;/li&gt;
&lt;li&gt;The control plane is one Deployment, installed with Helm. A second chart adds NATS JetStream.&lt;/li&gt;
&lt;li&gt;OpenTofu roots for Scaleway, AWS and Google Cloud create the cluster, managed PostgreSQL and the KMS key.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your code, your pipelines and your decisions stay in your cluster and your database. What leaves is what your agents send to the model provider you configure. The pipeline YAML is the same on the laptop and in production.&lt;/p&gt;

&lt;p&gt;This is also where the scale comes from. An execution is a row in PostgreSQL and its work is Jobs, so a thousand tasks are a thousand rows and whatever your scheduler and autoscaler make of the Jobs. Work that waits for a person holds a volume and no CPU. The &lt;a href="https://github.com/optimiware/kodema/blob/master/docs/runbooks/production-deployment.md" rel="noopener noreferrer"&gt;production deployment guide&lt;/a&gt; has the procedure.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. The job we would give it first: legacy modernization
&lt;/h2&gt;

&lt;p&gt;Modernizing an old estate is the same change made four hundred times, each needing a build, a test run and a signature. It is too large for a team and too repetitive for anyone to want. It is shaped like a factory order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write what the agents must know (architecture, domain language, conventions) as Markdown in a context repository. The Git service serves it under the same access rules as the code.&lt;/li&gt;
&lt;li&gt;Write one pipeline: implement, build, test, review, integrate.&lt;/li&gt;
&lt;li&gt;Create one task per module from a script, through the API.&lt;/li&gt;
&lt;li&gt;Reviewers work an inbox instead of a backlog. Operators see what failed. Every merged commit leads back to a task, an execution and an approver.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When the reviewers trust a class of change, move it to the unattended line.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we left out
&lt;/h2&gt;

&lt;p&gt;The spec spends a lot of its length on what Kodema refuses to do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No &lt;code&gt;when&lt;/code&gt;, no expressions, no parallel actions, no DAG, no loops.&lt;/strong&gt; A pipeline is a list. A condition belongs in a shell script, where &lt;code&gt;if&lt;/code&gt; already works and can be tested.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No resume.&lt;/strong&gt; Each action settles once. Rework is a new execution from the first action, and the old one stays in the history as it was.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No pipelines discovered in Git.&lt;/strong&gt; You post them through the API (&lt;code&gt;kodactl pipeline apply .kodema/&lt;/code&gt;). A workload that can push code cannot change the pipeline that governs it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We expect arguments about the first one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The name
&lt;/h2&gt;

&lt;p&gt;A kodema (木霊) is a tree spirit of Japanese folklore. It lives in a tree and is seldom seen.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Unseen, the wood thinks&lt;br&gt;
branches commit while you sleep&lt;br&gt;
dawn finds the leaves changed&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Try it, and tell us where it breaks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The repository: &lt;a href="https://github.com/optimiware/kodema" rel="noopener noreferrer"&gt;github.com/optimiware/kodema&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The design, in one document with 20 numbered acceptance criteria: &lt;a href="https://github.com/optimiware/kodema/blob/master/KODEMA.md" rel="noopener noreferrer"&gt;KODEMA.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The rest of the tour (sign-in, Git, MCP): &lt;a href="https://github.com/optimiware/kodema/blob/master/docs/runbooks/quickstart.md" rel="noopener noreferrer"&gt;quickstart&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you are done, &lt;code&gt;kodema down --purge&lt;/code&gt; removes the containers, the volumes and the state.&lt;/p&gt;

&lt;p&gt;We would most like to hear from people who run platform teams: what your company would need before it let this near a real repository, and what broke when you ran the steps above. Open an issue.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>kubernetes</category>
      <category>factory</category>
      <category>opensource</category>
    </item>
    <item>
      <title>OAuthSonas: A Tiny OpenID Connect Provider for Playwright E2E Tests</title>
      <dc:creator>Louis</dc:creator>
      <pubDate>Tue, 21 Jul 2026 09:02:22 +0000</pubDate>
      <link>https://dev.to/optimod/oauthsonas-a-tiny-openid-connect-provider-for-playwright-e2e-tests-248e</link>
      <guid>https://dev.to/optimod/oauthsonas-a-tiny-openid-connect-provider-for-playwright-e2e-tests-248e</guid>
      <description>&lt;p&gt;If you've ever wired up end-to-end tests for an app that uses OpenID Connect, you've probably done one of these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;stubbed the OIDC library entirely and shipped a fake &lt;code&gt;/login&lt;/code&gt; route that sets a session cookie,&lt;/li&gt;
&lt;li&gt;pointed your test suite at a real Auth0 tenant and prayed the rate limits wouldn't bite,&lt;/li&gt;
&lt;li&gt;or written a half-baked mock that returns a hardcoded JWT and silently broke every token-validation rule in your middleware.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All three are bad. The first one means your E2E tests never exercise the path your users actually take. The second is flaky, slow, and leaks credentials. The third gives you green tests over broken code.&lt;/p&gt;

&lt;p&gt;At &lt;a href="https://optimiweb.io" rel="noopener noreferrer"&gt;Optimi&lt;/a&gt; we run edge infrastructure for enterprise customers, and our dashboards authenticate against a real OIDC provider. We wanted E2E tests that hit the &lt;em&gt;actual&lt;/em&gt; browser Authorization Code flow — discovery, PKCE, callback, JWKS validation, userinfo, logout — without standing up a full Auth0 tenant per CI run. So we built one and open-sourced it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 Project link: &lt;a href="https://github.com/optimiweb/oauthsonas" rel="noopener noreferrer"&gt;github.com/optimiweb/oauthsonas&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Meet &lt;code&gt;oauthsonas&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;oauthsonas&lt;/code&gt; (that's &lt;em&gt;"OAuth-sonas"&lt;/em&gt; — personas for OAuth) is a small, in-memory OpenID Connect provider for local development and integration tests. It implements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;real browser Authorization Code flow with S256 PKCE&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Rotating &lt;strong&gt;refresh tokens&lt;/strong&gt; (with reuse detection)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RS256 JWT&lt;/strong&gt; access and ID tokens&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discovery&lt;/strong&gt;, &lt;strong&gt;JWKS&lt;/strong&gt;, &lt;strong&gt;userinfo&lt;/strong&gt;, and &lt;strong&gt;RP-initiated logout&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configurable personas&lt;/strong&gt; — pick who you "are" with one click&lt;/li&gt;
&lt;li&gt;Stable, versioned &lt;strong&gt;DOM selectors&lt;/strong&gt; for browser automation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is deliberately &lt;strong&gt;production-unsafe&lt;/strong&gt; — no database, no real authentication, single-replica only, in-memory state lost on restart. That's the point. It's a &lt;strong&gt;drop-in stand-in for your real IdP&lt;/strong&gt; when your real IdP is the wrong tool for the job.&lt;/p&gt;

&lt;p&gt;A new 2048-bit RSA key is generated on every start and published at &lt;code&gt;/.well-known/jwks.json&lt;/code&gt;. Your relying party validates tokens against that JWKS the same way it would against Auth0's — no special test mode, no shortcuts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is better than mocking
&lt;/h2&gt;

&lt;p&gt;When you stub the OIDC library in your tests, you silently disconnect your test from the protocol your application actually runs. State preservation, PKCE verifier handling, &lt;code&gt;aud&lt;/code&gt;/&lt;code&gt;iss&lt;/code&gt; checking, JWKS rotation, refresh-token rotation — none of it gets exercised.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;oauthsonas&lt;/code&gt; keeps all of that real. Your app speaks OIDC the same way it does in production; only the human at the keyboard is replaced by a persona picker.&lt;/p&gt;

&lt;p&gt;That gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real &lt;strong&gt;discovery URL&lt;/strong&gt; for your middleware to pull configuration from&lt;/li&gt;
&lt;li&gt;Real &lt;strong&gt;JWKS&lt;/strong&gt; for RS256 signature validation&lt;/li&gt;
&lt;li&gt;Real &lt;strong&gt;callback handling&lt;/strong&gt; — your &lt;code&gt;/auth/callback&lt;/code&gt; route runs unchanged&lt;/li&gt;
&lt;li&gt;Real &lt;strong&gt;refresh-token rotation&lt;/strong&gt; with reuse detection&lt;/li&gt;
&lt;li&gt;Real &lt;strong&gt;RP-initiated logout&lt;/strong&gt; with &lt;code&gt;id_token_hint&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Reproducible &lt;strong&gt;RBAC personas&lt;/strong&gt; (&lt;code&gt;roles&lt;/code&gt;, &lt;code&gt;org_id&lt;/code&gt;, &lt;code&gt;memberships&lt;/code&gt;) as JWT claims&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1 — Run the provider
&lt;/h2&gt;

&lt;p&gt;Install the Go version declared in &lt;code&gt;go.mod&lt;/code&gt; and either run from a checkout or install the command directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;install &lt;/span&gt;github.com/optimiweb/oauthsonas/cmd/oauthsonas@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then start it with the example config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oauthsonas &lt;span class="nt"&gt;--config&lt;/span&gt; config.example.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or, if you prefer containers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;podman run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; 127.0.0.1:8181:8181 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;OAUTHSONAS_ALLOW_NON_LOOPBACK&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  ghcr.io/optimiweb/oauthsonas:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify it's alive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl http://127.0.0.1:8181/.well-known/openid-configuration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"issuer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://127.0.0.1:8181"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"authorization_endpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://127.0.0.1:8181/oauth2/auth"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"token_endpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://127.0.0.1:8181/oauth2/token"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"jwks_uri"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://127.0.0.1:8181/.well-known/jwks.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"userinfo_endpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://127.0.0.1:8181/userinfo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"end_session_endpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://127.0.0.1:8181/logout"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ The default issuer is exactly &lt;code&gt;http://127.0.0.1:8181&lt;/code&gt;. Do &lt;strong&gt;not&lt;/strong&gt; substitute &lt;code&gt;localhost&lt;/code&gt; in your client config — OIDC issuer matching is exact.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 2 — Point your app at it
&lt;/h2&gt;

&lt;p&gt;Whatever OIDC library your app uses, configure it with the equivalent of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;OIDC_AUTHORITY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://127.0.0.1:8181
&lt;span class="nv"&gt;OIDC_CLIENT_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;dashboard
&lt;span class="nv"&gt;OIDC_REDIRECT_URI&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://127.0.0.1:5173/auth/callback
&lt;span class="nv"&gt;OIDC_POST_LOGOUT_REDIRECT_URI&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;http://127.0.0.1:5173/
&lt;span class="nv"&gt;OIDC_SCOPE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"openid profile email"&lt;/span&gt;
&lt;span class="nv"&gt;OIDC_AUDIENCE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://api.example.test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The example client defined in &lt;code&gt;config.example.yaml&lt;/code&gt; is &lt;strong&gt;public&lt;/strong&gt; and requires &lt;strong&gt;S256 PKCE&lt;/strong&gt; — so set your library up for a public client with a code verifier. No client secret to leak, no symmetric JWT to forge.&lt;/p&gt;

&lt;p&gt;When a developer hits your login button, they'll be redirected to &lt;code&gt;oauthsonas&lt;/code&gt;'s authorization page, where they pick a configured persona — say &lt;strong&gt;Acme Administrator&lt;/strong&gt; — and the redirect comes back to your callback with a normal authorization code. Your library then exchanges it and validates the RS256 tokens against the published JWKS, exactly as in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 — (Optional) Define the personas you test against
&lt;/h2&gt;

&lt;p&gt;The default &lt;code&gt;config.example.yaml&lt;/code&gt; ships platform staff, account managers, and per-customer admin/viewer personas — already a useful RBAC vocabulary. To add your own:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;personas&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;delta-viewer&lt;/span&gt;
    &lt;span class="na"&gt;subject&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;oauthsonas|delta-viewer&lt;/span&gt;
    &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;viewer@delta.example.test&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Delta Viewer&lt;/span&gt;
    &lt;span class="na"&gt;organization_id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;org_delta&lt;/span&gt;
    &lt;span class="na"&gt;roles&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;customer-viewer&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Roles are emitted as a JWT claim (&lt;code&gt;roles&lt;/code&gt; by default). &lt;code&gt;oauthsonas&lt;/code&gt; &lt;strong&gt;never&lt;/strong&gt; expands roles into permissions — that's your app's job, as it should be. You can rename claims via a top-level &lt;code&gt;claims:&lt;/code&gt; block (useful for Auth0-style namespaced keys like &lt;code&gt;https://example.com/roles&lt;/code&gt;), or enforce a role vocabulary with &lt;code&gt;allowed_roles&lt;/code&gt;. Validate a config without starting the server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oauthsonas &lt;span class="nt"&gt;--config&lt;/span&gt; config.yaml &lt;span class="nt"&gt;--check-config&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For tests, prefer one persona per RBAC branch you care about: one platform admin, one org-scoped customer admin, one org-scoped viewer, one multi-org staff member. Same matrix you'd use in your test suite, just expressed as YAML.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4 — Drive the flow from Playwright
&lt;/h2&gt;

&lt;p&gt;This is the fun part. The persona picker exposes &lt;strong&gt;stable, versioned selectors&lt;/strong&gt; specifically for browser automation:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Element&lt;/th&gt;
&lt;th&gt;Selector&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Persona form container&lt;/td&gt;
&lt;td&gt;&lt;code&gt;form[data-testid="persona-form-&amp;lt;id&amp;gt;"]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CSRF hidden input&lt;/td&gt;
&lt;td&gt;&lt;code&gt;input[data-testid="csrf-input"]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interaction ID field&lt;/td&gt;
&lt;td&gt;&lt;code&gt;input[data-testid="interaction-id-input"]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Submit button&lt;/td&gt;
&lt;td&gt;&lt;code&gt;button[data-testid="persona-select-&amp;lt;id&amp;gt;"]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That's the contract. &lt;code&gt;oauthsonas&lt;/code&gt; will not change it without a major version bump — see the handler godoc for the full versioned form contract on &lt;code&gt;POST /oauth2/auth/select&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here's a minimal Playwright login helper you can drop into a fixture. It assumes your app's login button lives at &lt;code&gt;/&lt;/code&gt; and redirects to the IdP.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;test&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Page&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@playwright/test&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ISSUER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;http://127.0.0.1:8181&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Persona&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;platform-admin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;operator&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;account-manager-acme&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;acme-admin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;acme-viewer&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bravo-admin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;signInAs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;persona&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Persona&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// 1. Trigger the OIDC flow from your app. The app redirects to /oauth2/auth&lt;/span&gt;
  &lt;span class="c1"&gt;//    on oauthsonas, which renders the persona picker.&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByRole&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;button&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sr"&gt;/sign in/i&lt;/span&gt; &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="c1"&gt;// 2. We're now on the oauthsonas authorization page. Make sure we arrived.&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;waitForURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;RegExp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`^&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ISSUER&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/oauth2/auth&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;??`&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

  &lt;span class="c1"&gt;// 3. Click the persona button — the form is pre-filled with CSRF + interaction_id.&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;locator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`button[data-testid="persona-select-&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;persona&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"]`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="c1"&gt;// 4. oauthsonas responds with a 302 to your /auth/callback, which exchanges&lt;/span&gt;
  &lt;span class="c1"&gt;//    the code and redirects back to your authenticated landing page.&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;waitForURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\/(&lt;/span&gt;&lt;span class="sr"&gt;app|dashboard|home&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;$/&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;test&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;extend&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;authedPage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Page&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;authedPage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;signInAs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;acme-admin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;expect&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A test then becomes trivially readable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;expect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../fixtures/auth&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;an org admin can invite a new member&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;authedPage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/app/settings/members&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByRole&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;button&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sr"&gt;/invite member/i&lt;/span&gt; &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByLabel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;newhire@acme.example.test&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByRole&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;button&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sr"&gt;/send invite/i&lt;/span&gt; &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/invitation sent/i&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBeVisible&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;a viewer cannot invite members&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;signInAs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;acme-viewer&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/app/settings/members&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByRole&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;button&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sr"&gt;/invite member/i&lt;/span&gt; &lt;span class="p"&gt;})).&lt;/span&gt;&lt;span class="nf"&gt;toBeHidden&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No mocks. No injected cookies. No bypassed middleware. Your token-validation code, your session middleware, your &lt;code&gt;aud&lt;/code&gt;/&lt;code&gt;iss&lt;/code&gt; checks — all run for real.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5 — Clean up: logout
&lt;/h2&gt;

&lt;p&gt;RP-initiated logout works too, because your test should be able to reset identity between steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;signOut&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Your app's logout route should 302 to the IdP's end_session_endpoint&lt;/span&gt;
  &lt;span class="c1"&gt;// with an id_token_hint and a post_logout_redirect_uri.&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/auth/logout&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;waitForURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// back to the unauthenticated landing page&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;oauthsonas&lt;/code&gt; derives the client from the &lt;code&gt;aud&lt;/code&gt; claim of the &lt;code&gt;id_token_hint&lt;/code&gt;, so logout works with or without an explicit &lt;code&gt;client_id&lt;/code&gt; — exactly mirroring Auth0 and Keycloak behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Playwright project setup that works
&lt;/h2&gt;

&lt;p&gt;Bundle Playwright tests with &lt;code&gt;oauthsonas&lt;/code&gt; started in &lt;code&gt;globalSetup&lt;/code&gt; and torn down in &lt;code&gt;globalTeardown&lt;/code&gt;. sketch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// playwright.config.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;defineConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@playwright/test&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;globalSetup&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./tests/global-setup&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;globalTeardown&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./tests/global-teardown&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;use&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;baseURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;http://127.0.0.1:5173&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;trace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;retain-on-failure&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;webServer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;npm run dev&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5173&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;reuseExistingServer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// tests/global-setup.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;spawn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;node:child_process&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;child&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;ReturnType&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;spawn&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;child&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;spawn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;oauthsonas&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;--config&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;oauthsonas.yaml&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;stdio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;inherit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ok&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;waitFor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;http://127.0.0.1:8181/readyz&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="nx"&gt;_000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;oauthsonas did not become ready&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OAUTHSONAS_PID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;child&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;waitFor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;timeoutMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;deadline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;timeoutMs&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;deadline&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// tests/global-teardown.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OAUTHSONAS_PID&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;kill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SIGTERM&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In CI, use the published container image from GitHub Container Registry instead of installing Go:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker pull ghcr.io/optimiweb/oauthsonas:latest
docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;OAUTHSONAS_ALLOW_NON_LOOPBACK&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 127.0.0.1:8181:8181 &lt;span class="se"&gt;\&lt;/span&gt;
  ghcr.io/optimiweb/oauthsonas:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep the published port loopback-bound, even in CI. The &lt;code&gt;OAUTHSONAS_ALLOW_NON_LOOPBACK=true&lt;/code&gt; env only acknowledges that the container itself binds &lt;code&gt;0.0.0.0&lt;/code&gt; — Docker needs that for port-forwarding, but the host-side port should still be &lt;code&gt;127.0.0.1&lt;/code&gt; only. There is no reason ever to expose &lt;code&gt;oauthsonas&lt;/code&gt; to the internet.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you actually want to test
&lt;/h2&gt;

&lt;p&gt;With the real flow in place, here's a non-exhaustive list of regressions your E2E suite now catches that mocking would have hidden:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PKCE verifier mismatch&lt;/strong&gt; — if your library mis-handles the verifier, the token exchange fails against &lt;code&gt;oauthsonas&lt;/code&gt; the same way it would against Auth0.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JWKS rotation after server restart&lt;/strong&gt; — restart the &lt;code&gt;oauthsonas&lt;/code&gt; process mid-test and verify your client refetches keys (it should — the &lt;code&gt;kid&lt;/code&gt; changes).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;aud&lt;/code&gt;/&lt;code&gt;iss&lt;/code&gt; validation&lt;/strong&gt; — set &lt;code&gt;OIDC_AUDIENCE&lt;/code&gt; wrong and watch your middleware reject the token.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scope downscoping on refresh&lt;/strong&gt; — request &lt;code&gt;offline_access&lt;/code&gt;, then refresh with a narrower scope; &lt;code&gt;oauthsonas&lt;/code&gt; correctly narrows the new grant.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refresh-token reuse detection&lt;/strong&gt; — replay a refresh token and observe the rejection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RBAC matrix&lt;/strong&gt; — same flow, different personas, one assertion per branch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logout&lt;/strong&gt; — confirm &lt;code&gt;id_token_hint&lt;/code&gt;-based RP-initiated logout redirects back to your &lt;code&gt;post_logout_redirect_uri&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are precisely the bugs that mock auth hides. None of them are exotic; all of them have bitten someone I know in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  What &lt;code&gt;oauthsonas&lt;/code&gt; is &lt;em&gt;not&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;This is worth being explicit about, because the temptation to "just use it in dev" can lead you astray:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Not for production.&lt;/strong&gt; In-memory state, no real authentication, no database. A restart invalidates every token and every interaction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single-replica only.&lt;/strong&gt; All protocol state is process-local. Don't try to put it behind a load balancer — JWKS will mismatch and cookies will fail.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No password flow, no user provisioning, no Auth0 Management API.&lt;/strong&gt; It's a &lt;em&gt;test fixture&lt;/em&gt;, not a tiny Auth0 replacement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No persistent identities.&lt;/strong&gt; Personas are YAML-defined; you can't "sign up" a new user through it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Read &lt;a href="https://github.com/optimiweb/oauthsonas/blob/main/SECURITY.md" rel="noopener noreferrer"&gt;&lt;code&gt;SECURITY.md&lt;/code&gt;&lt;/a&gt; in the repo before you hack on it — the design is intentionally unsafe for some classes of deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Roadmap-ish
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;oauthsonas&lt;/code&gt; is intentionally minimal and we plan to keep it that way. The roadmap is &lt;em&gt;removing&lt;/em&gt; rough edges, not &lt;em&gt;adding&lt;/em&gt; features. Things you can expect to improve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Better logging attributes for correlating Playwright runs with OIDC events&lt;/li&gt;
&lt;li&gt;More ergonomic persona picker HTML for screen readers (already accessible, but we're picky)&lt;/li&gt;
&lt;li&gt;Tighter CI story around the published container image&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Things we will &lt;em&gt;not&lt;/em&gt; accept as PRs: databases, password authentication, multi-replica state, user provisioning, a Management API. There's a wide market of real IdPs for that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it, star it, break it
&lt;/h2&gt;

&lt;p&gt;Fair: this is a small tool solving a narrow problem. If your E2E tests currently mock auth and you've been quietly unhappy about it, give &lt;code&gt;oauthsonas&lt;/code&gt; a try:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Source &amp;amp; docs:&lt;/strong&gt; &lt;a href="https://github.com/optimiweb/oauthsonas" rel="noopener noreferrer"&gt;github.com/optimiweb/oauthsonas&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Container image:&lt;/strong&gt; &lt;code&gt;ghcr.io/optimiweb/oauthsonas:latest&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;License:&lt;/strong&gt; MIT&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contributing:&lt;/strong&gt; &lt;a href="https://github.com/optimiweb/oauthsonas/blob/main/CONTRIBUTING.md" rel="noopener noreferrer"&gt;CONTRIBUTING.md&lt;/a&gt; — we read every issue and PR.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you find a protocol edge your real IdP handles and &lt;code&gt;oauthsonas&lt;/code&gt; doesn't, that's a bug — please open an issue with a minimal reproducer. We want this to be the &lt;em&gt;last&lt;/em&gt; test-IdP you ever have to write.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;oauthsonas&lt;/code&gt; is built by the team at &lt;a href="https://optimi.com/en/docs/oauthsonas" rel="noopener noreferrer"&gt;Optimi&lt;/a&gt;, where we orchestrate enterprise edge infrastructure (CDN, DNS, security, technical SEO/GEO) for premium brands. We open-source small, sharp tools when they solve a problem we'd otherwise have to keep solving — and we'd rather they lived in the community than on a PowerPoint slide.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Found this useful? Drop a ⭐ on the repo so other people find it too.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>playwright</category>
      <category>oauth</category>
      <category>e2e</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
