Konfiguration av åtkomstkontroll
Exempel
Följande JSON är ett exempel för denna standardiserade konfigurationskomponent:
{ "DefaultAllow": true
}
Definition
AccessControl
Åtkomstkontrollen består av en standardinställning och en lista med regler.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://invantive.com/schemas/defs/AccessControl.schema.json",
"title": "AccessControl",
"description": "Specification of ACL for a specific preset.",
"type": "object",
"additionalProperties": false,
"properties": {
"DefaultAllow": {
"type": "boolean",
"description": "Whether to allow access (true) or disallow (false) when no rule matches."
},
"AccessControlList": {
"type": ["array", "null"],
"items": {
"$ref": "./AccessControlElement.schema.json"
},
"description": "Ordered list of ACLs. First one to apply is used."
}
}
}
AccessControlElement
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://invantive.com/schemas/defs/AccessControlElement.schema.json",
"title": "AccessControlElement",
"description": "Specification of an ACL element.",
"type": "object",
"additionalProperties": false,
"properties": {
"Description": {
"type": ["string", "null"],
"description": "Optional description identifying the access control element."
},
"Context": {
"type": ["string", "null"],
"description": "Optional context limiting the applicability of the access control element. * at the end is a wildcard."
},
"Url": {
"type": ["string", "null"],
"description": "Optional URL. * at the end is a wildcard.",
"format": "uri"
},
"ErrorCode": {
"type": ["string", "null"],
"description": "Optional message code identifying the ACL.",
},
"ErrorMessage": {
"type": ["string", "null"],
"description": "Optional message to show when the check fails.",
},
"Allow": {
"type": "boolean",
"description": "Whether to allow access or deny.",
"default": false
},
"ValidFromUtc": {
"type": ["string", "null"],
"format": "date-time",
"description": "Start of validity (UTC). Outside of this period the access control element is not enforced."
},
"ValidToUtc": {
"type": ["string", "null"],
"format": "date-time",
"description": "End of validity (UTC). Outside of this period the access control element is not enforced."
},
"LogOnCode": {
"type": ["string", "null"],
"description": "Log on code."
},
"DataContainerId": {
"type": ["string", "null"],
"description": "Data container ID."
},
"IpAddressClientCidr": {
"type": ["string", "null"],
"description": "IP address of the client device in CIDR notation (1.2.3.4/5)."
}
}
}