GeoSync Phase 1A — Staging QA¶
Central SSO with compat $_SESSION[qz_user] hydration. No project ACL, no Go changes.
Prerequisites¶
- Run
sql/001_geosync_user_bridge.sqlon GeoSync DB (qzs). - Run
sql/002_geosync_service_resource.sqlon Central DB (acugis_meta). - Configure PHP environment (see
deploy/geosync-auth.env.example): GEOSYNC_AUTH_MODE=centralCENTRAL_DATABASE_URL=postgresql://...CENTRAL_LOGIN_URL=/loginCENTRAL_LOGOUT_URL=/logoutGEOSYNC_BASE_PATH=/geosync(when mounted under subpath)- Ensure test user is in Central Administrators group (only group seeded with
geosyncservice admin in 1A). - Document one break-glass local account in
public.user; setGEOSYNC_AUTH_MODE=localto use legacy login.
Rollback (instant)¶
Reload PHP-FPM. No schema rollback required.
Test checklist¶
| # | Case | Expected |
|---|---|---|
| 1 | Open /geosync/admin/projects.php without acugis_session |
Redirect to /login?next=... |
| 2 | Log in at Central as Administrator | Can open GeoSync admin UI |
| 3 | Central user in Editors only (no Administrators) | 403 Permission denied (Editors not granted in 1A) |
| 4 | First login | Row in geosync_user_bridge; public.user Admin with owner_id = id; auth_source = central_sso if columns exist |
| 5 | Second request | Same qz_user->id; no duplicate users |
| 6 | index.php dashboard |
Projects/groups scoped as before |
| 7 | POST admin/action/project.php |
JSON success when owned |
| 8 | /geosync/logout.php |
Redirect to Central logout; GeoSync requires login again |
| 9 | /geosync/login.php |
Redirect to Central (no local form) |
| 10 | POST admin/action/login.php |
Redirect to Central (not 404/error) |
| 11 | signup.php, registration.php, verify/signup actions |
403 Registration disabled |
| 12 | /geosync/formbuilder/, /geosync/analysis/ |
Load when session valid |
| 13 | /geosync/api/proxy.php |
401 without session; works with session |
| 14 | GEOSYNC_AUTH_MODE=local |
Legacy email/password via login.php works |
Manual includes (no auto_prepend)¶
Bootstrap is wired via:
require_once .../incl/geosync_auth_prepend.php on:
index.phpadmin/*.phpadmin/action/*.php(exceptlogin.php— public redirect only)formbuilder/index.php,analysis/index.php,api/proxy.php
After staging sign-off, optional migration to auto_prepend_file.
Known limitations (1A)¶
- Service ACL: Administrators → geosync admin only (no Editors).
- No per-project Central ACL.
- FormBuilder/Analysis still trust PHP perimeter;
X-User-IDunchanged. - Keycloak PHP mode still exists but is superseded by
centralin production.
Debug¶
- Missing Central DSN → 503 Central authentication store unavailable.
- Valid session, no service grant → 403 Permission denied.
- Bridge/JIT failure → 500 Failed to provision GeoSync user.