Skip to content

Commit ac0637a

Browse files
Add Windows support research and certificate setup documentation
Includes comprehensive research on Tauri v2 Windows distribution: - Code signing options (Azure Trusted Signing, SSL.com) - WebView2 runtime handling - NSIS installer configuration - CI/CD pipeline setup with GitHub Actions - SmartScreen and Windows Defender considerations Certificate setup guide covers Individual and Organization validation paths for Azure, plus SSL.com as backup option. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent bad4b01 commit ac0637a

2 files changed

Lines changed: 976 additions & 0 deletions

File tree

docs/windows-certificate-setup.md

Lines changed: 299 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,299 @@
1+
# Windows Code Signing Certificate Setup Options
2+
3+
This document covers the three recommended options for signing Windows builds of Maple for distribution.
4+
5+
## Quick Comparison
6+
7+
| Option | Cost | Approval Time | Publisher Name | CI/CD Integration | Best For |
8+
|--------|------|---------------|----------------|-------------------|----------|
9+
| Azure Individual | ~$10/month | 1-3 days | Your personal name | OIDC (keyless) | Immediate start, indie apps |
10+
| Azure Organization | ~$10/month | 1-3 days | Legal business name | OIDC (keyless) | Established companies (3+ years) |
11+
| SSL.com eSigner | ~$239-499/year | 1-5 days | Business or personal | TOTP secrets | Backup option, flexible requirements |
12+
13+
---
14+
15+
## Option 1: Azure Trusted Signing - Individual Validation
16+
17+
**Best for:** Starting immediately without business history requirements.
18+
19+
**Publisher shown:** "Published by: [Your Legal Name]"
20+
21+
### Prerequisites
22+
- Azure account with Pay-As-You-Go subscription
23+
- Government-issued photo ID (passport or driver's license)
24+
- Microsoft Authenticator app on mobile device
25+
- US or Canada residency
26+
27+
### Setup Steps
28+
29+
#### 1. Create Azure Account
30+
```
31+
https://portal.azure.com
32+
```
33+
- Sign up for Pay-As-You-Go subscription if you don't have one
34+
- No upfront costs - billed monthly based on usage
35+
36+
#### 2. Register the Resource Provider
37+
1. Go to Azure Portal → Subscriptions → [Your Subscription]
38+
2. Left sidebar → Settings → Resource providers
39+
3. Search for `Microsoft.CodeSigning`
40+
4. Click "Register" and wait for status to show "Registered"
41+
42+
#### 3. Create Trusted Signing Account
43+
1. Search for "Trusted Signing" in Azure Portal
44+
2. Click "Create"
45+
3. Select your subscription and resource group
46+
4. Choose a region (e.g., "West US" → endpoint: `https://wus.codesigning.azure.net`)
47+
5. Choose "Basic" SKU ($9.99/month)
48+
6. Create the resource
49+
50+
#### 4. Complete Identity Validation
51+
1. In your Trusted Signing resource → "Identity validation"
52+
2. Select "Individual"
53+
3. Follow the prompts:
54+
- Upload government-issued photo ID
55+
- Complete biometric/liveness check via Microsoft Authenticator
56+
- Provide current address (utility bill if ID address differs)
57+
4. Wait 1-3 business days for approval
58+
59+
#### 5. Create Certificate Profile
60+
1. After identity validation completes → "Certificate profiles"
61+
2. Click "Add"
62+
3. Select "Public Trust" (required for public distribution)
63+
4. Enter profile name (e.g., "maple-signing")
64+
5. The certificate will be generated on-demand during signing
65+
66+
#### 6. Create App Registration for CI/CD
67+
1. Go to Azure Entra ID (Azure Active Directory)
68+
2. App registrations → New registration
69+
3. Name: "GitHub Actions - Maple Signing"
70+
4. Leave defaults, click Register
71+
5. Note the **Application (client) ID** and **Directory (tenant) ID**
72+
73+
#### 7. Configure Federated Credentials (OIDC)
74+
1. In your App Registration → Certificates & secrets
75+
2. Federated credentials → Add credential
76+
3. Select "GitHub Actions deploying Azure resources"
77+
4. Configure:
78+
- Organization: `OpenSecretCloud`
79+
- Repository: `Maple`
80+
- Entity type: `Branch` (for `master`) or `Tag` (for releases)
81+
- Name: "github-actions-release"
82+
5. Add another for tags if needed: Entity type `Tag`, value `v*`
83+
84+
#### 8. Assign Signing Role
85+
1. Go to your Trusted Signing Account resource
86+
2. Access control (IAM) → Add role assignment
87+
3. Role: "Trusted Signing Certificate Profile Signer"
88+
4. Members: Select your App Registration service principal
89+
5. Review + assign
90+
91+
### GitHub Secrets Required
92+
```
93+
AZURE_CLIENT_ID = [App Registration Client ID]
94+
AZURE_TENANT_ID = [Directory/Tenant ID]
95+
AZURE_SUBSCRIPTION_ID = [Your Azure Subscription ID]
96+
AZURE_ENDPOINT = https://wus.codesigning.azure.net (or your region)
97+
AZURE_ACCOUNT = [Trusted Signing Account name]
98+
AZURE_PROFILE = [Certificate Profile name]
99+
```
100+
101+
---
102+
103+
## Option 2: Azure Trusted Signing - Organization Validation
104+
105+
**Best for:** Companies with 3+ years of verifiable history wanting professional branding.
106+
107+
**Publisher shown:** "Published by: [Your Legal Business Name]"
108+
109+
### Prerequisites
110+
- Everything from Individual Validation, plus:
111+
- US or Canada registered business entity
112+
- **3+ years of verifiable business history** (tax filings, business registration)
113+
- D-U-N-S number (recommended - speeds up verification)
114+
115+
### Setup Steps
116+
117+
Same as Individual Validation except:
118+
119+
#### 4. Complete Identity Validation (Organization)
120+
1. In your Trusted Signing resource → "Identity validation"
121+
2. Select "Organization" (not Individual)
122+
3. Provide:
123+
- Legal business name (exactly as registered)
124+
- Business address
125+
- EIN or business registration number
126+
- D-U-N-S number (if available)
127+
- Primary contact information
128+
4. Microsoft will verify against public business records
129+
5. Wait 1-3 business days (may take longer without D-U-N-S)
130+
131+
### If Rejected
132+
- Most common reason: Business history less than 3 years
133+
- Alternative: Use Individual Validation instead
134+
- You can switch to Organization later when you qualify
135+
136+
---
137+
138+
## Option 3: SSL.com eSigner (Backup Option)
139+
140+
**Best for:** Those who can't use Azure, or need more flexible business verification.
141+
142+
**Publisher shown:** Business name or personal name (depending on cert type)
143+
144+
### Pricing
145+
- OV Code Signing: ~$239/year (basic)
146+
- EV Code Signing: ~$499/year (extended validation)
147+
- eSigner service included or add-on depending on plan
148+
149+
### Prerequisites
150+
- Credit card for payment
151+
- Government-issued ID
152+
- For OV/EV: Business registration documents, domain ownership
153+
154+
### Setup Steps
155+
156+
#### 1. Purchase Certificate
157+
1. Go to https://www.ssl.com/certificates/code-signing/
158+
2. Select "Code Signing" (OV) or "EV Code Signing"
159+
3. Choose certificate term (1-3 years)
160+
4. During checkout, select "eSigner" for cloud signing (required for CI/CD)
161+
162+
#### 2. Complete Validation
163+
- **Individual/OV:** Government ID, phone verification
164+
- **Business/EV:** Business documents, callback verification, may require lawyer letter if under 3 years
165+
166+
#### 3. Set Up eSigner
167+
1. After validation, access SSL.com dashboard
168+
2. Go to eSigner settings
169+
3. Generate TOTP secret (for 2FA in CI/CD)
170+
4. Note your credential ID
171+
172+
#### 4. Configure GitHub Secrets
173+
```
174+
ES_USERNAME = [SSL.com account email]
175+
ES_PASSWORD = [SSL.com account password]
176+
CREDENTIAL_ID = [eSigner credential ID]
177+
ES_TOTP_SECRET = [TOTP secret for automated 2FA]
178+
```
179+
180+
### GitHub Actions Integration
181+
```yaml
182+
- name: Sign with SSL.com eSigner
183+
uses: sslcom/esigner-codesign@develop
184+
with:
185+
command: sign
186+
username: ${{ secrets.ES_USERNAME }}
187+
password: ${{ secrets.ES_PASSWORD }}
188+
credential_id: ${{ secrets.CREDENTIAL_ID }}
189+
totp_secret: ${{ secrets.ES_TOTP_SECRET }}
190+
file_path: frontend/src-tauri/target/release/bundle/nsis/*.exe
191+
override: true
192+
```
193+
194+
### Pros/Cons vs Azure
195+
**Pros:**
196+
- More flexible validation requirements
197+
- EV certificates available (though less relevant post-2024)
198+
- Works internationally
199+
200+
**Cons:**
201+
- More expensive (~$239-499/year vs ~$120/year)
202+
- Uses secrets instead of OIDC (less secure)
203+
- Slightly more complex CI/CD setup
204+
205+
---
206+
207+
## GitHub Actions Workflow Snippet (Azure)
208+
209+
Add this to your release workflow for Windows builds:
210+
211+
```yaml
212+
build-windows:
213+
runs-on: windows-latest
214+
permissions:
215+
id-token: write # Required for OIDC
216+
contents: write
217+
218+
steps:
219+
- uses: actions/checkout@v4
220+
221+
- name: Setup Bun
222+
uses: oven-sh/setup-bun@v1
223+
with:
224+
bun-version: 1.2.2
225+
226+
- name: Install Rust
227+
uses: dtolnay/rust-toolchain@stable
228+
with:
229+
targets: x86_64-pc-windows-msvc
230+
231+
- name: Azure Login (OIDC)
232+
uses: azure/login@v2
233+
with:
234+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
235+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
236+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
237+
238+
- name: Install Azure Signing Tool
239+
shell: powershell
240+
run: dotnet tool install --global Azure.CodeSigning.Tool
241+
242+
- name: Create Signing Script
243+
shell: powershell
244+
run: |
245+
$script = @"
246+
param([string]`$file)
247+
& acs tool sign -v ``
248+
-u "${{ secrets.AZURE_ENDPOINT }}" ``
249+
-a "${{ secrets.AZURE_ACCOUNT }}" ``
250+
-p "${{ secrets.AZURE_PROFILE }}" ``
251+
-i `$file
252+
"@
253+
Set-Content -Path ".\filesign.ps1" -Value $script
254+
echo "$PWD" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
255+
256+
- name: Install frontend dependencies
257+
working-directory: ./frontend
258+
run: bun install
259+
260+
- name: Build Tauri App
261+
uses: tauri-apps/tauri-action@v0
262+
env:
263+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
264+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
265+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
266+
VITE_OPEN_SECRET_API_URL: https://enclave.trymaple.ai
267+
VITE_MAPLE_BILLING_API_URL: https://billing.opensecret.cloud
268+
VITE_CLIENT_ID: ba5a14b5-d915-47b1-b7b1-afda52bc5fc6
269+
with:
270+
projectPath: './frontend'
271+
tagName: ${{ github.ref_name }}
272+
releaseName: 'Maple v${{ github.ref_name }}'
273+
args: --bundles nsis
274+
```
275+
276+
Note: The `signCommand` in `tauri.conf.json` must be configured to call the signing script. See the Windows implementation guide for full details.
277+
278+
---
279+
280+
## Recommendation Summary
281+
282+
1. **If you need to ship immediately:** Azure Individual Validation
283+
2. **If you can wait 3 weeks and have 3+ years business history:** Azure Organization Validation
284+
3. **If Azure doesn't work out:** SSL.com eSigner as backup
285+
286+
All three options provide full CI/CD automation with no hardware tokens required.
287+
288+
---
289+
290+
## Next Steps After Certificate Setup
291+
292+
Once your certificate is ready:
293+
1. Add Windows to your GitHub Actions workflow
294+
2. Configure `tauri.conf.json` with WebView2 and NSIS settings
295+
3. Update `build.rs` for Windows manifest (DPI awareness)
296+
4. Update `latest.json` generation to include Windows platform
297+
5. Test the full build and signing pipeline
298+
299+
See `docs/windows-research.md` for complete implementation details.

0 commit comments

Comments
 (0)