{"canonical_url":"https://engineer.company/glossary/authentication/","content_markdown":"# Authentication\n\n## What it is\n\nAuthentication is the check a system makes before it accepts a claimed identity:\nsomeone says “I am this account”, and the system asks for evidence that only the\nholder of that account should be able to produce. Engineers often shorten it to\nauthn, and interfaces call the same moment “sign in” or “log in”.\n\nIdentification is the claim itself, such as typing a username. Authentication is\nthe evidence for that claim. Authorization is the separate decision, made\nafterwards, about what the now-known identity is allowed to do. Even HTTP blurs\nthe line: RFC 9110 names status code 401 “Unauthorized”, yet defines it as a\nrequest that lacks valid authentication credentials, and obliges the server to\nsend a WWW-Authenticate header describing how to supply them. The code for “we\nknow who you are, and the answer is still no” is 403 Forbidden.\n\n```http\nHTTP/1.1 401 Unauthorized\nWWW-Authenticate: Bearer realm=\"api\"\n```\n\nThe evidence comes in kinds, usually called factors. Something you know is a\npassword or a PIN. Something you have is a phone, a hardware security key or a\nprivate key file. Something you are is a fingerprint or a face. Multi-factor\nauthentication combines two different kinds, so that a thief who obtains one\nstill lacks the other. Two passwords are still one factor.\n\nMuch of it involves no person at all. Services present API tokens to each other,\nand SSH shows the machine-shaped version clearly: RFC 4252 makes “publickey” the\nonly method every implementation must support, and the client proves it holds a\nprivate key by signing with it, so the key never crosses the network. Single\nsign-on moves the check elsewhere. With OpenID Connect an identity provider\nauthenticates the user and hands the application a signed ID token, so the\napplication never sees a password. Passkeys, built on the W3C Web Authentication\nAPI, keep a private key on the device, scoped to one website, and sign the\nserver’s challenge together with the origin the browser is actually talking to,\nso a lookalike domain receives nothing it can replay.\n\n## Why it matters\n\nEvery other control assumes this one worked. Permissions, audit logs, rate\nlimits and billing are all keyed on an identity, and if the check that set the\nidentity is weak, each of them faithfully applies to the wrong party. A log line\nsaying an administrator deleted a table records which account did it, and only\ngood authentication turns that into who.\n\nThe practical decision is how strong the check must be for each door, and NIST\nSP 800-63B gives the clearest scale to decide with. Its first assurance level,\nAAL1, accepts a single factor. AAL2 requires two factors, and a verifier at that\nlevel must offer at least one phishing-resistant option. AAL3 requires a\nphishing-resistant authenticator whose private key cannot be exported. The\nguideline is blunt about one popular choice: codes typed in by hand, whether\nsent by text message or shown in an app, are not phishing-resistant, because\nnothing ties the typed digits to the site that asked for them.\n\nRevision 4 of the same document, which superseded revision 3 on 1 August 2025,\nalso settled several arguments about passwords. A password used as the only\nfactor must be at least 15 characters long, and one used only inside\nmulti-factor login at least 8. Verifiers may impose no other composition rules\nand may not demand periodic changes, but must force a change when there is\nevidence of compromise. New passwords are checked against a blocklist of common\nand breached ones, the user is told why a choice was refused, and the stored\nform is salted and hashed with a scheme that has a cost factor. Consecutive\nfailed attempts against one authenticator are capped at 100. For sessions at\nAAL2 it recommends asking again at least every 24 hours, and after an hour\nwithout activity.\n\nOur recommendation follows from that. Where users already hold an account with a\ncompetent identity provider, let that provider do the check and accept its\nsigned answer, because a password the application never stores is one it can\nnever leak. Where the application must keep passwords, follow 800-63B literally\nrather than by memory, and put a phishing-resistant method in front of anything\nadministrative.\n\n## What it looks like in practice\n\nWhen the company moved its source code onto\n[its own git server](/portfolio/your-code-on-your-own-hardware/),\nauthentication was the first item on the list of what running a forge means. The\nforge chosen is SSH-first and has no administrative web interface, so the way in\nis a key. A session that arrives anonymously is turned away, as is one that\narrives without a key, and every declared repository is marked private besides.\nThe listener that checks those keys, on port 23231, accepts connections from\nthe loopback interface alone, so every login from outside first passes through\na jump host, and the firewall’s declared surface stays the same size.\n\nThe same concern looks different at the scale of a whole organisation. In an\nearlier role as Infrastructure Engineer, the work was consolidating identities\nand access across\n[M365, 1Password, Red Hat SSO and OKTA SSO](/portfolio/led-access-management-across-m365-and-sso/),\nwhere permissions had been granted ad hoc, over time, by different people. Least\nprivilege was enforced, and onboarding and offboarding were standardised so that\naccess was revoked promptly instead of lingering after someone moved on.\nUnauthorised-access risk dropped sharply and access became auditable: the team\ncould finally answer “who can reach this, and why”.\n\nAuthentication also has a face, and users judge it by its error messages. On\n[one application’s sign-in against a major mail provider](/portfolio/rewrote-error-messages-to-stop-blaming-users/),\nthe message said the password was incorrect. The password was right; the\nprovider requires an application-specific password for third-party clients and\nrejects the account password however carefully it is typed. The message was\nrewritten to name the provider, say that it requires an app-specific password\nfor other clients, and say where to create one. A test now drives that refusal\nand asserts that the message contains the provider’s name and the required\ncredential type, so the old wording cannot return unnoticed.\n\n## Where it goes wrong\n\n- **The message blames the user for a cause elsewhere.** A locked account, an\n  expired password, a clock drifting out of step with a code generator and a\n  provider demanding a different credential all arrive as “wrong password”, and\n  the user retypes something that will never work. Name the cause the user can\n  act on, while keeping the reply identical for an account that exists and one\n  that does not, so the form gives nobody a list of valid usernames.\n- **A phishing page relays the code in real time.** The user types a password\n  and a six-digit code into a copy of the real page, which forwards both to the\n  genuine site within the 30 seconds that RFC 6238 recommends as the default\n  time step. One-time codes stop stolen and reused passwords; they do little\n  against a live relay. Origin-bound keys such as passkeys sign for one site\n  only, which is why NIST counts them as phishing-resistant and typed codes not.\n- **Credentials outlive the people who held them.** Offboarding closes the\n  account in the directory, while an SSH key in an `authorized_keys` file, a\n  personal access token and a shared administrator password carry on working.\n  Each credential needs an owner, a place where it is recorded and a date when\n  someone looks at it again.\n- **The session stays valid long after the sign-in.** A cookie or token that\n  lasts for months is a password with a long fuse. Signing out has to end the\n  session on the server, not just delete the cookie in one browser, and a\n  self-contained token that the server never checks back on stays usable until\n  it expires, whatever happens to the account.\n- **Account recovery is the weakest entrance.** A strong login beside a reset\n  link sent to an email address makes the mailbox the real credential. Recovery\n  deserves the same scrutiny as the front door, because an attacker will pick\n  whichever one is weaker.\n\n## Further reading\n\n- [NIST SP 800-63B-4](https://pages.nist.gov/800-63-4/sp800-63b.html) — the\n  current text: assurance levels, the 15-character password minimum and what\n  counts as phishing-resistant.\n- [NIST SP 800-63B, revision 3](https://pages.nist.gov/800-63-3/sp800-63b.html)\n  — the 2017 authentication guideline, kept online and marked as superseded by\n  revision 4 from 1 August 2025.\n- [RFC 9110, section 11: HTTP Authentication](https://www.rfc-editor.org/rfc/rfc9110.html#section-11)\n  — the challenge and response behind 401, WWW-Authenticate and the\n  Authorization header.\n- [RFC 4252: The SSH Authentication Protocol](https://www.rfc-editor.org/rfc/rfc4252.html)\n  — public-key, password and host-based login as SSH defines them.\n- [RFC 6238: TOTP](https://www.rfc-editor.org/rfc/rfc6238.html) — how\n  authenticator apps derive their short codes from a shared secret and the\n  clock.\n- [Web Authentication, Level 3](https://www.w3.org/TR/webauthn-3/) — the W3C API\n  behind passkeys and its origin-scoped public-key credentials.\n\n\u003chttps://engineer.company/glossary/authentication/\u003e\n","date_modified":"2026-10-20T21:59:50Z","description":"How a system checks who is asking, from passwords and SSH keys to passkeys and single sign-on, what NIST now requires, and where sign-in breaks.","formats":{"gemtext":"https://engineer.company/glossary/authentication/index.gmi","gopher":"https://engineer.company/glossary/authentication/gophermap","html":"https://engineer.company/glossary/authentication/","json":"https://engineer.company/glossary/authentication/index.json","markdown":"https://engineer.company/glossary/authentication/index.md","pdf":"https://engineer.company/glossary/authentication/index.pdf"},"kind":"page","language":"en","title":"What is authentication?","url":"https://engineer.company/glossary/authentication/","version":1}