You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Note: This is a specific workaround for developers behind a corporate SSL-decryption/packet-inspection gateway (such as Zscaler) and is **not** required for all developers (e.g., if you are on a direct internet connection).*
92
+
93
+
If your corporate network performs SSL decryption/packet-inspection, Maven inside the isolated Docker container may fail to connect to Maven Central (all dependencies, including JasperReports 7, resolve from Central — the build declares no custom `<repositories>`) with a `PKIX path building failed` error.
94
+
95
+
The recommended, zero-import workaround is to leverage your Windows host's trusted certificate store by caching the dependencies on Windows once, and mounting your host's `.m2` repository into the container:
96
+
97
+
1.**Seed the cache on Windows**:
98
+
Run this once inside your Windows terminal to download and cache the libraries (which automatically trusts your corporate certificate):
99
+
```powershell
100
+
cd backend
101
+
mvn clean install -DskipTests
102
+
```
103
+
2.**Mount the cache in your local environment**:
104
+
Set the `M2_HOME` variable inside your local, ignored `.env` file pointing to your host's `.m2` directory:
105
+
```properties
106
+
M2_HOME=/mnt/c/Users/<your-username>/.m2
107
+
```
108
+
Docker Compose will automatically detect this variable and mount your local Windows Maven cache into the container's `/root/.m2` path, bypassing the certificate handshake issues completely!
109
+
110
+
### Authentication (FAM/Cognito) — local testing
111
+
112
+
The SPA has two auth modes, selected at runtime by `public/amplify-config.js` (loaded before the
113
+
bundle). The repo default is **mock**; deployed environments mount a per-env ConfigMap over it. See
114
+
`src/context/auth/` (the `AuthProvider` seam) and `src/config/auth/amplify-initializer.ts`.
115
+
116
+
**Mock mode (default — no Cognito).**`npm run dev` with the backend running (security off by
117
+
default) signs you in automatically. Use the **"Mock user"** dropdown in the header to switch
118
+
`ILCR_ADMIN` ↔ `ILCR_SUBMITTER` — it switches both the nav/route-guards **and** the backend mock
119
+
principal (via the `X-Mock-Groups` header), so it exercises role gating end to end. This is the
120
+
fastest path for manual testing.
121
+
122
+
**Real FAM/Cognito login (Hosted UI).**
123
+
124
+
1. Frontend — copy the example config over the default (do **not** commit it; the repo default must
3. Open `http://localhost:3000` → FAM Hosted UI → sign in (IDIR/BCeID) → back to the app with your
139
+
real role. Confirm the exact `cognitoDomain` with the FAM admin if the Hosted UI does not load.
140
+
141
+
**Dev-only testing aids (real session, local dev only — `import.meta.env.DEV`, tree-shaken from every
142
+
deployed build):**
143
+
144
+
-**"View as (dev)"** header dropdown — overrides the role the SPA uses (nav + route guards) so you
145
+
can test both roles without re-logging-in. It is **frontend-only**: the backend still enforces your
146
+
real token, so admin APIs still `403` if your account isn't really in that group.
147
+
- A **"viewing as" warning banner** appears whenever an override is active, naming your real role.
148
+
- A **Sign out** button (header, Logout icon) runs the Cognito/loginproxy logout chain on a real
149
+
session; hidden in mock mode.
150
+
151
+
When done with real login: `git checkout -- frontend/public/amplify-config.js`.
152
+
89
153
## Frontend Shared Conventions
90
154
91
155
Reusable building blocks and global styles that new schedule/feature pages should adopt rather than
@@ -126,7 +190,7 @@ FAM authentication is tracked separately. The dashboard currently displays the s
126
190
127
191
## OpenShift Status
128
192
129
-
OpenShift Gold is the destination environment, but the Gold project is not required for this local-dev scaffold. Pull requests always deploy a sandbox environment (zone = PR number mod 50). Merges to `main` deploy to TEST and then, if tests pass, to PROD in the same workflow run — but only while the `ENABLE_OPENSHIFT_DEPLOY` repository variable is `true`; it is left unset until the code is ready for those environments.
193
+
OpenShift Gold is the destination environment, but the Gold project is not required for this local-dev scaffold. Pull requests always deploy a sandbox environment (zone = PR number mod 50). Merges to `main` deploy to TEST on every merge. The PROD pipeline (deploy, Sysdig monitor, image promotion) is commented out in `.github/workflows/merge.yml` until the `prod` GitHub environment has its own `ORACLEDB_*` secrets; restore those jobs to open PROD.
130
194
131
195
Deployed pods fail closed on authentication: JWT enforcement (`ILCR_SECURITY_ENABLED`) and the Oracle datasource (`ILCR_DATASOURCE_ENABLED`) both default to `true` and can be overridden per scope with GitHub variables (environment-first, then repository). The backend refuses to start a deployed pod with security off while the datasource is on (`DeployedSecurityGuard`), so mock auth can never serve real data from a public route; setting both variables to `false` yields a data-less mock-auth smoke deployment.
0 commit comments