Merge tag 'v9.0.0-rc3'
[qemu/ar7.git] / qapi / authz.json
blob7fc6e3032ea63bbcb0ebc6b9a0f3a7f3581e7310
1 # -*- Mode: Python -*-
2 # vim: filetype=python
4 ##
5 # = User authorization
6 ##
8 ##
9 # @QAuthZListPolicy:
11 # The authorization policy result
13 # @deny: deny access
15 # @allow: allow access
17 # Since: 4.0
19 { 'enum': 'QAuthZListPolicy',
20   'prefix': 'QAUTHZ_LIST_POLICY',
21   'data': ['deny', 'allow']}
24 # @QAuthZListFormat:
26 # The authorization policy match format
28 # @exact: an exact string match
30 # @glob: string with ? and * shell wildcard support
32 # Since: 4.0
34 { 'enum': 'QAuthZListFormat',
35   'prefix': 'QAUTHZ_LIST_FORMAT',
36   'data': ['exact', 'glob']}
39 # @QAuthZListRule:
41 # A single authorization rule.
43 # @match: a string or glob to match against a user identity
45 # @policy: the result to return if @match evaluates to true
47 # @format: the format of the @match rule (default 'exact')
49 # Since: 4.0
51 { 'struct': 'QAuthZListRule',
52   'data': {'match': 'str',
53            'policy': 'QAuthZListPolicy',
54            '*format': 'QAuthZListFormat'}}
57 # @AuthZListProperties:
59 # Properties for authz-list objects.
61 # @policy: Default policy to apply when no rule matches (default:
62 #     deny)
64 # @rules: Authorization rules based on matching user
66 # Since: 4.0
68 { 'struct': 'AuthZListProperties',
69   'data': { '*policy': 'QAuthZListPolicy',
70             '*rules': ['QAuthZListRule'] } }
73 # @AuthZListFileProperties:
75 # Properties for authz-listfile objects.
77 # @filename: File name to load the configuration from.  The file must
78 #     contain valid JSON for AuthZListProperties.
80 # @refresh: If true, inotify is used to monitor the file,
81 #     automatically reloading changes.  If an error occurs during
82 #     reloading, all authorizations will fail until the file is next
83 #     successfully loaded.  (default: true if the binary was built
84 #     with CONFIG_INOTIFY1, false otherwise)
86 # Since: 4.0
88 { 'struct': 'AuthZListFileProperties',
89   'data': { 'filename': 'str',
90             '*refresh': 'bool' } }
93 # @AuthZPAMProperties:
95 # Properties for authz-pam objects.
97 # @service: PAM service name to use for authorization
99 # Since: 4.0
101 { 'struct': 'AuthZPAMProperties',
102   'data': { 'service': 'str' } }
105 # @AuthZSimpleProperties:
107 # Properties for authz-simple objects.
109 # @identity: Identifies the allowed user.  Its format depends on the
110 #     network service that authorization object is associated with.
111 #     For authorizing based on TLS x509 certificates, the identity
112 #     must be the x509 distinguished name.
114 # Since: 4.0
116 { 'struct': 'AuthZSimpleProperties',
117   'data': { 'identity': 'str' } }