feat: add CIE authentication configuration options and update README #3

Merged
gabdevele merged 1 commits from cie-bridge-simplified into main 2026-06-17 16:09:54 +00:00
5 changed files with 18 additions and 16 deletions
Showing only changes of commit 467b0aa632 - Show all commits
+7
View File
@@ -146,6 +146,13 @@ Set `DB_NAME`, `DB_USER`, `DB_PASSWORD`, `MYSQL_ROOT_PASSWORD` and
origin without quotes or a trailing slash, for example
`https://visione.studentindipendenti.it`.
For CIE auth deploys, also override values that vary by environment:
- `CIE_AUTH_SERVICE_BASE_URL`
- `CIE_AUTH_START_PATH`
- `CIE_AUTH_SHARED_SECRET`
- `CIE_AUTH_STATE_TTL_MINUTES`
- `CIE_AUTH_DEFAULT_FRONTEND_REDIRECT_URI`
Docker builds use BuildKit cache mounts for CPM dependencies and `ccache`, so
repeat Dokploy builds can reuse Drogon and C++ compilation cache.
+1 -1
View File
@@ -76,7 +76,7 @@
"spec_path": "build/openapi/visione.openapi.json"
},
"cors": {
"allowed_origin": "http://localhost:3000"
"allowed_origin": "http://127.0.0.1:3000"
}
}
}
+10
View File
@@ -38,6 +38,16 @@ int main()
config["custom_config"]["mail"]["smtp_port"] = std::stoi(envSmtpPort);
if (const char* envCorsAllowedOrigin = std::getenv("CORS_ALLOWED_ORIGIN"))
config["custom_config"]["cors"]["allowed_origin"] = envCorsAllowedOrigin;
if (const char* envCieServiceBaseUrl = std::getenv("CIE_AUTH_SERVICE_BASE_URL"))
config["custom_config"]["cie_auth"]["service_base_url"] = envCieServiceBaseUrl;
if (const char* envCieStartPath = std::getenv("CIE_AUTH_START_PATH"))
config["custom_config"]["cie_auth"]["start_path"] = envCieStartPath;
if (const char* envCieSharedSecret = std::getenv("CIE_AUTH_SHARED_SECRET"))
config["custom_config"]["cie_auth"]["shared_secret"] = envCieSharedSecret;
if (const char* envCieStateTtl = std::getenv("CIE_AUTH_STATE_TTL_MINUTES"))
config["custom_config"]["cie_auth"]["state_ttl_minutes"] = std::stoi(envCieStateTtl);
if (const char* envCieFrontendRedirect = std::getenv("CIE_AUTH_DEFAULT_FRONTEND_REDIRECT_URI"))
config["custom_config"]["cie_auth"]["default_frontend_redirect_uri"] = envCieFrontendRedirect;
drogon::app().loadConfigJson(config);
}
else
@@ -1,12 +0,0 @@
ALTER TABLE teams DROP FOREIGN KEY teams_area_fk;
ALTER TABLE reports DROP FOREIGN KEY reports_area_fk;
ALTER TABLE areas DROP COLUMN active;
ALTER TABLE teams
ADD CONSTRAINT teams_area_fk
FOREIGN KEY (area_id) REFERENCES areas(id) ON DELETE SET NULL;
ALTER TABLE reports
ADD CONSTRAINT reports_area_fk
FOREIGN KEY (area_id) REFERENCES areas(id) ON DELETE SET NULL;
-3
View File
@@ -1,3 +0,0 @@
ALTER TABLE users
DROP COLUMN password_hash,
DROP COLUMN must_change_password;