Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 48 additions & 6 deletions backend/schema/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,32 @@
}
]
},
"access_directive": {
"description": "Access Directive",
"type": "string",
"enum": [
"allow",
"deny"
],
"example": "allow"
},
"authorization_username": {
"description": "Username",
"type": "string",
"minLength": 1,
"example": "admin"
},
"authorization_password": {
"description": "Password",
"type": "string",
"example": "pass"
},
"authorization_hint": {
"description": "Password Hint",
"type": "string",
"minLength": 1,
"example": "p***"
},
"created_on": {
"description": "Date and time of creation",
"readOnly": true,
Expand Down Expand Up @@ -86,7 +112,10 @@
"type": "string",
"pattern": "^[^&| @!#%^();:/\\\\}{=+?<>,~`'\"]+$"
},
"example": ["example.com", "www.example.com"]
"example": [
"example.com",
"www.example.com"
]
},
"enabled": {
"description": "Is Enabled",
Expand Down Expand Up @@ -136,7 +165,10 @@
},
"directive": {
"type": "string",
"enum": ["allow", "deny"],
"enum": [
"allow",
"deny"
],
"example": "allow"
},
"address": {
Expand All @@ -163,11 +195,10 @@
"additionalProperties": false,
"properties": {
"username": {
"type": "string",
"minLength": 1
"$ref": "#/properties/authorization_username"
},
"password": {
"type": "string"
"$ref": "#/properties/authorization_password"
}
},
"example": {
Expand Down Expand Up @@ -214,18 +245,24 @@
"schema": {
"type": "object",
"additionalProperties": false,
"required": ["certificate", "certificate_key"],
"required": [
"certificate",
"certificate_key"
],
"properties": {
"certificate": {
"type": "string",
"format": "binary",
"example": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----"
},
"certificate_key": {
"type": "string",
"format": "binary",
"example": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----"
},
"intermediate_certificate": {
"type": "string",
"format": "binary",
"example": "-----BEGIN CERTIFICATE-----\nMIID...-----END CERTIFICATE-----"
}
}
Expand All @@ -236,6 +273,11 @@
}
}
}
},
"meta": {
"description": "Meta Information",
"type": "object",
"example": {}
}
}
}
7 changes: 7 additions & 0 deletions backend/schema/components/access-list-list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "array",
"description": "Access list list",
"items": {
"$ref": "./access-list-object.json"
}
}
125 changes: 122 additions & 3 deletions backend/schema/components/access-list-object.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"type": "object",
"description": "Access List object",
"required": ["id", "created_on", "modified_on", "owner_user_id", "name", "meta", "satisfy_any", "pass_auth", "proxy_host_count"],
"required": [
"id",
"created_on",
"modified_on",
"owner_user_id",
"name",
"meta",
"satisfy_any",
"pass_auth",
"proxy_host_count"
],
"properties": {
"id": {
"$ref": "../common.json#/properties/id"
Expand All @@ -21,8 +31,7 @@
"example": "My Access List"
},
"meta": {
"type": "object",
"example": {}
"$ref": "../common.json#/properties/meta"
},
"satisfy_any": {
"type": "boolean",
Expand All @@ -36,6 +45,116 @@
"type": "integer",
"minimum": 0,
"example": 3
},
"owner": {
"$ref": "./user-object.json"
},
"items": {
"type": "array",
"minItems": 0,
"items": {
"type": "object",
"required": [
"id",
"created_on",
"modified_on",
"access_list_id",
"username",
"password",
"hint",
"meta"
],
"additionalProperties": false,
"properties": {
"id": {
"$ref": "../common.json#/properties/id"
},
"created_on": {
"$ref": "../common.json#/properties/created_on"
},
"modified_on": {
"$ref": "../common.json#/properties/modified_on"
},
"access_list_id": {
"$ref": "../common.json#/properties/access_list_id"
},
"username": {
"$ref": "../common.json#/properties/authorization_username"
},
"password": {
"$ref": "../common.json#/properties/authorization_password"
},
"hint": {
"$ref": "../common.json#/properties/authorization_hint"
},
"meta": {
"$ref": "../common.json#/properties/meta"
}
}
},
"example": [
{
"id": 1,
"created_on": "2024-10-08T22:15:40.000Z",
"modified_on": "2024-10-08T22:15:40.000Z",
"access_list_id": 1,
"username": "admin",
"password": "",
"hint": "a****",
"meta": {}
}
]
},
"clients": {
"type": "array",
"minItems": 0,
"items": {
"type": "object",
"required": [
"id",
"created_on",
"modified_on",
"access_list_id",
"address",
"directive",
"meta"
],
"additionalProperties": false,
"properties": {
"id": {
"$ref": "../common.json#/properties/id"
},
"created_on": {
"$ref": "../common.json#/properties/created_on"
},
"modified_on": {
"$ref": "../common.json#/properties/modified_on"
},
"access_list_id": {
"$ref": "../common.json#/properties/access_list_id"
},
"address": {
"$ref": "../common.json#/properties/address"
},
"directive": {
"$ref": "../common.json#/properties/access_directive"
},
"meta": {
"$ref": "../common.json#/properties/meta"
}
}
},
"example": [
{
"id": 1,
"created_on": "2024-10-08T22:15:40.000Z",
"modified_on": "2024-10-08T22:15:40.000Z",
"access_list_id": 1,
"address": "127.0.0.1",
"directive": "allow",
"meta": {}
}
]
}
}
}
3 changes: 1 addition & 2 deletions backend/schema/components/audit-log-object.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
"example": "created"
},
"meta": {
"type": "object",
"example": {}
"$ref": "../common.json#/properties/meta"
},
"user": {
"$ref": "./user-object.json"
Expand Down
19 changes: 16 additions & 3 deletions backend/schema/components/dead-host-object.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
{
"type": "object",
"description": "404 Host object",
"required": ["id", "created_on", "modified_on", "owner_user_id", "domain_names", "certificate_id", "ssl_forced", "hsts_enabled", "hsts_subdomains", "http2_support", "advanced_config", "enabled", "meta"],
"required": [
"id",
"created_on",
"modified_on",
"owner_user_id",
"domain_names",
"certificate_id",
"ssl_forced",
"hsts_enabled",
"hsts_subdomains",
"http2_support",
"advanced_config",
"enabled",
"meta"
],
"additionalProperties": false,
"properties": {
"id": {
Expand Down Expand Up @@ -42,8 +56,7 @@
"$ref": "../common.json#/properties/enabled"
},
"meta": {
"type": "object",
"example": {}
"$ref": "../common.json#/properties/meta"
},
"certificate": {
"oneOf": [
Expand Down
52 changes: 44 additions & 8 deletions backend/schema/components/permission-object.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,83 @@
{
"type": "object",
"minProperties": 1,
"required": [
"visibility",
"access_lists",
"dead_hosts",
"proxy_hosts",
"redirection_hosts",
"streams",
"certificates"
],
"additionalProperties": false,
"properties": {
"visibility": {
"type": "string",
"description": "Visibility Type",
"enum": ["all", "user"],
"enum": [
"all",
"user"
],
"example": "all"
},
"access_lists": {
"type": "string",
"description": "Access Lists Permissions",
"enum": ["hidden", "view", "manage"],
"enum": [
"hidden",
"view",
"manage"
],
"example": "view"
},
"dead_hosts": {
"type": "string",
"description": "404 Hosts Permissions",
"enum": ["hidden", "view", "manage"],
"enum": [
"hidden",
"view",
"manage"
],
"example": "manage"
},
"proxy_hosts": {
"type": "string",
"description": "Proxy Hosts Permissions",
"enum": ["hidden", "view", "manage"],
"enum": [
"hidden",
"view",
"manage"
],
"example": "hidden"
},
"redirection_hosts": {
"type": "string",
"description": "Redirection Permissions",
"enum": ["hidden", "view", "manage"],
"enum": [
"hidden",
"view",
"manage"
],
"example": "view"
},
"streams": {
"type": "string",
"description": "Streams Permissions",
"enum": ["hidden", "view", "manage"],
"enum": [
"hidden",
"view",
"manage"
],
"example": "manage"
},
"certificates": {
"type": "string",
"description": "Certificates Permissions",
"enum": ["hidden", "view", "manage"],
"enum": [
"hidden",
"view",
"manage"
],
"example": "hidden"
}
}
Expand Down
Loading