Skip to content

Security

Security

TheYard is a public demo with real accounts and a real database. That combination is what makes the question worth answering properly: nothing here is worth stealing, and the shape of the answer is the same whether or not it is.

This document says what is protected and how, what is deliberately not, and what went wrong and got fixed. The third section is the useful one. A threat model with no findings in it has usually not been applied.

In plain words

This page says what is protected and how, what is deliberately left open, and what went wrong and was fixed. For example, the database has no password because nothing logs in with one: the site reaches it with an Azure identity.

What it buys: a developer knows the rules before touching anything sensitive, and the organization can show a reviewer or an auditor its security on one page, mistakes included.

Reporting something

Open an issue on the repository, or email the address on the resume the site serves. There is no bounty and no formal window. Anything real will be fixed and written down in a record here with what it allowed.

What is protected, and by what

The database has no password, because it has no login. The Azure SQL server was created Entra-only, so SQL authentication does not exist on it. The container reaches it as the user-assigned managed identity it already carries, and the connection string in its environment is a server name, a database name and an authentication mode. There is nothing in it to leak (ADR: The SQL Server backend).

That identity can read and write rows, and nothing else. It holds db_datareader and db_datawriter. It has no right to change the shape of any table, which is why the schema is a SQL project published separately from the application (ADR: Data first, and the database in source control). An application that cannot change its own schema cannot be made to.

Passwords are hashed by ASP.NET Core Identity and never stored. The session is a JWT this service signs and reads itself, carried in an httpOnly cookie, so a script on the page cannot read it and cannot be tricked into sending it elsewhere (ADR: Accounts and per-user bids). The key it signs with is a repository secret the deploy hands the web app at roll time; a container given none invents one and logs that it did, and every session ends with it. A session is a year long and is re-issued once a day while it is in use, so a login lasts a year past the last visit and a sign-out still ends it at once (the accounts record's addendum of 13 September). A password reset link is minted by the operator behind the admin key, lives an hour and works once; it stands for a signed token that carries a fingerprint of the password hash so it cannot be replayed after the password changes; the link itself carries only a GUID, the token is kept under it on the document store for the hour and deleted on use, and the link is built from the site's own address rather than the origin's (the accounts record's addendum of 14 September). The same link is emailed by "Forgot password" through Azure Communication Services as the containers' own identity, with no key in the pipeline and one email per address per five minutes.

The key's rule, read from this build: nothing, a placeholder a failed deploy substitution left behind, or anything too short to sign with all count as no key, and no key means the host invents one and says so:

/// <summary>
/// The fewest bytes HMAC-SHA256 will sign with. A shorter key is refused by
/// the token handler on the first sign-in, which is a 500 on a page that
/// was working a minute ago; better to treat it as no key at all.
/// </summary>
public const int MinimumKeyBytes = 32;

/// <summary>
/// The configured signing key, or null when there is nothing usable in the
/// setting: no value, a placeholder a failed deploy substitution left
/// behind (anything starting with two underscores, the rule every other
/// substituted setting follows), or a value too short to sign with. Null
/// means the host invents a key and says so (ADR: Accounts and per-user
/// bids) (ADR: Three readers with no memory of the project).
/// </summary>
public static string? ConfiguredKey(string? configured)
{
    if (string.IsNullOrWhiteSpace(configured) || configured.StartsWith("__", StringComparison.Ordinal))
    {
        return null;
    }
    return Encoding.UTF8.GetByteCount(configured) < MinimumKeyBytes ? null : configured;
}

Live from api/TheYard.Api/Shared/Auth/Tokens.cs, region configured-key, read from this build at 99df7a8.

A session bids only where its account is. The token names the store that opened it, and a bid or a purchase sent to the other store, which the store header allows in one request, is refused with a sentence rather than written under an account that store does not have (ADR: Three readers with no memory of the project).

/// <summary>
/// Whether the session was opened on the store <paramref name="current"/> names. A token
/// from one store used against the other, which the header allows in one
/// request, would write a bid under an account the other store does not
/// have: on the relational side the foreign key refused it as a 500, on
/// the document side nothing refused it at all (ADR: Three readers with no
/// memory of the project). A token with no store claim, which every token
/// minted here carries, is on no store.
/// </summary>
public static bool SessionIsOn(this HttpContext context, CurrentBackend current) =>
    string.Equals(context.User.FindFirstValue(TokenIssuer.StoreClaim), current.Key, StringComparison.Ordinal);

Live from api/TheYard.Api/Shared/Auth/Tokens.cs, region session-per-store, read from this build at 99df7a8.

Five wrong passwords buy five minutes off, per account, and the refusal says exactly what a wrong password says, so the endpoint is not a list of which addresses are registered here (ADR: A password guess should cost something).

// Five wrong passwords buys five minutes off.
//
// Without this, POST /api/auth/login
// is an unmetered password oracle against real accounts: the endpoint
// is public, there is no throttle in front of it, and every attempt
// costs an attacker one request. Five and five is the usual shape and
// the reason it works is arithmetic rather than strength: it turns
// thousands of guesses a minute into twelve an hour, per account,
// which is the difference between a wordlist finishing and not.
//
// The refusal after a lockout says the same sentence as a wrong
// password, deliberately. A distinct "this account is locked" is a
// reply that confirms the address is registered here, and the login
// endpoint already goes out of its way not to be that
// (ADR: A password guess should cost something).
options.Lockout.MaxFailedAccessAttempts = 5;
options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes(5);
options.Lockout.AllowedForNewUsers = true;

Live from api/TheYard.Api/Features/Accounts/Module.cs, region lockout, read from this build at 99df7a8.

Public surfaces publish shapes, not values. The Admin tab shows every SQL statement the application sends, with each parameter's name, type and size. Not its value: the type those rows are built from has no field for one, so there is no redaction rule for a future column to get past. Exception messages do not reach any public surface either, because that is where a driver writes a server name, a login name or the value that broke a constraint; the type goes to the page and the message goes to Application Insights (ADR: What the database is actually doing, ADR: Reviewing my own work).

Every state-changing endpoint identifies its caller and changes only that caller's data, with one deliberate exception below.

No secret is in the repository. Not the connection string, not the Application Insights key, not the JWT signing key, which lives in GitHub's secret store and the container's environment and nowhere else. The build has no credential in it, and CI has no Azure credential at all, which is also why the coverage number has the shape it does (ADR: Counting what the tests cover).

What is deliberately not protected, and why

The Admin tab is public. That is the decision, not an oversight (ADR: Observability). The site is a portfolio and the running system reporting on itself is part of what it is showing. The cost is that everything on that page has to be safe to publish, which is a constraint the page is designed around and which has been got wrong twice and corrected twice, both recorded.

The site a request is for is a header the sender can write. Both Yard domains reach the one web app's address, and the edge says which one the visitor typed in X-Yard-Host. Anybody can send that header to the origin directly. It counts only when the Host is not already one of the three names and only when it names one of them (SiteHosts.cs), so the most a sender can choose is which of the three sites answers, the choice typing the other address already gives them: the store a listing comes from, the Store bar's link, and which of the two Yard addresses a reset link names. It grants nothing, and The Shed's domain, routed by its Host, cannot be told it is a Yard site.

The origin is reachable without going through the edge. The design is Front Door with a locked origin, it is in the template, and it needs a subscription this project does not pay for. That trade was easy when the origin held nothing. It is a smaller trade now that it holds accounts, and ADR-001's addendum says so rather than pretending the control is in place.

There is no per-address rate limiter. Behind the edge, the origin sees one address for every visitor, so an IP-partitioned limit is a global cap rather than a per-attacker one, and because the origin is directly reachable an attacker can bypass the edge and forge whatever address they like. A limiter of that shape would be worth having and would not be the control that mattered, which is why the effort went into per-account lockout instead. This is still a gap and is named as one.

Registration has a ceiling, and it is the one limit that argument never covered. The paragraph above is about partitioning: any limit that has to tell one visitor from another is either lying to itself behind the edge or being lied to in front of it. A limit that does not partition has nothing to forge. Since 1.0.0.74 this site accepts 120 new accounts per sliding hour, counted across the whole site, which matters because registration is the only write an anonymous caller can make that persists, and because every request through it pays for a deliberately expensive password hash on a container that serves everything else. What it costs is stated rather than hidden: while somebody is spending the hour's allowance, a real visitor cannot register either, and browsing, signing in and bidding are untouched. The window is in memory in the one process that serves both sites since 19 October, so the ceiling is one window, 120 an hour across both; a durable bound belongs with the origin lock (ADR-054).

The hop from the edge to the origins is HTTPS, and the origins are still open. The visitor's connection is TLS to the edge, and since 1.0.0.156 the edge reaches the one web app over HTTPS as well, at its own azurewebsites.net name (The Shed's name is bound to it directly) on the certificate Azure manages for that domain, so the session cookie is encrypted on both legs. Until then the origin was a container group with no TLS listener and this hop was plain HTTP on port 8080, which the accounts record admitted and this page did not until a reader with no context noticed the omission (ADR: Three readers with no memory of the project). What is still missing is the origin lock: anybody can reach those names directly, which is the same missing subscription named above.

POST /api/errors/client is anonymous. A crash in the page should reach the same place a crash in the server does. Its message and stack are bounded, and browser reports keep their own ring so a flood of them cannot push real server errors off the page an operator would read during an outage. Each report is also one Application Insights line under the component's own 0.1 GB daily cap, so a flood of reports can close the day's telemetry; the ring keeps the page readable when that happens.

The bidding data is invented. Every vehicle is synthetic and every bid is play money. This lowers the stakes; it does not change the shape of any of the above, which is the point of writing it down.

What went wrong

All of this was found on 3 September 2026, in one afternoon of auditing, mostly by reading comments whose justification had expired.

What What it allowed Record
DELETE /api/bids took no user Any signed-in visitor could delete every other visitor's bids, durably ADR-048
POST /api/market/tick took no account A stranger with curl could counter-bid every auction any signed-in visitor was winning and move the public listing's prices ADR-049
Login never counted failures An unmetered password oracle against real accounts ADR-050
A database exception's message reached the log section Server hostname, login name and caller address on a public page ADR-045
The same, in the error buffer next to it The same, for every unhandled exception ADR-045 addendum
The metrics endpoint returned the whole request ring A live feed of what every other visitor was doing ADR-045
Three scrollable tables with no keyboard access WCAG 2.1.1, found by CI once CI could say what it found ADR-042 addendum
Registration had no ceiling The only anonymous write that persists, unbounded in rows and in a container's CPU, one loop away ADR-054

The pattern in the first three is one thing, and it is the reason this page exists: each was a deliberate decision, defended in a comment, correct when it was written, and left standing after the assumption underneath it changed. Accounts arrived and a database arrived, and the sentences did not move. That is harder to catch than an absent thought, because the file reads as though the question has been settled.

The habit that comes out of it: when a system gains users, or persistence, or anything a person would call theirs, the comments that say "this is only a demo" are a work list.

Store

The Yard, home

Steven StoutStaff .NET engineerRemote

Production .NET that stays up. Built with AI, measured on every version.

Steven Stout

Hi, I'm Steve. I build the systems that make delivery boring in the best way, then coach people inside them.

  • 200+

    production releases, none took the platform down

    Conway Investment Research, 2019 to 2024. Sole engineer for the first three years on a live financial advisory platform.

    See how
  • 50%

    shorter release cycle

    Storee Construction, 2024 to 2026. Four ASP.NET applications onto one .NET 10 platform on Azure, with a four-person team I hired and mentored.

    See how

01Verified

Steven Stout

A real person, and the work is mine.

  • Identity

    Checked by LinkedIn, not by me.

    LinkedIn verified my government ID.

  • Running system

    You are looking at it.

    Version 1.0.5.273 is live. Nothing ships unless it passes the automated gates first.

That's who I am. Here's how I work.

02Strengths

Ten strengths, each with the proof beside it. The numbers match my resume and LinkedIn, and the live ones are read from this site as you look.

  • 01

    Keeps production alive

    200+ releases on a live financial platform, and none took it down. Sole engineer for the first three years.

    See the Conway work

  • 02

    Simplifies messy systems

    Four ASP.NET applications onto one .NET 10 platform on Azure, and a release cycle 50% shorter.

    See the Storee work

  • 03

    Marries dev and infrastructure

    Blue-green releases at Storee that flipped in about 5 seconds with nobody signed out, and Azure Front Door at two employers.

    See this site's cloud

  • 04

    Designs data that holds up

    White-label clients on one shared database, the isolation built into the data, and no cross-client issues.

    See the Conway work

  • 05

    Keeps AI-written code honest

    15 quality numbers that may only improve: 273 releases in a row with none worse.

    See the quality numbers

  • 06

    Resourceful

    $30,000+ cut from Azure and vendor spend at Conway. This site's Azure bill is public, resource by resource.

    See the bill

  • 07

    Builds people up

    Hired and mentored a four-person team. 13 colleagues recommend me by name.

    Read the recommendations

  • 08

    Takes ideas to production

    This site: designed, built and run solo, with 352 versions measured through one gate.

    How it was built

  • 09

    Writes clearly

    Posts on real engineering problems, in plain words.

    Read the blog

  • 10

    Owns decisions

    153 decision records, each with its tradeoff and the call I made.

    See the decision records

Built with AI. Gated so quality never slides.

Steven Stout’s showcase: a used-vehicle auction on .NET and React, built and run by one engineer, live on Azure, with its decisions written down.

No quality number has gotten worse at any release since 1.0.5.1 on 10 November: 273 releases in a row.

One engineer, an AI agent and a gate that checks 15 quality numbers on every release. 352 versions measured, with every result public, the worst days included.

82 releases in the last 7 days, each through the same gate.

Async methods with no CancellationToken, may only fall

11091.0.3.1391.0.5.2731.0.4.115, the ratchet
Every number, on the Quality page

TheYard, right nowLive

Answering in

unread

02505007501,000

server time at p95, the usual five minutes of the last day.

Azure this month

unread

the bill, by resource, read from Azure. The Admin tab shows every line.

Since the last roll

unread

 

rolled in place by the pipeline, behind one gate.

People who have visited

unread

30 days agotoday

Scanners, my own tools' and my own reads left out.

03Start here

04Where teams are heading

How I see engineering with AI, and the setup on this site that backs it.

AI-augmented teams · Architecture and ownership

AI writes more of the code. Someone still has to own what ships.

Teams are going to be heavily AI-augmented. That moves the senior job toward architecture and technical ownership: deciding what to build in pieces small enough to verify, and owning what ships.

  • Task tracking will get automated too. Judgment stays human: seeing a design fail at scale before it does.
  • On this site the AI's first design held the whole catalogue in memory. I caught it when the App Service plan hit 82 per cent and moved the work to the store.

What the AI wrote, what I decided

07Tech stack

  •    
  •    
  •    

Read from the build, never typed by hand

What TheYard runs on

What we use, where it runs, its AWS twin, the version as built, and the file that proves it.

Cloud patterns, not one vendor: every Azure piece in this stack has a named AWS twin. Mapped, not yet run on AWS.

  • .NET 1114 projects
  • React 19.3TypeScript 7.0
  • Azure9 Bicep files
  • 11GitHub Actions workflows
The whole stack, with the file that proves each line

The last release the gate stopped was 1.0.5.258 on 2 December, at its browser 1 of 2 job.

08How it is built

09How it is run

10Who and why

Next step

11What has to work, where is it today, and what does success look like?

Book 20 minutes opens an email to me with those three questions in it, and I answer with a time.

Book 20 minutes

Your email app should have opened with this message. If it did not, copy it and send it from any mailbox.

Or message me on LinkedIn