Progmasoft Git

progmaweb

The site and account service of Progmasoft: a Next.js frontend and an ASP.NET Core API.

Clonegit clone https://git.progmasoft.com/progmaweb

Ask for the Privacy and Security Policies at registration

progmasoft.com/privacy and progmasoft.com/security publish the two
policies in en-US, de-DE, ru-RU and he-IL, and the footer links both.
The Privacy Policy says what an account keeps and that Progmasoft keeps
an IP address for one purpose only: with a ViGet upload, to establish
where an upload that turns out to be malicious software came from and
to give it to the competent authorities. It says that no data, the IP
address included, is sold, rented or traded. The Security Policy covers
passwords, sessions, HTTPS, the ban on malicious software in ViGet and
how to report a weakness.

The registration form asks the person to accept both policies, and the
API refuses a registration without that acceptance, with a password
(acceptPolicies, a validation error of that field) or through Google:
the start of a Google registration without acceptPolicies=true goes
back to /register?google=policies-required, and the completion creates
no account unless the authentication state carries the current version.
An account keeps the version it accepted and the moment, in two new
columns that schema step 2 adds; accounts created before it keep null.
PolicyAcceptance.CurrentVersion and policyVersion on the web side name
the same date, and a web test reads the C# constant to keep them equal.
Commit
53fb8b8bde857025d12655ae53857fc30226b186
Author
Leitwolf11 ·
Parents
8f18eba55a89

Files · Download .tar.gz

Changes

 apps/api-tests/AccountEndpointTests.cs       |  58 +++++++++++--
 apps/api-tests/AccountServiceTests.cs        |  64 ++++++++++++++-
 apps/api-tests/AccountStoreContractTests.cs  |  20 +++++
 apps/api-tests/AccountStoreSelectionTests.cs |   9 ++-
 apps/api-tests/OAuthTestClient.cs            |   2 +-
 apps/api-tests/SessionLifetimeTests.cs       |   2 +-
 apps/api-tests/UnconfiguredGoogleTests.cs    |   2 +-
 apps/api/Accounts/AccountContracts.cs        |  10 ++-
 apps/api/Accounts/AccountEndpoints.cs        |  18 ++++-
 apps/api/Accounts/AccountRecord.cs           |   9 ++-
 apps/api/Accounts/AccountSchema.cs           |  11 +++
 apps/api/Accounts/AccountService.cs          |  31 ++++++-
 apps/api/Accounts/PolicyAcceptance.cs        |  20 +++++
 apps/api/Accounts/PostgresAccountStore.cs    |  17 +++-
 apps/web/app/globals.css                     |  17 ++++
 apps/web/app/privacy/layout.tsx              |  11 +++
 apps/web/app/privacy/page.tsx                |  13 +++
 apps/web/app/register/page.tsx               |   1 +
 apps/web/app/security/layout.tsx             |  11 +++
 apps/web/app/security/page.tsx               |  13 +++
 apps/web/app/site.css                        |  32 ++++++++
 apps/web/app/sitemap.ts                      |  10 +++
 apps/web/components/AuthForm.tsx             |  34 ++++++++
 apps/web/components/Footer.tsx               |   5 ++
 apps/web/components/PolicyPage.tsx           |  61 ++++++++++++++
 apps/web/lib/localization.ts                 |  36 +++++++++
 apps/web/lib/policies.ts                     |  43 ++++++++++
 apps/web/lib/policies/de-DE.ts               | 117 +++++++++++++++++++++++++++
 apps/web/lib/policies/en-US.ts               | 117 +++++++++++++++++++++++++++
 apps/web/lib/policies/he-IL.ts               | 116 ++++++++++++++++++++++++++
 apps/web/lib/policies/ru-RU.ts               | 117 +++++++++++++++++++++++++++
 apps/web/lib/policy-messages.ts              |  21 +++++
 apps/web/tests/policies.test.mjs             |  73 +++++++++++++++++
 33 files changed, 1096 insertions(+), 25 deletions(-)

diff --git a/apps/api-tests/AccountEndpointTests.cs b/apps/api-tests/AccountEndpointTests.cs
index c5c305e..50d43d5 100644
--- a/apps/api-tests/AccountEndpointTests.cs
+++ b/apps/api-tests/AccountEndpointTests.cs
@@ -22,7 +22,7 @@ public sealed class AccountEndpointTests
         using HttpClient client = factory.CreateAccountClient(handleCookies: false);
 
         HttpResponseMessage response = await client.GetAsync(
-            "/api/v1/accounts/oauth/google/start?accountName=GoogleUser",
+            "/api/v1/accounts/oauth/google/start?accountName=GoogleUser&acceptPolicies=true",
             TestContext.Current.CancellationToken);
 
         Assert.Equal(HttpStatusCode.Redirect, response.StatusCode);
@@ -62,6 +62,47 @@ public sealed class AccountEndpointTests
         Assert.Equal("/register?google=invalid-account-name", response.Headers.Location?.OriginalString);
     }
 
+    [Theory]
+    [InlineData("/api/v1/accounts/oauth/google/start?accountName=GoogleUser")]
+    [InlineData("/api/v1/accounts/oauth/google/start?accountName=GoogleUser&acceptPolicies=false")]
+    public async Task GoogleRegistrationWithoutThePoliciesStaysOnTheSite(string start)
+    {
+        await using AccountApiFactory factory = new();
+        using HttpClient client = factory.CreateAccountClient(handleCookies: false);
+
+        HttpResponseMessage response = await client.GetAsync(start, TestContext.Current.CancellationToken);
+
+        Assert.Equal(HttpStatusCode.Redirect, response.StatusCode);
+        Assert.Equal("/register?google=policies-required", response.Headers.Location?.OriginalString);
+    }
+
+    [Theory]
+    [InlineData(null)]
+    [InlineData(false)]
+    public async Task RegistrationWithoutThePoliciesIsRefused(bool? acceptPolicies)
+    {
+        await using AccountApiFactory factory = new();
+        using HttpClient client = factory.CreateAccountClient();
+
+        HttpResponseMessage response = await client.PostAsJsonAsync("/api/v1/accounts/register", new
+        {
+            accountName = "PolicyUser",
+            email = "policy@example.com",
+            password = "a-long-development-password",
+            acceptPolicies
+        }, TestContext.Current.CancellationToken);
+
+        Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
+        using JsonDocument problem = JsonDocument.Parse(
+            await response.Content.ReadAsStringAsync(TestContext.Current.CancellationToken));
+        JsonElement messages = problem.RootElement.GetProperty("errors").GetProperty("acceptPolicies");
+        Assert.Equal([PolicyAcceptance.RequiredMessage], messages.EnumerateArray().Select(message => message.GetString()));
+
+        // The refusal kept neither the name nor the address.
+        HttpResponseMessage accepted = await RegisterAsync(client, "PolicyUser", "policy@example.com");
+        Assert.Equal(HttpStatusCode.Created, accepted.StatusCode);
+    }
+
     [Fact]
     public async Task GoogleCompleteDoesNotIssueASessionForAnExistingPasswordAccountWithTheSameEmail()
     {
@@ -109,7 +150,8 @@ public sealed class AccountEndpointTests
         {
             accountName = "PrimaryUser",
             email = "leitwolf1112@gmail.com",
-            password = "a-long-development-password"
+            password = "a-long-development-password",
+            acceptPolicies = true
         }, TestContext.Current.CancellationToken);
 
         Assert.Equal(HttpStatusCode.Created, registration.StatusCode);
@@ -139,7 +181,8 @@ public sealed class AccountEndpointTests
         {
             accountName = "LogoutUser",
             email = "logout@example.com",
-            password = "a-long-development-password"
+            password = "a-long-development-password",
+            acceptPolicies = true
         }, TestContext.Current.CancellationToken);
         Assert.Equal(HttpStatusCode.Created, registration.StatusCode);
 
@@ -165,7 +208,8 @@ public sealed class AccountEndpointTests
         {
             accountName,
             email = $"{Guid.NewGuid():N}@example.com",
-            password = "a-long-development-password"
+            password = "a-long-development-password",
+            acceptPolicies = true
         }, TestContext.Current.CancellationToken);
 
         Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
@@ -229,7 +273,8 @@ public sealed class AccountEndpointTests
         HttpResponseMessage missing = await client.PostAsJsonAsync("/api/v1/accounts/login", new
         {
             email = "missing@example.com",
-            password = "a-long-development-password"
+            password = "a-long-development-password",
+            acceptPolicies = true
         }, TestContext.Current.CancellationToken);
         HttpResponseMessage wrong = await client.PostAsJsonAsync("/api/v1/accounts/login", new
         {
@@ -284,6 +329,7 @@ public sealed class AccountEndpointTests
         {
             accountName,
             email,
-            password = "a-long-development-password"
+            password = "a-long-development-password",
+            acceptPolicies = true
         }, TestContext.Current.CancellationToken);
 }
diff --git a/apps/api-tests/AccountServiceTests.cs b/apps/api-tests/AccountServiceTests.cs
index 0ff7b33..27863bf 100644
--- a/apps/api-tests/AccountServiceTests.cs
+++ b/apps/api-tests/AccountServiceTests.cs
@@ -23,6 +23,7 @@ public sealed class AccountServiceTests
                 null,
                 "google@example.com",
                 "GoogleUser",
+                PolicyAcceptance.CurrentVersion,
                 sessions,
                 TestContext.Current.CancellationToken);
 
@@ -44,7 +45,8 @@ public sealed class AccountServiceTests
             new RegisterAccountRequest(
                 "PasswordUser",
                 "unverified@example.com",
-                "a-long-development-password"),
+                "a-long-development-password",
+                true),
             sessions,
             TestContext.Current.CancellationToken);
         Assert.NotNull(registration);
@@ -54,6 +56,7 @@ public sealed class AccountServiceTests
                 "google-subject-victim",
                 "unverified@example.com",
                 null,
+                null,
                 sessions,
                 TestContext.Current.CancellationToken);
 
@@ -85,6 +88,7 @@ public sealed class AccountServiceTests
                 "google-subject-race",
                 "race@example.com",
                 "GoogleUser",
+                PolicyAcceptance.CurrentVersion,
                 sessions,
                 TestContext.Current.CancellationToken);
 
@@ -107,6 +111,7 @@ public sealed class AccountServiceTests
                 "google-subject-stable",
                 "google@example.com",
                 "GoogleUser",
+                PolicyAcceptance.CurrentVersion,
                 sessions,
                 TestContext.Current.CancellationToken);
 
@@ -115,6 +120,7 @@ public sealed class AccountServiceTests
                 "google-subject-stable",
                 "changed@example.com",
                 null,
+                null,
                 sessions,
                 TestContext.Current.CancellationToken);
 
@@ -125,6 +131,62 @@ public sealed class AccountServiceTests
         Assert.Equal(first.Account.Id, second.Account.Id);
     }
 
+    [Fact]
+    public async Task RegistrationKeepsTheVersionOfThePoliciesAndTheMoment()
+    {
+        InMemoryAccountStore store = new();
+        AccountService accounts = new(store, TimeProvider.System);
+        SessionService sessions = new(
+            store,
+            TimeProvider.System,
+            Options.Create(new AccountSessionOptions()));
+
+        (AuthenticatedAccount? password, _) = await accounts.RegisterAsync(
+            new RegisterAccountRequest("PasswordUser", "password@example.com", "a-long-development-password", true),
+            sessions,
+            TestContext.Current.CancellationToken);
+        (AuthenticatedAccount? google, _) = await accounts.AuthenticateGoogleAsync(
+            "google-subject-policies",
+            "google@example.com",
+            "GoogleUser",
+            PolicyAcceptance.CurrentVersion,
+            sessions,
+            TestContext.Current.CancellationToken);
+
+        foreach (AuthenticatedAccount? authentication in new[] { password, google })
+        {
+            Assert.NotNull(authentication);
+            Assert.Equal(PolicyAcceptance.CurrentVersion, authentication.Account.PoliciesVersion);
+            Assert.Equal(authentication.Account.CreatedAt, authentication.Account.PoliciesAcceptedAt);
+        }
+    }
+
+    [Theory]
+    [InlineData(null)]
+    [InlineData("2020-01-01")]
+    public async Task GoogleAuthenticationCreatesNoAccountWithoutTheCurrentPolicies(string? policies)
+    {
+        InMemoryAccountStore store = new();
+        AccountService accounts = new(store, TimeProvider.System);
+        SessionService sessions = new(
+            store,
+            TimeProvider.System,
+            Options.Create(new AccountSessionOptions()));
+
+        (AuthenticatedAccount? authentication, GoogleAccountFailure failure) =
+            await accounts.AuthenticateGoogleAsync(
+                "google-subject-new",
+                "new@example.com",
+                "GoogleUser",
+                policies,
+                sessions,
+                TestContext.Current.CancellationToken);
+
+        Assert.Null(authentication);
+        Assert.Equal(GoogleAccountFailure.PoliciesRequired, failure);
+        Assert.Null(await store.FindByGoogleSubjectAsync("google-subject-new", TestContext.Current.CancellationToken));
+    }
+
     private sealed class ConcurrentPasswordRegistrationStore(AccountRecord passwordAccount) : IAccountStore
     {
         private bool createAttempted;
diff --git a/apps/api-tests/AccountStoreContractTests.cs b/apps/api-tests/AccountStoreContractTests.cs
index 2266273..f9f36be 100644
--- a/apps/api-tests/AccountStoreContractTests.cs
+++ b/apps/api-tests/AccountStoreContractTests.cs
@@ -65,6 +65,26 @@ public abstract class AccountStoreContractTests
         Assert.Equal("AQAAAA-hash", found.PasswordHash);
         Assert.Equal("Grace", found.AccountName);
         Assert.Equal("grace@example.com", found.Email);
+        Assert.Null(found.PoliciesVersion);
+        Assert.Null(found.PoliciesAcceptedAt);
+    }
+
+    [Fact]
+    public async Task AnAccountKeepsThePoliciesItAccepted()
+    {
+        IAccountStore store = await CreateStoreAsync();
+        AccountRecord account = Account("Hopper", "hopper@example.com") with
+        {
+            PoliciesVersion = PolicyAcceptance.CurrentVersion,
+            PoliciesAcceptedAt = Moment
+        };
+
+        AccountRecord stored = Assert.IsType<AccountRecord>((await store.CreateAsync(account, Cancellation)).Account);
+
+        AccountRecord found = Assert.IsType<AccountRecord>(await store.FindByIdAsync(account.Id, Cancellation));
+        Assert.Equal(stored, found);
+        Assert.Equal(PolicyAcceptance.CurrentVersion, found.PoliciesVersion);
+        Assert.True((Moment - found.PoliciesAcceptedAt!.Value).Duration() < TimeSpan.FromMicroseconds(1));
     }
 
     [Fact]
diff --git a/apps/api-tests/AccountStoreSelectionTests.cs b/apps/api-tests/AccountStoreSelectionTests.cs
index 1087575..f1153dd 100644
--- a/apps/api-tests/AccountStoreSelectionTests.cs
+++ b/apps/api-tests/AccountStoreSelectionTests.cs
@@ -223,7 +223,8 @@ public sealed class DurableAccountApiTests
             {
                 accountName = "Survivor",
                 email = "survivor@example.com",
-                password = "a-long-development-password"
+                password = "a-long-development-password",
+                acceptPolicies = true
             }, TestContext.Current.CancellationToken);
             Assert.Equal(HttpStatusCode.Created, registration.StatusCode);
             cookie = await SessionCookieAsync(registration);
@@ -244,7 +245,8 @@ public sealed class DurableAccountApiTests
         HttpResponseMessage login = await restarted.PostAsJsonAsync("/api/v1/accounts/login", new
         {
             email = "survivor@example.com",
-            password = "a-long-development-password"
+            password = "a-long-development-password",
+            acceptPolicies = true
         }, TestContext.Current.CancellationToken);
         Assert.Equal(HttpStatusCode.OK, login.StatusCode);
 
@@ -252,7 +254,8 @@ public sealed class DurableAccountApiTests
         {
             accountName = "survivor",
             email = "other@example.com",
-            password = "a-long-development-password"
+            password = "a-long-development-password",
+            acceptPolicies = true
         }, TestContext.Current.CancellationToken);
         Assert.Equal(HttpStatusCode.BadRequest, again.StatusCode);
 
diff --git a/apps/api-tests/OAuthTestClient.cs b/apps/api-tests/OAuthTestClient.cs
index a176c04..a5d342d 100644
--- a/apps/api-tests/OAuthTestClient.cs
+++ b/apps/api-tests/OAuthTestClient.cs
@@ -37,7 +37,7 @@ internal sealed class OAuthTestClient(AccountApiFactory factory)
     {
         using HttpClient accounts = factory.CreateAccountClient(handleCookies: false);
         HttpResponseMessage registered = await accounts.PostAsJsonAsync("/api/v1/accounts/register",
-            new { accountName, email, password = "correct horse battery staple" }, Cancel);
+            new { accountName, email, password = "correct horse battery staple", acceptPolicies = true }, Cancel);
         Assert.Equal(HttpStatusCode.Created, registered.StatusCode);
         // The console knows the account of the Progmasoft account session; it has no sign-in of its own.
         string session = registered.Headers.GetValues("Set-Cookie")
diff --git a/apps/api-tests/SessionLifetimeTests.cs b/apps/api-tests/SessionLifetimeTests.cs
index 8626186..aa9d9ea 100644
--- a/apps/api-tests/SessionLifetimeTests.cs
+++ b/apps/api-tests/SessionLifetimeTests.cs
@@ -22,7 +22,7 @@ public sealed class SessionLifetimeTests
         AccountService accounts = new(store, clock);
         SessionService sessions = new(store, clock, Options.Create(options));
         (AuthenticatedAccount? registration, _) = await accounts.RegisterAsync(
-            new RegisterAccountRequest("LifetimeUser", "lifetime@example.com", "a-long-development-password"),
+            new RegisterAccountRequest("LifetimeUser", "lifetime@example.com", "a-long-development-password", true),
             sessions,
             TestContext.Current.CancellationToken);
         return Assert.IsType<AuthenticatedAccount>(registration).ExpiresAt;
diff --git a/apps/api-tests/UnconfiguredGoogleTests.cs b/apps/api-tests/UnconfiguredGoogleTests.cs
index d4e8c53..9a7ca77 100644
--- a/apps/api-tests/UnconfiguredGoogleTests.cs
+++ b/apps/api-tests/UnconfiguredGoogleTests.cs
@@ -36,7 +36,7 @@ public sealed class UnconfiguredGoogleTests
 
         HttpResponseMessage registration = await client.PostAsJsonAsync(
             "/api/v1/accounts/register",
-            new RegisterAccountRequest("LocalUser1", "local@example.com", password),
+            new RegisterAccountRequest("LocalUser1", "local@example.com", password, true),
             TestContext.Current.CancellationToken);
         Assert.Equal(HttpStatusCode.Created, registration.StatusCode);
 
diff --git a/apps/api/Accounts/AccountContracts.cs b/apps/api/Accounts/AccountContracts.cs
index 4a803a0..c33db6c 100644
--- a/apps/api/Accounts/AccountContracts.cs
+++ b/apps/api/Accounts/AccountContracts.cs
@@ -11,7 +11,15 @@ namespace Progmasoft.Progmaweb.Api.Accounts;
 /// <param name="AccountName">Requested account name; see <see cref="AccountNamePolicy"/>.</param>
 /// <param name="Email">Email address of the account; see <see cref="EmailAddressPolicy"/>.</param>
 /// <param name="Password">Password in plain text; see <see cref="PasswordPolicy"/>. It is hashed before it is stored.</param>
-public sealed record RegisterAccountRequest(string? AccountName, string? Email, string? Password);
+/// <param name="AcceptPolicies">
+/// Whether the person accepted the Privacy Policy and the Security Policy; anything but <see langword="true"/> is
+/// refused. See <see cref="PolicyAcceptance"/>.
+/// </param>
+public sealed record RegisterAccountRequest(
+    string? AccountName,
+    string? Email,
+    string? Password,
+    bool? AcceptPolicies = null);
 
 /// <summary>Body of <c>POST /api/v1/accounts/login</c>.</summary>
 /// <param name="Email">Email address the account was registered with.</param>
diff --git a/apps/api/Accounts/AccountEndpoints.cs b/apps/api/Accounts/AccountEndpoints.cs
index f15b1be..72d0bbc 100644
--- a/apps/api/Accounts/AccountEndpoints.cs
+++ b/apps/api/Accounts/AccountEndpoints.cs
@@ -48,12 +48,15 @@ internal static class AccountEndpoints
     /// <param name="accountName">
     /// Account name to create when the Google identity is new; omitted when signing in to an existing account.
     /// </param>
+    /// <param name="acceptPolicies">
+    /// Whether the person accepted the Privacy Policy and the Security Policy; required with an account name.
+    /// </param>
     /// <param name="configuration">Application configuration with the Google client credentials.</param>
     /// <returns>
     /// A challenge that sends the browser to Google, a redirect back to registration when the name is invalid, or
     /// 503 when Google sign-in is not configured.
     /// </returns>
-    private static IResult StartGoogleAsync(string? accountName, IConfiguration configuration)
+    private static IResult StartGoogleAsync(string? accountName, bool? acceptPolicies, IConfiguration configuration)
     {
         if (string.IsNullOrWhiteSpace(configuration["Authentication:Google:ClientId"]) ||
             string.IsNullOrWhiteSpace(configuration["Authentication:Google:ClientSecret"]))
@@ -70,6 +73,13 @@ internal static class AccountEndpoints
             return Results.Redirect("/register?google=invalid-account-name");
         }
 
+        // A registration leaves for Google only after the person accepted the policies, so a refusal is shown on
+        // the form rather than after the round trip.
+        if (normalized is not null && acceptPolicies is not true)
+        {
+            return Results.Redirect("/register?google=policies-required");
+        }
+
         AuthenticationProperties properties = new()
         {
             RedirectUri = "/api/v1/accounts/oauth/google/complete"
@@ -77,6 +87,7 @@ internal static class AccountEndpoints
         if (normalized is not null)
         {
             properties.Items["accountName"] = normalized;
+            properties.Items["policies"] = PolicyAcceptance.CurrentVersion;
         }
 
         return Results.Challenge(properties, [GoogleDefaults.AuthenticationScheme]);
@@ -104,8 +115,10 @@ internal static class AccountEndpoints
         string? subject = external.Principal.FindFirstValue(ClaimTypes.NameIdentifier);
         string? accountName = null;
         external.Properties?.Items.TryGetValue("accountName", out accountName);
+        string? policies = null;
+        external.Properties?.Items.TryGetValue("policies", out policies);
         (AuthenticatedAccount? authentication, GoogleAccountFailure failure) =
-            await accounts.AuthenticateGoogleAsync(subject, email, accountName, sessions, cancellationToken);
+            await accounts.AuthenticateGoogleAsync(subject, email, accountName, policies, sessions, cancellationToken);
         await context.SignOutAsync(ExternalCookieScheme);
 
         if (authentication is null)
@@ -115,6 +128,7 @@ internal static class AccountEndpoints
                 GoogleAccountFailure.AccountNameRequired => "/register?google=account-name-required",
                 GoogleAccountFailure.InvalidAccountName => "/register?google=invalid-account-name",
                 GoogleAccountFailure.AccountNameUnavailable => "/register?google=account-name-unavailable",
+                GoogleAccountFailure.PoliciesRequired => "/register?google=policies-required",
                 _ => "/login?google=failed"
             };
             return Results.Redirect(destination);
diff --git a/apps/api/Accounts/AccountRecord.cs b/apps/api/Accounts/AccountRecord.cs
index 5e27f3e..4139043 100644
--- a/apps/api/Accounts/AccountRecord.cs
+++ b/apps/api/Accounts/AccountRecord.cs
@@ -16,6 +16,11 @@ namespace Progmasoft.Progmaweb.Api.Accounts;
 /// ASP.NET Core Identity password hash; <see langword="null"/> for an account that signs in through Google only.
 /// </param>
 /// <param name="CreatedAt">Moment the account was created, in UTC.</param>
+/// <param name="PoliciesVersion">
+/// Version of the policies the owner accepted, <see cref="PolicyAcceptance.CurrentVersion"/> at the time;
+/// <see langword="null"/> for an account created before registration asked for it, or by operations tooling.
+/// </param>
+/// <param name="PoliciesAcceptedAt">Moment the owner accepted them, in UTC; null when the version is.</param>
 internal sealed record AccountRecord(
     Guid Id,
     string AccountName,
@@ -24,7 +29,9 @@ internal sealed record AccountRecord(
     string NormalizedEmail,
     string? GoogleSubject,
     string? PasswordHash,
-    DateTimeOffset CreatedAt);
+    DateTimeOffset CreatedAt,
+    string? PoliciesVersion = null,
+    DateTimeOffset? PoliciesAcceptedAt = null);
 
 /// <summary>A session as the store keeps it.</summary>
 /// <param name="TokenDigest">SHA-256 digest of the session token. The token itself is never stored.</param>
diff --git a/apps/api/Accounts/AccountSchema.cs b/apps/api/Accounts/AccountSchema.cs
index 3fc3707..eda80c0 100644
--- a/apps/api/Accounts/AccountSchema.cs
+++ b/apps/api/Accounts/AccountSchema.cs
@@ -53,6 +53,17 @@ internal static class AccountSchema
 
         CREATE INDEX sessions_expires_at_idx ON sessions (expires_at);
         CREATE INDEX sessions_account_id_idx ON sessions (account_id);
+        """,
+        // 2: the policies an account accepted at registration.
+        //
+        // Accounts created before step 2 accepted none, and keep null in both columns; the constraint keeps the
+        // version and the moment together.
+        """
+        ALTER TABLE accounts
+            ADD COLUMN policies_version     text,
+            ADD COLUMN policies_accepted_at timestamptz,
+            ADD CONSTRAINT accounts_policies_check
+                CHECK ((policies_version IS NULL) = (policies_accepted_at IS NULL));
         """
     ];
 
diff --git a/apps/api/Accounts/AccountService.cs b/apps/api/Accounts/AccountService.cs
index 40e971d..996e222 100644
--- a/apps/api/Accounts/AccountService.cs
+++ b/apps/api/Accounts/AccountService.cs
@@ -38,7 +38,7 @@ internal sealed class AccountService(
     /// <param name="cancellationToken">Cancels the operation.</param>
     /// <returns>
     /// The signed-in account and no errors, or no account and the messages of each refused field, keyed by
-    /// <c>accountName</c>, <c>email</c> and <c>password</c>.
+    /// <c>accountName</c>, <c>email</c>, <c>password</c> and <c>acceptPolicies</c>.
     /// </returns>
     public async ValueTask<(AuthenticatedAccount? Authentication, Dictionary<string, string[]> Errors)> RegisterAsync(
         RegisterAccountRequest request,
@@ -52,6 +52,7 @@ internal sealed class AccountService(
             return (null, errors);
         }
 
+        DateTimeOffset now = timeProvider.GetUtcNow();
         AccountRecord provisional = new(
             Guid.NewGuid(),
             accountName,
@@ -60,7 +61,9 @@ internal sealed class AccountService(
             normalizedEmail,
             null,
             string.Empty,
-            timeProvider.GetUtcNow());
+            now,
+            PolicyAcceptance.CurrentVersion,
+            now);
 
         string passwordHash = passwordHasher.HashPassword(provisional, request.Password!);
         AccountRecord account = provisional with { PasswordHash = passwordHash };
@@ -148,6 +151,10 @@ internal sealed class AccountService(
     /// <param name="providerSubject">Subject identifier Google issued for the identity.</param>
     /// <param name="providerEmail">Email address Google reported for the identity.</param>
     /// <param name="requestedAccountName">Account name to create for a new identity; may be <see langword="null"/>.</param>
+    /// <param name="acceptedPolicies">
+    /// Version of the policies the person accepted before leaving for Google; a new identity creates an account only
+    /// when it is <see cref="PolicyAcceptance.CurrentVersion"/>.
+    /// </param>
     /// <param name="sessions">Session service.</param>
     /// <param name="cancellationToken">Cancels the operation.</param>
     /// <returns>The signed-in account, or no account and the reason.</returns>
@@ -156,6 +163,7 @@ internal sealed class AccountService(
             string? providerSubject,
             string? providerEmail,
             string? requestedAccountName,
+            string? acceptedPolicies,
             SessionService sessions,
             CancellationToken cancellationToken)
     {
@@ -191,6 +199,12 @@ internal sealed class AccountService(
             return (null, GoogleAccountFailure.InvalidAccountName);
         }
 
+        if (acceptedPolicies != PolicyAcceptance.CurrentVersion)
+        {
+            return (null, GoogleAccountFailure.PoliciesRequired);
+        }
+
+        DateTimeOffset now = timeProvider.GetUtcNow();
         AccountRecord account = new(
             Guid.NewGuid(),
             accountName,
@@ -199,7 +213,9 @@ internal sealed class AccountService(
             normalizedEmail,
             providerSubject,
             null,
-            timeProvider.GetUtcNow());
+            now,
+            PolicyAcceptance.CurrentVersion,
+            now);
         CreateAccountResult result = await store.CreateAsync(account, cancellationToken);
 
         if (result.Status is CreateAccountStatus.AccountNameUnavailable)
@@ -302,6 +318,11 @@ internal sealed class AccountService(
             errors["password"] = [passwordError];
         }
 
+        if (request.AcceptPolicies is not true)
+        {
+            errors["acceptPolicies"] = [PolicyAcceptance.RequiredMessage];
+        }
+
         return errors;
     }
 }
@@ -321,5 +342,7 @@ internal enum GoogleAccountFailure
     /// <summary>The supplied account name breaks <see cref="AccountNamePolicy"/>.</summary>
     InvalidAccountName,
     /// <summary>The supplied account name is taken.</summary>
-    AccountNameUnavailable
+    AccountNameUnavailable,
+    /// <summary>The identity is new and the person did not accept the current policies.</summary>
+    PoliciesRequired
 }
diff --git a/apps/api/Accounts/PolicyAcceptance.cs b/apps/api/Accounts/PolicyAcceptance.cs
new file mode 100644
index 0000000..f31760d
--- /dev/null
+++ b/apps/api/Accounts/PolicyAcceptance.cs
@@ -0,0 +1,20 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+namespace Progmasoft.Progmaweb.Api.Accounts;
+
+/// <summary>The Privacy Policy and Security Policy a new account accepts.</summary>
+/// <remarks>
+/// Registration, with a password or through Google, creates an account only after the person accepted both policies.
+/// The account keeps the version it accepted and the moment, so a later version of the policies can tell who has
+/// accepted it. The text lives on the <c>/privacy</c> and <c>/security</c> pages of the web application, which name
+/// the same version.
+/// </remarks>
+internal static class PolicyAcceptance
+{
+    /// <summary>The version of the policies, the date they took effect.</summary>
+    public const string CurrentVersion = "2026-11-06";
+
+    /// <summary>The message of a registration that did not accept the policies.</summary>
+    public const string RequiredMessage = "Accept the Privacy Policy and the Security Policy to create an account.";
+}
diff --git a/apps/api/Accounts/PostgresAccountStore.cs b/apps/api/Accounts/PostgresAccountStore.cs
index 3a3ea82..9f93701 100644
--- a/apps/api/Accounts/PostgresAccountStore.cs
+++ b/apps/api/Accounts/PostgresAccountStore.cs
@@ -25,19 +25,24 @@ internal sealed class PostgresAccountStore(NpgsqlDataSource dataSource) : IAccou
 
     /// <summary>The columns of an account, in the order <see cref="ReadAccount"/> reads them.</summary>
     private const string AccountColumns =
-        "id, account_name, normalized_account_name, email, normalized_email, google_subject, password_hash, created_at";
+        "id, account_name, normalized_account_name, email, normalized_email, google_subject, password_hash, created_at, " +
+        "policies_version, policies_accepted_at";
 
     /// <inheritdoc/>
     public async ValueTask<CreateAccountResult> CreateAsync(AccountRecord account, CancellationToken cancellationToken)
     {
-        AccountRecord stored = account with { CreatedAt = ToStoredPrecision(account.CreatedAt) };
+        AccountRecord stored = account with
+        {
+            CreatedAt = ToStoredPrecision(account.CreatedAt),
+            PoliciesAcceptedAt = account.PoliciesAcceptedAt is { } accepted ? ToStoredPrecision(accepted) : null
+        };
 
         for (int attempt = 0; attempt < CreateAttempts; attempt++)
         {
             // A row that breaks a unique index is skipped instead of raising an error, so that a taken name is an
             // ordinary answer and the transaction log holds no failed statement for it.
             await using (NpgsqlCommand insert = dataSource.CreateCommand(
-                $"INSERT INTO accounts ({AccountColumns}) VALUES ($1, $2, $3, $4, $5, $6, $7, $8) ON CONFLICT DO NOTHING"))
+                $"INSERT INTO accounts ({AccountColumns}) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) ON CONFLICT DO NOTHING"))
             {
                 insert.Parameters.AddWithValue(stored.Id);
                 insert.Parameters.AddWithValue(stored.AccountName);
@@ -47,6 +52,8 @@ internal sealed class PostgresAccountStore(NpgsqlDataSource dataSource) : IAccou
                 insert.Parameters.AddWithValue(NullableText(stored.GoogleSubject));
                 insert.Parameters.AddWithValue(NullableText(stored.PasswordHash));
                 insert.Parameters.AddWithValue(stored.CreatedAt);
+                insert.Parameters.AddWithValue(NullableText(stored.PoliciesVersion));
+                insert.Parameters.Add(new NpgsqlParameter<DateTimeOffset?> { TypedValue = stored.PoliciesAcceptedAt });
                 if (await insert.ExecuteNonQueryAsync(cancellationToken) == 1)
                 {
                     return CreateAccountResult.Created(stored);
@@ -188,7 +195,9 @@ internal sealed class PostgresAccountStore(NpgsqlDataSource dataSource) : IAccou
         reader.GetString(4),
         reader.IsDBNull(5) ? null : reader.GetString(5),
         reader.IsDBNull(6) ? null : reader.GetString(6),
-        reader.GetFieldValue<DateTimeOffset>(7));
+        reader.GetFieldValue<DateTimeOffset>(7),
+        reader.IsDBNull(8) ? null : reader.GetString(8),
+        reader.IsDBNull(9) ? null : reader.GetFieldValue<DateTimeOffset>(9));
 
     /// <summary>Converts an optional text to a parameter value.</summary>
     /// <param name="value">The text, or <see langword="null"/>.</param>
diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css
index c405f30..a56f2e8 100644
--- a/apps/web/app/globals.css
+++ b/apps/web/app/globals.css
@@ -979,6 +979,23 @@ a {
   border-color: var(--accent);
 }
 
+.consent-field {
+  display: flex;
+  align-items: flex-start;
+  gap: 10px;
+  color: var(--ink-650);
+  font-size: 14px;
+  line-height: 1.5;
+}
+
+.consent-field input {
+  flex: none;
+  width: 18px;
+  height: 18px;
+  margin: 2px 0 0;
+  accent-color: var(--violet-600);
+}
+
 .form-switch {
   margin: 0;
   color: var(--ink-650);
diff --git a/apps/web/app/privacy/layout.tsx b/apps/web/app/privacy/layout.tsx
new file mode 100644
index 0000000..6e9ce04
--- /dev/null
+++ b/apps/web/app/privacy/layout.tsx
@@ -0,0 +1,11 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import type { ReactNode } from "react";
+import "../site.css";
+
+export default function PolicyLayout({
+  children,
+}: Readonly<{ children: ReactNode }>) {
+  return children;
+}
diff --git a/apps/web/app/privacy/page.tsx b/apps/web/app/privacy/page.tsx
new file mode 100644
index 0000000..369f652
--- /dev/null
+++ b/apps/web/app/privacy/page.tsx
@@ -0,0 +1,13 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import type { Metadata } from "next";
+import { PolicyPage, policyMetadata } from "@/components/PolicyPage";
+
+export function generateMetadata(): Promise<Metadata> {
+  return policyMetadata("privacy");
+}
+
+export default function Page() {
+  return <PolicyPage kind="privacy" />;
+}
diff --git a/apps/web/app/register/page.tsx b/apps/web/app/register/page.tsx
index fa774bd..87798ef 100644
--- a/apps/web/app/register/page.tsx
+++ b/apps/web/app/register/page.tsx
@@ -29,6 +29,7 @@ export default async function RegisterPage({
     "account-name-required": auth.googleAccountNameRequired,
     "account-name-unavailable": auth.googleAccountNameUnavailable,
     "invalid-account-name": auth.googleInvalidAccountName,
+    "policies-required": auth.googlePoliciesRequired,
   };
   const initialMessage = google ? googleMessages[google] : undefined;
 
diff --git a/apps/web/app/security/layout.tsx b/apps/web/app/security/layout.tsx
new file mode 100644
index 0000000..6e9ce04
--- /dev/null
+++ b/apps/web/app/security/layout.tsx
@@ -0,0 +1,11 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import type { ReactNode } from "react";
+import "../site.css";
+
+export default function PolicyLayout({
+  children,
+}: Readonly<{ children: ReactNode }>) {
+  return children;
+}
diff --git a/apps/web/app/security/page.tsx b/apps/web/app/security/page.tsx
new file mode 100644
index 0000000..1bf1320
--- /dev/null
+++ b/apps/web/app/security/page.tsx
@@ -0,0 +1,13 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import type { Metadata } from "next";
+import { PolicyPage, policyMetadata } from "@/components/PolicyPage";
+
+export function generateMetadata(): Promise<Metadata> {
+  return policyMetadata("security");
+}
+
+export default function Page() {
+  return <PolicyPage kind="security" />;
+}
diff --git a/apps/web/app/site.css b/apps/web/app/site.css
index f9b26c7..3bbeb7b 100644
--- a/apps/web/app/site.css
+++ b/apps/web/app/site.css
@@ -530,3 +530,35 @@
     transform: none;
   }
 }
+
+/* Policies */
+
+.pm-policy-version {
+  margin-top: 16px;
+  color: var(--ink-650);
+  font-size: 0.95rem;
+}
+
+.pm-policy {
+  max-width: 760px;
+}
+
+.pm-policy section + section {
+  margin-top: 40px;
+}
+
+.pm-policy h2 {
+  margin-bottom: 12px;
+  font-size: 1.35rem;
+}
+
+.pm-policy p {
+  margin-block: 0 14px;
+  line-height: 1.7;
+}
+
+.pm-policy-see-also {
+  margin-top: 48px;
+  padding-top: 24px;
+  border-top: 1px solid var(--line);
+}
diff --git a/apps/web/app/sitemap.ts b/apps/web/app/sitemap.ts
index 2c0b47c..714a2fa 100644
--- a/apps/web/app/sitemap.ts
+++ b/apps/web/app/sitemap.ts
@@ -40,5 +40,15 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
       changeFrequency: "weekly",
       priority: 1,
     },
+    {
+      url: "https://progmasoft.com/privacy",
+      changeFrequency: "yearly",
+      priority: 0.3,
+    },
+    {
+      url: "https://progmasoft.com/security",
+      changeFrequency: "yearly",
+      priority: 0.3,
+    },
   ];
 }
diff --git a/apps/web/components/AuthForm.tsx b/apps/web/components/AuthForm.tsx
index 8f63dd1..7976e0f 100644
--- a/apps/web/components/AuthForm.tsx
+++ b/apps/web/components/AuthForm.tsx
@@ -7,6 +7,7 @@ import Link from "next/link";
 import { useRouter } from "next/navigation";
 import { type FormEvent, type MouseEvent, useId, useState } from "react";
 import { getMessages, type Locale } from "@/lib/localization";
+import { policyUrls } from "@/lib/policies";
 
 type AuthMode = "login" | "register";
 
@@ -58,7 +59,17 @@ export function AuthForm({ initialMessage, locale, mode }: AuthFormProps) {
         accountName.reportValidity();
         return;
       }
+      const acceptPolicies = form?.elements.namedItem("acceptPolicies");
+      if (!(acceptPolicies instanceof HTMLInputElement)) {
+        setMessage(auth.consentRequired);
+        return;
+      }
+      if (!acceptPolicies.checkValidity()) {
+        acceptPolicies.reportValidity();
+        return;
+      }
       parameters.set("accountName", accountName.value);
+      parameters.set("acceptPolicies", "true");
     }
 
     const query = parameters.size === 0 ? "" : `?${parameters.toString()}`;
@@ -86,6 +97,7 @@ export function AuthForm({ initialMessage, locale, mode }: AuthFormProps) {
             accountName: String(form.get("accountName") ?? ""),
             email: String(form.get("email") ?? ""),
             password,
+            acceptPolicies: form.get("acceptPolicies") === "on",
           }
         : {
             email: String(form.get("email") ?? ""),
@@ -230,6 +242,28 @@ export function AuthForm({ initialMessage, locale, mode }: AuthFormProps) {
         </div>
       )}
 
+      {mode === "register" && (
+        <div className="consent-field">
+          <input
+            id={`${formId}-accept-policies`}
+            name="acceptPolicies"
+            type="checkbox"
+            required
+          />
+          <label htmlFor={`${formId}-accept-policies`}>
+            {auth.consentStart}
+            <a href={policyUrls.privacy} target="_blank" rel="noopener">
+              {auth.consentPrivacy}
+            </a>
+            {auth.consentMiddle}
+            <a href={policyUrls.security} target="_blank" rel="noopener">
+              {auth.consentSecurity}
+            </a>
+            {auth.consentEnd}
+          </label>
+        </div>
+      )}
+
       <button className="button auth-submit" type="submit" disabled={pending}>
         {pending
           ? auth.working
diff --git a/apps/web/components/Footer.tsx b/apps/web/components/Footer.tsx
index d7f72e8..ba68ada 100644
--- a/apps/web/components/Footer.tsx
+++ b/apps/web/components/Footer.tsx
@@ -4,10 +4,13 @@
 import { Brand } from "./Brand";
 import { getHomeMessages } from "@/lib/home-messages";
 import { getMessages, type Locale } from "@/lib/localization";
+import { policyUrls } from "@/lib/policies";
+import { getPolicyMessages } from "@/lib/policy-messages";
 import { getCatalogMessages } from "@/lib/products";
 
 export function Footer({ locale }: { locale: Locale }) {
   const { footer } = getMessages(locale);
+  const policies = getPolicyMessages(locale);
   const site = getHomeMessages(locale).navigation;
   const catalog = getCatalogMessages(locale);
   return (
@@ -32,6 +35,8 @@ export function Footer({ locale }: { locale: Locale }) {
           <a href="https://github.com/Progmasoft/progmaweb">
             {footer.websiteSource}
           </a>
+          <a href={policyUrls.privacy}>{policies.privacy.title}</a>
+          <a href={policyUrls.security}>{policies.security.title}</a>
         </div>
       </div>
       <div className="shell footer-bottom">
diff --git a/apps/web/components/PolicyPage.tsx b/apps/web/components/PolicyPage.tsx
new file mode 100644
index 0000000..c0e8eda
--- /dev/null
+++ b/apps/web/components/PolicyPage.tsx
@@ -0,0 +1,61 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import type { Metadata } from "next";
+import { Footer } from "@/components/Footer";
+import { SiteHeader } from "@/components/SiteHeader";
+import { getLocale } from "@/lib/locale.server";
+import { type PolicyKind, policyUrls, policyVersion } from "@/lib/policies";
+import { getPolicyMessages } from "@/lib/policy-messages";
+
+/** The title, description and canonical address of a policy page. */
+export async function policyMetadata(kind: PolicyKind): Promise<Metadata> {
+  const policy = getPolicyMessages(await getLocale())[kind];
+  return {
+    title: policy.title,
+    description: policy.description,
+    alternates: { canonical: policyUrls[kind] },
+  };
+}
+
+/** progmasoft.com/privacy and progmasoft.com/security. */
+export async function PolicyPage({ kind }: { kind: PolicyKind }) {
+  const locale = await getLocale();
+  const messages = getPolicyMessages(locale);
+  const policy = messages[kind];
+  const other: PolicyKind = kind === "privacy" ? "security" : "privacy";
+  return (
+    <div className="pm-page">
+      <SiteHeader locale={locale} />
+      <main>
+        <section className="pm-hero">
+          <div className="pm-shell pm-product-hero">
+            <h1>{policy.title}</h1>
+            <p className="pm-lede">{policy.description}</p>
+            <p className="pm-policy-version">
+              {messages.versionLabel}{" "}
+              <time dateTime={policyVersion}>{messages.versionDate}</time>
+            </p>
+          </div>
+        </section>
+        <section className="pm-section">
+          <article className="pm-shell pm-policy">
+            {policy.sections.map((section) => (
+              <section key={section.heading}>
+                <h2>{section.heading}</h2>
+                {section.paragraphs.map((paragraph) => (
+                  <p key={paragraph}>{paragraph}</p>
+                ))}
+              </section>
+            ))}
+            <p className="pm-policy-see-also">
+              {messages.seeAlso}:{" "}
+              <a href={`/${other}`}>{messages[other].title}</a>
+            </p>
+          </article>
+        </section>
+      </main>
+      <Footer locale={locale} />
+    </div>
+  );
+}
diff --git a/apps/web/lib/localization.ts b/apps/web/lib/localization.ts
index 3213adf..a92906a 100644
--- a/apps/web/lib/localization.ts
+++ b/apps/web/lib/localization.ts
@@ -264,6 +264,15 @@ export const messages = {
         "That Account name is unavailable. Choose another name.",
       googleInvalidAccountName:
         "Use a valid Account name before continuing with Google.",
+      googlePoliciesRequired:
+        "Accept the Privacy Policy and the Security Policy before continuing with Google.",
+      consentStart: "I have read and accept the ",
+      consentPrivacy: "Privacy Policy",
+      consentMiddle: " and the ",
+      consentSecurity: "Security Policy",
+      consentEnd: ".",
+      consentRequired:
+        "Accept the Privacy Policy and the Security Policy to create an account.",
     },
     dashboard: {
       loading: "Loading account…",
@@ -518,6 +527,15 @@ export const messages = {
         "Dieser Kontoname ist nicht verfügbar. Wählen Sie einen anderen Namen.",
       googleInvalidAccountName:
         "Verwenden Sie einen gültigen Kontonamen, bevor Sie mit Google fortfahren.",
+      googlePoliciesRequired:
+        "Nehmen Sie die Datenschutzerklärung und die Sicherheitsrichtlinie an, bevor Sie mit Google fortfahren.",
+      consentStart: "Ich habe die ",
+      consentPrivacy: "Datenschutzerklärung",
+      consentMiddle: " und die ",
+      consentSecurity: "Sicherheitsrichtlinie",
+      consentEnd: " gelesen und nehme sie an.",
+      consentRequired:
+        "Nehmen Sie die Datenschutzerklärung und die Sicherheitsrichtlinie an, um ein Konto zu erstellen.",
     },
     dashboard: {
       loading: "Konto wird geladen…",
@@ -773,6 +791,15 @@ export const messages = {
         "Это имя аккаунта недоступно. Выберите другое.",
       googleInvalidAccountName:
         "Укажите допустимое имя аккаунта, прежде чем продолжить с Google.",
+      googlePoliciesRequired:
+        "Примите Политику конфиденциальности и Политику безопасности, прежде чем продолжить с Google.",
+      consentStart: "Я прочитал(а) и принимаю ",
+      consentPrivacy: "Политику конфиденциальности",
+      consentMiddle: " и ",
+      consentSecurity: "Политику безопасности",
+      consentEnd: ".",
+      consentRequired:
+        "Примите Политику конфиденциальности и Политику безопасности, чтобы создать аккаунт.",
     },
     dashboard: {
       loading: "Загрузка аккаунта…",
@@ -1012,6 +1039,15 @@ export const messages = {
       googleAccountNameRequired: "יש לבחור שם חשבון לפני ההמשך עם Google.",
       googleAccountNameUnavailable: "שם החשבון הזה אינו זמין. יש לבחור שם אחר.",
       googleInvalidAccountName: "יש להזין שם חשבון תקין לפני ההמשך עם Google.",
+      googlePoliciesRequired:
+        "יש לקבל את מדיניות הפרטיות ואת מדיניות האבטחה לפני ההמשך עם Google.",
+      consentStart: "קראתי ואני מקבל/ת את ",
+      consentPrivacy: "מדיניות הפרטיות",
+      consentMiddle: " ואת ",
+      consentSecurity: "מדיניות האבטחה",
+      consentEnd: ".",
+      consentRequired:
+        "יש לקבל את מדיניות הפרטיות ואת מדיניות האבטחה כדי ליצור חשבון.",
     },
     dashboard: {
       loading: "החשבון נטען…",
diff --git a/apps/web/lib/policies.ts b/apps/web/lib/policies.ts
new file mode 100644
index 0000000..88a52d7
--- /dev/null
+++ b/apps/web/lib/policies.ts
@@ -0,0 +1,43 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+/**
+ * The version of the policies, the date they took effect. Registration sends
+ * the acceptance of this version, and the account API keeps the same value
+ * (PolicyAcceptance.CurrentVersion); the two change together.
+ */
+export const policyVersion = "2026-11-06";
+
+/** The two policies a new account accepts. */
+export type PolicyKind = "privacy" | "security";
+
+/** The canonical addresses of the policies. */
+export const policyUrls: Record<PolicyKind, string> = {
+  privacy: "https://progmasoft.com/privacy",
+  security: "https://progmasoft.com/security",
+};
+
+/** One part of a policy: a heading and its paragraphs. */
+export interface PolicySection {
+  heading: string;
+  paragraphs: string[];
+}
+
+/** The text of one policy. */
+export interface PolicyText {
+  title: string;
+  description: string;
+  sections: PolicySection[];
+}
+
+/** Both policies in one language, with the words around them. */
+export interface PolicyMessages {
+  /** Shown before the date of the version. */
+  versionLabel: string;
+  /** The date of the version, written for the language. */
+  versionDate: string;
+  /** The link from one policy to the other. */
+  seeAlso: string;
+  privacy: PolicyText;
+  security: PolicyText;
+}
diff --git a/apps/web/lib/policies/de-DE.ts b/apps/web/lib/policies/de-DE.ts
new file mode 100644
index 0000000..8ae7d2e
--- /dev/null
+++ b/apps/web/lib/policies/de-DE.ts
@@ -0,0 +1,117 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import type { PolicyMessages } from "../policies";
+
+export const deDE: PolicyMessages = {
+  versionLabel: "Fassung vom",
+  versionDate: "6. November 2026",
+  seeAlso: "Siehe auch",
+  privacy: {
+    title: "Datenschutzerklärung",
+    description:
+      "Was Progmasoft über Sie speichert, warum, und was Progmasoft niemals damit tut.",
+    sections: [
+      {
+        heading: "Wer wir sind",
+        paragraphs: [
+          "Progmasoft betreibt progmasoft.com, Progmasoft Account, Progmasoft Credentials und die Progmasoft Console, ViGet, AI Support und die Produktseiten von Progmasoft. Diese Erklärung gilt für all diese Angebote. Fragen dazu richten Sie an support@progmasoft.com.",
+        ],
+      },
+      {
+        heading: "Was Ihr Konto speichert",
+        paragraphs: [
+          "Ihren Kontonamen, Ihre E-Mail-Adresse und entweder einen Hash Ihres Passworts oder die Kennung, die Google Ihrer Google-Identität gibt. Ihr Passwort selbst speichern wir nie: Es wird vor dem Speichern gehasht. Außerdem speichern wir, wann das Konto erstellt wurde und welche Fassung dieser Richtlinien Sie wann angenommen haben.",
+          "Solange Sie angemeldet sind, speichern wir einen Digest Ihres Sitzungstokens und den Zeitpunkt, an dem die Sitzung endet. Das Token selbst existiert nur in Ihrem Browser.",
+          "Wenn Sie in der Progmasoft Console eine Anwendung registrieren, speichern wir, was Sie dafür angeben.",
+        ],
+      },
+      {
+        heading: "Ihre IP-Adresse",
+        paragraphs: [
+          "Wir speichern Ihre IP-Adresse nur zu einem einzigen Zweck. Wenn Sie ein Paket oder ein Plugin auf ViGet hochladen, speichern wir die IP-Adresse, von der der Upload kam, zusammen mit dem Upload. Stellt sich heraus, dass der Upload Schadsoftware enthält, verwenden wir diese Adresse, um festzustellen, woher er kam, und übergeben sie den zuständigen Behörden. Für nichts anderes verwenden wir sie.",
+          "Wir speichern keine IP-Adressen zu Ihrem Konto, zu Ihren Sitzungen oder in den Zugriffsprotokollen unserer Webserver.",
+          "Um das Erraten von Passwörtern zu bremsen, zählt der Anmeldedienst einige Minuten lang Anfragen je Adresse. Diese Zählung liegt nur im Arbeitsspeicher und wird nie gespeichert.",
+        ],
+      },
+      {
+        heading: "Wir verkaufen Ihre Daten nicht",
+        paragraphs: [
+          "Wir verkaufen, vermieten oder tauschen Ihre Daten an niemanden, auch nicht Ihre IP-Adresse. Wir verwenden sie nicht für Werbung und erstellen kein Profil von Ihnen.",
+        ],
+      },
+      {
+        heading: "Dienste, die Ihre Anfragen sehen",
+        paragraphs: [
+          "Unsere Seiten werden über Cloudflare ausgeliefert, das jede Anfrage zu uns trägt und die Seiten vor Angriffen schützt. Dafür verarbeitet Cloudflare Ihre IP-Adresse nach seiner eigenen Datenschutzerklärung. Die Seiten verwenden Cloudflare Web Analytics, das Besuche ohne Cookies und ohne Sie zu identifizieren zählt.",
+          "Wenn Sie sich mit Google anmelden, teilt Google uns die Kennung und die E-Mail-Adresse Ihrer Google-Identität mit und sonst nichts aus Ihrem Google-Konto.",
+          "Fragen an AI Support beantwortet ein Modell, das auf unserem eigenen Server läuft. Sie werden nicht gespeichert und an niemanden weitergegeben.",
+        ],
+      },
+      {
+        heading: "Cookies und Speicher",
+        paragraphs: [
+          "Wir setzen nur die Cookies, die die Seiten brauchen: das Cookie Ihrer Sitzung, die kurzlebigen Cookies der Google-Anmeldung und von Progmasoft Credentials sowie das Cookie, das sich Ihre Sprache merkt. Ihre Wahl zwischen hell und dunkel liegt im Speicher Ihres Browsers. Keines davon dient dazu, Sie zu verfolgen.",
+        ],
+      },
+      {
+        heading: "Wie lange wir speichern",
+        paragraphs: [
+          "Kontodaten bleiben gespeichert, solange das Konto besteht. Eine Sitzung wird entfernt, sobald sie beendet ist. Die IP-Adresse eines ViGet-Uploads bleibt gespeichert, solange der Upload auf ViGet liegt, und ein Jahr nach seiner Entfernung, damit auch einer spät eingehenden Meldung noch nachgegangen werden kann.",
+        ],
+      },
+      {
+        heading: "Ihre Rechte",
+        paragraphs: [
+          "Schreiben Sie von der Adresse Ihres Kontos an support@progmasoft.com, um zu erfahren, was wir über Sie speichern, um es zu berichtigen oder um das Konto löschen zu lassen. Wir antworten innerhalb von 30 Tagen.",
+        ],
+      },
+      {
+        heading: "Änderungen",
+        paragraphs: [
+          "Eine neue Fassung dieser Erklärung trägt auf dieser Seite ein neues Datum. Wir schreiben den Inhabern von Konten, bevor eine neue Fassung wirksam wird.",
+        ],
+      },
+    ],
+  },
+  security: {
+    title: "Sicherheitsrichtlinie",
+    description:
+      "Wie Progmasoft Ihr Konto und ViGet schützt, was auf ViGet verboten ist und wie Sie eine Schwachstelle melden.",
+    sections: [
+      {
+        heading: "Ihr Konto",
+        paragraphs: [
+          "Ein Passwort hat mindestens 12 Zeichen und wird nur als Hash gespeichert. Anmeldeversuche sind in ihrer Häufigkeit begrenzt.",
+          "Eine Sitzung dauert höchstens 30 Tage und endet, wenn Sie sich abmelden. Ihr Cookie kann von Skripten auf der Seite nicht gelesen werden und wird nur über HTTPS gesendet.",
+        ],
+      },
+      {
+        heading: "Verbindungen",
+        paragraphs: [
+          "Jede Seite von Progmasoft wird nur über HTTPS ausgeliefert, und Browser werden angewiesen, dabei zu bleiben (HSTS). Jede Seite trägt eine Content Security Policy, die nur die Skripte zulässt, die die Seite selbst nennt.",
+        ],
+      },
+      {
+        heading: "Schadsoftware auf ViGet",
+        paragraphs: [
+          "Es ist verboten, Schadsoftware auf ViGet hochzuladen: Software, die den Computern, auf denen sie läuft, schadet, sie ausspäht oder die Kontrolle über sie übernimmt, oder die etwas anderes tut, als sie angibt.",
+          "Wenn wir solche Software finden oder auf sie hingewiesen werden, entfernen wir sie, schließen das Konto, das sie hochgeladen hat, und übergeben die IP-Adresse des Uploads den zuständigen Behörden, wie es die Datenschutzerklärung beschreibt.",
+          "Jedes Plugin, das ViGet ausliefert, ist mit seinem SHA-256-Digest verzeichnet, und Tazel prüft den Digest, bevor es das Plugin verwendet.",
+        ],
+      },
+      {
+        heading: "Worum wir Sie bitten",
+        paragraphs: [
+          "Wählen Sie ein Passwort, das Sie nirgendwo sonst verwenden, melden Sie sich nur auf Geräten an, denen Sie vertrauen, und melden Sie sich an einem gemeinsam genutzten Computer ab.",
+        ],
+      },
+      {
+        heading: "Eine Schwachstelle melden",
+        paragraphs: [
+          "Wenn Sie eine Sicherheitslücke in einer Seite, einem Produkt oder einem Paket von Progmasoft finden, schreiben Sie an support@progmasoft.com, was Sie gefunden haben. Bitte geben Sie uns Zeit, sie zu beheben, bevor Sie sie veröffentlichen, und lesen oder ändern Sie beim Testen keine Daten anderer Personen.",
+        ],
+      },
+    ],
+  },
+};
diff --git a/apps/web/lib/policies/en-US.ts b/apps/web/lib/policies/en-US.ts
new file mode 100644
index 0000000..01536ca
--- /dev/null
+++ b/apps/web/lib/policies/en-US.ts
@@ -0,0 +1,117 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import type { PolicyMessages } from "../policies";
+
+export const enUS: PolicyMessages = {
+  versionLabel: "Version of",
+  versionDate: "6 November 2026",
+  seeAlso: "See also",
+  privacy: {
+    title: "Privacy Policy",
+    description:
+      "What Progmasoft keeps about you, why it keeps it, and what it never does with it.",
+    sections: [
+      {
+        heading: "Who we are",
+        paragraphs: [
+          "Progmasoft runs progmasoft.com, Progmasoft Account, Progmasoft Credentials and the Progmasoft Console, ViGet, AI Support and the Progmasoft product sites. This policy covers all of them. Write to support@progmasoft.com with any question about it.",
+        ],
+      },
+      {
+        heading: "What your account keeps",
+        paragraphs: [
+          "Your account name, your email address, and either a hash of your password or the identifier Google gives your Google identity. We never keep your password itself: it is hashed before it is stored. We also keep when the account was created, and which version of these policies you accepted and when.",
+          "While you are signed in we keep a digest of your session token and the moment the session ends. The token itself exists only in your browser.",
+          "If you register an application in the Progmasoft Console, we keep what you enter for it.",
+        ],
+      },
+      {
+        heading: "Your IP address",
+        paragraphs: [
+          "We keep your IP address for one purpose only. When you upload a package or a plugin to ViGet, we record the IP address the upload came from, together with the upload. If the upload turns out to contain malicious software, we use that address to establish where it came from and give it to the competent authorities. We use it for nothing else.",
+          "We do not keep IP addresses with your account, with your sessions or in the access logs of our web servers.",
+          "To slow down password guessing, the sign-in service counts requests per address for a few minutes. The count is held in memory and never written down.",
+        ],
+      },
+      {
+        heading: "We do not sell your data",
+        paragraphs: [
+          "We do not sell, rent or trade your data to anyone, and that includes your IP address. We do not use it for advertising, and we do not build a profile of you.",
+        ],
+      },
+      {
+        heading: "Services that see your requests",
+        paragraphs: [
+          "Our sites are served through Cloudflare, which carries every request to us and protects the sites against attacks. To do that, Cloudflare processes your IP address under its own privacy policy. The pages use Cloudflare Web Analytics, which counts visits without cookies and without identifying you.",
+          "If you sign in with Google, Google tells us the identifier and the email address of your Google identity, and nothing else of your Google account.",
+          "Questions asked on AI Support are answered by a model that runs on our own server. They are not stored, and they are not sent to anyone else.",
+        ],
+      },
+      {
+        heading: "Cookies and storage",
+        paragraphs: [
+          "We set only the cookies the sites need: the cookie of your session, the short-lived cookies of Google sign-in and of Progmasoft Credentials, and the cookie that remembers your language. Your choice between light and dark is kept in the storage of your browser. None of them is used to track you.",
+        ],
+      },
+      {
+        heading: "How long we keep it",
+        paragraphs: [
+          "Account data is kept for as long as the account exists. A session is removed once it has ended. The IP address of a ViGet upload is kept while the upload is on ViGet and for one year after it was removed, so that a report that arrives late can still be followed.",
+        ],
+      },
+      {
+        heading: "Your rights",
+        paragraphs: [
+          "Write to support@progmasoft.com from the address of your account to learn what we keep about you, to correct it, or to have the account deleted. We answer within 30 days.",
+        ],
+      },
+      {
+        heading: "Changes",
+        paragraphs: [
+          "A new version of this policy carries a new date on this page. We write to the owners of accounts before a new version takes effect.",
+        ],
+      },
+    ],
+  },
+  security: {
+    title: "Security Policy",
+    description:
+      "How Progmasoft protects your account and ViGet, what is forbidden on ViGet, and how to report a weakness.",
+    sections: [
+      {
+        heading: "Your account",
+        paragraphs: [
+          "A password has at least 12 characters and is stored only as a hash. Attempts to sign in are limited in rate.",
+          "A session lasts at most 30 days and ends when you sign out. Its cookie cannot be read by scripts on the page and is sent only over HTTPS.",
+        ],
+      },
+      {
+        heading: "Connections",
+        paragraphs: [
+          "Every Progmasoft site is served only over HTTPS, and browsers are told to keep it that way (HSTS). Every page carries a Content Security Policy, which allows only the scripts the page itself names.",
+        ],
+      },
+      {
+        heading: "Malicious software on ViGet",
+        paragraphs: [
+          "Uploading malicious software to ViGet is forbidden: software that harms, spies on or takes control of the computers it runs on, or that does something other than what it says it does.",
+          "When we find such software or are told about it, we remove it, close the account that uploaded it, and give the IP address of the upload to the competent authorities, as the Privacy Policy describes.",
+          "Every plugin ViGet serves is listed with its SHA-256 digest, and Tazel checks the digest before it uses the plugin.",
+        ],
+      },
+      {
+        heading: "What we ask of you",
+        paragraphs: [
+          "Choose a password you use nowhere else, sign in only on devices you trust, and sign out on a computer you share.",
+        ],
+      },
+      {
+        heading: "Reporting a weakness",
+        paragraphs: [
+          "If you find a security weakness in a Progmasoft site, product or package, write to support@progmasoft.com with what you found. Please give us time to fix it before you make it public, and do not read or change the data of other people while you test.",
+        ],
+      },
+    ],
+  },
+};
diff --git a/apps/web/lib/policies/he-IL.ts b/apps/web/lib/policies/he-IL.ts
new file mode 100644
index 0000000..e36d680
--- /dev/null
+++ b/apps/web/lib/policies/he-IL.ts
@@ -0,0 +1,116 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import type { PolicyMessages } from "../policies";
+
+export const heIL: PolicyMessages = {
+  versionLabel: "גרסה מיום",
+  versionDate: "6 בנובמבר 2026",
+  seeAlso: "ראו גם",
+  privacy: {
+    title: "מדיניות פרטיות",
+    description: "מה Progmasoft שומרת עליך, למה, ומה היא לעולם לא עושה עם זה.",
+    sections: [
+      {
+        heading: "מי אנחנו",
+        paragraphs: [
+          "Progmasoft מפעילה את progmasoft.com, את Progmasoft Account, את Progmasoft Credentials ואת Progmasoft Console, את ViGet, את AI Support ואת אתרי המוצרים של Progmasoft. המדיניות הזו חלה על כולם. שאלות עליה אפשר לשלוח אל support@progmasoft.com.",
+        ],
+      },
+      {
+        heading: "מה החשבון שלך שומר",
+        paragraphs: [
+          "את שם החשבון, את כתובת הדוא״ל, ואת הגיבוב (hash) של הסיסמה או את המזהה ש־Google נותנת לזהות ה־Google שלך. את הסיסמה עצמה איננו שומרים לעולם: היא עוברת גיבוב לפני השמירה. אנחנו שומרים גם מתי החשבון נוצר, ואיזו גרסה של המדיניות הזו קיבלת ומתי.",
+          "כל עוד את או אתה מחוברים, אנחנו שומרים תמצית (digest) של אסימון ההתחברות ואת הרגע שבו ההתחברות מסתיימת. האסימון עצמו קיים רק בדפדפן שלך.",
+          "אם רשמת יישום ב־Progmasoft Console, אנחנו שומרים את מה שהזנת עבורו.",
+        ],
+      },
+      {
+        heading: "כתובת ה־IP שלך",
+        paragraphs: [
+          "אנחנו שומרים את כתובת ה־IP שלך למטרה אחת בלבד. כשמעלים חבילה או תוסף ל־ViGet, אנחנו רושמים את כתובת ה־IP שממנה הגיעה ההעלאה, יחד עם ההעלאה. אם מתברר שההעלאה מכילה תוכנה זדונית, אנחנו משתמשים בכתובת הזו כדי לקבוע מאין היא הגיעה, ומוסרים אותה לרשויות המוסמכות. לשום דבר אחר איננו משתמשים בה.",
+          "איננו שומרים כתובות IP עם החשבון שלך, עם ההתחברויות שלך או ביומני הגישה של שרתי האינטרנט שלנו.",
+          "כדי להאט ניחוש סיסמאות, שירות ההתחברות סופר בקשות לפי כתובת במשך כמה דקות. הספירה נשמרת בזיכרון בלבד ולעולם אינה נכתבת.",
+        ],
+      },
+      {
+        heading: "איננו מוכרים את המידע שלך",
+        paragraphs: [
+          "איננו מוכרים, משכירים או סוחרים במידע שלך עם אף אחד, וזה כולל את כתובת ה־IP שלך. איננו משתמשים בו לפרסום, ואיננו בונים עליך פרופיל.",
+        ],
+      },
+      {
+        heading: "שירותים שרואים את הבקשות שלך",
+        paragraphs: [
+          "האתרים שלנו מוגשים דרך Cloudflare, שמעבירה אלינו כל בקשה ומגינה על האתרים מפני התקפות. לשם כך Cloudflare מעבדת את כתובת ה־IP שלך לפי מדיניות הפרטיות שלה. הדפים משתמשים ב־Cloudflare Web Analytics, שסופר ביקורים בלי עוגיות ובלי לזהות אותך.",
+          "אם מתחברים עם Google, ‏Google מוסרת לנו את המזהה ואת כתובת הדוא״ל של זהות ה־Google שלך, ושום דבר אחר מחשבון ה־Google.",
+          "על שאלות ב־AI Support עונה מודל שרץ על השרת שלנו. השאלות אינן נשמרות ואינן נשלחות לאף אחד אחר.",
+        ],
+      },
+      {
+        heading: "עוגיות ואחסון",
+        paragraphs: [
+          "אנחנו מגדירים רק את העוגיות שהאתרים צריכים: עוגיית ההתחברות, העוגיות קצרות החיים של ההתחברות עם Google ושל Progmasoft Credentials, והעוגייה שזוכרת את השפה שבחרת. הבחירה בין בהיר לכהה נשמרת באחסון של הדפדפן. אף אחת מהן אינה משמשת למעקב אחריך.",
+        ],
+      },
+      {
+        heading: "כמה זמן אנחנו שומרים",
+        paragraphs: [
+          "נתוני החשבון נשמרים כל עוד החשבון קיים. התחברות נמחקת ברגע שהסתיימה. כתובת ה־IP של העלאה ל־ViGet נשמרת כל עוד ההעלאה נמצאת ב־ViGet ועוד שנה אחרי שהוסרה, כדי שגם בדיווח שמגיע באיחור עדיין יהיה אפשר לטפל.",
+        ],
+      },
+      {
+        heading: "הזכויות שלך",
+        paragraphs: [
+          "כתבו אל support@progmasoft.com מהכתובת של החשבון כדי לדעת מה אנחנו שומרים עליכם, כדי לתקן את זה או כדי למחוק את החשבון. אנחנו עונים בתוך 30 יום.",
+        ],
+      },
+      {
+        heading: "שינויים",
+        paragraphs: [
+          "גרסה חדשה של המדיניות הזו נושאת תאריך חדש בדף הזה. אנחנו כותבים לבעלי החשבונות לפני שגרסה חדשה נכנסת לתוקף.",
+        ],
+      },
+    ],
+  },
+  security: {
+    title: "מדיניות אבטחה",
+    description:
+      "איך Progmasoft מגינה על החשבון שלך ועל ViGet, מה אסור ב־ViGet ואיך מדווחים על חולשה.",
+    sections: [
+      {
+        heading: "החשבון שלך",
+        paragraphs: [
+          "לסיסמה יש לפחות 12 תווים והיא נשמרת רק כגיבוב. ניסיונות התחברות מוגבלים בקצב.",
+          "התחברות נמשכת 30 יום לכל היותר ומסתיימת כשמתנתקים. סקריפטים בדף אינם יכולים לקרוא את העוגייה שלה, והיא נשלחת רק ב־HTTPS.",
+        ],
+      },
+      {
+        heading: "חיבורים",
+        paragraphs: [
+          "כל אתר של Progmasoft מוגש רק ב־HTTPS, והדפדפנים מתבקשים להמשיך כך (HSTS). כל דף נושא Content Security Policy, שמתירה רק את הסקריפטים שהדף עצמו מציין.",
+        ],
+      },
+      {
+        heading: "תוכנה זדונית ב־ViGet",
+        paragraphs: [
+          "אסור להעלות ל־ViGet תוכנה זדונית: תוכנה שפוגעת במחשבים שהיא רצה עליהם, מרגלת אחריהם או משתלטת עליהם, או שעושה משהו אחר ממה שהיא מצהירה.",
+          "כשאנחנו מוצאים תוכנה כזו או מקבלים עליה דיווח, אנחנו מסירים אותה, סוגרים את החשבון שהעלה אותה, ומוסרים את כתובת ה־IP של ההעלאה לרשויות המוסמכות, כפי שמתואר במדיניות הפרטיות.",
+          "כל תוסף ש־ViGet מגיש רשום עם תמצית ה־SHA-256 שלו, ו־Tazel בודק את התמצית לפני שהוא משתמש בתוסף.",
+        ],
+      },
+      {
+        heading: "מה אנחנו מבקשים ממך",
+        paragraphs: [
+          "בחרו סיסמה שאינכם משתמשים בה בשום מקום אחר, התחברו רק ממכשירים שאתם סומכים עליהם, והתנתקו במחשב משותף.",
+        ],
+      },
+      {
+        heading: "דיווח על חולשה",
+        paragraphs: [
+          "אם מצאתם חולשת אבטחה באתר, במוצר או בחבילה של Progmasoft, כתבו אל support@progmasoft.com מה מצאתם. אנא תנו לנו זמן לתקן אותה לפני שאתם מפרסמים אותה, ואל תקראו או תשנו מידע של אנשים אחרים בזמן הבדיקה.",
+        ],
+      },
+    ],
+  },
+};
diff --git a/apps/web/lib/policies/ru-RU.ts b/apps/web/lib/policies/ru-RU.ts
new file mode 100644
index 0000000..35c7a0a
--- /dev/null
+++ b/apps/web/lib/policies/ru-RU.ts
@@ -0,0 +1,117 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import type { PolicyMessages } from "../policies";
+
+export const ruRU: PolicyMessages = {
+  versionLabel: "Редакция от",
+  versionDate: "6 ноября 2026 г.",
+  seeAlso: "См. также",
+  privacy: {
+    title: "Политика конфиденциальности",
+    description:
+      "Что Progmasoft хранит о вас, зачем, и чего Progmasoft никогда с этим не делает.",
+    sections: [
+      {
+        heading: "Кто мы",
+        paragraphs: [
+          "Progmasoft управляет сайтом progmasoft.com, Progmasoft Account, Progmasoft Credentials и Progmasoft Console, ViGet, AI Support и сайтами продуктов Progmasoft. Эта политика распространяется на все из них. Вопросы о ней присылайте на support@progmasoft.com.",
+        ],
+      },
+      {
+        heading: "Что хранит ваш аккаунт",
+        paragraphs: [
+          "Имя аккаунта, адрес электронной почты и либо хеш вашего пароля, либо идентификатор, который Google присваивает вашей учётной записи Google. Сам пароль мы никогда не храним: перед сохранением он хешируется. Мы также храним время создания аккаунта и то, какую редакцию этих политик и когда вы приняли.",
+          "Пока вы вошли в систему, мы храним дайджест токена вашей сессии и момент её окончания. Сам токен существует только в вашем браузере.",
+          "Если вы регистрируете приложение в Progmasoft Console, мы храним то, что вы для него указываете.",
+        ],
+      },
+      {
+        heading: "Ваш IP-адрес",
+        paragraphs: [
+          "Мы храним ваш IP-адрес только для одной цели. Когда вы загружаете пакет или плагин в ViGet, мы записываем IP-адрес, с которого пришла загрузка, вместе с самой загрузкой. Если окажется, что загрузка содержит вредоносное программное обеспечение, мы используем этот адрес, чтобы установить, откуда она пришла, и передаём его компетентным органам. Ни для чего другого мы его не используем.",
+          "Мы не храним IP-адреса вместе с вашим аккаунтом, вашими сессиями или в журналах доступа наших веб-серверов.",
+          "Чтобы затруднить подбор паролей, служба входа в течение нескольких минут считает запросы с каждого адреса. Этот счёт находится только в памяти и никуда не записывается.",
+        ],
+      },
+      {
+        heading: "Мы не продаём ваши данные",
+        paragraphs: [
+          "Мы не продаём, не сдаём в аренду и не передаём ваши данные никому, включая ваш IP-адрес. Мы не используем их для рекламы и не составляем ваш профиль.",
+        ],
+      },
+      {
+        heading: "Службы, которые видят ваши запросы",
+        paragraphs: [
+          "Наши сайты обслуживаются через Cloudflare, который доставляет нам каждый запрос и защищает сайты от атак. Для этого Cloudflare обрабатывает ваш IP-адрес согласно собственной политике конфиденциальности. Страницы используют Cloudflare Web Analytics, который считает посещения без cookie и без вашей идентификации.",
+          "Если вы входите через Google, Google сообщает нам идентификатор и адрес электронной почты вашей учётной записи Google и больше ничего из вашего аккаунта Google.",
+          "На вопросы в AI Support отвечает модель, работающая на нашем собственном сервере. Вопросы не сохраняются и никому не передаются.",
+        ],
+      },
+      {
+        heading: "Cookie и хранилище",
+        paragraphs: [
+          "Мы устанавливаем только те cookie, которые нужны сайтам: cookie вашей сессии, кратковременные cookie входа через Google и Progmasoft Credentials, а также cookie, запоминающий ваш язык. Выбор между светлой и тёмной темой хранится в хранилище вашего браузера. Ничто из этого не используется для слежки за вами.",
+        ],
+      },
+      {
+        heading: "Как долго мы храним данные",
+        paragraphs: [
+          "Данные аккаунта хранятся, пока существует аккаунт. Сессия удаляется после её окончания. IP-адрес загрузки в ViGet хранится, пока загрузка находится в ViGet, и ещё один год после её удаления, чтобы можно было разобраться и с поздно поступившим сообщением.",
+        ],
+      },
+      {
+        heading: "Ваши права",
+        paragraphs: [
+          "Напишите на support@progmasoft.com с адреса вашего аккаунта, чтобы узнать, что мы о вас храним, исправить это или удалить аккаунт. Мы отвечаем в течение 30 дней.",
+        ],
+      },
+      {
+        heading: "Изменения",
+        paragraphs: [
+          "Новая редакция этой политики получает на этой странице новую дату. Мы пишем владельцам аккаунтов до того, как новая редакция вступит в силу.",
+        ],
+      },
+    ],
+  },
+  security: {
+    title: "Политика безопасности",
+    description:
+      "Как Progmasoft защищает ваш аккаунт и ViGet, что запрещено в ViGet и как сообщить об уязвимости.",
+    sections: [
+      {
+        heading: "Ваш аккаунт",
+        paragraphs: [
+          "Пароль содержит не менее 12 символов и хранится только в виде хеша. Частота попыток входа ограничена.",
+          "Сессия длится не более 30 дней и заканчивается, когда вы выходите из системы. Её cookie недоступен скриптам на странице и передаётся только по HTTPS.",
+        ],
+      },
+      {
+        heading: "Соединения",
+        paragraphs: [
+          "Каждый сайт Progmasoft доступен только по HTTPS, и браузерам предписано так и продолжать (HSTS). Каждая страница содержит Content Security Policy, которая разрешает только те скрипты, которые называет сама страница.",
+        ],
+      },
+      {
+        heading: "Вредоносное ПО в ViGet",
+        paragraphs: [
+          "Загружать в ViGet вредоносное программное обеспечение запрещено: программы, которые вредят компьютерам, на которых работают, шпионят за ними или захватывают над ними контроль, или делают не то, что заявляют.",
+          "Если мы находим такую программу или нам о ней сообщают, мы удаляем её, закрываем аккаунт, который её загрузил, и передаём IP-адрес загрузки компетентным органам, как описано в Политике конфиденциальности.",
+          "Каждый плагин, который выдаёт ViGet, указан со своим дайджестом SHA-256, и Tazel проверяет дайджест перед использованием плагина.",
+        ],
+      },
+      {
+        heading: "О чём мы вас просим",
+        paragraphs: [
+          "Выберите пароль, который вы больше нигде не используете, входите только на устройствах, которым доверяете, и выходите из системы на общем компьютере.",
+        ],
+      },
+      {
+        heading: "Как сообщить об уязвимости",
+        paragraphs: [
+          "Если вы нашли уязвимость в сайте, продукте или пакете Progmasoft, напишите на support@progmasoft.com, что вы нашли. Пожалуйста, дайте нам время её исправить, прежде чем сообщать о ней публично, и не читайте и не изменяйте данные других людей во время проверки.",
+        ],
+      },
+    ],
+  },
+};
diff --git a/apps/web/lib/policy-messages.ts b/apps/web/lib/policy-messages.ts
new file mode 100644
index 0000000..0cdc234
--- /dev/null
+++ b/apps/web/lib/policy-messages.ts
@@ -0,0 +1,21 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import type { Locale } from "./localization";
+import type { PolicyMessages } from "./policies";
+import { deDE } from "./policies/de-DE";
+import { enUS } from "./policies/en-US";
+import { heIL } from "./policies/he-IL";
+import { ruRU } from "./policies/ru-RU";
+
+/** The policies in every published language. */
+export const policyMessages: Record<Locale, PolicyMessages> = {
+  "en-US": enUS,
+  "de-DE": deDE,
+  "ru-RU": ruRU,
+  "he-IL": heIL,
+};
+
+export function getPolicyMessages(locale: Locale): PolicyMessages {
+  return policyMessages[locale];
+}
diff --git a/apps/web/tests/policies.test.mjs b/apps/web/tests/policies.test.mjs
new file mode 100644
index 0000000..d967b95
--- /dev/null
+++ b/apps/web/tests/policies.test.mjs
@@ -0,0 +1,73 @@
+// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+import assert from "node:assert/strict";
+import { readFileSync } from "node:fs";
+import { test } from "node:test";
+import { messages, supportedLocales } from "../lib/localization.ts";
+import { policyUrls, policyVersion } from "../lib/policies.ts";
+import { deDE } from "../lib/policies/de-DE.ts";
+import { enUS } from "../lib/policies/en-US.ts";
+import { heIL } from "../lib/policies/he-IL.ts";
+import { ruRU } from "../lib/policies/ru-RU.ts";
+
+const policies = { "en-US": enUS, "de-DE": deDE, "ru-RU": ruRU, "he-IL": heIL };
+
+test("the page and the account API name the same version", () => {
+  const api = readFileSync(
+    new URL("../../api/Accounts/PolicyAcceptance.cs", import.meta.url),
+    "utf8",
+  );
+  assert.match(api, new RegExp(`CurrentVersion = "${policyVersion}"`));
+  assert.match(policyVersion, /^\d{4}-\d{2}-\d{2}$/);
+});
+
+test("every language has both policies, part for part", () => {
+  assert.deepEqual(Object.keys(policies).sort(), [...supportedLocales].sort());
+  for (const locale of supportedLocales) {
+    for (const kind of ["privacy", "security"]) {
+      const text = policies[locale][kind];
+      const english = enUS[kind];
+      assert.equal(text.sections.length, english.sections.length, locale);
+      text.sections.forEach((section, index) => {
+        assert.ok(section.heading.length > 0, `${locale} ${kind} ${index}`);
+        assert.equal(
+          section.paragraphs.length,
+          english.sections[index].paragraphs.length,
+          `${locale} ${kind} ${section.heading}`,
+        );
+      });
+    }
+  }
+});
+
+test("the privacy policy keeps the IP address for ViGet uploads only and sells nothing", () => {
+  const privacy = enUS.privacy.sections.map((section) =>
+    section.paragraphs.join(" "),
+  );
+  const address = privacy.find((text) =>
+    text.startsWith("We keep your IP address for one purpose only."),
+  );
+  assert.ok(address);
+  assert.match(address, /upload a package or a plugin to ViGet/);
+  assert.match(address, /competent authorities/);
+  assert.ok(
+    privacy.some((text) =>
+      text.startsWith("We do not sell, rent or trade your data"),
+    ),
+  );
+});
+
+test("registration names the policies in every language", () => {
+  for (const locale of supportedLocales) {
+    const { auth } = messages[locale];
+    assert.ok(auth.consentPrivacy.length > 0, locale);
+    assert.ok(auth.consentSecurity.length > 0, locale);
+    assert.ok(auth.consentRequired.length > 0, locale);
+    assert.ok(auth.googlePoliciesRequired.length > 0, locale);
+  }
+  assert.deepEqual(policyUrls, {
+    privacy: "https://progmasoft.com/privacy",
+    security: "https://progmasoft.com/security",
+  });
+});