feat: add homelab deployment configs, documentation, and automation scripts
This commit is contained in:
24
scripts/check_authentik_proxy_providers.py
Normal file
24
scripts/check_authentik_proxy_providers.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import urllib.request, ssl, json
|
||||
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE
|
||||
|
||||
AK_BASE = "https://authentik.snarfnet.net"
|
||||
AK_TOKEN = "SnarfNetPermanentAutomationToken2026"
|
||||
|
||||
def req(endpoint):
|
||||
url = f"{AK_BASE}/api/v3/{endpoint}"
|
||||
r = urllib.request.Request(url, headers={"Authorization": f"Bearer {AK_TOKEN}"})
|
||||
with urllib.request.urlopen(r, timeout=10, context=ctx) as res:
|
||||
return json.loads(res.read().decode())
|
||||
|
||||
print("=== Authentik Providers (Proxy) ===")
|
||||
providers = req("providers/proxy/")
|
||||
for p in providers.get("results", []):
|
||||
print(p["pk"], p["name"], p.get("internal_host"), p.get("external_host"), p.get("mode"))
|
||||
|
||||
print("\n=== Authentik Outposts ===")
|
||||
outposts = req("outposts/instances/")
|
||||
for o in outposts.get("results", []):
|
||||
print(o["pk"], o["name"], o["type"], [p for p in o.get("providers", [])])
|
||||
Reference in New Issue
Block a user