mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-02 17:53:30 +00:00
85bc0ba7244f58b6cf299dd6e33bbfb47867c85d
6
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
5e0c52afcb |
AAE-50678 SonarCloud scan on daily cron instead of every develop push (#12184)
* ci: change sonar-develop workflow to run on daily cron instead of every push to develop Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> * ci: add pull-requests: read permission to sonar-develop workflow Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> |
||
|
|
7b8d616a9f |
AAE-50678 Fix: report test coverage to SonarCloud (#12181),
* fix: enable LCOV coverage reporting for SonarCloud Add lcov reporter to all karma configs, upload coverage artifacts from unit test matrix jobs, and add a SonarCloud scan job that merges coverage reports and runs the sonar-scanner with proper LCOV paths. Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: pass secrets to unit-test-workflow and set SONAR_HOST_URL for SonarCloud Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> * fix: add test outputs to nx.json so NX caches and restores coverage reports Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> * test: add unit tests for Chart model to verify coverage reporting * fix: use find to locate lcov.info in downloaded artifacts for SonarCloud coverage Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> * test: add fake file with unit test to verify coverage reporting Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> * ci: add full SonarCloud scan workflow on develop push Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> * test: remove fake coverage-canary file and its spec Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> * fix: replace secrets inherit with explicit SONAR_TOKEN in workflow call Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> |
||
|
|
70db1e383f |
AAE-50593 Fix: memory leaks in datatable column-resize directives (#12180)
* fix: memory leaks in datatable column-resize directives Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> * test: add regression test for mouseup listener cleanup on repeated mousedown Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> |
||
|
|
ce907417b7 |
AAE-48166 Compensate for VM/Citrix clock drift in token expiry check (#12024)
* fix: compensate for VM/Citrix clock drift in token expiry check * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * feat(core/auth): add TimeSyncDateTimeProvider for angular-oauth2-oidc clock drift correction * feat(auth): add periodic clock re-sync to protect against mid-session drift in Citrix/VM environments - Add startPeriodicSync() and stopPeriodicSync() to TimeSyncService - Re-sync clock offset every 5 minutes and on document visibility change - Add security cap (maxAllowedOffsetMs) to reject unreasonably large offsets - Preserve existing offset on sync failures instead of resetting to 0 - Wire periodic sync start in RedirectAuthService.configureAuth() - Wire periodic sync stop in RedirectAuthService.logout() - Add unit tests for periodic sync and offset cap behavior * feat: replace dedicated time API with passive Date response header interception - Add `updateClockOffsetFromDateHeader()` to `TimeSyncService` so the clock offset can be updated from any HTTP `Date` response header (RFC 7231) - Make `serverTimeUrl` config optional: `syncClockOffset` is a safe no-op and `checkTimeSync` uses the stored `clockOffsetMs` when no URL is configured - Add `DateHeaderTimeSyncInterceptor` that reads the `Date` header from every HTTP response and passively keeps `TimeSyncService.clockOffsetMs` current - Register the new interceptor in `provideCoreAuth()` / `AuthModule` - Export `DateHeaderTimeSyncInterceptor` from the public API - Add unit tests for all new paths * feat: retry token refresh before checking for clock out-of-sync - tokenHasExpiredDueToClockOutOfSync$: skip the first "token expired" event so the library's automatic refresh has a chance to run before clock drift is diagnosed as the root cause - oauthErrorEventOccurDueToClockOutOfSync$: use scan() to skip the first token_refresh_error (allowing one retry) and only check clock sync on the second occurrence; all other error types are still checked immediately - Update test for token expiry: now requires two events before logout - Replace single token_refresh_error clock-sync test with two tests: one verifying no logout on first error, one verifying logout on second * fix(core): remove duplicate @angular/common/http import in date-header-time-sync interceptor spec * fix(core): treat empty/whitespace serverTimeUrl as not configured in TimeSyncService * fix(core): limit DateHeaderTimeSyncInterceptor to IAM API responses only * refactor: remove tokenHasExpiredDueToClockOutOfSync$ and re-sync clock + refresh token on validation failure Instead of having a separate observable that detects token expiration due to clock drift and immediately logs the user out, the oauthErrorEventOccurDueToClockOutOfSync$ now re-syncs the clock offset and attempts a token refresh when clock drift is detected. Only if the refresh fails after re-syncing does it propagate the error and trigger logout. * fix(auth): check token validity after clock re-sync before attempting refresh After re-syncing the clock offset, the code now checks whether the token is actually still valid using the corrected time (via tokenHasExpired()). If the token is valid, no refresh is needed — the token only appeared expired due to clock drift. This avoids the impossible situation of retrying a token refresh when the triggering error was itself a refresh error. * refactor(auth): replace IAM header interceptor with HEAD request to app root for time sync Instead of passively reading the Date header from IAM responses (which requires IAM to be reachable and has CORS constraints), the TimeSyncService now makes a lightweight HEAD request to the application's own root URL (served by nginx). This is simpler and more reliable because: - No CORS issues (same origin) - Nginx always includes a Date header - HEAD request has minimal payload (no body) - Works before authentication is established - No dedicated serverTimeUrl configuration needed The DateHeaderTimeSyncInterceptor has been removed as it is no longer needed. * fix(auth): reset tokenRefreshErrorCount on successful token event The tokenRefreshErrorCount in the oauthErrorEventOccurDueToClockOutOfSync$ stream now resets to 0 when a 'token_received' or 'token_refreshed' event occurs. This prevents intermittent errors that self-correct from accumulating toward the clock-drift detection threshold. * fix(core): provide meaningful error message when API response body is null When the server returns no response body (e.g., during token expiration, network interruption, or CORS failures), err.error is null causing JSON.stringify(null) to produce the unhelpful message "null". Now we explicitly handle the null case and produce a message like "401 Unauthorized" instead of "null". * fix: resync clock before invalidating tokens at startup At startup, when the first OAuth event fires, the service checks if the access token is valid. Previously it would immediately clear storage if the token appeared invalid. This could cause false negatives when the local clock was out of sync (e.g. VM/Citrix environments). Now the service first re-syncs the clock offset via TimeSyncService, then re-evaluates the token validity. Storage is only cleared if the token is still invalid after the corrected time check. * Remove maxAllowedOffsetMs from TimeSyncService * Fix startPeriodicSync call to match updated signature * WIP * Add Flag * AAE-48166 Sync time using server time * AAE-48166 Fix unit test * AAE-48166 Fix service * AAE-48166 Fix service * AAE-48166 Fix service and add tests * AAE-48166 Use app root instead of server time url * AAE-48166 Use oauth2.timeSync config key for time sync gate * AAE-48166 Keep redirect auth flow unchanged when time sync is disable * Add oauth2.showDebugInformation and related debug logging for time sync * AAE-48166 Fix multi-tab OIDC refresh failures by resyncing server time when timeSync enabled * AAE-48166 Avoid repeated server time calls by caching the result for 2 seconds * AAE-48166 test(auth): cover timeSync clock sync for implicit flow silent refresh --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Diogo Bastos <diogo.bastos@hyland.com> Co-authored-by: alep85 <amedeo.lepore@hyland.com> |
||
|
|
23f0392c12 |
AAE-47634 Refactor: switch form service getTask to use runtime bundle API (#12020)
* refactor: switch form service getTask to use runtime bundle API instead of query service * Update form-cloud.service.ts * Add TaskDetailsCloudModelRuntimeBundle interface * Update getTaskById to return TaskDetailsCloudModelRuntimeBundle * Modify return type of getTaskById method Updated return type of getTaskById to include TaskDetailsCloudModel. * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Refactor TaskDetailsCloudModel by removing fields Removed unused properties from TaskDetailsCloudModel. * Update task-cloud.service.ts * Update task-cloud.service.ts * fix: add 404 fallback to query service in FormCloudService.getTask for completed tasks * AAE-47634 getTaskById: call Runtime Bundle first, fall back to Query Service on 404 * AAE-47634 Gate Runtime Bundle task fallback behind ADF_TASK_RUNTIME_BUNDLE_FALLBACK_ENABLED token and drop no longer used taskDetailsSource input * refactor: update task fetching tests to use async/await and firstValueFrom --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: alep85 <amedeo.lepore@hyland.com> |
||
|
|
4c4dd195a4 |
Remove unused webdriver-manager dependency to eliminate vulnerable form-data ~2.3.2 (#11060)
* Initial plan * Remove webdriver-manager to eliminate form-data ~2.3.2 dependency Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: eromano <1030050+eromano@users.noreply.github.com> |