Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ paths = [
'''forge-contracts/vectors/.*\.json''',
# The generator for those vectors.
'''forge-contracts/schema/vectors\.py''',
# Interop vectors vendored from platform-auth (App Connect, passkey vault): keys derived from
# fixed seeds and published upstream so every app reproduces the same bytes.
'''forge-web/lib/vendor/platform-auth/[^/]+/(vectors\.json|__vectors__/[^/]+\.json)''',
# Fixtures for the secret scanner's own tests: fake tokens and the public Dash Core WIF
# vectors, which must look real for the scanner to be tested.
'''tools/secret-scan-vectors/.*''',
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Members-only content in public repositories, Environments and the secret scan. P
- **Environments** (`dg env`): configuration and secrets kept outside git, encrypted for a repository's **Maintainers** (the default for `production`, `prod*`, `staging` and `release*`) or its **Members**, changed by maintainers only, injected with `dg env run` or written to a git-ignored file with `dg env export -o .env`. Two changes at once fail closed (E608) until a maintainer keeps one. `dg collab remove` lists the values the removed member could read. See [Environments](docs/guides/environments.md).
- **Secrets in a public push.** `git push` to a public repository checks every file it publishes for the first time. It refuses a new `.env` file, a PEM private key, an AWS key pair or a GitHub or GitLab token with a valid checksum (E807), and warns about `.envrc` files, random-looking values and keys in test folders. `-o allow-secret=<fingerprint>` or `.forge/secret-scan-allow` lets a checked finding through. See [Secrets in a push](docs/guides/quick-start.md#secrets-in-a-push).
- **Wallet sign-in keeps your encryption key.** The web app stores the encryption key the Dash Wallet registers in the browser's vault, every one of them across approvals, so private repositories and members-only content open after one unlock per tab. When the identity's key came from somewhere else, it says "Your encryption key is held elsewhere. Import it under Settings → Private repos."
- **Wallet sign-in with App Connect v2: one approval for all of Forge.** Where the network runs protocol 14 and Forge is deployed (devnet sakura today), the wallet tile comes first and shows an App Connect v2 request: the wallet adds one key for this browser that works on every Forge contract, capped at 0.05 DASH of spending and expiring after 90 days (a wallet may offer other limits), so the extra approvals of the older exchange are not asked for. The phone link returns to a new `/connect/` page, and the sign-in checks the wallet again when the tab regains focus. A key a wallet granted is renewed in that wallet (**Renew in your wallet**, in the low-funds banner, the top-up sheet and Settings → This browser's key); the identity file or recovery phrase still works. If your wallet's build has no App Connect v2, **Show the older code** gives today's request. A v2 sign-in does not bring an encryption key: set up private and members-only content in Settings. We know of no released Dash Wallet that speaks App Connect v2 yet; the [wallet sign-in notes](docs/design/wallet-login.md#app-connect-v2-one-approval-for-all-of-forge) say what works today.

### Changed

Expand Down
4 changes: 2 additions & 2 deletions docs/design/ux-dx-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ With no storage profile the command stops before creating anything: *"No storage
### 2.2 Browser: getting an identity
Sign-in sheet (replaces `login-modal.tsx`): three tiles plus an "Advanced" disclosure.

1. **Use my Dash wallet** (app-connect, PV14; first when the contract exists on the active network). App creates an ephemeral keypair → QR / deep link with the request (group `dash-forge`; one AUTHENTICATION HIGH key, budget 0.05 DASH, expiry 90 days; ENCRYPTION optional for private repos) → polls `loginKeyResponse` by `appEphemeralPubKeyHash` → decrypts the grant → **verifies on-chain** that the key is live on the responder with the requested bounds, budget and expiry → vault. Waiting copy: *"Approve in your wallet. Forge gets a key that can spend at most 0.05 DASH, only here, until <date>."* After 3 min: *"No response yet. Keep this tab open, or choose another method."* If no wallet supports it yet the tile says so — *"needs a wallet with Platform login (list)"*.
1. **Use my Dash wallet** (App Connect v2 where the chain runs PV14 and Forge is deployed; first where a wallet can answer, else last with the reason). App creates an ephemeral keypair → QR (and, on a phone, a deep link that also carries a return address `/connect/`) with the request (group `dash-forge`; one AUTHENTICATION HIGH key, budget 0.05 DASH, expiry 90 days; no encryption key, since no Forge contract allows a wallet-issued one) → polls `loginKeyResponse` by `appEphemeralPubKeyHash`, at once when the tab regains focus or the wallet returns → decrypts the grant → **verifies on-chain** that the key is live on the responder with the requested bounds, budget and expiry (the budget may be higher: wallets offer presets from 0.1 DASH) → confirm step ("A wallet answered for this identity": compare the username and id with the wallet) → vault. One approval covers all four Forge contracts, so no guided grants follow. Waiting copy: *"Approve in your wallet. One approval covers all of Forge, spending up to 0.05 DASH until <date>. Your wallet may offer other limits."* A link under the code, *"Using a Dash Wallet build without App Connect v2? Show the older code"*, switches to the older exchange (one approval per contract, guided) and back. If no wallet supports either yet the tile says so. Details: [wallet-login.md](wallet-login.md#app-connect-v2-one-approval-for-all-of-forge).
2. **Create a new identity** (funds from any Dash wallet). (i) 12-word mnemonic generated in-browser; the user confirms three words before continuing; (ii) deposit QR with amount (default 0.05 DASH, min 0.02; *"This becomes your Platform credits. ~0.0005 DASH per issue or push."*); (iii) watch the address, build and broadcast the asset lock, wait for InstantSend, register the identity **with the limited key inside the IdentityCreate** so no second signature is needed; (iv) the master key exists only in memory during this step. Note under the QR: *"This page watches for your deposit through the Dash network's own nodes, and asks a block explorer (`insight.dash.org`, changeable in Settings) only if they cannot answer. Neither can take funds or keys."*
3. **Import an identity file** (bridge JSON, `dg auth export`, or mnemonic): the master key signs one `IdentityUpdate` registering a limited key and is discarded. *"Your master key is used once, right now, to create a limited key for this browser. It is not stored."*

Expand All @@ -83,7 +83,7 @@ Sign-in sheet (replaces `login-modal.tsx`): three tiles plus an "Advanced" discl
- Holds limited key(s), storage credentials (§3), the local spend ledger. Never the master key.
- AES-256-GCM under **passkey PRF** when available, else **Argon2id(passphrase)** (m=64 MiB, t=3); both can be enrolled. Auto-lock after 12 h or sign-out.
- Header pill: DPNS name (or 8-char id), balance, and a thin **key budget bar**. Tooltip: *"This browser's key: 0.031 of 0.05 DASH left · expires 24 Dec."*
- Budget < 20 % or expiry < 7 days: amber pill + banner *"This browser's key is nearly used up. Renew (uses your master key once)."* Renewal = a new limited key via any of the three routes; `IdentityKeyLimitsUpdate` top-up when a master key was imported anyway.
- Budget < 20 % or expiry < 7 days: amber pill + banner *"This browser's key is nearly used up. Renew (uses your master key once)."* Renewal = a new limited key via any of the three routes; `IdentityKeyLimitsUpdate` top-up when a master key was imported anyway. A key a wallet granted through App Connect is renewed in that wallet (**Renew in your wallet**: choose the vault protection first, then approve the new code; the wallet disables the old key in the same update), with the identity file or phrase as the other way.

### 2.4 CLI auth
```
Expand Down
Loading
Loading