You are here

csp.schema.yml in Content-Security-Policy 8

config/schema/csp.schema.yml

File

config/schema/csp.schema.yml
View source
  1. # Schema for the configuration files of the csp module.
  2. csp.settings:
  3. type: config_object
  4. label: 'Content Security Policy Settings'
  5. mapping:
  6. report-only:
  7. type: csp_policy
  8. label: 'Report-Only Policy'
  9. enforce:
  10. type: csp_policy
  11. label: 'Enforce Policy'
  12. csp_policy:
  13. type: mapping
  14. label: 'Policy'
  15. mapping:
  16. enable:
  17. type: boolean
  18. label: 'Enable'
  19. directives:
  20. type: sequence
  21. label: 'Directives'
  22. sequence:
  23. type: csp_directive.[%key]
  24. reporting:
  25. type: mapping
  26. label: 'Reporting'
  27. mapping:
  28. plugin:
  29. type: string
  30. label: 'The Reporting Handler Plugin ID'
  31. options:
  32. type: csp_reporting_handler.[%parent.plugin]
  33. label: 'Reporting Plugin Options'
  34. csp_directive_source_list:
  35. type: mapping
  36. mapping:
  37. base:
  38. type: string
  39. label: 'Base'
  40. flags:
  41. type: sequence
  42. label: 'Flags'
  43. sequence:
  44. type: string
  45. sources:
  46. type: sequence
  47. label: 'Sources'
  48. sequence:
  49. type: string
  50. csp_directive.default-src:
  51. type: csp_directive_source_list
  52. csp_directive.child-src:
  53. type: csp_directive_source_list
  54. csp_directive.connect-src:
  55. type: csp_directive_source_list
  56. csp_directive.font-src:
  57. type: csp_directive_source_list
  58. csp_directive.frame-src:
  59. type: csp_directive_source_list
  60. csp_directive.img-src:
  61. type: csp_directive_source_list
  62. csp_directive.manifest-src:
  63. type: csp_directive_source_list
  64. csp_directive.media-src:
  65. type: csp_directive_source_list
  66. csp_directive.object-src:
  67. type: csp_directive_source_list
  68. csp_directive.prefetch-src:
  69. type: csp_directive_source_list
  70. csp_directive.script-src:
  71. type: csp_directive_source_list
  72. csp_directive.script-src-attr:
  73. type: csp_directive_source_list
  74. csp_directive.script-src-elem:
  75. type: csp_directive_source_list
  76. csp_directive.style-src:
  77. type: csp_directive_source_list
  78. csp_directive.style-src-attr:
  79. type: csp_directive_source_list
  80. csp_directive.style-src-elem:
  81. type: csp_directive_source_list
  82. csp_directive.worker-src:
  83. type: csp_directive_source_list
  84. csp_directive.base-uri:
  85. type: csp_directive_source_list
  86. csp_directive.plugin-types:
  87. type: sequence
  88. sequence:
  89. type: string
  90. csp_directive.sandbox:
  91. type: sequence
  92. sequence:
  93. type: string
  94. csp_directive.form-action:
  95. type: csp_directive_source_list
  96. # frame-ancestors does not support unsafe flags
  97. # @see https://www.w3.org/TR/CSP/#grammardef-ancestor-source-list
  98. csp_directive.frame-ancestors:
  99. type: csp_directive_source_list
  100. csp_directive.navigate-to:
  101. type: csp_directive_source_list
  102. csp_directive.block-all-mixed-content:
  103. type: boolean
  104. csp_directive.upgrade-insecure-requests:
  105. type: boolean
  106. csp_reporting_handler.none:
  107. type: mapping
  108. label: 'None'
  109. csp_reporting_handler.sitelog:
  110. type: mapping
  111. label: 'Site Log'
  112. csp_reporting_handler.report-uri-com:
  113. type: mapping
  114. label: 'Report URI'
  115. mapping:
  116. subdomain:
  117. type: string
  118. label: 'Subdomain'
  119. wizard:
  120. type: boolean
  121. label: 'Wizard'
  122. csp_reporting_handler.uri:
  123. type: mapping
  124. label: 'URI'
  125. mapping:
  126. uri:
  127. type: uri
  128. label: 'URI'