Phase 1: app, Kanidm login, people, passports, addresses, audit log
visa.buildfor.life keeps the immigration records of the foreigners B4L looks after. This first phase is the base the deadlines and extension packs build on (docs/PLAN.md, phases 2 to 7). - One Rust binary (axum 0.8, minijinja, sqlx on PostgreSQL) with its templates, static files and migrations compiled in. - Login through Kanidm (OpenID Connect with PKCE and a nonce, ES256), client visa-web, group visa; sessions in PostgreSQL keyed by the SHA-256 of the cookie. VISA_INSECURE_NO_LOGIN=1 for loopback development only. - Same-site check and form token on every POST; a CSP without inline script or style; security headers. - People: list with filter, page, create, edit, archive, restore. - Passports from the machine-readable zone with check digits (ICAO 9303 TD3); expiry warnings at 12 and 6 months. - Addresses in Thailand in the order Thai forms use, with the house master and the TM.30 receipt. - Append-only audit log of every view and change, with the names of the changed fields but never their values (PDPA); the Activity page. - Invented demo people (visa seed-demo, refused when login is on). - 40 tests: unit tests, pages with demo data, the forms, the audit log and the whole login against a fake OpenID provider. - CI: gitleaks over the history, fmt, clippy and the tests against PostgreSQL 18; the pre-commit secret scan.
This commit is contained in:
commit
2e009700a9
56 files changed
+11193
No files matched your search
@@ -0,0 +1,46 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<title>{{ title }} · visa.buildfor.life</title>
|
||||
<script src="/static/theme-init.js?v={{ v }}"></script>
|
||||
<link rel="icon" href="/static/favicon.svg?v={{ v }}" type="image/svg+xml">
|
||||
<link rel="stylesheet" href="/static/app.css?v={{ v }}">
|
||||
<script src="/static/app.js?v={{ v }}" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<header class="top">
|
||||
<a class="brand" href="/people" aria-label="visa.buildfor.life, the people">
|
||||
{% include "_mark.html" %}
|
||||
<span class="nm">Visa</span><span class="sub">buildfor.life</span>
|
||||
</a>
|
||||
<button type="button" class="ib" id="themeBtn" aria-label="Switch between light and dark" title="Switch between light and dark">◐</button>
|
||||
</header>
|
||||
<div class="app">
|
||||
<aside class="side">
|
||||
<nav class="nav" aria-label="Sections">
|
||||
<a href="/people"{% if nav == "people" %} class="on" aria-current="page"{% endif %}>People</a>
|
||||
<a href="/activity"{% if nav == "activity" %} class="on" aria-current="page"{% endif %}>Activity</a>
|
||||
</nav>
|
||||
<div class="who">
|
||||
{% if user.local %}
|
||||
<span class="k">Local development</span>
|
||||
<b>No login</b>
|
||||
<p>VISA_INSECURE_NO_LOGIN is set; this only runs on a loopback address.</p>
|
||||
{% else %}
|
||||
<span class="k">Signed in as</span>
|
||||
<b>{{ user.name }}</b>
|
||||
<p>{{ user.login }} at id.cnx.network</p>
|
||||
<form method="post" action="/logout" class="inline-form"><input type="hidden" name="csrf" value="{{ csrf }}"><button type="submit" class="btn sm ghost">Sign out</button></form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</aside>
|
||||
<main id="main">
|
||||
{% block main %}{% endblock %}
|
||||
<footer class="ft">visa.buildfor.life {{ version }}. Every view and change of a person's record is written to the Activity log. Dates are in Chiang Mai time.</footer>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user