|
| 1 | +#!/usr/bin/python3 |
| 2 | +# --- GENERATED FILE --- DO NOT EDIT --- # |
| 3 | +# --- generated from: conf-v0.schema.yaml |
| 4 | + |
| 5 | +SCHEMA = { |
| 6 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 7 | + "$id": "mailto:[email protected]", |
| 8 | + "title": "sambacc configuration", |
| 9 | + "description": ( |
| 10 | + "The configuration for the sambacc tool. sambacc configures Samba and" |
| 11 | + " the container\nenvironment to fit Samba's unique needs. This" |
| 12 | + " configuration can hold configuration\nfor more than one server" |
| 13 | + ' "instance". The "configs" section contains one or' |
| 14 | + " more\nconfiguration with a name that can be selected at runtime." |
| 15 | + " Share definitions\nand samba global configuration blocks can be" |
| 16 | + " mixed and matched.\n" |
| 17 | + ), |
| 18 | + "type": "object", |
| 19 | + "$defs": { |
| 20 | + "section_choices": { |
| 21 | + "description": ( |
| 22 | + "Selects sub-sections from elsewhere in the configuration.\n" |
| 23 | + ), |
| 24 | + "type": "array", |
| 25 | + "items": {"type": "string"}, |
| 26 | + }, |
| 27 | + "feature_flags": { |
| 28 | + "description": ( |
| 29 | + "Feature flags are used to enable specific, wide-ranging," |
| 30 | + " features of\nsambacc. For example, it is used to enable" |
| 31 | + " clustered mode with ctdb.\n" |
| 32 | + ), |
| 33 | + "type": "array", |
| 34 | + "items": {"enum": ["addc", "ctdb"]}, |
| 35 | + }, |
| 36 | + "samba_options": { |
| 37 | + "description": ( |
| 38 | + "A mapping of values that will be passed into the smb.conf" |
| 39 | + " (or equivalent)\nto directly configure Samba.\n" |
| 40 | + ), |
| 41 | + "type": "object", |
| 42 | + "additionalProperties": {"type": "string"}, |
| 43 | + }, |
| 44 | + "permissions_config": { |
| 45 | + "description": ( |
| 46 | + "Settings that enable and manage sambacc's permissions" |
| 47 | + " management support.\n" |
| 48 | + ), |
| 49 | + "type": "object", |
| 50 | + "properties": { |
| 51 | + "method": { |
| 52 | + "description": ( |
| 53 | + "Backend method for controlling permissions on shares" |
| 54 | + ), |
| 55 | + "type": "string", |
| 56 | + }, |
| 57 | + "status_xattr": { |
| 58 | + "description": ( |
| 59 | + "xattr name used to store permissions state" |
| 60 | + ), |
| 61 | + "type": "string", |
| 62 | + }, |
| 63 | + }, |
| 64 | + "additionalProperties": {"type": "string"}, |
| 65 | + }, |
| 66 | + "user_entry": { |
| 67 | + "description": ( |
| 68 | + "A user that will be instantiated in the local contianer" |
| 69 | + " environment to\nin order to provide access to smb shares.\n" |
| 70 | + ), |
| 71 | + "type": "object", |
| 72 | + "properties": { |
| 73 | + "name": {"description": "The user's name", "type": "string"}, |
| 74 | + "uid": { |
| 75 | + "description": "The Unix UID the user should have", |
| 76 | + "type": "integer", |
| 77 | + }, |
| 78 | + "gid": { |
| 79 | + "description": "The Unix GID the user should have", |
| 80 | + "type": "integer", |
| 81 | + }, |
| 82 | + "nt_hash": { |
| 83 | + "description": "An NT-Hashed password", |
| 84 | + "type": "string", |
| 85 | + }, |
| 86 | + "password": { |
| 87 | + "description": "A plain-text password", |
| 88 | + "type": "string", |
| 89 | + }, |
| 90 | + }, |
| 91 | + "required": ["name"], |
| 92 | + "additionalProperties": False, |
| 93 | + }, |
| 94 | + "group_entry": { |
| 95 | + "description": ( |
| 96 | + "A group that will be instantiated in the local contianer" |
| 97 | + " environment to\nin order to provide access to smb shares.\n" |
| 98 | + ), |
| 99 | + "type": "object", |
| 100 | + "properties": { |
| 101 | + "name": {"description": "The group name", "type": "string"}, |
| 102 | + "gid": { |
| 103 | + "description": "The Unix GID the group should have", |
| 104 | + "type": "integer", |
| 105 | + }, |
| 106 | + }, |
| 107 | + "required": ["name"], |
| 108 | + "additionalProperties": False, |
| 109 | + }, |
| 110 | + "domain_user_entry": { |
| 111 | + "description": ( |
| 112 | + "A user that will be created in the specified AD domain." |
| 113 | + " These\nusers are populated in the directory after the" |
| 114 | + " domain is provisioned.\n" |
| 115 | + ), |
| 116 | + "type": "object", |
| 117 | + "properties": { |
| 118 | + "name": {"description": "The user's name", "type": "string"}, |
| 119 | + "surname": { |
| 120 | + "description": "A surname for the user", |
| 121 | + "type": "string", |
| 122 | + }, |
| 123 | + "given_name": { |
| 124 | + "description": "A given name for the user", |
| 125 | + "type": "string", |
| 126 | + }, |
| 127 | + "uid": {"type": "integer"}, |
| 128 | + "gid": {"type": "integer"}, |
| 129 | + "nt_hash": {"type": "string"}, |
| 130 | + "password": { |
| 131 | + "description": "A plain-text password", |
| 132 | + "type": "string", |
| 133 | + }, |
| 134 | + "member_of": { |
| 135 | + "description": ( |
| 136 | + "A list of group names that the user should belong to" |
| 137 | + ), |
| 138 | + "type": "array", |
| 139 | + "items": {"type": "string"}, |
| 140 | + }, |
| 141 | + }, |
| 142 | + "required": ["name"], |
| 143 | + "additionalProperties": False, |
| 144 | + }, |
| 145 | + "domain_group_entry": { |
| 146 | + "description": ( |
| 147 | + "A group that will be created in the specified AD domain." |
| 148 | + " These\ngroups are populated in the directory after the" |
| 149 | + " domain is provisioned.\n" |
| 150 | + ), |
| 151 | + "type": "object", |
| 152 | + "properties": { |
| 153 | + "name": {"description": "The group name", "type": "string"}, |
| 154 | + "gid": {"type": "integer"}, |
| 155 | + }, |
| 156 | + "required": ["name"], |
| 157 | + "additionalProperties": False, |
| 158 | + }, |
| 159 | + }, |
| 160 | + "properties": { |
| 161 | + "samba-container-config": { |
| 162 | + "type": "string", |
| 163 | + "title": "Cofiguration Format Version", |
| 164 | + "description": ( |
| 165 | + "A short version string that assists in allowing the" |
| 166 | + " configuration\nformat to (some day) support incompatible" |
| 167 | + " version changes.\n(It is unique to the configuration and is" |
| 168 | + " not the version of sambacc)\n" |
| 169 | + ), |
| 170 | + }, |
| 171 | + "configs": { |
| 172 | + "title": "Container Configurations", |
| 173 | + "description": ( |
| 174 | + "A mapping of named configurations (instances) to top-level" |
| 175 | + " configuration\nblocks. A useable configuration file must" |
| 176 | + " have at least one configuration,\nbut more than one is" |
| 177 | + " supported.\n" |
| 178 | + ), |
| 179 | + "type": "object", |
| 180 | + "additionalProperties": { |
| 181 | + "type": "object", |
| 182 | + "properties": { |
| 183 | + "shares": {"$ref": "#/$defs/section_choices"}, |
| 184 | + "globals": {"$ref": "#/$defs/section_choices"}, |
| 185 | + "instance_features": {"$ref": "#/$defs/feature_flags"}, |
| 186 | + "permissions": {"$ref": "#/$defs/permissions_config"}, |
| 187 | + "instance_name": { |
| 188 | + "description": ( |
| 189 | + "A name that will be set for the server" |
| 190 | + " instance.\n" |
| 191 | + ), |
| 192 | + "type": "string", |
| 193 | + }, |
| 194 | + "domain_settings": { |
| 195 | + "description": ( |
| 196 | + "The name of the domain settings. Only used with" |
| 197 | + " 'ADDC' feature flag.\n" |
| 198 | + ), |
| 199 | + "type": "string", |
| 200 | + }, |
| 201 | + }, |
| 202 | + "additionalProperties": False, |
| 203 | + }, |
| 204 | + }, |
| 205 | + "shares": { |
| 206 | + "description": ( |
| 207 | + "A mapping of share name to share specific configuration. A" |
| 208 | + ' share can\nhave "options" that are passed to Samba. Shares' |
| 209 | + ' can have an optional\n"permissions" section for managing' |
| 210 | + " permissions/acls in sambacc.\n" |
| 211 | + ), |
| 212 | + "type": "object", |
| 213 | + "additionalProperties": { |
| 214 | + "type": "object", |
| 215 | + "properties": { |
| 216 | + "options": {"$ref": "#/$defs/samba_options"}, |
| 217 | + "permissions": {"$ref": "#/$defs/permissions_config"}, |
| 218 | + }, |
| 219 | + "additionalProperties": False, |
| 220 | + }, |
| 221 | + }, |
| 222 | + "globals": { |
| 223 | + "description": ( |
| 224 | + "A mapping of samba global configuation blocks. The global" |
| 225 | + " section names\nare not passed to Samba. All sections" |
| 226 | + " selected by a configuration are\nmerged together before" |
| 227 | + " passing to Samba.\n" |
| 228 | + ), |
| 229 | + "type": "object", |
| 230 | + "additionalProperties": { |
| 231 | + "type": "object", |
| 232 | + "properties": {"options": {"$ref": "#/$defs/samba_options"}}, |
| 233 | + "additionalProperties": False, |
| 234 | + }, |
| 235 | + }, |
| 236 | + "domain_settings": { |
| 237 | + "description": ( |
| 238 | + "A mapping of AD DC domain configuration keys to domain" |
| 239 | + " configurations.\nThese parameters are used when" |
| 240 | + " provisioning an AD DC instance.\n" |
| 241 | + ), |
| 242 | + "type": "object", |
| 243 | + "additionalProperties": { |
| 244 | + "type": "object", |
| 245 | + "properties": { |
| 246 | + "realm": {"type": "string"}, |
| 247 | + "short_domain": {"type": "string"}, |
| 248 | + "admin_password": {"type": "string"}, |
| 249 | + }, |
| 250 | + "required": ["realm"], |
| 251 | + "additionalProperties": False, |
| 252 | + }, |
| 253 | + }, |
| 254 | + "users": { |
| 255 | + "description": ( |
| 256 | + "Users to add to the container environment in order to" |
| 257 | + " provide\nShare access-control wihout becoming a domain" |
| 258 | + " member server.\n" |
| 259 | + ), |
| 260 | + "type": "object", |
| 261 | + "properties": { |
| 262 | + "all_entries": { |
| 263 | + "type": "array", |
| 264 | + "items": {"$ref": "#/$defs/user_entry"}, |
| 265 | + } |
| 266 | + }, |
| 267 | + }, |
| 268 | + "groups": { |
| 269 | + "description": ( |
| 270 | + "Groups to add to the container environment in order to" |
| 271 | + " provide\nShare access-control wihout becoming a domain" |
| 272 | + " member server.\n" |
| 273 | + ), |
| 274 | + "type": "object", |
| 275 | + "properties": { |
| 276 | + "all_entries": { |
| 277 | + "type": "array", |
| 278 | + "items": {"$ref": "#/$defs/group_entry"}, |
| 279 | + } |
| 280 | + }, |
| 281 | + }, |
| 282 | + "domain_users": { |
| 283 | + "description": ( |
| 284 | + "The domain_users section defines initial users that will be" |
| 285 | + " automatically\nadded to a newly provisioned domain. This" |
| 286 | + " section is a mapping of the\ndomain settings name to a list" |
| 287 | + " of domain user entries.\n" |
| 288 | + ), |
| 289 | + "type": "object", |
| 290 | + "additionalProperties": { |
| 291 | + "type": "array", |
| 292 | + "items": {"$ref": "#/$defs/domain_user_entry"}, |
| 293 | + }, |
| 294 | + }, |
| 295 | + "domain_groups": { |
| 296 | + "description": ( |
| 297 | + "The domain_groups section defines initial groups that will" |
| 298 | + " be\nautomatically added to a newly provisioned domain. This" |
| 299 | + " section is\na mapping of the domain settings name to a list" |
| 300 | + " of domain group entries.\n" |
| 301 | + ), |
| 302 | + "type": "object", |
| 303 | + "additionalProperties": { |
| 304 | + "type": "array", |
| 305 | + "items": {"$ref": "#/$defs/domain_group_entry"}, |
| 306 | + }, |
| 307 | + }, |
| 308 | + "ctdb": { |
| 309 | + "type": "object", |
| 310 | + "additionalProperties": {"type": "string"}, |
| 311 | + }, |
| 312 | + }, |
| 313 | + "additionalProperties": False, |
| 314 | + "required": ["samba-container-config"], |
| 315 | + "patternProperties": {"^_": True}, |
| 316 | +} |
0 commit comments