blob: 969c10e80c4d1a8b65e701790b5be1ba99a40be8 [file] [log] [blame]
{
security_policy: {
job_policy: {
ambient_mark_vmo_exec: [
"/core/appmgr",
// The v2 Flutter and Dart JIT runners (which are not used for
// release builds) execute VMOs in order to run Flutter and
// Dart components.
// TODO(fxb/88626): These runners are configured in
// experiences.git (a product) and references to them do not
// belong in fuchsia.git (the platform). Add support for
// per-product policies and remove the runners from here.
// TODO(fxbug.dev/105101): remove all dart/flutter runners when
// Dart is extracted from fuchsia.git into an external
// repository.
"/core/session-manager/session:session/dart_jit_runner",
"/core/session-manager/session:session/flutter_jit_runner",
"/core/session-manager/session:session/workstation_session/login_shell/application_shell:*/chrome",
// FOR _ENG BUILDS ONLY: We allow elements in the Workstation
// session to access ambient accessibility to develop
// runnerless Flutter apps using JIT compilation (which enables hot
// reload). This should never be exposed to release builds, which
// should use AOT compilation instead.
"/core/session-manager/session:session/workstation_session/login_shell/application_shell:*/elements:**",
"/core/session-manager/session:session/workstation_session/login_shell/application_shell:*/shell_settings:**",
"/core/session-manager/session:session/workstation_session/login_shell/application_shell:*/terminal:**",
// We allow tests to access ambient executability in the same
// way that we're permissive with use of the components v1
// deprecated-ambient-replace-as-executable feature and
// VmexResource protocol on eng builds.
"/core/test_manager/**",
"/core/testing/**",
// TODO(fxbug.dev/105101): remove all dart runners when Dart is
// extracted from fuchsia.git into an external repository.
"/core/dart_jit_runner",
"/core/dart_aot_runner",
"/core/dart_jit_product_runner",
"/core/dart_aot_product_runner",
],
main_process_critical: [
"/bootstrap/archivist",
"/bootstrap/devfs",
"/bootstrap/devfs-with-pkg",
"/bootstrap/driver_manager",
"/bootstrap/power_manager",
"/bootstrap/shutdown_shim",
],
create_raw_processes: [
"/core/starnix_runner/kernels:**",
"/core/test_manager/elf_test_create_raw_processes_runner",
"/core/test_manager/elf_test_create_raw_processes_ambient_exec_runner",
"/core/test_manager/starnix_test_runners/starnix_unit_test_runner",
"/core/test_manager/starnix-tests:**",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
capability_policy: [
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.boot.RootResource",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/console-launcher",
"/bootstrap/driver_manager",
// Driver component names vary depending on the
// exact hardware configuration of the board.
// Grant all drivers the ability to access the root
// resource because of this.
// TODO(fxbug.dev/93188): remove this once the root
// resource is not widely used.
"/bootstrap/boot-drivers:**",
"/bootstrap/pkg-drivers:**",
"/bootstrap/netsvc",
"/bootstrap/svchost",
"/core",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "/",
source: "framework",
source_name: "hub",
capability: "directory",
target_monikers: [
"/core/sshd-host",
"/bootstrap/console-launcher",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.CpuResource",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/power_manager",
"/core",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.DebugResource",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/console",
"/core",
"/core/debug_serial",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.HypervisorResource",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/core",
"/core/zircon-guest-manager/vmm",
"/core/debian-guest-manager/vmm",
"/core/termina-guest-manager/vmm",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.InfoResource",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/boot-drivers:**",
"/bootstrap/pkg-drivers:**",
"/bootstrap/full-pkg-drivers:**",
"/core",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.IoportResource",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/boot-drivers:dev",
"/core",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.IrqResource",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/boot-drivers:dev",
"/core",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.RootJob",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/console-launcher",
"/bootstrap/driver_manager",
"/bootstrap/netsvc",
"/bootstrap/pwrbtn-monitor",
"/bootstrap/svchost",
"/core",
"/core/process_explorer",
"/core/profiler",
"/core/debug_agent",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.RootJobForInspect",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/console-launcher",
"/bootstrap/netsvc",
"/core",
"/core/memory_monitor",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.MexecResource",
capability: "protocol",
target_monikers: [
"/bootstrap/driver_manager",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.MmioResource",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/boot-drivers:dev",
"/core",
"/core/zircon-guest-manager/vmm",
"/core/debian-guest-manager/vmm",
"/core/termina-guest-manager/vmm",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.PowerResource",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/driver_manager",
"/core",
"/core/thermd",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.SmcResource",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/boot-drivers:dev",
"/core",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
],
},
{
source_moniker: "<component_manager>",
source: "component",
source_name: "fuchsia.kernel.VmexResource",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/fshost/blobfs",
// TODO(fxbug.dev/122055): Remove once merkle verification happens
// out-of-process.
"/bootstrap/fshost/fxfs",
"/core",
"/core/zircon-guest-manager/vmm",
"/core/debian-guest-manager/vmm",
"/core/session-manager/session:session/workstation_session/login_shell/application_shell:*/chrome",
"/core/termina-guest-manager/vmm",
"/core/starnix_runner/kernels:**",
"/core/test_manager/starnix_test_runners/starnix_unit_test_runner",
"/core/test_manager/starnix-tests:**",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
"/core/test_manager/chromium-system-tests:**",
"/core/test_manager/chromium-tests:**",
// debug-dash-launcher is used in engineering builds to launch dash shells.
// It uses PackageResolver to add tool package directories into the dash
// environment.
"/core/debug-dash-launcher",
],
},
{
source_moniker: "/bootstrap/fshost",
source: "component",
source_name: "blob",
capability: "directory",
target_monikers: [
"/bootstrap",
"/bootstrap/console-launcher",
"/bootstrap/fshost",
"/core",
"/core/appmgr",
"/core/pkg-cache",
"/core/sshd-host",
],
},
{
source_moniker: "/bootstrap/fshost",
source: "component",
source_name: "minfs",
capability: "directory",
target_monikers: [
"/bootstrap",
"/bootstrap/console-launcher",
"/bootstrap/fshost",
"/core",
"/core/appmgr",
"/core/minfs",
"/core/ssh-key-manager",
"/core/sshd-host",
// TODO(https://fxbug.dev/98760): Remove once fixed.
"/core/sl4f",
],
},
{
source_moniker: "/bootstrap/fshost",
source: "component",
source_name: "tmp",
capability: "directory",
target_monikers: [
"/bootstrap",
"/bootstrap/console-launcher",
"/bootstrap/fshost",
"/bootstrap/netsvc",
"/core",
"/core/appmgr",
"/core/sshd-host",
// TODO(https://fxbug.dev/98755): Remove once https://fxbug.dev/86575 is fixed.
"/core/sl4f",
],
},
{
source_moniker: "/bootstrap/fshost",
source: "component",
source_name: "deprecated-misc-storage",
capability: "directory",
target_monikers: [
"/bootstrap/fshost",
"/core/system-updater",
"/core/system-update-checker",
],
},
{
source_moniker: "/bootstrap/fshost/blobfs",
source: "component",
source_name: "blob-exec",
capability: "directory",
target_monikers: [
"/bootstrap/fshost",
"/bootstrap/fshost/blobfs",
"/bootstrap/pkg-cache",
"/bootstrap/base_resolver",
],
},
{
// We restrict access to PackageResolver because it gives direct access to package
// handles which provide executability which bypass VX security policy.
source_moniker: "/core/pkg-resolver",
source: "component",
source_name: "fuchsia.pkg.PackageResolver",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/console-launcher",
// This is only used when the kernel commandline flag devmgr.enable-ephemeral
// is set, which enables loading drivers ephemerally. This is intended for
// eng builds only.
"/bootstrap/driver_index",
"/bootstrap/driver_manager",
"/bootstrap/full_resolver",
"/bootstrap/netsvc",
// debug-dash-launcher is used in engineering builds to launch
// dash shells. It uses PackageResolver to add tool package directories
// into the dash environment.
"/core/debug-dash-launcher",
// system-updater still runs as a v1 component and is a
// valid client of PackageResolver. appmgr has its own
// allowlist for v1 components accessing pkg-resolver.
"/core",
"/core/process_resolver",
"/core/full-resolver",
"/core/system-update-checker",
"/core/system-updater",
],
},
{
// We restrict access to ProcessResolver because it is a deprecated protocol
// that allows resolving binaries from universe packages.
source_moniker: "/core/process_resolver",
source: "component",
source_name: "fuchsia.process.Resolver",
capability: "protocol",
target_monikers: [
// This protocol is available in `fx shell`
"/core",
// This protocol is available in the serial console
"/bootstrap/console-launcher",
// This protocol is used by CTS tests
"/core/test_manager/cts-tests:**",
// TODO(fxbug.dev/105828): terminal.cm instances are
// launched as children of the application shell, via its
// "elements" collection. Terminal requires some additional
// permissions gated through this policy file. If/when these
// permissions can be migrated to an ermine-specific policy
// file (outside fuchsia.git), the following entry should be
// removed here.
//
// This protocol is available to the terminal in workstation
"/core/session-manager/session:session/workstation_session/login_shell/application_shell:*/elements:**",
"/core/session-manager/session:session/workstation_session/login_shell/application_shell:*/terminal:**",
// TODO(https://fxbug.dev/106062): Scrutiny throws an routing error unless
// this is added. `process_resolver` does not have a `use` declaration for
// it's own capability.
"/core/process_resolver",
"/core/driver_playground",
// debug-dash-launcher is used in engineering builds to launch dash shells. It
// uses ProcessResolver to allow #!resolve scripts to be include in the dash
// environment.
"/core/debug-dash-launcher",
],
},
{
// We restrict access to PackageResolver because it gives direct access to
// executable package handles.
source_moniker: "/bootstrap/base_resolver",
source: "component",
source_name: "fuchsia.pkg.PackageResolver",
capability: "protocol",
target_monikers: [
"/bootstrap/driver_index",
"/bootstrap/driver_manager",
"/core/process_resolver",
],
},
{
// We restrict access to PackageCache because it gives direct access to package
// handles which provide executability which bypass VX security policy.
source_moniker: "/bootstrap/pkg-cache",
source: "component",
source_name: "fuchsia.pkg.PackageCache",
capability: "protocol",
target_monikers: [
"/core",
"/core/pkg-resolver",
"/core/system-updater",
],
},
{
// We restrict access to RetainedPackages because it gives callers the ability
// to override certain package garbage collection behavior intended to only be
// used by the system updater.
source_moniker: "/bootstrap/pkg-cache",
source: "component",
source_name: "fuchsia.pkg.RetainedPackages",
capability: "protocol",
target_monikers: [
"/core/system-updater",
],
},
{
// We restrict access to PackageCache because it gives direct access to executable
// binaries.
source_moniker: "/bootstrap/pkg-cache",
source: "component",
source_name: "bin",
capability: "directory",
target_monikers: [
"/bootstrap/console-launcher",
"/core/sshd-host",
// TODO(fxbug.dev/105828): terminal.cm instances are
// launched as children of the application shell, via its
// "elements" collection. Terminal requires some additional
// permissions gated through this policy file. If/when these
// permissions can be migrated to an ermine-specific policy
// file (outside fuchsia.git), the following entry should be
// removed here.
"/core/session-manager/session:session/workstation_session/login_shell/application_shell:*/elements:**",
"/core/session-manager/session:session/workstation_session/login_shell/application_shell:*/terminal:**",
],
},
{
source_moniker: "/bootstrap/pkg-cache",
source: "component",
source_name: "build-info",
capability: "directory",
target_monikers: [
"/core/build-info",
"/core/feedback",
"/core/sshd-host",
"/core/system-update-checker",
"/core/system-updater",
// TODO(crbug.com/1326674): Is this still needed for one
// or both realms?
// TODO(fxbug.dev/91934): Once we can define test realms out of tree
// we should remove this.
"/core/test_manager/chromium-system-tests:**",
"/core/test_manager/chromium-tests:**",
],
},
{
// We restrict access to pkgfs because it gives direct access to executable package
// handles.
source_moniker: "/bootstrap/pkg-cache",
source: "component",
source_name: "pkgfs",
capability: "directory",
target_monikers: [
"/bootstrap/console-launcher",
"/core",
"/core/appmgr",
"/core/sshd-host",
// TODO(fxbug.dev/105828): terminal.cm instances are
// launched as children of the application shell, via its
// "elements" collection. Terminal requires some additional
// permissions gated through this policy file. If/when these
// permissions can be migrated to an ermine-specific policy
// file (outside fuchsia.git), the following entry should be
// removed here.
"/core/session-manager/session:session/workstation_session/login_shell/application_shell:*/elements:**",
"/core/session-manager/session:session/workstation_session/login_shell/application_shell:*/terminal:**",
],
},
{
// We restrict access to pkgfs-packages because it gives direct access to
// executable package handles.
source_moniker: "/bootstrap/pkg-cache",
source: "component",
source_name: "pkgfs-packages",
capability: "directory",
target_monikers: [],
},
{
// We restrict access to pkgfs-versions because it gives direct access to
// executable package handles.
source_moniker: "/bootstrap/pkg-cache",
source: "component",
source_name: "pkgfs-versions",
capability: "directory",
target_monikers: [
// TODO(fxbug.dev/99692) migrate clients of "pkgfs" to just the subdirectories
],
},
{
// We restrict access to system because it gives direct access to executable
// binaries.
source_moniker: "/bootstrap/pkg-cache",
source: "component",
source_name: "system",
capability: "directory",
target_monikers: [
"/bootstrap",
"/bootstrap/console-launcher",
"/bootstrap/driver_manager",
"/core",
"/core/appmgr",
"/core/sshd-host",
"/core/system-updater",
"/core/system-update-checker",
],
},
{
// We restrict access to base-resolver's ComponentResolver protocol because we
// expect only parts of component framework to be able to access it.
source_moniker: "/bootstrap/base-resolver",
source: "component",
source_name: "fuchsia.component.resolution.Resolver",
capability: "protocol",
target_monikers: [
"/core/full-resolver",
],
},
// Only route Component resolver to test manager and system tests.
// TODO(fxbug.dev/86464): Remove this once we have facet API
{
source_moniker: "/core/full-resolver",
source: "component",
source_name: "fuchsia.component.resolution.Resolver",
capability: "protocol",
target_monikers: [
"/core/test_manager",
"/core/testing/test-arch-tests:**",
"/core/test_manager/system-tests:**",
"/core/full-resolver",
],
},
//TODO(fxbug.dev/91765) - Remove source moniker after from target.
{
source_moniker: "/bootstrap/cr50_agent",
source: "component",
source_name: "fuchsia.tpm.cr50.PinWeaver",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/cr50_agent",
"/core",
"/core/account",
"/core/account/credential_manager",
],
},
//TODO(fxbug.dev/91765) - Remove source moniker after from target.
{
source_moniker: "/bootstrap/cr50_agent",
source: "component",
source_name: "fuchsia.tpm.cr50.Cr50",
capability: "protocol",
target_monikers: [
"/bootstrap",
"/bootstrap/cr50_agent",
"/bootstrap/console-launcher",
"/bootstrap/miscsvc",
"/core",
"/core/appmgr",
],
},
// TODO(fxbug.dev/91765) - Remove source moniker after from target.
{
source_moniker: "/core/account/credential_manager",
source: "component",
source_name: "fuchsia.identity.credential.Manager",
capability: "protocol",
target_monikers: [
"/core/account/credential_manager",
"/core/account/password_authenticator",
],
},
// TODO(https://fxbug.dev/91765)
{
source_moniker: "/core/account/password_authenticator",
source: "component",
source_name: "fuchsia.identity.account.AccountManager",
capability: "protocol",
target_monikers: [
"/core",
"/core/account",
"/core/account/password_authenticator",
"/core/session-manager/session:session",
"/core/session-manager/session:session/workstation_session",
"/core/session-manager/session:session/workstation_session/login_shell",
],
},
// TODO(https://fxbug.dev/93790): not security policy; split out into separate file.
// TODO(https://fxbug.dev/93579): once product assembly supports product-specific
// components running in the network realm, remove this policy.
{
source_moniker: "/core/network/netstack",
source: "component",
source_name: "fuchsia.posix.socket.raw.Provider",
capability: "protocol",
target_monikers: [
"/core/network",
"/core/network/netstack",
"/core/lowpan-ot-driver",
"/core/starnix_runner",
"/core/starnix_runner/kernels:**",
"/core/test_manager",
"/core/test_manager/starnix-tests:**",
],
},
{
source_moniker: "/core/lowpanservice",
source: "component",
source_name: "fuchsia.factory.lowpan.FactoryLookup",
capability: "protocol",
target_monikers: [
"/core",
"/core/appmgr",
"/core/lowpanservice",
],
},
{
source_moniker: "/core/lowpanservice",
source: "component",
source_name: "fuchsia.lowpan.device.DeviceExtraConnector",
capability: "protocol",
target_monikers: [
"/core",
"/core/appmgr",
"/core/lowpanservice",
// TODO(https://fxbug.dev/107899): Create explicit security policies for
// out-of-tree product variants.
"/core/factory/realm_builder:**",
],
},
{
source_moniker: "/core/lowpanservice",
source: "component",
source_name: "fuchsia.lowpan.device.DeviceRouterExtraConnector",
capability: "protocol",
target_monikers: [
"/core",
"/core/appmgr",
"/core/lowpanservice",
],
},
{
// We restrict access to dev because it is equivalent to giving access to the
// component hub.
// Users should try to use the dev-class directory capability instead.
// OWNERS: surajmalhotra@google.com, dgilhooley@google.com
source_moniker: "/bootstrap/devfs",
source: "component",
source_name: "dev-topological",
capability: "directory",
target_monikers: [
"/bootstrap/devfs",
"/bootstrap/devfs-with-pkg",
"/bootstrap/fshost",
"/bootstrap/fshost/blobfs",
],
},
{
source_moniker: "/bootstrap/devfs-with-pkg",
source: "component",
source_name: "dev-topological",
capability: "directory",
target_monikers: [
"/bootstrap",
"/bootstrap/console-launcher",
"/bootstrap/devfs-with-pkg",
"/bootstrap/flashmap",
"/bootstrap/miscsvc",
"/bootstrap/power_manager",
"/bootstrap/sysinfo",
"/bootstrap/vboot-fwparam",
"/core/account/account_manager/account_handlers:**",
"/core/account/password_authenticator",
"/core/appmgr",
"/core/audio_recording",
"/core/driver_playground",
"/core/factory",
"/core/factory_env",
"/core/factory/framework",
"/core/factory_reset",
"/core/ffx-laboratory:**",
"/core/oemcrypto",
"/core/playready-cdm",
"/core/pre-migration-service",
"/core/reverse-migration",
"/core/sl4f",
"/core/sshd-host",
"/core/termina-guest-manager",
"/core/test_manager/devices-tests:**",
"/core/test_manager/drm-tests:**",
"/core/test_manager/google-tests:**",
"/core/testing/system-tests:**",
"/core/test_manager/system-tests:**",
"/core/test_manager/system-validation-tests:**",
"/core/trace_manager/cpuperf_provider",
],
},
{
// devfs access should be routed through the /bootstrap/devfs component
source_moniker: "/bootstrap/driver_manager",
source: "component",
source_name: "dev",
capability: "directory",
target_monikers: [
"/bootstrap/devfs",
"/bootstrap/driver_manager",
],
},
],
child_policy: {
reboot_on_terminate: [
"/bootstrap/driver_index",
"/bootstrap/fshost",
"/core",
"/core/appmgr",
"/core/audio_core",
"/core/network/netstack",
"/core/setui_service",
"/core/sysmem_connector",
"/core/system-update-checker",
"/core/system-update/system-update-committer",
"/core/wlancfg",
"/core/wlandevicemonitor",
"/core/wlanstack",
],
},
debug_registration_policy: [
{
debug: "protocol",
environment_name: "test-env",
source_moniker: "/core/test_manager/**",
source_name: "fuchsia.debugdata.Publisher",
target_moniker: "/core/test_manager/**",
},
{
debug: "protocol",
environment_name: "test-env",
source_moniker: "/core/testing/**",
source_name: "fuchsia.debugdata.Publisher",
target_moniker: "/core/testing/**",
},
{
debug: "protocol",
environment_name: "fuzzed-env",
source_moniker: "/core/test_manager/tests:**",
source_name: "fuchsia.fuzzer.CoverageDataCollector",
target_moniker: "/core/test_manager/tests:**",
},
],
},
}