nats.te 951 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. policy_module(nats, 0.0.3)
  2. ########################################
  3. #
  4. # Declarations
  5. #
  6. type nats_t;
  7. type nats_exec_t;
  8. init_daemon_domain(nats_t, nats_exec_t)
  9. type nats_etc_t;
  10. files_config_file(nats_etc_t)
  11. allow nats_t self:fifo_file { read write };
  12. allow nats_t self:netlink_route_socket { bind create getattr nlmsg_read read write };
  13. allow nats_t self:process { getsched signal };
  14. allow nats_t self:tcp_socket { accept bind create getattr listen read setopt write };
  15. allow nats_t self:unix_dgram_socket { connect create getattr write };
  16. logging_send_syslog_msg(nats_t)
  17. read_files_pattern(nats_t, nats_etc_t, nats_etc_t)
  18. miscfiles_read_localization(nats_t)
  19. files_read_etc_files(nats_t)
  20. corenet_tcp_bind_generic_node(nats_t)
  21. kernel_read_net_sysctls(nats_t)
  22. dev_read_sysfs(nats_t)
  23. corenet_tcp_bind_all_unreserved_ports(nats_t)
  24. optional_policy(`
  25. gen_require(`
  26. type supervisor_t;
  27. ')
  28. supervisor_service_domain(nats_t,nats_exec_t)
  29. ')