Skip to content

Commit 41669e6

Browse files
eseidelbryanoltman
andauthored
docs: add a section on automatic rollback (#315)
* docs: add a section on automatic rollback * Update src/content/docs/code-push/rollback.mdx Co-authored-by: Bryan Oltman <[email protected]> --------- Co-authored-by: Bryan Oltman <[email protected]>
1 parent 603e867 commit 41669e6

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

src/content/docs/code-push/release.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ shorebird release android --target ./lib/main_development.dart --flavor developm
6363
build` can. To pass arguments to the underlying `flutter build` you need to put
6464
`flutter build` arguments after a `--` separator. For example: `shorebird
6565
release android -- --dart-define="foo=bar"` will define the `"foo"` environment
66-
variable inside Dart as you might have done with `flutter build` directly. In
66+
variable inside Dart as you might have done with `flutter build` directly. In
6767
Powershell the `--` separator must be quoted: `'--'`.
6868
:::
6969

src/content/docs/code-push/rollback.mdx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,36 @@ If you app needs to download an older patch as part of a rollback,
4747
installing that patch will count against your monthly patch installs. If you
4848
have no remaining patch installs, the app will revert to the base release.
4949
:::
50+
51+
## Patch Integrity and Automatic Rollback
52+
53+
Shorebird includes safety features to prevent needing to issue the manual
54+
rollback of a patch.
55+
56+
`shorebird patch` also generates a hash of your patch file which is stored
57+
separately from the patch and checked every time your patch is installed, or
58+
booted from on the user's device.
59+
60+
Customers are also encouraged to use Shorebird's [patch-signing
61+
feature](https://docs.shorebird.dev/guides/patch-signing/) to cryptographically
62+
sign patch files. This uses the same cryptographic algorithms used in the
63+
Google and Apple app stores. When enabled, your [public
64+
key](https://en.wikipedia.org/wiki/Public-key_cryptography) is included in your
65+
app bundle and a patch's signature is checked on every install and boot to
66+
ensure your app can never accept a patch file not signed by your secret key.
67+
68+
Finally Shorebird's [updater](https://github.com/shorebirdtech/updater) includes
69+
automatic on-device rollback. If for any reason a patch's hash or signature does
70+
not match, the patch is discarded. If for any reason a patch fails to load into
71+
the Dart runtime, a patch will be marked "bad" on that device, and the app will
72+
be automatically rolled back to the latest installed patch.
73+
74+
The previous patch file is always kept on disk until at least one successful
75+
boot is made of the next patch, after which a patch file is automatically
76+
cleaned up from the user's device to minimize disk usage.
77+
78+
All of code which implements these integrity measures is of course open source
79+
and available for review on [GitHub](https://github.com/shorebirdtech/). An
80+
overview of our code locations is available under [Architecture](/architecture).
81+
82+
See also [Shorebird Public Security Policies](https://handbook.shorebird.dev/security/).

0 commit comments

Comments
 (0)