feat: add helper scripts for infrastructure management and troubleshooting

This commit is contained in:
2026-11-06 15:24:05 -05:00
parent aea8608f3d
commit 1965d37687
48 changed files with 1399 additions and 39 deletions

View File

@@ -0,0 +1,26 @@
import urllib.request
import ssl
import json
import sys
sys.stdout.reconfigure(encoding='utf-8')
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
token = "SnarfNetPermanentAutomationToken2026"
headers = {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
}
req = urllib.request.Request("https://authentik.snarfnet.net/api/v3/providers/oauth2/", headers=headers)
with urllib.request.urlopen(req, context=ctx) as resp:
data = json.loads(resp.read().decode())
for p in data['results']:
if 'semaphore' in p['name'].lower():
print(f"Provider ID: {p['pk']}, Name: {p['name']}")
print(f"Redirect URIs: {p.get('redirect_uris')}")
print(f"Client ID: {p.get('client_id')}")