feat: Discourse SSO + User API key extraction working

Discourse SSO flow: Cloudron login -> click "Log In" -> click OpenID
Connect button -> complete signup (enter username) -> logged in.

User API key generated via Discourse RSA-based flow:
1. Generate RSA keypair, submit public key
2. Authorize request on Discourse
3. Capture encrypted payload from POST response
4. Decrypt with PKCS1v15 padding (Discourse uses this, not OAEP)
5. Parse JSON to extract the key field

API key verified working: User-Api-Key header returns 30 topics from
/latest.json. Key stored in Bitwarden as "vp-techops Discourse".

Redmine SSO is blocked: Cloudron returns "You do not have access" --
the vp-techops user needs app access granted by Cloudron admin.

Also added cryptography==44.0.1 to requirements for RSA operations.
This commit is contained in:
TSYS Group COO
2026-08-13 21:25:29 -05:00
parent be2f607839
commit 2d01a9f962
5 changed files with 777 additions and 0 deletions
+1
View File
@@ -5,3 +5,4 @@ qrcode==7.4.2
Pillow==10.4.0
pyzbar==0.1.9
pytest==8.3.2
cryptography==44.0.1