Skip to content

Commit 92723e3

Browse files
authored
Merge pull request #320 from keirthana/update-security-docs
Rearrange security content
2 parents 0c27d14 + 14531c7 commit 92723e3

File tree

12 files changed

+177
-181
lines changed

12 files changed

+177
-181
lines changed

conf.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,12 @@
207207
'tutorial/getting-started-dashboard': '../create-test-virtual-device',
208208
'tutorial/getting-started': '../create-test-virtual-device',
209209
'tutorial/creating-addon': '../../howto/addons/create-addon',
210-
'explanation/cryptography/crypto_ams': '../../security/crypto_ams',
211-
'explanation/cryptography/crypto_anbox_runtime': '../../security/crypto_anbox_runtime',
212-
'explanation/cryptography/crypto_charms': '../../security/crypto_charms',
213-
'explanation/cryptography/crypto_dashboard': '../../security/crypto_dashboard',
214-
'explanation/cryptography/crypto_stream_agent': '../../security/crypto_stream_agent',
215-
'explanation/cryptography/crypto_stream_gateway': '../../security/crypto_stream_gateway',
210+
'explanation/cryptography/crypto_ams': '../../security/ams',
211+
'explanation/cryptography/crypto_anbox_runtime': '../../security/anbox-runtime',
212+
'explanation/cryptography/crypto_charms': '../../security/charms',
213+
'explanation/cryptography/crypto_dashboard': '../../security/dashboard',
214+
'explanation/cryptography/crypto_stream_agent': '../../security/streaming-stack',
215+
'explanation/cryptography/crypto_stream_gateway': '../../security/streaming-stack',
216216
'explanation/anbox-security': '../security/landing',
217217
'howto/install-appliance/enable-oidc': '../setup-oidc/landing/',
218218
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(exp-security-crypto-ams)=
1+
(exp-security-ams)=
22
# AMS
33

44
Anbox Management Service (AMS) is using cryptographic technology for:

explanation/security/crypto_anbox_runtime.md renamed to explanation/security/anbox-runtime.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(exp-security-crypto-anbox-runtime)=
1+
(exp-security-anbox-runtime)=
22
# Anbox runtime
33

44
The Anbox runtime (see {ref}`howto-anbox-runtime`) is using cryptographic technology for:
@@ -15,9 +15,9 @@ When communicating with the HTTPS API of the Anbox Stream Agent, Anbox will eith
1515

1616
## Token based authentication
1717

18-
Anbox accesses a limited set of API endpoints of the Anbox Management Service (AMS) to submit status information during runtime. Access is authenticated by a scope-limited [JWT](https://jwt.io/) based token. See {ref}`exp-security-crypto-ams` for more details.
18+
Anbox accesses a limited set of API endpoints of the Anbox Management Service (AMS) to submit status information during runtime. Access is authenticated by a scope-limited [JWT](https://jwt.io/) based token. See {ref}`exp-security-ams` for more details.
1919

20-
As part of the WebRTC connection process, Anbox communicates with the HTTP API endpoints provided by the Anbox Stream Agent. Anbox authenticates itself to the agent by presenting a token (see {ref}`exp-security-crypto-stream-agent`) and validates the TLS certificate of the agent by checking its fingerprint. The fingerprint Anbox uses for the validation check is the SHA-256 hash of the complete ASN.1 DER content (certificate, signature algorithm and signature) of the TLS certificate that the agent uses.
20+
As part of the WebRTC connection process, Anbox communicates with the HTTP API endpoints provided by the Anbox Stream Agent. Anbox authenticates itself to the agent by presenting a token (see {ref}`sec-security-crypto-stream-agent`) and validates the TLS certificate of the agent by checking its fingerprint. The fingerprint Anbox uses for the validation check is the SHA-256 hash of the complete ASN.1 DER content (certificate, signature algorithm and signature) of the TLS certificate that the agent uses.
2121

2222
## WebRTC
2323

explanation/security/android.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Android
2+
3+
The images that Anbox Cloud provides are based on different Android versions. They are updated with security patches monthly, based on the upstream security tags. You can find detailed information on the security patches that have been included (or considered to be included but found unrelated) in the [Android Security Bulletins](https://source.android.com/docs/security/bulletin). The relevant security bulletin for each Anbox Cloud release is linked in the {ref}`ref-release-notes`.
4+
5+
See [Android Security Features](https://source.android.com/docs/security/features) in the Android documentation for an overview of security-related features that Android provides. Anbox Cloud supports some of these features, but not all of them. Some of the features rely on hardware that is not available in a virtual system, and others interfere with the Ubuntu security features.
6+
7+
The following table shows which Android security features are supported in Anbox Cloud.
8+
9+
| Security feature | Supported in Anbox Cloud |
10+
|--------------------------------------------|:------------------------:|
11+
| App sandbox ||
12+
| App signing ||
13+
| Authentication | - |
14+
| Biometrics | - |
15+
| Encryption | - |
16+
| Keystore ||
17+
| Security-Enhanced Linux (SELinux) | - |
18+
| Trusty Trusted Execution Environment (TEE) | - |
19+
| Verified Boot | - |
20+
21+
### Security-Enhanced Linux (SELinux)
22+
23+
Currently, Anbox Cloud disables SELinux in Android. The reason for this is that SELinux conflicts with AppArmor, which is by default enabled in LXD. Anbox Cloud utilizes the security features provided by LXD and therefore relies on AppArmor instead of SELinux.
24+
25+
In future releases, it might be possible to run AppArmor and SELinux in parallel. In this case, the decision to disable SELinux will be reconsidered.

explanation/security/charms.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
(exp-security-charms)=
2+
# Charms
3+
4+
## Communication
5+
6+
All communication between Juju units and the Juju controller happens over TLS-encrypted websockets. The certificate for the TLS connection to the controller is added as explicitly trusted to each machine as part of the bootstrap process using a combination of cloud-init and SSH.
7+
8+
With this secure channel, Juju charms can communicate with each other using relation data. The data published by one unit is sent to the controller, which then makes it available for all other units on the same relation. The data for each relation is scoped by ID and is only visible to units participating in the specific relation on which it is set.
9+
10+
See [Security with Juju](https://canonical-juju.readthedocs-hosted.com/en/latest/user/explanation/juju-security/) for more information.
11+
12+
13+
## Cryptography
14+
15+
The following charms for Anbox Cloud make use of cryptographic technology for creation of TLS certificates:
16+
17+
* [`ams`](https://charmhub.io/ams)
18+
* [`ams-lxd`](https://charmhub.io/ams-lxd)
19+
* [`ams-node-controller`](https://charmhub.io/ams-node-controller)
20+
* [`anbox-stream-gateway`](https://charmhub.io/anbox-stream-gateway)
21+
* [`anbox-stream-agent`](https://charmhub.io/anbox-stream-agent)
22+
* [`anbox-cloud-dashboard`](https://charmhub.io/anbox-cloud-dashboard)
23+
* [`lxd-integrator`](https://charmhub.io/lxd-integrator)
24+
25+
When Anbox Cloud is deployed without the use of an external CA, the charms will generate self-signed certificates using the [cryptography](https://pypi.org/project/cryptography/) Python package. The private key used for signing has a size of 4096 bits.
26+
27+
### Packages used
28+
29+
* [cryptography from PyPI](https://pypi.org/project/cryptography/)

explanation/security/crypto_charms.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

explanation/security/crypto_stream_agent.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

explanation/security/crypto_stream_gateway.md

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(exp-security-crypto-dashboard)=
1+
(exp-security-dashboard)=
22
# Dashboard
33

44
The Anbox Cloud Dashboard (dashboard) is using cryptographic technology for:

explanation/security/instance.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Instances
2+
3+
Anbox Cloud uses secure and isolated system instances supplied by [LXD](https://ubuntu.com/lxd). LXD provides a high degree of flexibility when setting up instances - you get to decide the level of security for your requirements. See [Security](https://documentation.ubuntu.com/lxd/en/latest/security/) in the LXD documentation for more information about how a LXD setup can be secured.
4+
5+
```{tip}
6+
Using virtual machines to host Android containers provides better workload isolation.
7+
```
8+
9+
## Unprivileged instances
10+
11+
```{note}
12+
This section is particularly applicable for container based instances because a virtual machine is unprivileged by nature.
13+
```
14+
15+
Many instance managers use privileged instances, which means that the instances have root privileges on the host system, including access to all devices. This is a security risk, because attackers could gain control over the host system.
16+
17+
Anbox Cloud uses unprivileged LXD instances only, which fully isolates the instances and ensures that they cannot gain root privileges. In addition, the Android container that runs inside the LXD instance also runs as an unprivileged instance. This method isolates the Android container twice, with the result that if the encapsulation of either the LXD instance or the Android container should fail, the system would still be protected.
18+
19+
```{caution}
20+
While instances are fully isolated, all instances currently use the same GPU resources. As a result, any instance that is launched with GPU support could take all GPU resources in a DDoS-like attack, which would prevent other instances from starting.
21+
22+
Monitoring how the GPU resources are used for different applications and ensuring that you are running trusted workloads can provide insulation against DDoS-like attacks.
23+
24+
See {ref}`sec-gpu-slots` for more information.
25+
```

0 commit comments

Comments
 (0)