authz.json 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # -*- Mode: Python -*-
  2. # vim: filetype=python
  3. ##
  4. # = User authorization
  5. ##
  6. ##
  7. # @QAuthZListPolicy:
  8. #
  9. # The authorization policy result
  10. #
  11. # @deny: deny access
  12. #
  13. # @allow: allow access
  14. #
  15. # Since: 4.0
  16. ##
  17. { 'enum': 'QAuthZListPolicy',
  18. 'prefix': 'QAUTHZ_LIST_POLICY',
  19. 'data': ['deny', 'allow']}
  20. ##
  21. # @QAuthZListFormat:
  22. #
  23. # The authorization policy match format
  24. #
  25. # @exact: an exact string match
  26. #
  27. # @glob: string with ? and * shell wildcard support
  28. #
  29. # Since: 4.0
  30. ##
  31. { 'enum': 'QAuthZListFormat',
  32. 'prefix': 'QAUTHZ_LIST_FORMAT',
  33. 'data': ['exact', 'glob']}
  34. ##
  35. # @QAuthZListRule:
  36. #
  37. # A single authorization rule.
  38. #
  39. # @match: a string or glob to match against a user identity
  40. #
  41. # @policy: the result to return if @match evaluates to true
  42. #
  43. # @format: the format of the @match rule (default 'exact')
  44. #
  45. # Since: 4.0
  46. ##
  47. { 'struct': 'QAuthZListRule',
  48. 'data': {'match': 'str',
  49. 'policy': 'QAuthZListPolicy',
  50. '*format': 'QAuthZListFormat'}}
  51. ##
  52. # @AuthZListProperties:
  53. #
  54. # Properties for authz-list objects.
  55. #
  56. # @policy: Default policy to apply when no rule matches (default:
  57. # deny)
  58. #
  59. # @rules: Authorization rules based on matching user
  60. #
  61. # Since: 4.0
  62. ##
  63. { 'struct': 'AuthZListProperties',
  64. 'data': { '*policy': 'QAuthZListPolicy',
  65. '*rules': ['QAuthZListRule'] } }
  66. ##
  67. # @AuthZListFileProperties:
  68. #
  69. # Properties for authz-listfile objects.
  70. #
  71. # @filename: File name to load the configuration from. The file must
  72. # contain valid JSON for AuthZListProperties.
  73. #
  74. # @refresh: If true, inotify is used to monitor the file,
  75. # automatically reloading changes. If an error occurs during
  76. # reloading, all authorizations will fail until the file is next
  77. # successfully loaded. (default: true if the binary was built
  78. # with CONFIG_INOTIFY1, false otherwise)
  79. #
  80. # Since: 4.0
  81. ##
  82. { 'struct': 'AuthZListFileProperties',
  83. 'data': { 'filename': 'str',
  84. '*refresh': 'bool' } }
  85. ##
  86. # @AuthZPAMProperties:
  87. #
  88. # Properties for authz-pam objects.
  89. #
  90. # @service: PAM service name to use for authorization
  91. #
  92. # Since: 4.0
  93. ##
  94. { 'struct': 'AuthZPAMProperties',
  95. 'data': { 'service': 'str' } }
  96. ##
  97. # @AuthZSimpleProperties:
  98. #
  99. # Properties for authz-simple objects.
  100. #
  101. # @identity: Identifies the allowed user. Its format depends on the
  102. # network service that authorization object is associated with.
  103. # For authorizing based on TLS x509 certificates, the identity
  104. # must be the x509 distinguished name.
  105. #
  106. # Since: 4.0
  107. ##
  108. { 'struct': 'AuthZSimpleProperties',
  109. 'data': { 'identity': 'str' } }