security-1.0.xsd 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <xsd:schema xmlns="http://symfony.com/schema/dic/security"
  3. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  4. targetNamespace="http://symfony.com/schema/dic/security"
  5. elementFormDefault="qualified">
  6. <xsd:element name="config" type="config" />
  7. <xsd:complexType name="config">
  8. <xsd:choice maxOccurs="unbounded">
  9. <xsd:element name="access-decision-manager" type="access_decision_manager" minOccurs="0" maxOccurs="1" />
  10. <xsd:element name="encoders" type="encoders" minOccurs="0" maxOccurs="1" />
  11. <xsd:element name="encoder" type="encoder" minOccurs="0" maxOccurs="unbounded" />
  12. <xsd:element name="providers" type="providers" minOccurs="0" maxOccurs="1" />
  13. <xsd:element name="provider" type="provider" minOccurs="0" maxOccurs="unbounded" />
  14. <xsd:element name="firewalls" type="firewalls" minOccurs="0" maxOccurs="1" />
  15. <xsd:element name="firewall" type="firewall" minOccurs="0" maxOccurs="unbounded" />
  16. <xsd:element name="rule" type="rule" minOccurs="0" maxOccurs="unbounded" />
  17. <xsd:element name="role" type="role" minOccurs="0" maxOccurs="unbounded" />
  18. </xsd:choice>
  19. <xsd:attribute name="access-denied-url" type="xsd:string" />
  20. <xsd:attribute name="session-fixation-strategy" type="session_fixation_strategy" />
  21. <xsd:attribute name="hide-user-not-found" type="xsd:boolean" />
  22. <xsd:attribute name="always-authenticate-before-granting" type="xsd:boolean" />
  23. <xsd:attribute name="erase-credentials" type="xsd:boolean" />
  24. <xsd:attribute name="enable-authenticator-manager" type="xsd:boolean" />
  25. </xsd:complexType>
  26. <xsd:complexType name="encoders">
  27. <xsd:sequence>
  28. <xsd:element name="encoder" type="encoder" minOccurs="1" maxOccurs="unbounded" />
  29. </xsd:sequence>
  30. </xsd:complexType>
  31. <xsd:complexType name="providers">
  32. <xsd:sequence>
  33. <xsd:element name="provider" type="provider" minOccurs="1" maxOccurs="unbounded" />
  34. </xsd:sequence>
  35. </xsd:complexType>
  36. <xsd:complexType name="firewalls">
  37. <xsd:sequence>
  38. <xsd:element name="firewall" type="firewall" minOccurs="1" maxOccurs="unbounded" />
  39. </xsd:sequence>
  40. </xsd:complexType>
  41. <xsd:simpleType name="session_fixation_strategy">
  42. <xsd:restriction base="xsd:string">
  43. <xsd:enumeration value="none" />
  44. <xsd:enumeration value="migrate" />
  45. <xsd:enumeration value="invalidate" />
  46. </xsd:restriction>
  47. </xsd:simpleType>
  48. <xsd:complexType name="access_decision_manager">
  49. <xsd:attribute name="strategy" type="access_decision_manager_strategy" />
  50. <xsd:attribute name="service" type="xsd:string" />
  51. <xsd:attribute name="allow-if-all-abstain" type="xsd:boolean" />
  52. <xsd:attribute name="allow-if-equal-granted-denied" type="xsd:boolean" />
  53. </xsd:complexType>
  54. <xsd:simpleType name="access_decision_manager_strategy">
  55. <xsd:restriction base="xsd:string">
  56. <xsd:enumeration value="affirmative" />
  57. <xsd:enumeration value="consensus" />
  58. <xsd:enumeration value="unanimous" />
  59. <xsd:enumeration value="priority" />
  60. </xsd:restriction>
  61. </xsd:simpleType>
  62. <xsd:complexType name="encoder">
  63. <xsd:sequence>
  64. <xsd:element name="migrate-from" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
  65. </xsd:sequence>
  66. <xsd:attribute name="class" type="xsd:string" use="required" />
  67. <xsd:attribute name="algorithm" type="xsd:string" />
  68. <xsd:attribute name="hash-algorithm" type="xsd:string" />
  69. <xsd:attribute name="key-length" type="xsd:string" />
  70. <xsd:attribute name="ignore-case" type="xsd:boolean" />
  71. <xsd:attribute name="encode-as-base64" type="xsd:boolean" />
  72. <xsd:attribute name="iterations" type="xsd:string" />
  73. <xsd:attribute name="cost" type="xsd:integer" />
  74. <xsd:attribute name="memory-cost" type="xsd:string" />
  75. <xsd:attribute name="time-cost" type="xsd:string" />
  76. <xsd:attribute name="id" type="xsd:string" />
  77. </xsd:complexType>
  78. <xsd:complexType name="provider">
  79. <xsd:choice minOccurs="0" maxOccurs="1">
  80. <xsd:element name="chain" type="chain" />
  81. <xsd:element name="memory" type="memory" />
  82. <xsd:element name="ldap" type="ldap" />
  83. <!-- allow factories to use dynamic elements -->
  84. <xsd:any processContents="lax" />
  85. </xsd:choice>
  86. <xsd:attribute name="name" type="xsd:string" use="required" />
  87. <xsd:attribute name="id" type="xsd:string" />
  88. </xsd:complexType>
  89. <xsd:complexType name="chain">
  90. <xsd:sequence minOccurs="0" maxOccurs="unbounded">
  91. <xsd:element name="provider" type="xsd:string" />
  92. </xsd:sequence>
  93. <xsd:attribute name="providers" type="xsd:string" />
  94. </xsd:complexType>
  95. <xsd:complexType name="memory">
  96. <xsd:sequence>
  97. <xsd:element name="user" type="user" minOccurs="1" maxOccurs="unbounded" />
  98. </xsd:sequence>
  99. </xsd:complexType>
  100. <xsd:complexType name="user">
  101. <xsd:attribute name="name" type="xsd:string" use="required" />
  102. <xsd:attribute name="password" type="xsd:string" />
  103. <xsd:attribute name="roles" type="xsd:string" />
  104. </xsd:complexType>
  105. <xsd:complexType name="ldap">
  106. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  107. <xsd:element name="extra-field" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
  108. <xsd:element name="default-role" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
  109. </xsd:choice>
  110. <xsd:attribute name="service" type="xsd:string" use="required" />
  111. <xsd:attribute name="base-dn" type="xsd:string" use="required" />
  112. <xsd:attribute name="search-dn" type="xsd:string" />
  113. <xsd:attribute name="search-password" type="xsd:string" />
  114. <xsd:attribute name="uid-key" type="xsd:string" />
  115. <xsd:attribute name="filter" type="xsd:string" />
  116. <xsd:attribute name="password-attribute" type="xsd:string" />
  117. </xsd:complexType>
  118. <xsd:complexType name="firewall">
  119. <xsd:choice maxOccurs="unbounded">
  120. <xsd:element name="logout" type="logout" minOccurs="0" maxOccurs="1" />
  121. <xsd:element name="switch-user" type="switch_user" minOccurs="0" maxOccurs="1" />
  122. <xsd:element name="anonymous" type="anonymous" minOccurs="0" maxOccurs="1" />
  123. <xsd:element name="form-login" type="form_login" minOccurs="0" maxOccurs="1" />
  124. <xsd:element name="form-login-ldap" type="form_login_ldap" minOccurs="0" maxOccurs="1" />
  125. <xsd:element name="guard" type="guard" minOccurs="0" maxOccurs="1" />
  126. <xsd:element name="http-basic" type="http_basic" minOccurs="0" maxOccurs="1" />
  127. <xsd:element name="http-basic-ldap" type="http_basic_ldap" minOccurs="0" maxOccurs="1" />
  128. <xsd:element name="json-login" type="json_login" minOccurs="0" maxOccurs="1" />
  129. <xsd:element name="json-login-ldap" type="json_login_ldap" minOccurs="0" maxOccurs="1" />
  130. <xsd:element name="login-throttling" type="login_throttling" minOccurs="0" maxOccurs="1" />
  131. <xsd:element name="remember-me" type="remember_me" minOccurs="0" maxOccurs="1" />
  132. <xsd:element name="remote-user" type="remote_user" minOccurs="0" maxOccurs="1" />
  133. <xsd:element name="x509" type="x509" minOccurs="0" maxOccurs="1" />
  134. <!-- allow factories to use dynamic elements -->
  135. <xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
  136. </xsd:choice>
  137. <xsd:attribute name="name" type="xsd:string" use="required" />
  138. <xsd:attribute name="pattern" type="xsd:string" />
  139. <xsd:attribute name="host" type="xsd:string" />
  140. <xsd:attribute name="methods" type="xsd:string" />
  141. <xsd:attribute name="security" type="xsd:boolean" />
  142. <xsd:attribute name="user-checker" type="xsd:string" />
  143. <xsd:attribute name="request-matcher" type="xsd:string" />
  144. <xsd:attribute name="access-denied-url" type="xsd:string" />
  145. <xsd:attribute name="access-denied-handler" type="xsd:string" />
  146. <xsd:attribute name="entry-point" type="xsd:string" />
  147. <xsd:attribute name="provider" type="xsd:string" />
  148. <xsd:attribute name="stateless" type="xsd:boolean" />
  149. <xsd:attribute name="context" type="xsd:string" />
  150. <xsd:attribute name="lazy" type="xsd:boolean" />
  151. <!-- allow factories to use dynamic elements -->
  152. <xsd:anyAttribute processContents="lax" />
  153. </xsd:complexType>
  154. <xsd:complexType name="logout">
  155. <xsd:sequence>
  156. <xsd:element name="delete-cookie" type="delete_cookie" minOccurs="0" maxOccurs="unbounded" />
  157. </xsd:sequence>
  158. <xsd:attribute name="csrf-parameter" type="xsd:string" />
  159. <xsd:attribute name="csrf-token-generator" type="xsd:string" />
  160. <xsd:attribute name="csrf-token-id" type="xsd:string" />
  161. <xsd:attribute name="path" type="xsd:string" />
  162. <xsd:attribute name="target" type="xsd:string" />
  163. <xsd:attribute name="success-handler" type="xsd:string" />
  164. <xsd:attribute name="invalidate-session" type="xsd:boolean" />
  165. </xsd:complexType>
  166. <xsd:complexType name="delete_cookie">
  167. <xsd:attribute name="name" type="xsd:string" use="required" />
  168. <xsd:attribute name="path" type="xsd:string" />
  169. <xsd:attribute name="domain" type="xsd:string" />
  170. </xsd:complexType>
  171. <xsd:complexType name="switch_user">
  172. <xsd:attribute name="provider" type="xsd:string" />
  173. <xsd:attribute name="parameter" type="xsd:string" />
  174. <xsd:attribute name="role" type="xsd:string" />
  175. </xsd:complexType>
  176. <xsd:complexType name="anonymous">
  177. <xsd:attribute name="lazy" type="xsd:boolean" />
  178. <xsd:attribute name="secret" type="xsd:string" />
  179. </xsd:complexType>
  180. <xsd:complexType name="factory" abstract="true">
  181. <xsd:attribute name="check-path" type="xsd:string" />
  182. <xsd:attribute name="use-forward" type="xsd:boolean" />
  183. <xsd:attribute name="require-previous-session" type="xsd:boolean" />
  184. </xsd:complexType>
  185. <xsd:attributeGroup name="success-handler-options">
  186. <xsd:attribute name="always-use-default-target-path" type="xsd:boolean" />
  187. <xsd:attribute name="default-target-path" type="xsd:string" />
  188. <xsd:attribute name="target-path-parameter" type="xsd:string" />
  189. <xsd:attribute name="use-referer" type="xsd:boolean" />
  190. </xsd:attributeGroup>
  191. <xsd:attributeGroup name="failure-handler-options">
  192. <xsd:attribute name="failure-path" type="xsd:string" />
  193. <xsd:attribute name="failure-forward" type="xsd:boolean" />
  194. <xsd:attribute name="failure-path-parameter" type="xsd:string" />
  195. </xsd:attributeGroup>
  196. <xsd:attributeGroup name="ldap-factory">
  197. <xsd:attribute name="service" type="xsd:string" />
  198. <xsd:attribute name="dn-string" type="xsd:string" />
  199. <xsd:attribute name="query-string" type="xsd:string" />
  200. <xsd:attribute name="search-dn" type="xsd:string" />
  201. <xsd:attribute name="search-password" type="xsd:string" />
  202. </xsd:attributeGroup>
  203. <xsd:complexType name="form_login">
  204. <xsd:complexContent>
  205. <xsd:extension base="factory">
  206. <xsd:attribute name="login-path" type="xsd:string" />
  207. <xsd:attribute name="username-parameter" type="xsd:string" />
  208. <xsd:attribute name="password-parameter" type="xsd:string" />
  209. <xsd:attribute name="csrf-parameter" type="xsd:string" />
  210. <xsd:attribute name="csrf-token-id" type="xsd:string" />
  211. <xsd:attribute name="post-only" type="xsd:boolean" />
  212. <xsd:attribute name="csrf-token-generator" type="xsd:string" />
  213. <xsd:attribute name="enable-csrf" type="xsd:boolean" />
  214. <xsd:attributeGroup ref="success-handler-options" />
  215. <xsd:attributeGroup ref="failure-handler-options" />
  216. </xsd:extension>
  217. </xsd:complexContent>
  218. </xsd:complexType>
  219. <xsd:complexType name="form_login_ldap">
  220. <xsd:complexContent>
  221. <xsd:extension base="form_login">
  222. <xsd:attributeGroup ref="ldap-factory" />
  223. </xsd:extension>
  224. </xsd:complexContent>
  225. </xsd:complexType>
  226. <xsd:complexType name="guard">
  227. <xsd:sequence>
  228. <xsd:element name="authenticator" type="xsd:string" minOccurs="1" maxOccurs="unbounded" />
  229. </xsd:sequence>
  230. <xsd:attribute name="provider" type="xsd:string" />
  231. <xsd:attribute name="entry-point" type="xsd:string" />
  232. </xsd:complexType>
  233. <xsd:complexType name="http_basic">
  234. <xsd:attribute name="provider" type="xsd:string" />
  235. <xsd:attribute name="realm" type="xsd:string" />
  236. </xsd:complexType>
  237. <xsd:complexType name="http_basic_ldap">
  238. <xsd:complexContent>
  239. <xsd:extension base="http_basic">
  240. <xsd:attributeGroup ref="ldap-factory" />
  241. </xsd:extension>
  242. </xsd:complexContent>
  243. </xsd:complexType>
  244. <xsd:complexType name="json_login">
  245. <xsd:complexContent>
  246. <xsd:extension base="factory">
  247. <xsd:attribute name="username-path" type="xsd:string" />
  248. <xsd:attribute name="password-path" type="xsd:string" />
  249. </xsd:extension>
  250. </xsd:complexContent>
  251. </xsd:complexType>
  252. <xsd:complexType name="json_login_ldap">
  253. <xsd:complexContent>
  254. <xsd:extension base="json_login">
  255. <xsd:attributeGroup ref="ldap-factory" />
  256. </xsd:extension>
  257. </xsd:complexContent>
  258. </xsd:complexType>
  259. <xsd:complexType name="login_link">
  260. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  261. <xsd:element name="signature-property" type="xsd:string" />
  262. </xsd:choice>
  263. <xsd:attribute name="check-route" type="xsd:string" />
  264. <xsd:attribute name="check-post-only" type="xsd:boolean" />
  265. <xsd:attribute name="lifetime" type="xsd:integer" />
  266. <xsd:attribute name="max-uses" type="xsd:integer" />
  267. <xsd:attribute name="used-link-cache" type="xsd:string" />
  268. <xsd:attribute name="success-handler" type="xsd:string" />
  269. <xsd:attribute name="failure-handler" type="xsd:string" />
  270. <xsd:attribute name="provider" type="xsd:string" />
  271. </xsd:complexType>
  272. <xsd:complexType name="login_throttling">
  273. <xsd:attribute name="limiter" type="xsd:string" />
  274. <xsd:attribute name="max-attempts" type="xsd:integer" />
  275. </xsd:complexType>
  276. <xsd:complexType name="remember_me">
  277. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  278. <xsd:element name="user-provider" type="xsd:string" />
  279. </xsd:choice>
  280. <xsd:attribute name="name" type="xsd:string" />
  281. <xsd:attribute name="lifetime" type="xsd:integer" />
  282. <xsd:attribute name="path" type="xsd:string" />
  283. <xsd:attribute name="domain" type="xsd:string" />
  284. <xsd:attribute name="http-only" type="xsd:boolean" />
  285. <xsd:attribute name="always-remember-me" type="xsd:boolean" />
  286. <xsd:attribute name="remember-me-parameter" type="xsd:string" />
  287. <xsd:attribute name="secret" type="xsd:string" use="required" />
  288. <xsd:attribute name="service" type="xsd:string" />
  289. <xsd:attribute name="token-provider" type="xsd:string" />
  290. <xsd:attribute name="catch-exceptions" type="xsd:boolean" />
  291. <xsd:attribute name="secure" type="remember_me_secure" />
  292. <xsd:attribute name="samesite" type="remember_me_samesite" />
  293. </xsd:complexType>
  294. <xsd:simpleType name="remember_me_secure">
  295. <xsd:restriction base="xsd:string">
  296. <xsd:enumeration value="true" />
  297. <xsd:enumeration value="false" />
  298. <xsd:enumeration value="auto" />
  299. </xsd:restriction>
  300. </xsd:simpleType>
  301. <xsd:simpleType name="remember_me_samesite">
  302. <xsd:restriction base="xsd:string">
  303. <xsd:enumeration value="null" />
  304. <xsd:enumeration value="lax" />
  305. <xsd:enumeration value="strict" />
  306. <xsd:enumeration value="none" />
  307. </xsd:restriction>
  308. </xsd:simpleType>
  309. <xsd:complexType name="remote_user">
  310. <xsd:attribute name="provider" type="xsd:string" />
  311. <xsd:attribute name="user" type="xsd:string" />
  312. </xsd:complexType>
  313. <xsd:complexType name="x509">
  314. <xsd:attribute name="provider" type="xsd:string" />
  315. <xsd:attribute name="user" type="xsd:string" />
  316. <xsd:attribute name="credentials" type="xsd:string" />
  317. </xsd:complexType>
  318. <xsd:complexType name="rule">
  319. <xsd:choice>
  320. <xsd:element name="ip" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
  321. <xsd:element name="method" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
  322. <xsd:element name="role" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
  323. <xsd:element name="allow-if" type="xsd:string" minOccurs="0" maxOccurs="1" />
  324. </xsd:choice>
  325. <xsd:attribute name="requires-channel" type="xsd:string" />
  326. <xsd:attribute name="path" type="xsd:string" />
  327. <xsd:attribute name="host" type="xsd:string" />
  328. <xsd:attribute name="port" type="xsd:integer" />
  329. <xsd:attribute name="role" type="xsd:string" />
  330. <xsd:attribute name="methods" type="xsd:string" />
  331. <xsd:attribute name="allow-if" type="xsd:string" />
  332. </xsd:complexType>
  333. <xsd:complexType name="role">
  334. <xsd:simpleContent>
  335. <xsd:extension base="xsd:string">
  336. <xsd:attribute name="id" type="xsd:string" use="required" />
  337. <xsd:attribute name="value" type="xsd:string" />
  338. </xsd:extension>
  339. </xsd:simpleContent>
  340. </xsd:complexType>
  341. </xsd:schema>