<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=MindAttic.Authentication%2Frfc%2F0001-provisioning-cli</id>
	<title>MindAttic.Authentication/rfc/0001-provisioning-cli - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=MindAttic.Authentication%2Frfc%2F0001-provisioning-cli"/>
	<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication/rfc/0001-provisioning-cli&amp;action=history"/>
	<updated>2026-12-06T18:03:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.3</generator>
	<entry>
		<id>https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication/rfc/0001-provisioning-cli&amp;diff=547&amp;oldid=prev</id>
		<title>Docs Sync: md2wiki: sync from MindAttic.Docs</title>
		<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=MindAttic.Authentication/rfc/0001-provisioning-cli&amp;diff=547&amp;oldid=prev"/>
		<updated>2026-11-29T20:25:28Z</updated>

		<summary type="html">&lt;p&gt;md2wiki: sync from MindAttic.Docs&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= RFC 0001 — Operator provisioning CLI for CSPRNG secrets =&lt;br /&gt;
&lt;br /&gt;
== Problem ==&lt;br /&gt;
&lt;br /&gt;
[[MindAttic.Authentication/BIBLE|M.AUTH-LAW-2]] requires that the running app never write production secrets, yet a fresh deployment needs a CSPRNG pepper, a Data-Protection KEK, and a reset-token key to exist in Vault before first request. Today these must be hand-generated, which is error-prone and tempts insecure shortcuts. We need a &amp;lt;em&amp;gt;separate&amp;lt;/em&amp;gt; operator tool that generates and seeds them.&lt;br /&gt;
&lt;br /&gt;
== Options compared ==&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strong&amp;gt;In-app rotation UI that writes secrets.&amp;lt;/strong&amp;gt; Rejected — violates [[MindAttic.Authentication/BIBLE|M.AUTH-LAW-2]] (app would write prod secrets) and widens the prod write surface.&lt;br /&gt;
# &amp;lt;strong&amp;gt;Pure documentation / manual &amp;lt;code&amp;gt;openssl&amp;lt;/code&amp;gt;.&amp;lt;/strong&amp;gt; Works but is unauditable and easy to get wrong (wrong length, wrong bucket, wrong key id).&lt;br /&gt;
# &amp;lt;strong&amp;gt;A separate &amp;lt;code&amp;gt;dotnet run --provision&amp;lt;/code&amp;gt; operator tool (in &amp;lt;code&amp;gt;tools/&amp;lt;/code&amp;gt;).&amp;lt;/strong&amp;gt; Generates CSPRNG values; in &amp;lt;strong&amp;gt;dev&amp;lt;/strong&amp;gt; writes to the Vault file &amp;lt;code&amp;gt;CredentialStore&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;TokenStore&amp;lt;/code&amp;gt;; in &amp;lt;strong&amp;gt;prod&amp;lt;/strong&amp;gt; prints operator/IaC instructions to seed env / Azure Key Vault out-of-band. Chosen.&lt;br /&gt;
&lt;br /&gt;
== Decision ==&lt;br /&gt;
&lt;br /&gt;
Build option 3 as a standalone console tool under &amp;lt;code&amp;gt;tools/&amp;lt;/code&amp;gt;, depending on &amp;lt;code&amp;gt;MindAttic.Vault&amp;lt;/code&amp;gt; and the library&amp;#039;s &amp;lt;code&amp;gt;Secrets&amp;lt;/code&amp;gt; contract. It emits &amp;lt;code&amp;gt;pepper.vN&amp;lt;/code&amp;gt;, the DP KEK, the reset-token key, the CAPTCHA secret, and a one-time bootstrap token, each ≥32 bytes CSPRNG, redacting values from any log.&lt;br /&gt;
&lt;br /&gt;
== What NOT to do ==&lt;br /&gt;
&lt;br /&gt;
* Do &amp;lt;strong&amp;gt;not&amp;lt;/strong&amp;gt; let the tool ship inside the NuGet package or be reachable from the web host.&lt;br /&gt;
* Do &amp;lt;strong&amp;gt;not&amp;lt;/strong&amp;gt; write prod secrets from the tool — prod path only &amp;lt;em&amp;gt;prints&amp;lt;/em&amp;gt; instructions.&lt;br /&gt;
* Do &amp;lt;strong&amp;gt;not&amp;lt;/strong&amp;gt; invent default secret values (no fallback-to-empty); absent prod secrets must keep failing closed.&lt;br /&gt;
&lt;br /&gt;
== Phased plan (with risk) ==&lt;br /&gt;
&lt;br /&gt;
# Console scaffold + CSPRNG generation (low risk).&lt;br /&gt;
# Dev file-store seeding via Vault &amp;lt;code&amp;gt;CredentialStore&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;TokenStore&amp;lt;/code&amp;gt; (low risk).&lt;br /&gt;
# Prod &amp;quot;print instructions only&amp;quot; path + Key Vault guidance (medium risk — must never silently write).&lt;br /&gt;
# Wire one-time bootstrap token consumption with &amp;lt;code&amp;gt;AuthBootstrapper&amp;lt;/code&amp;gt; (medium risk — race-safe seeding).&lt;br /&gt;
&lt;br /&gt;
== Graduates into ==&lt;br /&gt;
&lt;br /&gt;
[[MindAttic.Authentication/BIBLE|BIBLE §4.1 / §6]] (the &amp;lt;code&amp;gt;tools/&amp;lt;/code&amp;gt; provisioning project) and [https://github.com/mindattic/MindAttic.Authentication/blob/main/docs/USER_STORIES.md USER_STORIES] backlog item &amp;lt;strong&amp;gt;M.AUTH-US-F3&amp;lt;/strong&amp;gt; when shipped.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-crumb&amp;quot;&amp;gt;Part of [[MindAttic.Authentication]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-source&amp;quot;&amp;gt;From [https://github.com/mindattic/MindAttic.Authentication/blob/main/docs/rfc/0001-provisioning-cli.md MindAttic.Authentication/docs/rfc/0001-provisioning-cli.md] via MindAttic.Docs; synced automatically, so edit the repo, not this page.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:MindAttic.Authentication]]&lt;/div&gt;</summary>
		<author><name>Docs Sync</name></author>
	</entry>
</feed>