mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-11-17 10:33:15 +01:00
Generate auth-gateway test fixtures from the Django config exporter
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"entries": [
|
||||
{
|
||||
"id": "cafe",
|
||||
"name": "Caf\u00e9",
|
||||
"hosts": [],
|
||||
"upstream": "http://10.0.0.14:8000",
|
||||
"allow_invalid_cert": false
|
||||
},
|
||||
{
|
||||
"id": "dashboard",
|
||||
"name": "Dashboard",
|
||||
"hosts": [
|
||||
"dashboard.example.test"
|
||||
],
|
||||
"upstream": "http://10.0.0.10:3000",
|
||||
"allow_invalid_cert": false
|
||||
},
|
||||
{
|
||||
"id": "files",
|
||||
"name": "Files",
|
||||
"hosts": [],
|
||||
"upstream": "http://10.0.0.13:8080",
|
||||
"allow_invalid_cert": false
|
||||
},
|
||||
{
|
||||
"id": "hypervisor",
|
||||
"name": "Hypervisor",
|
||||
"hosts": [
|
||||
"hypervisor.example.test"
|
||||
],
|
||||
"upstream": "https://10.0.0.12:8006",
|
||||
"allow_invalid_cert": true
|
||||
},
|
||||
{
|
||||
"id": "media",
|
||||
"name": "Media",
|
||||
"hosts": [
|
||||
"media.example.test",
|
||||
"media2.example.test"
|
||||
],
|
||||
"upstream": "http://10.0.0.11:32400",
|
||||
"allow_invalid_cert": false
|
||||
},
|
||||
{
|
||||
"id": "sso",
|
||||
"name": "SSO",
|
||||
"hosts": [
|
||||
"sso.example.test"
|
||||
],
|
||||
"upstream": "http://10.0.0.15:8000",
|
||||
"allow_invalid_cert": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
{
|
||||
"auth_methods": {
|
||||
"ip-allowlist": {
|
||||
"type": "ip_address",
|
||||
"rules": [
|
||||
{
|
||||
"address": "10.10.0.1",
|
||||
"prefix_length": null,
|
||||
"action": "allow",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"address": "10.20.0.0",
|
||||
"prefix_length": 24,
|
||||
"action": "allow",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"address": "10.20.0.12",
|
||||
"prefix_length": null,
|
||||
"action": "deny",
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"address": "10.30.0.15",
|
||||
"prefix_length": null,
|
||||
"action": "allow",
|
||||
"description": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"ip-empty": {
|
||||
"type": "ip_address",
|
||||
"rules": []
|
||||
},
|
||||
"local-password": {
|
||||
"type": "local_password",
|
||||
"session_expiration_minutes": 720
|
||||
},
|
||||
"oidc-company": {
|
||||
"type": "oidc",
|
||||
"session_expiration_minutes": 2880,
|
||||
"provider": "https://idp.example.test",
|
||||
"client_id": "fixture-client",
|
||||
"client_secret": "fixture-client-secret",
|
||||
"allowed_domains": [
|
||||
"example.test"
|
||||
],
|
||||
"allowed_emails": [
|
||||
"contractor@partner.example.test"
|
||||
]
|
||||
},
|
||||
"totp-global": {
|
||||
"type": "totp",
|
||||
"totp_secret": "JBSWY3DPEHPK3PXPJBSWY3DPEHPK3PXP"
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"staff": {
|
||||
"users": [
|
||||
"alice",
|
||||
"bob"
|
||||
]
|
||||
}
|
||||
},
|
||||
"users": {
|
||||
"alice": {
|
||||
"email": "alice@example.test",
|
||||
"password_hash": "$argon2id$v=19$m=65536,t=3,p=4$bEzFGMfGGK4rdHKhmwwMqw$1J+Ss48IEK1Q4Vpy0RaS+FHIZOjhjhE4MK5C5pzDzHg",
|
||||
"totp_secret": ""
|
||||
},
|
||||
"bob": {
|
||||
"email": "",
|
||||
"password_hash": "$argon2id$v=19$m=65536,t=3,p=4$bEzFGMfGGK4rdHKhmwwMqw$1J+Ss48IEK1Q4Vpy0RaS+FHIZOjhjhE4MK5C5pzDzHg",
|
||||
"totp_secret": "GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ"
|
||||
}
|
||||
},
|
||||
"policies": {
|
||||
"deny": {
|
||||
"policy_type": "deny",
|
||||
"groups": [],
|
||||
"methods": []
|
||||
},
|
||||
"empty-ip-list": {
|
||||
"policy_type": "protected",
|
||||
"groups": [],
|
||||
"methods": [
|
||||
"ip-empty"
|
||||
]
|
||||
},
|
||||
"oidc-company": {
|
||||
"policy_type": "protected",
|
||||
"groups": [],
|
||||
"methods": [
|
||||
"oidc-company"
|
||||
]
|
||||
},
|
||||
"password-totp": {
|
||||
"policy_type": "protected",
|
||||
"groups": [
|
||||
"staff"
|
||||
],
|
||||
"methods": [
|
||||
"local-password",
|
||||
"totp-global"
|
||||
]
|
||||
},
|
||||
"public": {
|
||||
"policy_type": "bypass",
|
||||
"groups": [],
|
||||
"methods": []
|
||||
},
|
||||
"staff-password": {
|
||||
"policy_type": "protected",
|
||||
"groups": [
|
||||
"staff"
|
||||
],
|
||||
"methods": [
|
||||
"local-password"
|
||||
]
|
||||
},
|
||||
"totp-only": {
|
||||
"policy_type": "protected",
|
||||
"groups": [],
|
||||
"methods": [
|
||||
"totp-global"
|
||||
]
|
||||
},
|
||||
"trusted-ips": {
|
||||
"policy_type": "protected",
|
||||
"groups": [],
|
||||
"methods": [
|
||||
"ip-allowlist"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"entries": {
|
||||
"cafe": {
|
||||
"routes": []
|
||||
},
|
||||
"dashboard": {
|
||||
"routes": [
|
||||
{
|
||||
"id": "admin",
|
||||
"path_prefix": "/admin",
|
||||
"policy": "password-totp"
|
||||
},
|
||||
{
|
||||
"id": "api",
|
||||
"path_prefix": "/api",
|
||||
"policy": "trusted-ips"
|
||||
}
|
||||
],
|
||||
"default_policy": "staff-password"
|
||||
},
|
||||
"files": {
|
||||
"routes": [],
|
||||
"default_policy": "totp-only"
|
||||
},
|
||||
"hypervisor": {
|
||||
"routes": [],
|
||||
"default_policy": "trusted-ips"
|
||||
},
|
||||
"media": {
|
||||
"routes": [],
|
||||
"default_policy": "public"
|
||||
},
|
||||
"sso": {
|
||||
"routes": [],
|
||||
"default_policy": "oidc-company"
|
||||
},
|
||||
"wireguard_webadmin": {
|
||||
"routes": [],
|
||||
"default_policy": "public"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"entries": [
|
||||
{
|
||||
"id": "wireguard_webadmin",
|
||||
"name": "WireGuard WebAdmin",
|
||||
"hosts": [
|
||||
"webadmin.example.test",
|
||||
"webadmin2.example.test"
|
||||
],
|
||||
"upstream": "wireguard-webadmin:8000",
|
||||
"static_routes": [
|
||||
{
|
||||
"path_prefix": "/static",
|
||||
"root": "/static",
|
||||
"strip_prefix": "/static",
|
||||
"cache_control": "public, max-age=3600"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user