blob: 4ed4b362b2770726daa06ca63c70f1e9462735d9 [file] [log] [blame]
Charles Chen3d4a6b72023-01-17 08:16:44 +00001###
2### isolated_compute_apps.
3###
4### This file defines the rules for isolated apps that requires the permission
5### to gather data with service manager and require computational resources to
6### improve the performance to process data under a sandbox. This
7### isolated_compute_app restricts data egress to protect the privacy.
8###
9### TODO(b/266923392): Clean rules for isolated_compute_app characteristics
10###
11type isolated_compute_app, domain;
12
13typeattribute isolated_compute_app coredomain;
14
15app_domain(isolated_compute_app)
16isolated_app_domain(isolated_compute_app)
17
18allow isolated_compute_app audioserver_service:service_manager find;
19allow isolated_compute_app cameraserver_service:service_manager find;
20allow isolated_compute_app content_capture_service:service_manager find;
21allow isolated_compute_app device_state_service:service_manager find;
22allow isolated_compute_app speech_recognition_service:service_manager find;
Charles Chen3e9f05f2023-01-31 13:02:12 +000023allow isolated_compute_app mediaserver_service:service_manager find;
Charles Chen3d4a6b72023-01-17 08:16:44 +000024
25# Enable access to hardware services for camera functionalilites
26hal_client_domain(isolated_compute_app, hal_allocator)
27hwbinder_use(isolated_compute_app)
28
Charles Chen3e9f05f2023-01-31 13:02:12 +000029allow isolated_compute_app dmabuf_system_heap_device:chr_file r_file_perms;
30
31# Allow access to network sockets received over IPC. New socket creation is not
32# permitted.
33allow isolated_compute_app { ephemeral_app priv_app untrusted_app_all }:{ tcp_socket udp_socket } { rw_socket_perms_no_ioctl };
34
ThiƩbaud Weksteene9ac9ce2023-03-27 12:44:03 +110035# Allow access to the toybox: b/275024392
36allow isolated_compute_app toolbox_exec:file rx_file_perms;
37
Charles Chen3d4a6b72023-01-17 08:16:44 +000038#####
39##### Neverallow
40#####
41
42# Do not allow isolated_compute_app to access hardware service except for the
43# ones necessary for camera service.
44# TODO (b/266555480): The permission should be guarded by compliance test.
45# Remove the negation for member domains when refactorization is done.
46# neverallow isolated_compute_app {
47# hwservice_manager_type
48# -hal_graphics_allocator_hwservice
49# -hal_graphics_mapper_hwservice
50# -hidl_allocator_hwservice
51# -hidl_manager_hwservice
52# -hidl_memory_hwservice
53# }:hwservice_manager *;