docs: reference central ~/keystore signing setup
This commit is contained in:
+3
-3
@@ -49,9 +49,9 @@ docs/perf/*.raw
|
|||||||
/tmp-artifacts/
|
/tmp-artifacts/
|
||||||
|
|
||||||
# ---------- Signing secrets (never commit) ----------
|
# ---------- Signing secrets (never commit) ----------
|
||||||
# Upload keystore, passwords and Gradle signing config live inside the repo
|
# Keystore, passwords and key.properties live OUTSIDE the repo in ~/keystore/;
|
||||||
# folder for convenience, but must never be tracked.
|
# the Gradle signing config is app/android/key.properties. These patterns are
|
||||||
/keys/
|
# defence in depth in case signing material is ever copied back into the tree.
|
||||||
**/key.properties
|
**/key.properties
|
||||||
*.jks
|
*.jks
|
||||||
*.keystore
|
*.keystore
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# Copy to app/android/key.properties and fill in for a signed release build.
|
# Copy to app/android/key.properties and fill in for a signed release build.
|
||||||
# The file is git-ignored; without it the release build falls back to debug keys.
|
# The file is git-ignored; without it the release build falls back to debug keys.
|
||||||
|
# The keystore itself lives outside the repository in /home/ubuntu/keystore/.
|
||||||
storePassword=CHANGE_ME
|
storePassword=CHANGE_ME
|
||||||
keyPassword=CHANGE_ME
|
keyPassword=CHANGE_ME
|
||||||
keyAlias=ironarc
|
keyAlias=ironarc
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Legende: `[ ]` offen · `[x]` erledigt · `[~]` teilweise/geplant mit Owner
|
|||||||
| R8/Minify | aktiv; Release-APK auf Gerät installiert, Match gespielt, keine Crashes |
|
| R8/Minify | aktiv; Release-APK auf Gerät installiert, Match gespielt, keine Crashes |
|
||||||
| Signatur-Zertifikat | `CN=Hadrian Burkhardt, O=softwareapp-hb.de, C=DE`
|
| Signatur-Zertifikat | `CN=Hadrian Burkhardt, O=softwareapp-hb.de, C=DE`
|
||||||
| Zertifikat SHA-256 | `10:B6:76:BF:7A:B9:8C:5F:7B:E3:6B:CB:DA:AC:91:91:1F:A4:3D:BA:19:6F:F7:DC:A9:F3:30:54:E6:B9:0B:63` |
|
| Zertifikat SHA-256 | `10:B6:76:BF:7A:B9:8C:5F:7B:E3:6B:CB:DA:AC:91:91:1F:A4:3D:BA:19:6F:F7:DC:A9:F3:30:54:E6:B9:0B:63` |
|
||||||
| Signing | **erledigt**: Upload-Keystore `ironarc-upload.jks` (RSA 4096, gültig bis 11.03.2054), AAB per `jarsigner -verify` bestätigt |
|
| Signing | **erledigt**: Upload-Keystore `/home/ubuntu/keystore/ironarc-upload.jks` (RSA 4096, gültig bis 11.03.2054), AAB per `jarsigner -verify` bestätigt |
|
||||||
|
|
||||||
## 2. App-Inhalte (Play Console)
|
## 2. App-Inhalte (Play Console)
|
||||||
|
|
||||||
|
|||||||
+26
-16
@@ -2,24 +2,33 @@
|
|||||||
|
|
||||||
| Feld | Wert |
|
| Feld | Wert |
|
||||||
|---|---|
|
|---|---|
|
||||||
| Keystore | `keys/ironarc-upload.jks` (**im Repo-Ordner, aber ignoriert**) |
|
| Keystore | **`~/keystore/ironarc-upload.jks`** (außerhalb des Repos) |
|
||||||
| Alias | `ironarc` |
|
| Alias | `ironarc` |
|
||||||
| Typ / Algorithmus | PKCS12 · RSA 4096 · SHA384withRSA |
|
| Typ / Algorithmus | PKCS12 · RSA 4096 · SHA384withRSA |
|
||||||
| Gültig | 2026-10-25 – **2054-03-11** |
|
| Gültig | 2026-10-25 – **2054-03-11** |
|
||||||
| Zertifikat | `CN=Hadrian Burkhardt, O=softwareapp-hb.de, C=DE` |
|
| Zertifikat | `CN=Hadrian Burkhardt, O=softwareapp-hb.de, C=DE` |
|
||||||
| SHA-256 | `10:B6:76:BF:7A:B9:8C:5F:7B:E3:6B:CB:DA:AC:91:91:1F:A4:3D:BA:19:6F:F7:DC:A9:F3:30:54:E6:B9:0B:63` |
|
| SHA-256 | `10:B6:76:BF:7A:B9:8C:5F:7B:E3:6B:CB:DA:AC:91:91:1F:A4:3D:BA:19:6F:F7:DC:A9:F3:30:54:E6:B9:0B:63` |
|
||||||
| Passwort-Ablage | `keys/credentials.txt` und `keys/.pw` (beide ignoriert, `chmod 600`) |
|
| Passwort | `~/keystore/ironarc-upload.pw`, Details in `~/keystore/ironarc-credentials.txt` (beide `chmod 600`) |
|
||||||
|
|
||||||
## Warum der Keystore im Repo liegt – und was das kostet
|
## Konvention (siehe `~/keystore/README.md`)
|
||||||
|
|
||||||
Er liegt hier, damit Build und Backup an einem Ort sind. Der Schutz besteht aus zwei Schichten:
|
Alle Upload-Keystores dieser Maschine liegen **zentral in `~/keystore/`**, bewusst außerhalb
|
||||||
|
der Git-Repositories: Ein Clone oder ZIP eines Projekts enthält dadurch **kein** Signingmaterial,
|
||||||
|
und ein Backup muss nur einen Ordner abdecken.
|
||||||
|
|
||||||
1. `.gitignore` → `/keys/`, `**/key.properties`, `*.jks`, `*.keystore`, `*.p12`
|
Projekte referenzieren den Keystore über eine **git-ignorierte** Properties-Datei mit
|
||||||
2. `.githooks/pre-commit` → blockiert jeden Commit, der solche Dateien enthält
|
**absolutem Pfad** — bei Flutter `app/android/key.properties`:
|
||||||
|
|
||||||
**Grenzen:** `git add -f` umgeht `.gitignore`; der Hook fängt das ab, aber nur wenn er aktiv ist
|
```properties
|
||||||
(`git config core.hooksPath .githooks`). Ein ZIP des Projektordners enthält den Keystore
|
storePassword=…
|
||||||
**immer**. Deshalb gilt weiterhin: verschlüsseltes Backup außerhalb des Repos anlegen.
|
keyPassword=…
|
||||||
|
keyAlias=ironarc
|
||||||
|
storeFile=/home/ubuntu/keystore/ironarc-upload.jks
|
||||||
|
```
|
||||||
|
|
||||||
|
Der absolute Pfad ist bewusst gewählt: Ein relativer Pfad aus `app/android/app/` müsste drei
|
||||||
|
Ebenen nach oben zeigen und wäre beim Verschieben des Projekts still kaputt (der Build fällt
|
||||||
|
dann auf Debug-Keys zurück).
|
||||||
|
|
||||||
## Signierten Build erzeugen
|
## Signierten Build erzeugen
|
||||||
|
|
||||||
@@ -28,10 +37,6 @@ cd app && flutter build appbundle --release
|
|||||||
# → build/app/outputs/bundle/release/app-release.aab
|
# → build/app/outputs/bundle/release/app-release.aab
|
||||||
```
|
```
|
||||||
|
|
||||||
`app/android/key.properties` verweist relativ auf den Keystore
|
|
||||||
(`storeFile=../../../keys/ironarc-upload.jks`, aufgelöst ab `app/android/app/`).
|
|
||||||
Fehlt die Datei, fällt der Build auf Debug-Keys zurück – für Play nicht verwendbar.
|
|
||||||
|
|
||||||
## Signatur prüfen
|
## Signatur prüfen
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -41,12 +46,17 @@ keytool -printcert -jarfile build/app/outputs/bundle/release/app-release.aab
|
|||||||
|
|
||||||
Die Warnung „self-signed / invalid certificate chain“ ist bei Android-Upload-Keys normal.
|
Die Warnung „self-signed / invalid certificate chain“ ist bei Android-Upload-Keys normal.
|
||||||
|
|
||||||
|
## Schutz gegen versehentliches Committen
|
||||||
|
|
||||||
|
1. `.gitignore` → `**/key.properties`, `*.jks`, `*.keystore`, `*.p12`
|
||||||
|
2. `.githooks/pre-commit` → blockiert Commits mit Signingmaterial (einmalig aktivieren:
|
||||||
|
`git config core.hooksPath .githooks`)
|
||||||
|
|
||||||
## Wenn der Keystore verloren geht
|
## Wenn der Keystore verloren geht
|
||||||
|
|
||||||
Ohne Keystore sind keine Updates der veröffentlichten App möglich. Google bietet einen
|
Ohne Keystore sind keine Updates der veröffentlichten App möglich. Google bietet einen
|
||||||
**Upload-Key-Reset** an (neuer Upload-Key, App-Signing-Key bleibt bei Google) – möglich, aber
|
**Upload-Key-Reset** an (neuer Upload-Key, App-Signing-Key bleibt bei Google) — möglich, aber
|
||||||
mit Prüfprozess. Deshalb: Passwort in einen Passwort-Manager, Keystore in ein verschlüsseltes
|
mit Prüfprozess. Deshalb: `~/keystore/` auf verschlüsselte Medien sichern (zwei Kopien).
|
||||||
Backup (zwei Medien).
|
|
||||||
|
|
||||||
## Play App Signing
|
## Play App Signing
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user