-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c95ab0
commit dbe586c
Showing
8 changed files
with
114 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import { Meta } from 'nextra' | ||
|
||
export default { | ||
index: 'Overview', | ||
index: 'App', | ||
'bundled-server': 'Bundled Server', | ||
security: 'Security', | ||
} satisfies Meta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Callout } from 'nextra/components' | ||
|
||
# Bundled Server | ||
|
||
The desktop app comes with a fully functional Stump server built-in. This is a convenience feature to make it easier to get started with Stump without needing to set up a server separately. | ||
|
||
## Friction Points | ||
|
||
There are some compromises made to make this feature work: | ||
|
||
- The bundled server comes with a cost of about 70-80MB, arguably bloating the app size for those who perhaps don't need or want it. | ||
- The server does not come with a web-compatible client by default, so you have to download the web client separately if you want to use it in a browser | ||
- When you close the app the server will also exit. The current plan is to implement a tray functionality which keeps the server running in the background when the app is closed | ||
|
||
These pain points are very much on my radar, rest assured they are not planned to be permanent fixtures. | ||
|
||
The bundled server is not currently optional due to resource constraints, namely the lack of development time to adjust CI pipelines to build two separate versions of the app. I will happily accept contributions to make this possible, otherwise it is possible to build the app locally without the server if you so desire. | ||
|
||
There are a few thoughts on improving the requirement for the web client, such as bundling it directly in the server (which would bloat further) or developing an installer that will download and install the web client for you alongside the app. | ||
|
||
<Callout emoji="📣"> | ||
Please share your thoughts on how to improve the bundled server feature(s) and the pain points | ||
outlined above. I'm always open to suggestions! | ||
</Callout> | ||
|
||
## Enabling the Server | ||
|
||
The server, while bundled by default, will not be enabled unless explicitly turned on. The setting for enabling the server is in multiple places, depending on the context, however it will always appear the same: | ||
|
||
### First Run | ||
|
||
When you first run the app, you will be greeted with a setup screen that prompts you to add a server. Instead, hit the "Bundled server" switch and restart the app. The server will be enabled on the next launch, and you will be presented with the same screen to connect to it. | ||
|
||
<Callout emoji="ℹ️" type="info"> | ||
The default options for the bundled server can be configured by editing the `~/.stump/Stump.toml` | ||
file. For additional configuration options, see the [server | ||
configuration](/guides/configuration/server-options) guide. | ||
</Callout> | ||
|
||
### Desktop Settings | ||
|
||
If you have already configured a server with the desktop application, launching will either take you directly into the app or the login screen for the actively connected server. The bundled server setting can be found in the settings menu, under the "Desktop" tab, in addition to the setup screen. As with the setup screen, toggling the switch will require a restart to take effect. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Security | ||
|
||
An overview of security-related topcis unique to the desktop app | ||
|
||
## Authentication | ||
|
||
The desktop app uses token-based authentication when authenticating against and communicating with the Stump server. The web app which you're accustomed to in the browser uses session-based authentication. Due to platform inconsistencies with cookies, this was a necessary change to ensure the desktop app could communicate with the server. | ||
|
||
### Token Storage | ||
|
||
The token is stored using your native platform's secure storage mechanism. On Windows, this is the Credential Manager, on macOS it is the Keychain, and on Linux it is the Secret Service. Because of this, you might be prompted to give Stump permission to access these services. The [keyring](https://docs.rs/keyring/latest/keyring/) library is used to interact with these secure stores. | ||
|
||
This is a necessary step to ensure your token is stored securely, as opposed to storing it somewhere in app memory. This helps to mitigate some of the common attack vectors that could be used to steal and maliciously use your token, such as JavaScript exploitation from crafted ebooks. | ||
|
||
## Debug Builds | ||
|
||
At the moment, all desktop builds are debug. This means that a developer console is available to you, which while convenient for debugging, could be used maliciously to exploit the app. This is a known issue, however will be resolved when the app is stable and non-debug builds are available. | ||
|
||
## macOS Quirks | ||
|
||
macOS has some unique security features that are worth mentioning: | ||
|
||
### Remote Access | ||
|
||
macOS has hardened restrictions on what URLs an app can successfully connect to. This means that non-local IP addresses are **actively blocked** by the app. This is unfortunately an unavoidable limitation imposed by Apple, and is not something that can be worked around. So if you are running a server and wish to connect to it **remotely**, you will have to configure a domain with the appropriate SSL certificates to connect to it. | ||
|
||
### App Signing (lack thereof) | ||
|
||
The desktop app is not signed, which means that macOS will likely flat out refuse to run it. This will hopefully be resolved in the future by signing the app, however since that comes at a cost it is not a priority or feasible at the moment. | ||
|
||
To get around this, you can force macOS to accept the risk by running the following command in Terminal: | ||
|
||
```bash | ||
xattr -c /Applications/Stump.app | ||
``` | ||
|
||
While I obviously don't have malicious intent, I still have to say: **do at your own risk**. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters