feat: add cluster management and audit utility scripts

This commit is contained in:
2026-11-05 21:40:22 -05:00
parent fa969fc1d3
commit fffb446206
63 changed files with 1686 additions and 6 deletions

29
scripts/check_flows.py Normal file
View File

@@ -0,0 +1,29 @@
import urllib.request
import ssl
import json
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
req = urllib.request.Request(
"https://authentik.snarfnet.net/api/v3/flows/instances/?designation=authorization",
headers={"Authorization": "Bearer SnarfNetPermanentAutomationToken2026"}
)
with urllib.request.urlopen(req, context=ctx, timeout=5) as resp:
data = json.loads(resp.read().decode('utf-8'))
print("Authorization flows:")
for f in data.get('results', []):
print(f" {f.get('name')} (slug: {f.get('slug')}, pk: {f.get('pk')})")
req3 = urllib.request.Request(
"https://authentik.snarfnet.net/api/v3/propertymappings/provider/scope/",
headers={"Authorization": "Bearer SnarfNetPermanentAutomationToken2026"}
)
with urllib.request.urlopen(req3, context=ctx, timeout=5) as resp:
data3 = json.loads(resp.read().decode('utf-8'))
print("Scope Property Mappings:")
for m in data3.get('results', []):
print(f" {m.get('scope_name')}: {m.get('pk')}")