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
Publish the policies of 6 December 2026 and tell account holders
- Commit
4174e3832388ce3d2c090c240d63cbaf4b4e9114- Author
- Leitwolf11 ·
- Parents
bdf8c8cf23cd
Changes
apps/api-tests/AccountCommandTests.cs | 89 +++++++++++++++++- apps/api-tests/AccountServiceTests.cs | 12 +++ apps/api-tests/AccountStoreContractTests.cs | 35 +++++++ apps/api-tests/AccountStoreSelectionTests.cs | 12 +++ apps/api-tests/packages.lock.json | 14 +++ apps/api/Accounts/AccountCommand.cs | 78 +++++++++++++++- apps/api/Accounts/AccountSchema.cs | 10 ++ apps/api/Accounts/IAccountStore.cs | 18 ++++ apps/api/Accounts/InMemoryAccountStore.cs | 44 ++++++++- apps/api/Accounts/PolicyAcceptance.cs | 11 ++- apps/api/Accounts/PolicyNotices.cs | 131 +++++++++++++++++++++++++++ apps/api/Accounts/PostgresAccountStore.cs | 42 +++++++++ apps/api/Progmaweb.Api.csproj | 1 + apps/api/Program.cs | 2 + apps/api/packages.lock.json | 14 +++ apps/web/app/privacy/[version]/page.tsx | 23 +++++ apps/web/app/security/[version]/page.tsx | 23 +++++ apps/web/components/PolicyPage.tsx | 69 +++++++++++--- apps/web/e2e/pages.ts | 1 + apps/web/lib/policies.ts | 82 ++++++++++++++++- apps/web/lib/policies/de-DE.ts | 18 ++-- apps/web/lib/policies/en-US.ts | 18 ++-- apps/web/lib/policies/fr-FR.ts | 18 ++-- apps/web/lib/policies/ru-RU.ts | 18 ++-- apps/web/lib/policies/v2026-11-06/de-DE.ts | 116 ++++++++++++++++++++++++ apps/web/lib/policies/v2026-11-06/en-US.ts | 116 ++++++++++++++++++++++++ apps/web/lib/policies/v2026-11-06/fr-FR.ts | 116 ++++++++++++++++++++++++ apps/web/lib/policies/v2026-11-06/ru-RU.ts | 116 ++++++++++++++++++++++++ apps/web/lib/policy-messages.ts | 44 +++++++-- apps/web/tests/policies.test.mjs | 51 ++++++++++- docs/ACCOUNT-API.md | 8 +- docs/LIMITATIONS.md | 6 +- ops/README.md | 18 ++++ ops/mail/README.md | 6 +- 34 files changed, 1298 insertions(+), 82 deletions(-) diff --git a/apps/api-tests/AccountCommandTests.cs b/apps/api-tests/AccountCommandTests.cs index 0434e65..a3771d2 100644 --- a/apps/api-tests/AccountCommandTests.cs +++ b/apps/api-tests/AccountCommandTests.cs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later using Microsoft.Extensions.DependencyInjection; +using MimeKit; using Progmasoft.Progmaweb.Api.Accounts; namespace Progmasoft.Progmaweb.Api.Tests; @@ -26,11 +27,28 @@ public sealed class AccountCommandTests } } - private static (ServiceProvider Services, InMemoryAccountStore Store) Services() + private sealed class Outbox(int failAfter = int.MaxValue) : IPolicyNoticeSender + { + public List<MimeMessage> Sent { get; } = []; + + public Task SendAsync(MimeMessage message, CancellationToken cancellationToken) + { + if (Sent.Count >= failAfter) + { + throw new IOException("the mail server went away"); + } + + Sent.Add(message); + return Task.CompletedTask; + } + } + + private static (ServiceProvider Services, InMemoryAccountStore Store) Services(Outbox? outbox = null) { InMemoryAccountStore store = new(); ServiceProvider services = new ServiceCollection() .AddSingleton<IAccountStore>(store) + .AddSingleton<IPolicyNoticeSender>(outbox ?? new Outbox()) .AddSingleton(TimeProvider.System) .AddSingleton<AccountService>() .BuildServiceProvider(); @@ -120,4 +138,73 @@ public sealed class AccountCommandTests Assert.Equal(2, code); Assert.Contains("usage", errors, StringComparison.Ordinal); } + + private static async Task AddAccountAsync(InMemoryAccountStore store, string name, string? policies) + { + AccountRecord account = new( + Guid.NewGuid(), name, name.ToUpperInvariant(), $"{name.ToLowerInvariant()}@example.com", + $"{name.ToUpperInvariant()}@EXAMPLE.COM", null, "hash", DateTimeOffset.UnixEpoch, + policies, policies is null ? null : DateTimeOffset.UnixEpoch); + await store.CreateAsync(account, TestContext.Current.CancellationToken); + } + + [Fact] + public async Task EveryHolderOfAnEarlierVersionIsToldOnceFromNoReply() + { + Outbox outbox = new(); + (ServiceProvider services, InMemoryAccountStore store) = Services(outbox); + await AddAccountAsync(store, "OlderHolder1", PolicyAcceptance.PreviousVersion); + await AddAccountAsync(store, "CurrentHolder1", PolicyAcceptance.CurrentVersion); + + (int code, string output, _) = await RunAsync(services, new Input(false), "notify-policies", "--dry-run"); + Assert.Equal(0, code); + Assert.Contains("1 account holders would be told", output, StringComparison.Ordinal); + Assert.Empty(outbox.Sent); + + (code, output, _) = await RunAsync(services, new Input(false), "notify-policies"); + Assert.Equal(0, code); + Assert.Contains("Told 1 account holders", output, StringComparison.Ordinal); + MimeMessage notice = Assert.Single(outbox.Sent); + Assert.Equal("noreply@progmasoft.com", notice.From.Mailboxes.Single().Address); + Assert.Equal("support@progmasoft.com", notice.ReplyTo.Mailboxes.Single().Address); + Assert.Equal("olderholder1@example.com", notice.To.Mailboxes.Single().Address); + Assert.Equal("auto-generated", notice.Headers["Auto-Submitted"]); + Assert.Contains("6 December 2026", notice.Subject, StringComparison.Ordinal); + string body = notice.TextBody ?? string.Empty; + Assert.Contains("https://progmasoft.com/privacy/2026-12-06", body, StringComparison.Ordinal); + Assert.Contains("Agenceland MCP Marketplace", body, StringComparison.Ordinal); + Assert.Contains("6 November 2026", body, StringComparison.Ordinal); + + (code, output, _) = await RunAsync(services, new Input(false), "notify-policies"); + Assert.Equal(0, code); + Assert.Contains("Told 0 account holders", output, StringComparison.Ordinal); + Assert.Single(outbox.Sent); + } + + [Fact] + public async Task AFailedNoticeStopsAndARunAfterItSendsOnlyWhatIsLeft() + { + (ServiceProvider services, InMemoryAccountStore store) = Services(new Outbox(failAfter: 1)); + await AddAccountAsync(store, "FirstHolder1", null); + await AddAccountAsync(store, "SecondHolder1", PolicyAcceptance.PreviousVersion); + + (int code, _, string errors) = await RunAsync(services, new Input(false), "notify-policies"); + Assert.Equal(1, code); + Assert.Contains("Sent 1 of 2", errors, StringComparison.Ordinal); + + IReadOnlyList<AccountRecord> left = await store.ListAccountsToNotifyAsync( + PolicyAcceptance.CurrentVersion, TestContext.Current.CancellationToken); + Assert.Single(left); + } + + [Theory] + [InlineData("notify-policies", "--now")] + [InlineData("notify-policies", "--dry-run", "extra")] + public async Task ANoticeCommandWithOtherWordsIsAUsageError(params string[] args) + { + (ServiceProvider services, _) = Services(); + (int code, _, string errors) = await RunAsync(services, new Input(false), args); + Assert.Equal(2, code); + Assert.Contains("accounts notify-policies [--dry-run]", errors, StringComparison.Ordinal); + } } diff --git a/apps/api-tests/AccountServiceTests.cs b/apps/api-tests/AccountServiceTests.cs index bd39641..b703d85 100644 --- a/apps/api-tests/AccountServiceTests.cs +++ b/apps/api-tests/AccountServiceTests.cs @@ -240,5 +240,17 @@ public sealed class AccountServiceTests public ValueTask<int> RemoveExpiredSessionsAsync(DateTimeOffset now, CancellationToken cancellationToken) => ValueTask.FromResult(0); + + public ValueTask<IReadOnlyList<AccountRecord>> ListAccountsToNotifyAsync( + string version, + CancellationToken cancellationToken) => + ValueTask.FromResult<IReadOnlyList<AccountRecord>>([]); + + public ValueTask RecordPolicyNoticeAsync( + Guid accountId, + string version, + DateTimeOffset sentAt, + CancellationToken cancellationToken) => + ValueTask.CompletedTask; } } diff --git a/apps/api-tests/AccountStoreContractTests.cs b/apps/api-tests/AccountStoreContractTests.cs index 2d4584a..ee95d1e 100644 --- a/apps/api-tests/AccountStoreContractTests.cs +++ b/apps/api-tests/AccountStoreContractTests.cs @@ -249,6 +249,41 @@ public abstract class AccountStoreContractTests // The account outlives its sessions. Assert.NotNull(await store.FindByIdAsync(account.Id, Cancellation)); } + + [Fact] + public async Task AnAccountIsToldAboutANewVersionOfThePoliciesOnce() + { + IAccountStore store = await CreateStoreAsync(); + AccountRecord none = Account("NoPolicies1", "none@example.com"); + AccountRecord older = Account("OlderPolicies1", "older@example.com") with + { + PoliciesVersion = "2026-11-06", + PoliciesAcceptedAt = Moment + }; + AccountRecord current = Account("CurrentPolicies1", "current@example.com") with + { + PoliciesVersion = "2026-12-06", + PoliciesAcceptedAt = Moment + }; + foreach (AccountRecord account in new[] { none, older, current }) + { + Assert.Equal(CreateAccountStatus.Created, (await store.CreateAsync(account, Cancellation)).Status); + } + + IReadOnlyList<AccountRecord> toTell = await store.ListAccountsToNotifyAsync("2026-12-06", Cancellation); + Assert.Equal( + ["NoPolicies1", "OlderPolicies1"], + toTell.Select(account => account.AccountName).Order()); + + await store.RecordPolicyNoticeAsync(older.Id, "2026-12-06", Moment, Cancellation); + await store.RecordPolicyNoticeAsync(older.Id, "2026-12-06", Moment, Cancellation); + toTell = await store.ListAccountsToNotifyAsync("2026-12-06", Cancellation); + Assert.Equal(["NoPolicies1"], toTell.Select(account => account.AccountName)); + + // Another version is another notice. + toTell = await store.ListAccountsToNotifyAsync("2027-01-01", Cancellation); + Assert.Equal(3, toTell.Count); + } } public sealed class InMemoryAccountStoreTests : AccountStoreContractTests diff --git a/apps/api-tests/AccountStoreSelectionTests.cs b/apps/api-tests/AccountStoreSelectionTests.cs index 1dbbf6b..8bf415a 100644 --- a/apps/api-tests/AccountStoreSelectionTests.cs +++ b/apps/api-tests/AccountStoreSelectionTests.cs @@ -122,6 +122,18 @@ public sealed class ExpiredSessionCleanupTests throw new IOException("The database does not answer."); } + public ValueTask<IReadOnlyList<AccountRecord>> ListAccountsToNotifyAsync( + string version, + CancellationToken cancellationToken) => + ValueTask.FromResult<IReadOnlyList<AccountRecord>>([]); + + public ValueTask RecordPolicyNoticeAsync( + Guid accountId, + string version, + DateTimeOffset sentAt, + CancellationToken cancellationToken) => + ValueTask.CompletedTask; + public ValueTask<CreateAccountResult> CreateAsync(AccountRecord account, CancellationToken cancellationToken) => throw new NotSupportedException(); diff --git a/apps/api-tests/packages.lock.json b/apps/api-tests/packages.lock.json index 7e23c7d..6efdf8f 100644 --- a/apps/api-tests/packages.lock.json +++ b/apps/api-tests/packages.lock.json @@ -32,6 +32,14 @@ "xunit.v3.core.mtp-v2": "[4.0.2]" } }, + "MailKit": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "PG6hnsklTzd/iK9A6j03OxDOas9mh8zOBkbPzcsLmFOODE8Hw3HTy7HAKiJvVHXNpKc3/KMVG/4QvOAKCBbGhA==", + "dependencies": { + "MimeKit.Core": "5.0.0" + } + }, "Microsoft.ApplicationInsights": { "type": "Transitive", "resolved": "2.23.0", @@ -267,6 +275,11 @@ "resolved": "5.0.0", "contentHash": "dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==" }, + "MimeKit.Core": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "0RLaVyex/BjUGqiw9xtGwzyCMaBcsu33Rth61bDCeVeQaaQK7tjcy4TA+nHKTqwUdp4OGd+gnhuq2fuR+c20qA==" + }, "Npgsql": { "type": "Transitive", "resolved": "10.0.3", @@ -594,6 +607,7 @@ "progmaweb.api": { "type": "Project", "dependencies": { + "MailKit": "[5.0.0, )", "Microsoft.AspNetCore.Authentication.Google": "[10.0.14, )", "Microsoft.EntityFrameworkCore.Sqlite": "[10.0.14, )", "Npgsql": "[10.0.3, )", diff --git a/apps/api/Accounts/AccountCommand.cs b/apps/api/Accounts/AccountCommand.cs index 7240a16..2107c1b 100644 --- a/apps/api/Accounts/AccountCommand.cs +++ b/apps/api/Accounts/AccountCommand.cs @@ -6,11 +6,21 @@ using System.Text; namespace Progmasoft.Progmaweb.Api.Accounts; /// <summary> -/// The command that provisions a reserved account on the server: <c>accounts provision-reserved <Name> -/// <email></c>. Public registration refuses the reserved names (Progmasoft, Leitwolf); this is the trusted -/// operations tooling that creates them. The password is read from the terminal without echo, twice, or from one line -/// of standard input when it is not a terminal; it never appears on a command line. +/// The account commands of the server. /// </summary> +/// <remarks> +/// <para> +/// <c>accounts provision-reserved <Name> <email></c> provisions a reserved account. Public registration +/// refuses the reserved names (Progmasoft, Leitwolf); this is the trusted operations tooling that creates them. The +/// password is read from the terminal without echo, twice, or from one line of standard input when it is not a +/// terminal; it never appears on a command line. +/// </para> +/// <para> +/// <c>accounts notify-policies [--dry-run]</c> tells every account holder who accepted an earlier version of the +/// policies about <see cref="PolicyAcceptance.CurrentVersion"/>, once: each notice sent is recorded, so the command can +/// run again after a failure and sends only what is left. <c>--dry-run</c> counts them and sends nothing. +/// </para> +/// </remarks> internal static class AccountCommand { /// <summary>Runs an account command.</summary> @@ -29,9 +39,11 @@ internal static class AccountCommand TextWriter errors, CancellationToken cancellationToken) { - if (args is not ["provision-reserved", string name, string email]) + bool isNotice = args is ["notify-policies"] or ["notify-policies", "--dry-run"]; + if (!isNotice && args is not ["provision-reserved", _, _]) { await errors.WriteLineAsync("usage: accounts provision-reserved <Name> <email>"); + await errors.WriteLineAsync(" accounts notify-policies [--dry-run]"); return 2; } @@ -41,6 +53,14 @@ internal static class AccountCommand await AccountSchema.ApplyAsync(dataSource, cancellationToken); } + if (isNotice) + { + return await NotifyPoliciesAsync(services, args.Length == 2, output, errors, cancellationToken); + } + + string name = args[1]; + string email = args[2]; + string? password = input.Read("Password: "); if (input.IsTerminal && password != input.Read("Password again: ")) { @@ -60,6 +80,54 @@ internal static class AccountCommand await output.WriteLineAsync($"Created the reserved account {account.AccountName} ({account.Email})."); return 0; } + + /// <summary>Sends the notices of the newest version of the policies that were not sent yet.</summary> + /// <param name="services">The services of the API.</param> + /// <param name="isDryRun">Whether to count them only.</param> + /// <param name="output">Where results go.</param> + /// <param name="errors">Where errors go.</param> + /// <param name="cancellationToken">Cancels the command.</param> + /// <returns>0 when every notice went out, 1 when one failed.</returns> + private static async Task<int> NotifyPoliciesAsync( + IServiceProvider services, + bool isDryRun, + TextWriter output, + TextWriter errors, + CancellationToken cancellationToken) + { + IAccountStore store = services.GetRequiredService<IAccountStore>(); + string version = PolicyAcceptance.CurrentVersion; + IReadOnlyList<AccountRecord> accounts = await store.ListAccountsToNotifyAsync(version, cancellationToken); + if (isDryRun) + { + await output.WriteLineAsync($"{accounts.Count} account holders would be told about the policies of {version}."); + return 0; + } + + IPolicyNoticeSender sender = services.GetRequiredService<IPolicyNoticeSender>(); + TimeProvider time = services.GetService<TimeProvider>() ?? TimeProvider.System; + int sent = 0; + foreach (AccountRecord account in accounts) + { + try + { + await sender.SendAsync(PolicyNotice.For(account), cancellationToken); + } + catch (Exception exception) when (exception is IOException or MailKit.ProtocolException + or MailKit.Net.Smtp.SmtpCommandException or System.Net.Sockets.SocketException) + { + await errors.WriteLineAsync( + $"Sent {sent} of {accounts.Count}; the notice to {account.AccountName} failed: {exception.Message}"); + return 1; + } + + await store.RecordPolicyNoticeAsync(account.Id, version, time.GetUtcNow(), cancellationToken); + sent++; + } + + await output.WriteLineAsync($"Told {sent} account holders about the policies of {version}."); + return 0; + } } /// <summary>Where <see cref="AccountCommand"/> reads a password from.</summary> diff --git a/apps/api/Accounts/AccountSchema.cs b/apps/api/Accounts/AccountSchema.cs index a9b1b66..4d55905 100644 --- a/apps/api/Accounts/AccountSchema.cs +++ b/apps/api/Accounts/AccountSchema.cs @@ -64,6 +64,16 @@ internal static class AccountSchema ADD COLUMN policies_accepted_at timestamptz, ADD CONSTRAINT accounts_policies_check CHECK ((policies_version IS NULL) = (policies_accepted_at IS NULL)); + """, + // 3: the notices of a new version of the policies, one per account and version, so that a notice that was + // sent is never sent again. + """ + CREATE TABLE policy_notices ( + account_id uuid NOT NULL REFERENCES accounts (id) ON DELETE CASCADE, + policies_version text NOT NULL, + sent_at timestamptz NOT NULL, + PRIMARY KEY (account_id, policies_version) + ); """ ]; diff --git a/apps/api/Accounts/IAccountStore.cs b/apps/api/Accounts/IAccountStore.cs index 5e4d3ab..d471dba 100644 --- a/apps/api/Accounts/IAccountStore.cs +++ b/apps/api/Accounts/IAccountStore.cs @@ -59,5 +59,23 @@ internal interface IAccountStore /// <param name="cancellationToken">Cancels the operation.</param> /// <returns>The number of sessions that were removed.</returns> ValueTask<int> RemoveExpiredSessionsAsync(DateTimeOffset now, CancellationToken cancellationToken); + + /// <summary>The accounts to tell about a version of the policies.</summary> + /// <remarks> + /// An account is told when it accepted an earlier version or none, and was not told about this version yet. A + /// version is the date it takes effect, <c>yyyy-MM-dd</c>, so versions compare as text. + /// </remarks> + /// <param name="version">The version of the policies.</param> + /// <param name="cancellationToken">Cancels the operation.</param> + /// <returns>The accounts, oldest first.</returns> + ValueTask<IReadOnlyList<AccountRecord>> ListAccountsToNotifyAsync(string version, CancellationToken cancellationToken); + + /// <summary>Records that an account was told about a version of the policies.</summary> + /// <param name="accountId">The account.</param> + /// <param name="version">The version.</param> + /// <param name="sentAt">When the notice was sent, in UTC.</param> + /// <param name="cancellationToken">Cancels the operation.</param> + /// <returns>A task that completes when the notice is recorded.</returns> + ValueTask RecordPolicyNoticeAsync(Guid accountId, string version, DateTimeOffset sentAt, CancellationToken cancellationToken); } diff --git a/apps/api/Accounts/InMemoryAccountStore.cs b/apps/api/Accounts/InMemoryAccountStore.cs index 39f5474..5ae734a 100644 --- a/apps/api/Accounts/InMemoryAccountStore.cs +++ b/apps/api/Accounts/InMemoryAccountStore.cs @@ -24,6 +24,9 @@ internal sealed class InMemoryAccountStore : IAccountStore /// <summary>Sessions by the hexadecimal form of their token digest.</summary> private readonly Dictionary<string, SessionRecord> sessionsByDigest = new(StringComparer.Ordinal); + /// <summary>The notices sent: account and version.</summary> + private readonly HashSet<(Guid AccountId, string Version)> policyNotices = []; + /// <inheritdoc/> public ValueTask<CreateAccountResult> CreateAsync(AccountRecord account, CancellationToken cancellationToken) { @@ -158,5 +161,44 @@ internal sealed class InMemoryAccountStore : IAccountStore return ValueTask.FromResult(expired.Length); } } -} + /// <inheritdoc/> + public ValueTask<IReadOnlyList<AccountRecord>> ListAccountsToNotifyAsync( + string version, + CancellationToken cancellationToken) + { + cancellationToken.ThrowIfCancellationRequested(); + lock (gate) + { + AccountRecord[] accounts = + [ + .. accountsById.Values + .Where(account => account.PoliciesVersion is null + || string.CompareOrdinal(account.PoliciesVersion, version) < 0) + .Where(account => !policyNotices.Contains((account.Id, version))) + .OrderBy(account => account.CreatedAt) + .ThenBy(account => account.Id) + ]; + return ValueTask.FromResult<IReadOnlyList<AccountRecord>>(accounts); + } + } + + /// <inheritdoc/> + public ValueTask RecordPolicyNoticeAsync( + Guid accountId, + string version, + DateTimeOffset sentAt, + CancellationToken cancellationToken) + { + cancellationToken.ThrowIfCancellationRequested(); + lock (gate) + { + if (accountsById.ContainsKey(accountId)) + { + policyNotices.Add((accountId, version)); + } + + return ValueTask.CompletedTask; + } + } +} diff --git a/apps/api/Accounts/PolicyAcceptance.cs b/apps/api/Accounts/PolicyAcceptance.cs index 1abf844..0684d6a 100644 --- a/apps/api/Accounts/PolicyAcceptance.cs +++ b/apps/api/Accounts/PolicyAcceptance.cs @@ -12,8 +12,15 @@ namespace Progmasoft.Progmaweb.Api.Accounts; /// </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 newest version of the policies, the date it takes effect. Registration records it from the day it is + /// published, and the account holders who accepted an earlier one are told before that date + /// (<c>accounts notify-policies</c>). + /// </summary> + public const string CurrentVersion = "2026-12-06"; + + /// <summary>The version before it, which applies until <see cref="CurrentVersion"/> takes effect.</summary> + public const string PreviousVersion = "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/PolicyNotices.cs b/apps/api/Accounts/PolicyNotices.cs new file mode 100644 index 0000000..d256b78 --- /dev/null +++ b/apps/api/Accounts/PolicyNotices.cs @@ -0,0 +1,131 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +using System.Globalization; +using MailKit.Net.Smtp; +using MailKit.Security; +using Microsoft.Extensions.Options; +using MimeKit; + +namespace Progmasoft.Progmaweb.Api.Accounts; + +/// <summary>Where the notices of a new version of the policies are submitted.</summary> +internal sealed class PolicyNoticeOptions +{ + /// <summary>The section of the configuration.</summary> + public const string Section = "PolicyNotices"; + + /// <summary>The mail server, Postfix on the same host.</summary> + public string SmtpHost { get; set; } = "127.0.0.1"; + + /// <summary>Its port; loopback submission needs neither authentication nor TLS.</summary> + public int SmtpPort { get; set; } = 25; +} + +/// <summary>Sends one notice.</summary> +internal interface IPolicyNoticeSender +{ + /// <summary>Sends a message.</summary> + /// <param name="message">The message.</param> + /// <param name="cancellationToken">Cancels the operation.</param> + /// <returns>A task that completes once the mail server took the message.</returns> + Task SendAsync(MimeMessage message, CancellationToken cancellationToken); +} + +/// <summary>Submits notices to the mail server of the host over SMTP.</summary> +/// <param name="options">Where the mail server is.</param> +internal sealed class SmtpPolicyNoticeSender(IOptions<PolicyNoticeOptions> options) : IPolicyNoticeSender +{ + /// <inheritdoc/> + public async Task SendAsync(MimeMessage message, CancellationToken cancellationToken) + { + using SmtpClient client = new(); + // The server is Postfix on loopback, which relays for 127.0.0.0/8 and signs with DKIM; the message never + // leaves the host before Postfix takes it, and Postfix requires TLS for the remote delivery. + await client.ConnectAsync(options.Value.SmtpHost, options.Value.SmtpPort, SecureSocketOptions.None, cancellationToken); + await client.SendAsync(new SmtpSendRequest(message), cancellationToken); + await client.DisconnectAsync(quit: true, cancellationToken); + } +} + +/// <summary>The notice an account holder gets before a new version of the policies takes effect.</summary> +/// <remarks> +/// The Privacy Policy promises to write to the owners of accounts before a new version takes effect. The notice is +/// sent from <c>noreply@progmasoft.com</c>; replies go to support. It is written in the four languages of the site, +/// English first, because an account keeps no language. +/// </remarks> +internal static class PolicyNotice +{ + /// <summary>The sender of every notice.</summary> + public static readonly MailboxAddress From = new("Progmasoft", "noreply@progmasoft.com"); + + /// <summary>Where a reply goes.</summary> + public static readonly MailboxAddress ReplyTo = new("Progmasoft Support", "support@progmasoft.com"); + + /// <summary>Builds the notice of <see cref="PolicyAcceptance.CurrentVersion"/> for one account.</summary> + /// <param name="account">The account.</param> + /// <returns>The message.</returns> + public static MimeMessage For(AccountRecord account) + { + string version = PolicyAcceptance.CurrentVersion; + DateOnly effective = DateOnly.ParseExact(version, "yyyy-MM-dd", CultureInfo.InvariantCulture); + string english = effective.ToString("d MMMM yyyy", CultureInfo.GetCultureInfo("en-US")); + string previous = DateOnly.ParseExact(PolicyAcceptance.PreviousVersion, "yyyy-MM-dd", CultureInfo.InvariantCulture) + .ToString("d MMMM yyyy", CultureInfo.GetCultureInfo("en-US")); + string privacy = $"https://progmasoft.com/privacy/{version}"; + string security = $"https://progmasoft.com/security/{version}"; + + MimeMessage message = new(); + message.From.Add(From); + message.ReplyTo.Add(ReplyTo); + message.To.Add(new MailboxAddress(account.AccountName, account.Email)); + message.Subject = $"The Progmasoft policies change on {english}"; + message.MessageId = MimeKit.Utils.MimeUtils.GenerateMessageId("progmasoft.com"); + message.Headers.Add("Auto-Submitted", "auto-generated"); + message.Body = new TextPart("plain") + { + Text = $""" + Hello {account.AccountName}, + + The Privacy Policy and the Security Policy of Progmasoft change on {english}. ViGet was closed, and the + new version names the Agenceland MCP Marketplace (agencelandmcp.progmasoft.com) in its place: once the + marketplace takes uploads, the IP address an upload came from is kept with it, malicious software is + taken off and the account that uploaded it is closed, and every server it serves is listed with its + SHA-256 digest, which Agenceland checks. Nothing else changes. + + The new version: + {privacy} + {security} + + Until {english}, the version of {previous} applies. If you do not agree, write to + support@progmasoft.com from the address of your account and we delete the account. + + Progmasoft + + -- + + Die Datenschutzerklärung und die Sicherheitsrichtlinie von Progmasoft ändern sich am {effective.ToString("d. MMMM yyyy", CultureInfo.GetCultureInfo("de-DE"))}. + ViGet wurde geschlossen; an seiner Stelle nennt die neue Fassung den Agenceland MCP Marketplace + (agencelandmcp.progmasoft.com). Sonst ändert sich nichts. Die neue Fassung: {privacy} und {security}. + Wenn Sie nicht einverstanden sind, schreiben Sie von der Adresse Ihres Kontos an support@progmasoft.com, + und wir löschen das Konto. + + -- + + Политика конфиденциальности и Политика безопасности Progmasoft меняются {effective.ToString("d MMMM yyyy", CultureInfo.GetCultureInfo("ru-RU"))} г. + ViGet закрыт; вместо него новая версия называет Agenceland MCP Marketplace + (agencelandmcp.progmasoft.com). Больше ничего не меняется. Новая версия: {privacy} и {security}. + Если вы не согласны, напишите на support@progmasoft.com с адреса вашей учётной записи, и мы её удалим. + + -- + + La Politique de confidentialité et la Politique de sécurité de Progmasoft changent le {effective.ToString("d MMMM yyyy", CultureInfo.GetCultureInfo("fr-FR"))}. + ViGet a été fermé ; à sa place, la nouvelle version nomme l’Agenceland MCP Marketplace + (agencelandmcp.progmasoft.com). Rien d’autre ne change. La nouvelle version : {privacy} et {security}. + Si vous n’êtes pas d’accord, écrivez à support@progmasoft.com depuis l’adresse de votre compte, et nous + supprimons le compte. + """ + }; + return message; + } +} diff --git a/apps/api/Accounts/PostgresAccountStore.cs b/apps/api/Accounts/PostgresAccountStore.cs index f6e9988..4adb4ab 100644 --- a/apps/api/Accounts/PostgresAccountStore.cs +++ b/apps/api/Accounts/PostgresAccountStore.cs @@ -165,6 +165,48 @@ internal sealed class PostgresAccountStore(NpgsqlDataSource dataSource) : IAccou return await command.ExecuteNonQueryAsync(cancellationToken); } + /// <inheritdoc/> + public async ValueTask<IReadOnlyList<AccountRecord>> ListAccountsToNotifyAsync( + string version, + CancellationToken cancellationToken) + { + await using NpgsqlCommand command = dataSource.CreateCommand( + $""" + SELECT {AccountColumns} FROM accounts + WHERE (policies_version IS NULL OR policies_version < $1) + AND NOT EXISTS ( + SELECT 1 FROM policy_notices WHERE account_id = accounts.id AND policies_version = $1) + ORDER BY created_at, id + """); + command.Parameters.AddWithValue(version); + await using NpgsqlDataReader reader = await command.ExecuteReaderAsync(cancellationToken); + List<AccountRecord> accounts = []; + while (await reader.ReadAsync(cancellationToken)) + { + accounts.Add(ReadAccount(reader)); + } + + return accounts; + } + + /// <inheritdoc/> + public async ValueTask RecordPolicyNoticeAsync( + Guid accountId, + string version, + DateTimeOffset sentAt, + CancellationToken cancellationToken) + { + await using NpgsqlCommand command = dataSource.CreateCommand( + """ + INSERT INTO policy_notices (account_id, policies_version, sent_at) VALUES ($1, $2, $3) + ON CONFLICT (account_id, policies_version) DO NOTHING + """); + command.Parameters.AddWithValue(accountId); + command.Parameters.AddWithValue(version); + command.Parameters.AddWithValue(ToStoredPrecision(sentAt)); + await command.ExecuteNonQueryAsync(cancellationToken); + } + /// <summary>Finds the one account whose column has a value.</summary> /// <typeparam name="TKey">Type of the value.</typeparam> /// <param name="column">Name of a column with a unique index. It is written into the statement.</param> diff --git a/apps/api/Progmaweb.Api.csproj b/apps/api/Progmaweb.Api.csproj index 99adff3..1693f71 100644 --- a/apps/api/Progmaweb.Api.csproj +++ b/apps/api/Progmaweb.Api.csproj @@ -12,6 +12,7 @@ <GenerateDocumentationFile>true</GenerateDocumentationFile> </PropertyGroup> <ItemGroup> + <PackageReference Include="MailKit" Version="5.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="10.0.14" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.14" /> <PackageReference Include="Npgsql" Version="10.0.3" /> diff --git a/apps/api/Program.cs b/apps/api/Program.cs index 4653d77..7841f60 100644 --- a/apps/api/Program.cs +++ b/apps/api/Program.cs @@ -101,6 +101,8 @@ builder.Services.AddRateLimiter(options => }); builder.Services.Configure<ForwardedHeadersOptions>(ForwardedHeadersPolicy.Configure); +builder.Services.Configure<PolicyNoticeOptions>(builder.Configuration.GetSection(PolicyNoticeOptions.Section)); +builder.Services.AddSingleton<IPolicyNoticeSender, SmtpPolicyNoticeSender>(); builder.WebHost.ConfigureKestrel(options => options.Limits.MaxRequestBodySize = 16 * 1024); diff --git a/apps/api/packages.lock.json b/apps/api/packages.lock.json index 9366595..35f2b61 100644 --- a/apps/api/packages.lock.json +++ b/apps/api/packages.lock.json @@ -2,6 +2,15 @@ "version": 1, "dependencies": { "net10.0": { + "MailKit": { + "type": "Direct", + "requested": "[5.0.0, )", + "resolved": "5.0.0", + "contentHash": "PG6hnsklTzd/iK9A6j03OxDOas9mh8zOBkbPzcsLmFOODE8Hw3HTy7HAKiJvVHXNpKc3/KMVG/4QvOAKCBbGhA==", + "dependencies": { + "MimeKit.Core": "5.0.0" + } + }, "Microsoft.AspNetCore.Authentication.Google": { "type": "Direct", "requested": "[10.0.14, )", @@ -232,6 +241,11 @@ "Microsoft.IdentityModel.Logging": "8.23.0" } }, + "MimeKit.Core": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "0RLaVyex/BjUGqiw9xtGwzyCMaBcsu33Rth61bDCeVeQaaQK7tjcy4TA+nHKTqwUdp4OGd+gnhuq2fuR+c20qA==" + }, "OpenIddict": { "type": "Transitive", "resolved": "7.8.0", diff --git a/apps/web/app/privacy/[version]/page.tsx b/apps/web/app/privacy/[version]/page.tsx new file mode 100644 index 0000000..32618d1 --- /dev/null +++ b/apps/web/app/privacy/[version]/page.tsx @@ -0,0 +1,23 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +import type { Metadata } from "next"; +import { notFound } from "next/navigation"; +import { PolicyPage, policyMetadata } from "@/components/PolicyPage"; +import { isPolicyVersion } from "@/lib/policies"; + +type Props = { params: Promise<{ version: string }> }; + +export async function generateMetadata({ params }: Props): Promise<Metadata> { + const { version } = await params; + return isPolicyVersion(version) ? policyMetadata("privacy", version) : {}; +} + +/** progmasoft.com/privacy/<version>: one published version. */ +export default async function Page({ params }: Props) { + const { version } = await params; + if (!isPolicyVersion(version)) { + notFound(); + } + return <PolicyPage kind="privacy" version={version} />; +} diff --git a/apps/web/app/security/[version]/page.tsx b/apps/web/app/security/[version]/page.tsx new file mode 100644 index 0000000..db7d7d4 --- /dev/null +++ b/apps/web/app/security/[version]/page.tsx @@ -0,0 +1,23 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +import type { Metadata } from "next"; +import { notFound } from "next/navigation"; +import { PolicyPage, policyMetadata } from "@/components/PolicyPage"; +import { isPolicyVersion } from "@/lib/policies"; + +type Props = { params: Promise<{ version: string }> }; + +export async function generateMetadata({ params }: Props): Promise<Metadata> { + const { version } = await params; + return isPolicyVersion(version) ? policyMetadata("security", version) : {}; +} + +/** progmasoft.com/security/<version>: one published version. */ +export default async function Page({ params }: Props) { + const { version } = await params; + if (!isPolicyVersion(version)) { + notFound(); + } + return <PolicyPage kind="security" version={version} />; +} diff --git a/apps/web/components/PolicyPage.tsx b/apps/web/components/PolicyPage.tsx index d987c8c..cfef684 100644 --- a/apps/web/components/PolicyPage.tsx +++ b/apps/web/components/PolicyPage.tsx @@ -9,37 +9,67 @@ import { type PolicyKind, type PolicyMessages, type PolicyText, + type PolicyVersion, + policyAfter, + policyInEffect, policyUrls, - policyVersion, + policyVersionWords, } from "@/lib/policies"; import { getPolicyMessages } from "@/lib/policy-messages"; +/** The path of a policy, and of one of its versions. */ +function pathOf(kind: PolicyKind, version?: PolicyVersion): string { + return version ? `/${kind}/${version}` : `/${kind}`; +} + /** One policy and the other, with their addresses. */ function select(messages: PolicyMessages, kind: PolicyKind) { const privacy = { text: messages.privacy, url: policyUrls.privacy }; const security = { text: messages.security, url: policyUrls.security }; return kind === "privacy" - ? { policy: privacy, other: { ...security, path: "/security" } } - : { policy: security, other: { ...privacy, path: "/privacy" } }; + ? { policy: privacy, other: { ...security, kind: "security" as const } } + : { policy: security, other: { ...privacy, kind: "privacy" as const } }; } /** The title, description and canonical address of a policy page. */ -export async function policyMetadata(kind: PolicyKind): Promise<Metadata> { - const { policy } = select(getPolicyMessages(await getLocale()), kind); +export async function policyMetadata( + kind: PolicyKind, + version?: PolicyVersion, +): Promise<Metadata> { + const shown = version ?? policyInEffect(new Date()); + const { policy } = select(getPolicyMessages(await getLocale(), shown), kind); return { title: policy.text.title, description: policy.text.description, - alternates: { canonical: policy.url }, + alternates: { + canonical: version ? `${policy.url}/${version}` : policy.url, + }, }; } -/** progmasoft.com/privacy and progmasoft.com/security. */ -export async function PolicyPage({ kind }: { kind: PolicyKind }) { +/** + * progmasoft.com/privacy and progmasoft.com/security show the version in + * effect, and name the next one while it is published and not in effect yet; + * /privacy/<version> and /security/<version> show one version. + */ +export async function PolicyPage({ + kind, + version, +}: { + kind: PolicyKind; + version?: PolicyVersion; +}) { const locale = await getLocale(); - const messages = getPolicyMessages(locale); + const inEffect = policyInEffect(new Date()); + const shown = version ?? inEffect; + const messages = getPolicyMessages(locale, shown); + const words = policyVersionWords[locale]; const selected = select(messages, kind); const policy: PolicyText = selected.policy.text; const other = selected.other; + const next = shown === inEffect ? policyAfter(inEffect) : undefined; + const isFuture = shown > inEffect; + const linkVersion = version && version !== inEffect ? version : undefined; return ( <div className="pm-page"> <SiteHeader locale={locale} /> @@ -50,8 +80,24 @@ export async function PolicyPage({ kind }: { kind: PolicyKind }) { <p className="pm-lede">{policy.description}</p> <p className="pm-policy-version"> {messages.versionLabel}{" "} - <time dateTime={policyVersion}>{messages.versionDate}</time> + <time dateTime={shown}>{messages.versionDate}</time> </p> + {next ? ( + <p className="pm-policy-version"> + {words.upcoming}{" "} + <time dateTime={next}> + {getPolicyMessages(locale, next).versionDate} + </time> + . <a href={pathOf(kind, next)}>{words.readIt}</a> + </p> + ) : null} + {isFuture ? ( + <p className="pm-policy-version"> + {words.notYet}{" "} + <time dateTime={shown}>{messages.versionDate}</time>.{" "} + <a href={pathOf(kind)}>{words.inEffect}</a> + </p> + ) : null} </div> </section> <section className="pm-section"> @@ -65,7 +111,8 @@ export async function PolicyPage({ kind }: { kind: PolicyKind }) { </section> ))} <p className="pm-policy-see-also"> - {messages.seeAlso}: <a href={other.path}>{other.text.title}</a> + {messages.seeAlso}:{" "} + <a href={pathOf(other.kind, linkVersion)}>{other.text.title}</a> </p> </article> </section> diff --git a/apps/web/e2e/pages.ts b/apps/web/e2e/pages.ts index a0c4335..998df04 100644 --- a/apps/web/e2e/pages.ts +++ b/apps/web/e2e/pages.ts @@ -6,6 +6,7 @@ export const layoutPages = [ "progmasoft.com/", "progmasoft.com/privacy", "progmasoft.com/security", + "progmasoft.com/privacy/2026-12-06", "account.progmasoft.com/", "account.progmasoft.com/login", "account.progmasoft.com/register", diff --git a/apps/web/lib/policies.ts b/apps/web/lib/policies.ts index c951299..77377bc 100644 --- a/apps/web/lib/policies.ts +++ b/apps/web/lib/policies.ts @@ -1,12 +1,86 @@ // SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> // SPDX-License-Identifier: AGPL-3.0-or-later +import type { Locale } from "./localization"; + +/** + * Every published version of the policies, oldest first. A version is the + * date it takes effect, at midnight UTC. + */ +export const policyVersions = ["2026-11-06", "2026-12-06"] as const; + +/** One published version. */ +export type PolicyVersion = (typeof policyVersions)[number]; + /** - * 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. + * The newest version. Registration sends the acceptance of it from the day it + * is published, and the account API keeps the same value + * (PolicyAcceptance.CurrentVersion); the two change together. Account holders + * who accepted an earlier one are told before it takes effect. */ -export const policyVersion = "2026-11-06"; +export const policyVersion: PolicyVersion = "2026-12-06"; + +/** Whether a text names a published version. */ +export function isPolicyVersion(text: string): text is PolicyVersion { + return (policyVersions as readonly string[]).includes(text); +} + +/** The version in effect at a moment: the newest that has taken effect. */ +export function policyInEffect(now: Date): PolicyVersion { + const today = now.toISOString().slice(0, 10); + let inEffect: PolicyVersion = policyVersions[0]; + for (const version of policyVersions) { + if (version <= today) { + inEffect = version; + } + } + return inEffect; +} + +/** The version published after one, if any. */ +export function policyAfter(version: PolicyVersion): PolicyVersion | undefined { + return policyVersions[policyVersions.indexOf(version) + 1]; +} + +/** The words around a version that is not, or not yet, in effect. */ +export interface PolicyVersionWords { + /** Before the date of the next version. */ + upcoming: string; + /** The link to it. */ + readIt: string; + /** On a version that has not taken effect yet, before its date. */ + notYet: string; + /** The link to the version in effect. */ + inEffect: string; +} + +/** Those words in every published language. */ +export const policyVersionWords: Record<Locale, PolicyVersionWords> = { + "en-US": { + upcoming: "A new version takes effect on", + readIt: "Read it", + notYet: "This version takes effect on", + inEffect: "The version in effect until then", + }, + "de-DE": { + upcoming: "Eine neue Fassung tritt in Kraft am", + readIt: "Lesen", + notYet: "Diese Fassung tritt in Kraft am", + inEffect: "Die bis dahin geltende Fassung", + }, + "ru-RU": { + upcoming: "Новая редакция вступает в силу", + readIt: "Прочитать", + notYet: "Эта редакция вступает в силу", + inEffect: "Редакция, действующая до тех пор", + }, + "fr-FR": { + upcoming: "Une nouvelle version entre en vigueur le", + readIt: "La lire", + notYet: "Cette version entre en vigueur le", + inEffect: "La version en vigueur d’ici là", + }, +}; /** The two policies a new account accepts. */ export type PolicyKind = "privacy" | "security"; diff --git a/apps/web/lib/policies/de-DE.ts b/apps/web/lib/policies/de-DE.ts index f93b345..1642bf4 100644 --- a/apps/web/lib/policies/de-DE.ts +++ b/apps/web/lib/policies/de-DE.ts @@ -5,7 +5,7 @@ import type { PolicyMessages } from "../policies"; export const deDE: PolicyMessages = { versionLabel: "Fassung vom", - versionDate: "6. November 2026", + versionDate: "6. Dezember 2026", seeAlso: "Siehe auch", privacy: { title: "Datenschutzerklärung", @@ -15,7 +15,7 @@ export const deDE: PolicyMessages = { { heading: "Wer wir sind", paragraphs: [ - "Progmasoft betreibt progmasoft.com, Progmasoft Account, Progmasoft Credentials und die Progmasoft Console, ViGet und die Produktseiten von Progmasoft. Diese Erklärung gilt für all diese Angebote. Fragen dazu richten Sie an support@progmasoft.com.", + "Progmasoft betreibt progmasoft.com, Progmasoft Account, Progmasoft Credentials und die Progmasoft Console, den Agenceland MCP Marketplace und die Produktseiten von Progmasoft. Diese Erklärung gilt für all diese Angebote. Fragen dazu richten Sie an support@progmasoft.com.", ], }, { @@ -29,7 +29,7 @@ export const deDE: PolicyMessages = { { heading: "Ihre IP-Adresse", paragraphs: [ - "Wir speichern Ihre IP-Adresse nur zu einem einzigen Zweck. ViGet nimmt noch keine Uploads von Konten an: Bisher veröffentlicht nur Progmasoft dort. Sobald es das tut, speichert ViGet die IP-Adresse, von der ein Upload kam, zusammen mit dem Upload. Stellt sich heraus, dass ein 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 Ihre IP-Adresse nur zu einem einzigen Zweck. Der Agenceland MCP Marketplace nimmt noch keine Uploads von Konten an. Sobald er das tut, speichert der Marketplace die IP-Adresse, von der ein Upload kam, zusammen mit dem Upload. Stellt sich heraus, dass ein 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.", ], @@ -56,7 +56,7 @@ export const deDE: PolicyMessages = { { 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 wird gespeichert, solange der Upload auf ViGet liegt, und ein Jahr nach seiner Entfernung, damit auch einer spät eingehenden Meldung noch nachgegangen werden kann.", + "Kontodaten bleiben gespeichert, solange das Konto besteht. Eine Sitzung wird entfernt, sobald sie beendet ist. Die IP-Adresse eines Uploads in den Agenceland MCP Marketplace wird gespeichert, solange der Upload im Marketplace liegt, und ein Jahr nach seiner Entfernung, damit auch einer spät eingehenden Meldung noch nachgegangen werden kann.", ], }, { @@ -76,7 +76,7 @@ export const deDE: PolicyMessages = { security: { title: "Sicherheitsrichtlinie", description: - "Wie Progmasoft Ihr Konto und ViGet schützt, was auf ViGet verboten ist und wie Sie eine Schwachstelle melden.", + "Wie Progmasoft Ihr Konto und den Agenceland MCP Marketplace schützt, was im Marketplace verboten ist und wie Sie eine Schwachstelle melden.", sections: [ { heading: "Ihr Konto", @@ -92,11 +92,11 @@ export const deDE: PolicyMessages = { ], }, { - heading: "Schadsoftware auf ViGet", + heading: "Schadsoftware im Agenceland MCP Marketplace", 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, nehmen wir sie von ViGet: Ihre Dateien werden nicht mehr ausgeliefert und nur noch als Beweismittel unzugänglich aufbewahrt. Wir 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.", + "Es ist verboten, Schadsoftware in den Agenceland MCP Marketplace 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, nehmen wir sie aus dem Marketplace: Ihre Dateien werden nicht mehr ausgeliefert und nur noch als Beweismittel unzugänglich aufbewahrt. Wir 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.", + "Jeder MCP-Server, den der Marketplace ausliefert, ist mit seiner festen Version und seinem SHA-256-Digest verzeichnet, und Agenceland prüft den Digest, bevor es den Server installiert.", ], }, { diff --git a/apps/web/lib/policies/en-US.ts b/apps/web/lib/policies/en-US.ts index eb8afab..8af066e 100644 --- a/apps/web/lib/policies/en-US.ts +++ b/apps/web/lib/policies/en-US.ts @@ -5,7 +5,7 @@ import type { PolicyMessages } from "../policies"; export const enUS: PolicyMessages = { versionLabel: "Version of", - versionDate: "6 November 2026", + versionDate: "6 December 2026", seeAlso: "See also", privacy: { title: "Privacy Policy", @@ -15,7 +15,7 @@ export const enUS: PolicyMessages = { { heading: "Who we are", paragraphs: [ - "Progmasoft runs progmasoft.com, Progmasoft Account, Progmasoft Credentials and the Progmasoft Console, ViGet and the Progmasoft product sites. This policy covers all of them. Write to support@progmasoft.com with any question about it.", + "Progmasoft runs progmasoft.com, Progmasoft Account, Progmasoft Credentials and the Progmasoft Console, the Agenceland MCP Marketplace and the Progmasoft product sites. This policy covers all of them. Write to support@progmasoft.com with any question about it.", ], }, { @@ -29,7 +29,7 @@ export const enUS: PolicyMessages = { { heading: "Your IP address", paragraphs: [ - "We keep your IP address for one purpose only. ViGet does not yet take uploads from accounts: only Progmasoft publishes to it. Once it does, ViGet will record the IP address each upload came from, together with the upload. If an upload turns out to contain malicious software, we will use that address to establish where it came from and give it to the competent authorities. We will use it for nothing else.", + "We keep your IP address for one purpose only. The Agenceland MCP Marketplace does not yet take uploads from accounts. Once it does, the marketplace will record the IP address each upload came from, together with the upload. If an upload turns out to contain malicious software, we will use that address to establish where it came from and give it to the competent authorities. We will 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.", ], @@ -56,7 +56,7 @@ export const enUS: PolicyMessages = { { 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 will be 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.", + "Account data is kept for as long as the account exists. A session is removed once it has ended. The IP address of an upload to the Agenceland MCP Marketplace will be kept while the upload is on the marketplace and for one year after it was removed, so that a report that arrives late can still be followed.", ], }, { @@ -76,7 +76,7 @@ export const enUS: PolicyMessages = { security: { title: "Security Policy", description: - "How Progmasoft protects your account and ViGet, what is forbidden on ViGet, and how to report a weakness.", + "How Progmasoft protects your account and the Agenceland MCP Marketplace, what is forbidden on the marketplace, and how to report a weakness.", sections: [ { heading: "Your account", @@ -92,11 +92,11 @@ export const enUS: PolicyMessages = { ], }, { - heading: "Malicious software on ViGet", + heading: "Malicious software on the Agenceland MCP Marketplace", 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 take it off ViGet: its files are no longer served, and are kept out of reach only as evidence. We 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.", + "Uploading malicious software to the Agenceland MCP Marketplace 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 take it off the marketplace: its files are no longer served, and are kept out of reach only as evidence. We close the account that uploaded it and give the IP address of the upload to the competent authorities, as the Privacy Policy describes.", + "Every MCP server the marketplace serves is listed with its pinned version and its SHA-256 digest, and Agenceland checks the digest before it installs the server.", ], }, { diff --git a/apps/web/lib/policies/fr-FR.ts b/apps/web/lib/policies/fr-FR.ts index ba87bf1..b21c414 100644 --- a/apps/web/lib/policies/fr-FR.ts +++ b/apps/web/lib/policies/fr-FR.ts @@ -5,7 +5,7 @@ import type { PolicyMessages } from "../policies"; export const frFR: PolicyMessages = { versionLabel: "Version du", - versionDate: "6 novembre 2026", + versionDate: "6 décembre 2026", seeAlso: "Voir aussi", privacy: { title: "Politique de confidentialité", @@ -15,7 +15,7 @@ export const frFR: PolicyMessages = { { heading: "Qui nous sommes", paragraphs: [ - "Progmasoft exploite progmasoft.com, Progmasoft Account, Progmasoft Credentials et la Console Progmasoft, ViGet et les sites des produits Progmasoft. Cette politique les couvre tous. Écrivez à support@progmasoft.com pour toute question à son sujet.", + "Progmasoft exploite progmasoft.com, Progmasoft Account, Progmasoft Credentials et la Console Progmasoft, l’Agenceland MCP Marketplace et les sites des produits Progmasoft. Cette politique les couvre tous. Écrivez à support@progmasoft.com pour toute question à son sujet.", ], }, { @@ -29,7 +29,7 @@ export const frFR: PolicyMessages = { { heading: "Votre adresse IP", paragraphs: [ - "Nous conservons votre adresse IP dans un seul but. ViGet n’accepte pas encore d’envois depuis les comptes : seul Progmasoft y publie. Lorsqu’il les acceptera, ViGet enregistrera l’adresse IP d’où provient chaque envoi, avec l’envoi. Si un envoi se révèle contenir un logiciel malveillant, nous utiliserons cette adresse pour établir sa provenance et la transmettrons aux autorités compétentes. Nous ne l’utiliserons à rien d’autre.", + "Nous conservons votre adresse IP dans un seul but. L’Agenceland MCP Marketplace n’accepte pas encore d’envois depuis les comptes. Lorsqu’il les acceptera, le Marketplace enregistrera l’adresse IP d’où provient chaque envoi, avec l’envoi. Si un envoi se révèle contenir un logiciel malveillant, nous utiliserons cette adresse pour établir sa provenance et la transmettrons aux autorités compétentes. Nous ne l’utiliserons à rien d’autre.", "Nous ne conservons pas d’adresses IP avec votre compte, avec vos sessions ni dans les journaux d’accès de nos serveurs web.", "Pour freiner les tentatives de deviner un mot de passe, le service de connexion compte les requêtes par adresse pendant quelques minutes. Ce décompte est tenu en mémoire et n’est jamais écrit.", ], @@ -56,7 +56,7 @@ export const frFR: PolicyMessages = { { heading: "Combien de temps nous les conservons", paragraphs: [ - "Les données du compte sont conservées aussi longtemps que le compte existe. Une session est supprimée une fois terminée. L’adresse IP d’un envoi sur ViGet sera conservée tant que l’envoi est sur ViGet et pendant un an après son retrait, afin qu’un signalement tardif puisse encore être suivi.", + "Les données du compte sont conservées aussi longtemps que le compte existe. Une session est supprimée une fois terminée. L’adresse IP d’un envoi sur l’Agenceland MCP Marketplace sera conservée tant que l’envoi est sur le Marketplace et pendant un an après son retrait, afin qu’un signalement tardif puisse encore être suivi.", ], }, { @@ -76,7 +76,7 @@ export const frFR: PolicyMessages = { security: { title: "Politique de sécurité", description: - "Comment Progmasoft protège votre compte et ViGet, ce qui est interdit sur ViGet, et comment signaler une faiblesse.", + "Comment Progmasoft protège votre compte et l’Agenceland MCP Marketplace, ce qui est interdit sur le Marketplace, et comment signaler une faiblesse.", sections: [ { heading: "Votre compte", @@ -92,11 +92,11 @@ export const frFR: PolicyMessages = { ], }, { - heading: "Logiciels malveillants sur ViGet", + heading: "Logiciels malveillants sur l’Agenceland MCP Marketplace", paragraphs: [ - "Il est interdit d’envoyer un logiciel malveillant sur ViGet : un logiciel qui nuit aux ordinateurs sur lesquels il s’exécute, les espionne ou en prend le contrôle, ou qui fait autre chose que ce qu’il annonce.", - "Lorsque nous trouvons un tel logiciel ou qu’on nous le signale, nous le retirons de ViGet : ses fichiers ne sont plus servis et ne sont conservés, hors d’atteinte, qu’à titre de preuve. Nous fermons le compte qui l’a envoyé et transmettons l’adresse IP de l’envoi aux autorités compétentes, comme le décrit la politique de confidentialité.", - "Chaque plugin que sert ViGet est listé avec son empreinte SHA-256, et Tazel vérifie l’empreinte avant d’utiliser le plugin.", + "Il est interdit d’envoyer un logiciel malveillant sur l’Agenceland MCP Marketplace : un logiciel qui nuit aux ordinateurs sur lesquels il s’exécute, les espionne ou en prend le contrôle, ou qui fait autre chose que ce qu’il annonce.", + "Lorsque nous trouvons un tel logiciel ou qu’on nous le signale, nous le retirons du Marketplace : ses fichiers ne sont plus servis et ne sont conservés, hors d’atteinte, qu’à titre de preuve. Nous fermons le compte qui l’a envoyé et transmettons l’adresse IP de l’envoi aux autorités compétentes, comme le décrit la politique de confidentialité.", + "Chaque serveur MCP que sert le Marketplace est listé avec sa version fixée et son empreinte SHA-256, et Agenceland vérifie l’empreinte avant d’installer le serveur.", ], }, { diff --git a/apps/web/lib/policies/ru-RU.ts b/apps/web/lib/policies/ru-RU.ts index 190f03a..92dd9ca 100644 --- a/apps/web/lib/policies/ru-RU.ts +++ b/apps/web/lib/policies/ru-RU.ts @@ -5,7 +5,7 @@ import type { PolicyMessages } from "../policies"; export const ruRU: PolicyMessages = { versionLabel: "Редакция от", - versionDate: "6 ноября 2026 г.", + versionDate: "6 декабря 2026 г.", seeAlso: "См. также", privacy: { title: "Политика конфиденциальности", @@ -15,7 +15,7 @@ export const ruRU: PolicyMessages = { { heading: "Кто мы", paragraphs: [ - "Progmasoft управляет сайтом progmasoft.com, Progmasoft Account, Progmasoft Credentials и Progmasoft Console, ViGet и сайтами продуктов Progmasoft. Эта политика распространяется на все из них. Вопросы о ней присылайте на support@progmasoft.com.", + "Progmasoft управляет сайтом progmasoft.com, Progmasoft Account, Progmasoft Credentials и Progmasoft Console, Agenceland MCP Marketplace и сайтами продуктов Progmasoft. Эта политика распространяется на все из них. Вопросы о ней присылайте на support@progmasoft.com.", ], }, { @@ -29,7 +29,7 @@ export const ruRU: PolicyMessages = { { heading: "Ваш IP-адрес", paragraphs: [ - "Мы храним ваш IP-адрес только для одной цели. ViGet пока не принимает загрузки от аккаунтов: публикует в нём только Progmasoft. Когда это станет возможно, ViGet будет записывать IP-адрес, с которого пришла каждая загрузка, вместе с самой загрузкой. Если окажется, что загрузка содержит вредоносное программное обеспечение, мы используем этот адрес, чтобы установить, откуда она пришла, и передадим его компетентным органам. Ни для чего другого мы его не используем.", + "Мы храним ваш IP-адрес только для одной цели. Agenceland MCP Marketplace пока не принимает загрузки от аккаунтов. Когда это станет возможно, Marketplace будет записывать IP-адрес, с которого пришла каждая загрузка, вместе с самой загрузкой. Если окажется, что загрузка содержит вредоносное программное обеспечение, мы используем этот адрес, чтобы установить, откуда она пришла, и передадим его компетентным органам. Ни для чего другого мы его не используем.", "Мы не храним IP-адреса вместе с вашим аккаунтом, вашими сессиями или в журналах доступа наших веб-серверов.", "Чтобы затруднить подбор паролей, служба входа в течение нескольких минут считает запросы с каждого адреса. Этот счёт находится только в памяти и никуда не записывается.", ], @@ -56,7 +56,7 @@ export const ruRU: PolicyMessages = { { heading: "Как долго мы храним данные", paragraphs: [ - "Данные аккаунта хранятся, пока существует аккаунт. Сессия удаляется после её окончания. IP-адрес загрузки в ViGet будет храниться, пока загрузка находится в ViGet, и ещё один год после её удаления, чтобы можно было разобраться и с поздно поступившим сообщением.", + "Данные аккаунта хранятся, пока существует аккаунт. Сессия удаляется после её окончания. IP-адрес загрузки в Agenceland MCP Marketplace будет храниться, пока загрузка находится в Marketplace, и ещё один год после её удаления, чтобы можно было разобраться и с поздно поступившим сообщением.", ], }, { @@ -76,7 +76,7 @@ export const ruRU: PolicyMessages = { security: { title: "Политика безопасности", description: - "Как Progmasoft защищает ваш аккаунт и ViGet, что запрещено в ViGet и как сообщить об уязвимости.", + "Как Progmasoft защищает ваш аккаунт и Agenceland MCP Marketplace, что запрещено в Marketplace и как сообщить об уязвимости.", sections: [ { heading: "Ваш аккаунт", @@ -92,11 +92,11 @@ export const ruRU: PolicyMessages = { ], }, { - heading: "Вредоносное ПО в ViGet", + heading: "Вредоносное ПО в Agenceland MCP Marketplace", paragraphs: [ - "Загружать в ViGet вредоносное программное обеспечение запрещено: программы, которые вредят компьютерам, на которых работают, шпионят за ними или захватывают над ними контроль, или делают не то, что заявляют.", - "Если мы находим такую программу или нам о ней сообщают, мы убираем её из ViGet: её файлы больше не выдаются и хранятся в недоступном месте только как доказательство. Мы закрываем аккаунт, который её загрузил, и передаём IP-адрес загрузки компетентным органам, как описано в Политике конфиденциальности.", - "Каждый плагин, который выдаёт ViGet, указан со своим дайджестом SHA-256, и Tazel проверяет дайджест перед использованием плагина.", + "Загружать в Agenceland MCP Marketplace вредоносное программное обеспечение запрещено: программы, которые вредят компьютерам, на которых работают, шпионят за ними или захватывают над ними контроль, или делают не то, что заявляют.", + "Если мы находим такую программу или нам о ней сообщают, мы убираем её из Marketplace: её файлы больше не выдаются и хранятся в недоступном месте только как доказательство. Мы закрываем аккаунт, который её загрузил, и передаём IP-адрес загрузки компетентным органам, как описано в Политике конфиденциальности.", + "Каждый MCP-сервер, который выдаёт Marketplace, указан со своей закреплённой версией и дайджестом SHA-256, и Agenceland проверяет дайджест перед установкой сервера.", ], }, { diff --git a/apps/web/lib/policies/v2026-11-06/de-DE.ts b/apps/web/lib/policies/v2026-11-06/de-DE.ts new file mode 100644 index 0000000..2270cb0 --- /dev/null +++ b/apps/web/lib/policies/v2026-11-06/de-DE.ts @@ -0,0 +1,116 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +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 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. ViGet nimmt noch keine Uploads von Konten an: Bisher veröffentlicht nur Progmasoft dort. Sobald es das tut, speichert ViGet die IP-Adresse, von der ein Upload kam, zusammen mit dem Upload. Stellt sich heraus, dass ein 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.", + ], + }, + { + 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 wird 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, und das Analyseskript von Cloudflare.", + ], + }, + { + 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, nehmen wir sie von ViGet: Ihre Dateien werden nicht mehr ausgeliefert und nur noch als Beweismittel unzugänglich aufbewahrt. Wir 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/v2026-11-06/en-US.ts b/apps/web/lib/policies/v2026-11-06/en-US.ts new file mode 100644 index 0000000..864b8e8 --- /dev/null +++ b/apps/web/lib/policies/v2026-11-06/en-US.ts @@ -0,0 +1,116 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +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 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. ViGet does not yet take uploads from accounts: only Progmasoft publishes to it. Once it does, ViGet will record the IP address each upload came from, together with the upload. If an upload turns out to contain malicious software, we will use that address to establish where it came from and give it to the competent authorities. We will 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.", + ], + }, + { + 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 will be 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 and the analytics script of Cloudflare.", + ], + }, + { + 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 take it off ViGet: its files are no longer served, and are kept out of reach only as evidence. We 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/v2026-11-06/fr-FR.ts b/apps/web/lib/policies/v2026-11-06/fr-FR.ts new file mode 100644 index 0000000..3d5b820 --- /dev/null +++ b/apps/web/lib/policies/v2026-11-06/fr-FR.ts @@ -0,0 +1,116 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +import type { PolicyMessages } from "../../policies"; + +export const frFR: PolicyMessages = { + versionLabel: "Version du", + versionDate: "6 novembre 2026", + seeAlso: "Voir aussi", + privacy: { + title: "Politique de confidentialité", + description: + "Ce que Progmasoft conserve à votre sujet, pourquoi il le conserve, et ce qu’il n’en fait jamais.", + sections: [ + { + heading: "Qui nous sommes", + paragraphs: [ + "Progmasoft exploite progmasoft.com, Progmasoft Account, Progmasoft Credentials et la Console Progmasoft, ViGet et les sites des produits Progmasoft. Cette politique les couvre tous. Écrivez à support@progmasoft.com pour toute question à son sujet.", + ], + }, + { + heading: "Ce que conserve votre compte", + paragraphs: [ + "Le nom de votre compte, votre adresse e-mail, et soit une empreinte de votre mot de passe, soit l’identifiant que Google donne à votre identité Google. Nous ne conservons jamais votre mot de passe lui-même : il est haché avant d’être enregistré. Nous conservons aussi la date de création du compte, ainsi que la version de ces politiques que vous avez acceptée et sa date.", + "Tant que vous êtes connecté, nous conservons une empreinte de votre jeton de session et le moment où la session prend fin. Le jeton lui-même n’existe que dans votre navigateur.", + "Si vous enregistrez une application dans la Console Progmasoft, nous conservons ce que vous saisissez pour elle.", + ], + }, + { + heading: "Votre adresse IP", + paragraphs: [ + "Nous conservons votre adresse IP dans un seul but. ViGet n’accepte pas encore d’envois depuis les comptes : seul Progmasoft y publie. Lorsqu’il les acceptera, ViGet enregistrera l’adresse IP d’où provient chaque envoi, avec l’envoi. Si un envoi se révèle contenir un logiciel malveillant, nous utiliserons cette adresse pour établir sa provenance et la transmettrons aux autorités compétentes. Nous ne l’utiliserons à rien d’autre.", + "Nous ne conservons pas d’adresses IP avec votre compte, avec vos sessions ni dans les journaux d’accès de nos serveurs web.", + "Pour freiner les tentatives de deviner un mot de passe, le service de connexion compte les requêtes par adresse pendant quelques minutes. Ce décompte est tenu en mémoire et n’est jamais écrit.", + ], + }, + { + heading: "Nous ne vendons pas vos données", + paragraphs: [ + "Nous ne vendons, ne louons et n’échangeons vos données avec personne, y compris votre adresse IP. Nous ne les utilisons pas pour la publicité et nous ne dressons pas de profil de vous.", + ], + }, + { + heading: "Les services qui voient vos requêtes", + paragraphs: [ + "Nos sites sont servis par Cloudflare, qui nous achemine chaque requête et protège les sites contre les attaques. Pour cela, Cloudflare traite votre adresse IP selon sa propre politique de confidentialité. Les pages utilisent Cloudflare Web Analytics, qui compte les visites sans cookies et sans vous identifier.", + "Si vous vous connectez avec Google, Google nous communique l’identifiant et l’adresse e-mail de votre identité Google, et rien d’autre de votre compte Google.", + ], + }, + { + heading: "Cookies et stockage", + paragraphs: [ + "Nous ne déposons que les cookies dont les sites ont besoin : le cookie de votre session, les cookies de courte durée de la connexion avec Google et de Progmasoft Credentials, et le cookie qui retient votre langue. Votre choix entre clair et sombre est conservé dans le stockage de votre navigateur. Aucun d’eux ne sert à vous suivre.", + ], + }, + { + heading: "Combien de temps nous les conservons", + paragraphs: [ + "Les données du compte sont conservées aussi longtemps que le compte existe. Une session est supprimée une fois terminée. L’adresse IP d’un envoi sur ViGet sera conservée tant que l’envoi est sur ViGet et pendant un an après son retrait, afin qu’un signalement tardif puisse encore être suivi.", + ], + }, + { + heading: "Vos droits", + paragraphs: [ + "Écrivez à support@progmasoft.com depuis l’adresse de votre compte pour savoir ce que nous conservons à votre sujet, pour le corriger ou pour faire supprimer le compte. Nous répondons sous 30 jours.", + ], + }, + { + heading: "Modifications", + paragraphs: [ + "Une nouvelle version de cette politique porte une nouvelle date sur cette page. Nous écrivons aux titulaires des comptes avant qu’une nouvelle version prenne effet.", + ], + }, + ], + }, + security: { + title: "Politique de sécurité", + description: + "Comment Progmasoft protège votre compte et ViGet, ce qui est interdit sur ViGet, et comment signaler une faiblesse.", + sections: [ + { + heading: "Votre compte", + paragraphs: [ + "Un mot de passe compte au moins 12 caractères et n’est conservé que sous forme d’empreinte. Les tentatives de connexion sont limitées en fréquence.", + "Une session dure au plus 30 jours et prend fin lorsque vous vous déconnectez. Son cookie ne peut pas être lu par les scripts de la page et n’est envoyé que par HTTPS.", + ], + }, + { + heading: "Connexions", + paragraphs: [ + "Chaque site de Progmasoft n’est servi que par HTTPS, et les navigateurs reçoivent la consigne de s’y tenir (HSTS). Chaque page porte une Content Security Policy, qui n’autorise que les scripts que la page nomme elle-même et le script d’analyse de Cloudflare.", + ], + }, + { + heading: "Logiciels malveillants sur ViGet", + paragraphs: [ + "Il est interdit d’envoyer un logiciel malveillant sur ViGet : un logiciel qui nuit aux ordinateurs sur lesquels il s’exécute, les espionne ou en prend le contrôle, ou qui fait autre chose que ce qu’il annonce.", + "Lorsque nous trouvons un tel logiciel ou qu’on nous le signale, nous le retirons de ViGet : ses fichiers ne sont plus servis et ne sont conservés, hors d’atteinte, qu’à titre de preuve. Nous fermons le compte qui l’a envoyé et transmettons l’adresse IP de l’envoi aux autorités compétentes, comme le décrit la politique de confidentialité.", + "Chaque plugin que sert ViGet est listé avec son empreinte SHA-256, et Tazel vérifie l’empreinte avant d’utiliser le plugin.", + ], + }, + { + heading: "Ce que nous vous demandons", + paragraphs: [ + "Choisissez un mot de passe que vous n’utilisez nulle part ailleurs, connectez-vous uniquement sur des appareils de confiance et déconnectez-vous sur un ordinateur partagé.", + ], + }, + { + heading: "Signaler une faiblesse", + paragraphs: [ + "Si vous trouvez une faiblesse de sécurité dans un site, un produit ou un paquet de Progmasoft, écrivez à support@progmasoft.com en décrivant ce que vous avez trouvé. Laissez-nous le temps de la corriger avant de la rendre publique, et ne lisez ni ne modifiez les données d’autres personnes pendant vos essais.", + ], + }, + ], + }, +}; diff --git a/apps/web/lib/policies/v2026-11-06/ru-RU.ts b/apps/web/lib/policies/v2026-11-06/ru-RU.ts new file mode 100644 index 0000000..f9d6b33 --- /dev/null +++ b/apps/web/lib/policies/v2026-11-06/ru-RU.ts @@ -0,0 +1,116 @@ +// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com> +// SPDX-License-Identifier: AGPL-3.0-or-later + +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 и сайтами продуктов Progmasoft. Эта политика распространяется на все из них. Вопросы о ней присылайте на support@progmasoft.com.", + ], + }, + { + heading: "Что хранит ваш аккаунт", + paragraphs: [ + "Имя аккаунта, адрес электронной почты и либо хеш вашего пароля, либо идентификатор, который Google присваивает вашей учётной записи Google. Сам пароль мы никогда не храним: перед сохранением он хешируется. Мы также храним время создания аккаунта и то, какую редакцию этих политик и когда вы приняли.", + "Пока вы вошли в систему, мы храним дайджест токена вашей сессии и момент её окончания. Сам токен существует только в вашем браузере.", + "Если вы регистрируете приложение в Progmasoft Console, мы храним то, что вы для него указываете.", + ], + }, + { + heading: "Ваш IP-адрес", + paragraphs: [ + "Мы храним ваш IP-адрес только для одной цели. ViGet пока не принимает загрузки от аккаунтов: публикует в нём только Progmasoft. Когда это станет возможно, ViGet будет записывать IP-адрес, с которого пришла каждая загрузка, вместе с самой загрузкой. Если окажется, что загрузка содержит вредоносное программное обеспечение, мы используем этот адрес, чтобы установить, откуда она пришла, и передадим его компетентным органам. Ни для чего другого мы его не используем.", + "Мы не храним IP-адреса вместе с вашим аккаунтом, вашими сессиями или в журналах доступа наших веб-серверов.", + "Чтобы затруднить подбор паролей, служба входа в течение нескольких минут считает запросы с каждого адреса. Этот счёт находится только в памяти и никуда не записывается.", + ], + }, + { + heading: "Мы не продаём ваши данные", + paragraphs: [ + "Мы не продаём, не сдаём в аренду и не передаём ваши данные никому, включая ваш IP-адрес. Мы не используем их для рекламы и не составляем ваш профиль.", + ], + }, + { + heading: "Службы, которые видят ваши запросы", + paragraphs: [ + "Наши сайты обслуживаются через Cloudflare, который доставляет нам каждый запрос и защищает сайты от атак. Для этого Cloudflare обрабатывает ваш IP-адрес согласно собственной политике конфиденциальности. Страницы используют Cloudflare Web Analytics, который считает посещения без cookie и без вашей идентификации.", + "Если вы входите через Google, Google сообщает нам идентификатор и адрес электронной почты вашей учётной записи Google и больше ничего из вашего аккаунта Google.", + ], + }, + { + 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, которая разрешает только скрипты, названные самой страницей, и скрипт аналитики Cloudflare.", + ], + }, + { + heading: "Вредоносное ПО в ViGet", + paragraphs: [ + "Загружать в ViGet вредоносное программное обеспечение запрещено: программы, которые вредят компьютерам, на которых работают, шпионят за ними или захватывают над ними контроль, или делают не то, что заявляют.", + "Если мы находим такую программу или нам о ней сообщают, мы убираем её из 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 index 41bcd13..65472ea 100644 --- a/apps/web/lib/policy-messages.ts +++ b/apps/web/lib/policy-messages.ts @@ -2,20 +2,46 @@ // SPDX-License-Identifier: AGPL-3.0-or-later import type { Locale } from "./localization"; -import type { PolicyMessages } from "./policies"; +import { + type PolicyMessages, + type PolicyVersion, + policyVersion, +} from "./policies"; import { deDE } from "./policies/de-DE"; import { enUS } from "./policies/en-US"; import { frFR } from "./policies/fr-FR"; import { ruRU } from "./policies/ru-RU"; +import { deDE as deDE20261106 } from "./policies/v2026-11-06/de-DE"; +import { enUS as enUS20261106 } from "./policies/v2026-11-06/en-US"; +import { frFR as frFR20261106 } from "./policies/v2026-11-06/fr-FR"; +import { ruRU as ruRU20261106 } from "./policies/v2026-11-06/ru-RU"; -/** The policies in every published language. */ -export const policyMessages: Record<Locale, PolicyMessages> = { - "en-US": enUS, - "de-DE": deDE, - "ru-RU": ruRU, - "fr-FR": frFR, +/** Every published version of the policies in every published language. */ +export const policyMessagesByVersion: Record< + PolicyVersion, + Record<Locale, PolicyMessages> +> = { + "2026-11-06": { + "en-US": enUS20261106, + "de-DE": deDE20261106, + "ru-RU": ruRU20261106, + "fr-FR": frFR20261106, + }, + "2026-12-06": { + "en-US": enUS, + "de-DE": deDE, + "ru-RU": ruRU, + "fr-FR": frFR, + }, }; -export function getPolicyMessages(locale: Locale): PolicyMessages { - return policyMessages[locale]; +/** The newest version in every published language. */ +export const policyMessages: Record<Locale, PolicyMessages> = + policyMessagesByVersion[policyVersion]; + +export function getPolicyMessages( + locale: Locale, + version: PolicyVersion = policyVersion, +): PolicyMessages { + return policyMessagesByVersion[version][locale]; } diff --git a/apps/web/tests/policies.test.mjs b/apps/web/tests/policies.test.mjs index 80b1016..019fed0 100644 --- a/apps/web/tests/policies.test.mjs +++ b/apps/web/tests/policies.test.mjs @@ -5,7 +5,16 @@ 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 { + isPolicyVersion, + policyAfter, + policyInEffect, + policyUrls, + policyVersion, + policyVersions, + policyVersionWords, +} from "../lib/policies.ts"; +import { enUS as enUS20261106 } from "../lib/policies/v2026-11-06/en-US.ts"; import { deDE } from "../lib/policies/de-DE.ts"; import { enUS } from "../lib/policies/en-US.ts"; import { frFR } from "../lib/policies/fr-FR.ts"; @@ -41,7 +50,7 @@ test("every language has both policies, part for part", () => { } }); -test("the privacy policy keeps the IP address for ViGet uploads only and sells nothing", () => { +test("the privacy policy keeps the IP address for marketplace uploads only and sells nothing", () => { const privacy = enUS.privacy.sections.map((section) => section.paragraphs.join(" "), ); @@ -51,9 +60,12 @@ test("the privacy policy keeps the IP address for ViGet uploads only and sells n assert.ok(address); assert.match( address, - /ViGet will record the IP address each upload came from/, + /the marketplace will record the IP address each upload came from/, + ); + assert.match( + address, + /The Agenceland MCP Marketplace does not yet take uploads from accounts/, ); - assert.match(address, /ViGet does not yet take uploads from accounts/); assert.match(address, /competent authorities/); assert.ok( privacy.some((text) => @@ -75,3 +87,34 @@ test("registration names the policies in every language", () => { security: "https://progmasoft.com/security", }); }); + +test("the newest version names the Agenceland MCP Marketplace and no closed service", () => { + for (const locale of supportedLocales) { + const text = JSON.stringify(policies[locale]); + assert.doesNotMatch(text, /ViGet|Tazel/, locale); + assert.match(text, /Agenceland MCP Marketplace/, locale); + } + // The version of 2026-11-06 stays as it was published. + assert.match(JSON.stringify(enUS20261106), /ViGet does not yet take uploads/); + assert.equal(enUS20261106.versionDate, "6 November 2026"); + assert.equal(enUS.versionDate, "6 December 2026"); +}); + +test("the version in effect is the newest whose date has come", () => { + assert.deepEqual([...policyVersions], ["2026-11-06", "2026-12-06"]); + assert.equal(policyVersion, policyVersions.at(-1)); + assert.equal(policyInEffect(new Date("2026-11-21T12:00:00Z")), "2026-11-06"); + assert.equal(policyInEffect(new Date("2026-12-05T23:59:59Z")), "2026-11-06"); + assert.equal(policyInEffect(new Date("2026-12-06T00:00:00Z")), "2026-12-06"); + assert.equal(policyInEffect(new Date("2030-01-01T00:00:00Z")), "2026-12-06"); + assert.equal(policyAfter("2026-11-06"), "2026-12-06"); + assert.equal(policyAfter("2026-12-06"), undefined); + assert.ok(isPolicyVersion("2026-11-06")); + assert.ok(!isPolicyVersion("2026-11-07")); + assert.ok(!isPolicyVersion("latest")); + for (const locale of supportedLocales) { + for (const word of Object.values(policyVersionWords[locale])) { + assert.ok(word.length > 0, locale); + } + } +}); diff --git a/docs/ACCOUNT-API.md b/docs/ACCOUNT-API.md index eb6b529..2105a5c 100644 --- a/docs/ACCOUNT-API.md +++ b/docs/ACCOUNT-API.md @@ -45,7 +45,8 @@ Surrounding white space of an account name or email address is ignored. ``` `acceptPolicies` says that the person accepted the Privacy Policy and the Security Policy; anything but `true` is -refused on that field. The account records the version of the policies it accepted. +refused on that field. The account records the version of the policies it accepted: the newest published one, even +before it takes effect. **201 Created.** The session cookie is set, `Location` names the account, and the body is the account: @@ -164,6 +165,7 @@ The client address comes from `X-Forwarded-For`, which the service accepts from | `Authentication:Google:ClientSecret` | Google OAuth client secret | empty; Google sign-in is off | | `AllowedHosts` | host names the service answers | the apex, `www`, `account`, `credentials`, `authorize` and `console` hosts, and loopback (`appsettings.json`) | | `ConnectionStrings:Accounts` | the PostgreSQL database of accounts, sessions and OAuth | none; without it the store is in memory (development) | +| `PolicyNotices:SmtpHost`, `PolicyNotices:SmtpPort` | the mail server the notices of new policies go to | `127.0.0.1`, `25` | | `OAuth:SigningKeyPath`, `OAuth:EncryptionKeyPath` | the keys that sign identity tokens and encrypt access tokens | see [Progmasoft OAuth](OAUTH.md) | | `ASPNETCORE_URLS` | listener address | `http://127.0.0.1:5085` in production | @@ -172,5 +174,5 @@ belong in the process environment or a secret manager and are never committed. ## What the API does not do -It does not verify email addresses, send mail, reset passwords, list accounts or delete accounts. See -[Known limitations](LIMITATIONS.md). +It does not verify email addresses, reset passwords, list accounts or delete accounts, and the only mail it sends is +the notice of a new version of the policies, from an operations command. See [Known limitations](LIMITATIONS.md). diff --git a/docs/LIMITATIONS.md b/docs/LIMITATIONS.md index 6d82b97..ca03927 100644 --- a/docs/LIMITATIONS.md +++ b/docs/LIMITATIONS.md @@ -30,10 +30,10 @@ Registration accepts any well-formed address. Nothing proves that the person who never linked to an existing account by address. - **What closes it.** A verification message and a confirmed state on the account. -## The API sends no mail +## The API sends only the notices of new policies -The mail host described in the [mail boundary](../ops/mail/README.md) is prepared for verification and recovery -messages, but the API contains no code that sends mail. +The API sends one kind of mail: the notice of a new version of the policies, from `noreply@progmasoft.com`, through +`accounts notify-policies` (see [Operations](../ops/README.md)). It sends no verification or recovery message. - **Consequence.** There is no automated password recovery. The recovery page asks the user to write to support from the address registered to the account. diff --git a/ops/README.md b/ops/README.md index b238d19..a2a8af7 100644 --- a/ops/README.md +++ b/ops/README.md @@ -99,6 +99,24 @@ COMMIT; Delete the dump once the deletion is confirmed. +### A new version of the policies + +The policies promise to write to account holders before a new version takes effect. A version is the date it takes +effect (`apps/web/lib/policies.ts` and `PolicyAcceptance.CurrentVersion` name the newest); `/privacy` and `/security` +show the version in effect and link the next one, and `/privacy/<version>` shows any published version. Once the new +version is deployed, tell every account holder who accepted an earlier one, as the `progmaweb` user with the +environment of the service: + +```sh +cd /srv/progmaweb/current/api +set -a; . /etc/progmaweb/account.env; set +a +runuser -u progmaweb --preserve-environment -- /usr/bin/dotnet Progmaweb.Api.dll accounts notify-policies --dry-run +runuser -u progmaweb --preserve-environment -- /usr/bin/dotnet Progmaweb.Api.dll accounts notify-policies +``` + +The notice comes from `noreply@progmasoft.com` with replies to support, in the four languages. Each one sent is +recorded in `policy_notices`, so a run after a failure sends only what is left and a second run sends nothing. + ### Logs without client addresses The logs keep no IP address. On both servers the `main` log format of diff --git a/ops/mail/README.md b/ops/mail/README.md index 31f9afa..0b695b8 100644 --- a/ops/mail/README.md +++ b/ops/mail/README.md @@ -5,9 +5,9 @@ SPDX-License-Identifier: AGPL-3.0-or-later # Progmasoft mail boundary -> **Status.** This document describes the mail host and the contract the account service will use. The account API -> does not send mail yet: there is no verification message and no automated password recovery in the code. See -> [Known limitations](../../docs/LIMITATIONS.md). +> **Status.** The account API sends one kind of mail: the notice of a new version of the policies, submitted to +> Postfix on `127.0.0.1:25` by `accounts notify-policies`. There is no verification message and no automated password +> recovery in the code. See [Known limitations](../../docs/LIMITATIONS.md). The Progmasoft Account API submits verification and password-recovery messages to Postfix over the loopback interface. Postfix requires TLS for remote SMTP delivery and signs `progmasoft.com` mail with OpenDKIM selector `registry`. The automated