Compare commits
6
Commits
v0.1.0-RC.3
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61618f3345 | ||
|
|
835c5add68
|
||
|
|
a9fa2bc932
|
||
|
|
d4b2b626ca
|
||
|
|
4f96071157
|
||
|
|
1f8e3196fe
|
No files matched your search
+3
-3
@@ -7,7 +7,7 @@
|
||||
<properties>
|
||||
<maven.compiler.release>21</maven.compiler.release>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<qqq.version>4.1.0-RC.21</qqq.version>
|
||||
<qqq.version>4.1.0-RC.26</qqq.version>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
@@ -34,7 +34,7 @@
|
||||
<dependency>
|
||||
<groupId>com.kingsrook.qqq</groupId>
|
||||
<artifactId>qqq-frontend-next</artifactId>
|
||||
<version>1.0.0-RC.35</version>
|
||||
<version>1.0.0-RC.38</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
@@ -78,7 +78,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.5.2</version>
|
||||
<version>3.5.6</version>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<qqq.logger.logSessionId.disabled>true</qqq.logger.logSessionId.disabled>
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
| Android host libraries | Published development libraries from source `0ae2101`: SDK run 3634 passed and artifacts verified. The scanner application's newer source and signed candidate are recorded below. |
|
||||
| Current cohort tests | Combined five-module `verify` (2026-11-05): 196 server tests (53 / 8 / 22 / 74 / 39), zero failures, errors and skips, zero Checkstyle violations, with qualified private owner dependencies. Android 232 unit tests and lint pass. Inherited report-only guardrail findings remain visible. |
|
||||
| Storage integrity and recovery | `PrivateObjectFilesTest` concurrent-writer and dot-bucket regressions; `EchoDemoAcceptanceTest.restoredSnapshotKeepsScanAndRetainedFileAndRevertedApprovalStateIsReaudited` is the isolated local-demo recovery acceptance (stopped H2 plus object snapshot/restore, `RecordFilesTables.FILE` relationship and byte hashes). See [operations](OPERATIONS.md). |
|
||||
| Local runtime | One server on public QQQ RC.21 and Printing 1.0.0; API 1.10, mobile 1.5, printing 2.3, mobile-record-files 1.0; existing data preserved. |
|
||||
| Local runtime | One server using the tested development aggregate: public QQQ SNAPSHOT, current Collaboration, scoped local Record Files and qualified document inputs, plus Printing 1.0.0. API 1.10, mobile 1.5, printing 2.3, mobile-record-files 1.0; existing data preserved. Final immutable public-cohort qualification remains open. |
|
||||
| Device and admin processes | Enrollment, approval and revocation work from a single record and from bulk selection (checked rows, select-all, first N), with confirmation and visible results, covered by HTTP and browser E2E tests. Earlier browser run: 15 cases. |
|
||||
| Hardware | TC22 manual tests: operator-reported pass on November 4 (no per-case artifacts). MC9400 configured and approved; trigger check pending. |
|
||||
| Approved-scanner photos | Host-only `quarantineCapturedFiles=false` makes an approved device's captured JPEG/PNG `AVAILABLE`; other intake stays `QUARANTINED`. `record-files.release` is admin-only. Root-reported: 69 owner and 197 scanner/Echo tests passed, 13 focused Android tests passed, Checkstyle passed. A synthetic gallery PNG from the signed MC9400 app was `AVAILABLE` with exact parent/type/size/SHA-256. No camera-hardware or new full-preview proof. Depends on the unmerged Record Files owner PR 1. |
|
||||
| Hardware | TC22 manual tests: operator-reported pass on November 4 (no per-case artifacts). MC9400 physical trigger done: Saved scan with backend EMDK CODE128/AIM/raw bytes and attribution confirmed (the barcode was not the requested literal). |
|
||||
|
||||
## Open gates
|
||||
|
||||
@@ -20,12 +21,12 @@ The maintained server and existing TC22 app now run the GS1, rich test-data and
|
||||
|
||||
| Gate | What is still required |
|
||||
| --- | --- |
|
||||
| Public dependency cohort | Public, coherent Generation/bridges/Record Files/Scripting artifacts from their owner; adoption of the Core/Collaboration/Next UI foundations when released. Today these are qualified owner inputs. |
|
||||
| Public dependency cohort | Public, coherent Generation/bridges/Record Files/Scripting artifacts from their owner; adoption of the Core/Collaboration/Next UI foundations when released. Today these are qualified owner inputs, and the current local aggregate uses public Core SNAPSHOT, current Collaboration and a local Record Files change, not a final public cohort. |
|
||||
| Release | Retest the full gate when the final public dependency cohort is adopted, with a reviewed release manifest; Maven publication stays disabled until then. Redesign of the shared CI pipeline is outside this scope. |
|
||||
| Signing and distribution | Done: QRun key with backup, signed Android 1.0.1 (code 3) built from the merged PR 15 source tree and installed in place on an MC9400 (installed bytes match; login/enrollment preserved; Scan Capture reopened; HTTPS connected). Open: MC9400 physical trigger scan, public dependencies and final distribution. No signing CI. |
|
||||
| Signing and distribution | Done: QRun key with backup, signed Android 1.0.1 (code 3) built from the merged PR 15 source tree and installed in place on an MC9400 (installed bytes match; login/enrollment preserved; Scan Capture reopened; HTTPS connected). Open: public dependencies, signing-APK download publication and final distribution. No signing CI. |
|
||||
| Deployment | HTTPS and the host's identity provider. Single-instance procedure, recovery and default-indefinite, host-owned retention guidance is in [operations](OPERATIONS.md); isolated local-demo recovery acceptance has passed. Enterprise object-store/HA and non-H2 databases are unsupported and unqualified options, not release tasks. The HTTP loopback demo is not a production deployment. |
|
||||
| Provider authentication | Native OAuth2 requires UI API 1.10 native-session and nonce-validation support on the server (verified in the Android source). Still open: native Authentik login, logout and account switching on a handheld. No such handheld test is claimed. |
|
||||
| Further device qualification | MC9400 physical trigger check and MDM-applied managed configuration remain unverified. Company profile/wallpaper is separate tracked scope, not a blocker for this release goal. The TC22 camera, GPS and screen-viewing checks are covered by the accepted operator group report; no separate per-case evidence is claimed or required again for that demo. |
|
||||
| Provider authentication | Native OAuth2 requires UI API 1.10 native-session and nonce-validation support on the server (verified in the Android source). Shared Authenticator server configuration is verified (trusted HTTPS, API 1.10, scanner and printing extensions and channels, exact callbacks, REQUIRED nonce). Still open: native Authentik login, logout and account switching on a handheld (needs the MC9400 wireless-debugging endpoint). No native-auth pass is claimed. The Printing client nonce fix (PR 11, `443f642`; 352 tests and build passed) awaits hosted Core. |
|
||||
| Further device qualification | MDM-applied managed configuration remain unverified. Company profile/wallpaper is separate tracked scope, not a blocker for this release goal. The TC22 camera, GPS and screen-viewing checks are covered by the accepted operator group report; no separate per-case evidence is claimed or required again for that demo. |
|
||||
| Barcode fidelity | Echo's supported profiles are documented ([limits](../examples/echo/README.md#fidelity-and-limits)); The committed source supports bounded GS1-128; physical print/rescan remains open. Other GS1, ECI, structured and binary profiles remain refused. No universal barcode-reproduction claim. |
|
||||
| Final reviews | Reconcile the dated security, architecture and standards reports to the final revision; they are scoped historical reviews, not a fresh exhaustive scan. A dated static review of base `a9eae04`, its supplement and its scope and limits are in [review reconciliation](REVIEW-RECONCILIATION-2026-11-05.md); it is not an audit rating. |
|
||||
|
||||
|
||||
+10
-4
@@ -22,12 +22,16 @@ The maintained composed Echo server and **existing TC22 app** were updated in pl
|
||||
|
||||
Use **Test Data → Test Orders → a record → Actions → Add photo**. Details, Items, History and Photos tabs provide direct access. Search/filter/count and Back preserve table context. Approved photos have thumbnails/previews; quarantined uploads remain listed as awaiting review. Ordinary read/attach permissions still apply.
|
||||
|
||||
The [local demo](LOCAL-DEMO.md) uses public QQQ `4.1.0-RC.21`, released Printing `1.0.0`, and qualified document/files/scripting owner inputs. Host port is `57832`; device port 8080 forwards to it, retaining the app URL `http://127.0.0.1:8080`. Contract versions remain UI API 1.10, mobile-scanners 1.5, printing 2.3 and mobile-record-files 1.0. This loopback demo is separate from HTTPS production deployment.
|
||||
**Approved-scanner photos.** The Echo host sets Record Files `quarantineCapturedFiles=false`, so a JPEG/PNG captured by a currently approved device is `AVAILABLE` at once. Uploads, imports and attachment-panel files stay `QUARANTINED`. Parent tables are Echo scans plus the test orders, items and events; the scanner's existing `.attach` grants are retained. Only `admin` gains `record-files.release`; scanner grants are unchanged. Three earlier quarantined photos were released through the audited admin Release process. The server's current aggregate was built from public Core SNAPSHOT, current Collaboration, the scoped local Record Files change and qualified private document inputs, not a final public cohort. The scoped Record Files change is [owner PR 1](https://git.kof22.com/QRun-IO/qbit-record-files/pulls/1) (policy commit `3f08c584`), open and unmerged; its public CI currently fails an enrollment check that the coordinator owns, so neither the check nor its merge gates are changed here. No version or POM was guessed.
|
||||
|
||||
The [local demo](LOCAL-DEMO.md) source defaults remain QQQ `4.1.0-RC.21` and Printing `1.0.0` pending the public-cohort update; the maintained runtime uses the verified development aggregate described above. Host port is `57832`. The TC22 development app retains its loopback forwarding; the signed MC9400 app connects through trusted HTTPS. Contract versions remain UI API 1.10, mobile-scanners 1.5, printing 2.3 and mobile-record-files 1.0. This is local development qualification, not a customer production deployment.
|
||||
|
||||
## Verification
|
||||
|
||||
- The combined five-module `verify` (2026-11-05, base `9e8685f` plus the storage fixes) passed **196 server tests** with zero failures, errors and skips and zero Checkstyle violations: scanner 53, base demo 8, mobile Record Files 22, Echo 74, Echo demo 39. It used qualified private owner dependencies; there is no public-dependency or physical-output qualification, and the gate must be repeated when the public cohort is adopted. The new build parent's report-only schema-location/contract-test findings remain visible.
|
||||
- Storage evidence: `PrivateObjectFilesTest.concurrentSameKeyWritersLeaveOneWinnersBytesAndMetadata` and `dotBucketsAreRefusedAndValidBucketsStillWork`; recovery acceptance `EchoDemoAcceptanceTest.restoredSnapshotKeepsScanAndRetainedFileAndRevertedApprovalStateIsReaudited` (details in [OPERATIONS](OPERATIONS.md#isolated-local-demo-recovery-acceptance-automated-passed)).
|
||||
- Photo/admin change set (root-reported, not rerun in this review): 69 owner tests and 197 scanner/Echo tests passed (runs of 31, 158 and 8), 13 focused Android tests passed, and the relevant Checkstyle passed. These groupings differ from the module split below, so no per-module counts are claimed. Public immutable dependency qualification is still pending.
|
||||
- Live evidence: a fresh synthetic gallery PNG uploaded from the production-signed MC9400 app returned "Saved photo", and the server showed `AVAILABLE` with the exact parent, type, size and SHA-256. An older photo's Available state, thumbnail and Preview control were observed. The new photo's full preview was not clicked because ADB disconnected. No camera-hardware or full-preview proof is claimed.
|
||||
- The earlier combined five-module `verify` (2026-11-05, base `9e8685f` plus the storage fixes) passed **196 server tests** with zero failures, errors and skips and zero Checkstyle violations: scanner 53, base demo 8, mobile Record Files 22, Echo 74, Echo demo 39. It used qualified private owner dependencies; there is no public-dependency or physical-output qualification, and the gate must be repeated when the public cohort is adopted. The new build parent's report-only schema-location/contract-test findings remain visible.
|
||||
- Storage/recovery PR 21 is merged (`59959247`), with bounded cold-restore and race proof complete. Website 0.1.17 is complete. Evidence: `PrivateObjectFilesTest.concurrentSameKeyWritersLeaveOneWinnersBytesAndMetadata` and `dotBucketsAreRefusedAndValidBucketsStillWork`; recovery acceptance `EchoDemoAcceptanceTest.restoredSnapshotKeepsScanAndRetainedFileAndRevertedApprovalStateIsReaudited` (details in [OPERATIONS](OPERATIONS.md#isolated-local-demo-recovery-acceptance-automated-passed)).
|
||||
- Android passed **232 unit tests**, lint with **0 errors/0 warnings**, and the debug APK build. E2E APK/instrumentation builds and eight runner guard tests also passed.
|
||||
- Isolated MC9400 native acceptance passed search/filter/paging/Back, grouped/related records, camera/gallery upload, parent-scoped saved-photo list, approved preview, rotation, pending-upload navigation protection and forced-logout cleanup. All requests matched the semantic API. Process-photo regression also passed.
|
||||
- The final date-only correction received unit/lint/build checks and actual TC22 verification. Actual-device screenshots confirm Actions → Add photo, dates/timezones, currency, related tabs, photo empty state and return to page two. Synthetic camera/gallery inputs in automated acceptance are not a new operator camera report.
|
||||
@@ -38,7 +42,9 @@ The [local demo](LOCAL-DEMO.md) uses public QQQ `4.1.0-RC.21`, released Printing
|
||||
|
||||
Previous TC22 APK SHA-256: `F71033C835AC3EB361A04D78C842947C5A04C85CE1AB1B999AA8CEFBFC9D7A95`; prior preview hashes are in [history](history/RICH-RECORDS-2026-11-05.md).
|
||||
|
||||
Signed Android `1.0.1` (code 3) was built from the identical merged source tree (PR 15) and installed in place on the MC9400. The installed bytes match the built APK, login and enrollment were preserved, the authorized Scan Capture screen reopened, and the HTTPS connection was established. Pending: the MC9400 physical trigger scan, native Authentik login/logout/account switching, the public dependency cohort and final distribution.
|
||||
Signed Android `1.0.1` (code 3) was built from the identical merged source tree (PR 15) and installed in place on the MC9400. The installed bytes match the built APK, login and enrollment were preserved, the authorized Scan Capture screen reopened, and the HTTPS connection was established. The MC9400 physical trigger is **done**: an actual operator trigger produced a Saved scan, and the backend confirmed EMDK CODE128, AIM and raw bytes with server-derived attribution. The barcode scanned was not the literal string requested, so no exact-test-string claim is made.
|
||||
|
||||
Shared Authenticator server configuration is verified: real trusted HTTPS, UI API 1.10, both scanner and printing extensions and channels, exact callbacks and a REQUIRED nonce. Native client login, logout and account switching are **not yet tested** (this needs the MC9400 wireless-debugging endpoint), so no native-auth pass is claimed. The Printing client required-nonce fix (PR 11, `443f642`; 352 Windows/CLI tests and build passed) awaits hosted Core. Pending: native Authentik login/logout/account switching, the final public Core/Collaboration/document/files/scripting/bridge artifacts, a public-cohort rerun, GS1 physical print/rescan, signing-APK download publication and owned cleanup.
|
||||
|
||||
The November 4 TC22 operator group pass remains accepted and is not requested again. Physical GS1 print/rescan, provider callback acceptance and fleet rollout remain open. Echo supports only its documented [barcode profiles](../examples/echo/README.md#fidelity-and-limits). Company profile/wallpaper is separate tracked scope, not a blocker for this release goal.
|
||||
|
||||
|
||||
+5
-3
@@ -9,6 +9,8 @@ Open work only, as of **2026-11-05**. Present status is in [session state](SESSI
|
||||
|
||||
Note: redesign of the shared CI pipeline is outside this scanner/local Echo scope and is not tracked here; the local demo does not depend on it.
|
||||
|
||||
- [ ] **Record Files `quarantineCapturedFiles`.** The Echo host (`EchoDemo`) and the optional integration test already call/require `RecordFilesQBitConfig.withQuarantineCapturedFiles(Boolean)` (nullable, null inherits `quarantineNewFiles`; applies only to CAPTURE intake with a provider-verified device identity). The owner's scoped change (policy commit `3f08c584`, PR 1) is open and unmerged, and its CI currently fails a not-enrolled check owned by the coordinator; do not change CI or weaken merge gates. Adopt the released version as a reviewed pin once public; no coordinate is known, so none was guessed and this source builds only against the local owner input until then.
|
||||
|
||||
## This repository
|
||||
|
||||
- [ ] Qualify GS1 template/media setup and **physical print/rescan** of the requested label profile. Software duplication, native acceptance and maintained-demo adoption are complete.
|
||||
@@ -21,13 +23,13 @@ Retention stays indefinite by default and any change is a host-owned policy ([op
|
||||
|
||||
## Hardware and device follow-up
|
||||
|
||||
- [ ] **MC9400:** one physical trigger scan, then confirm the backend record. The signed 1.0.1 (code 3) build is installed in place and approved ([session state](SESSION-STATE.md#handhelds)).
|
||||
- [ ] Native Authentik login, logout and account switching on a handheld (not yet tested).
|
||||
- [ ] Native Authentik login, logout and account switching on a handheld (not yet tested; needs the MC9400 wireless-debugging endpoint). The shared Authenticator server configuration is verified; the Printing client nonce fix (PR 11) awaits hosted Core. The MC9400 physical trigger check is done ([session state](SESSION-STATE.md#handhelds-and-remaining-limits)).
|
||||
- [ ] Optional: click the full preview of the newly uploaded gallery photo on a handheld (not observed because ADB disconnected). No camera-hardware proof is claimed.
|
||||
- [ ] Optional: capture per-case evidence (photos, logs, a scanned-back label) on a future run. The November 4 operator pass is accepted as is and is not to be requested again.
|
||||
|
||||
## Release (deliberately last)
|
||||
|
||||
- [ ] Final distribution of the signed 1.0.1 build and the public dependencies it waits on. Signing is done: the build was installed in place on an MC9400 through ADB, preserved enrollment, and reopened Scan Capture against the HTTPS server. Remaining device checks are listed above; no automatic APK-signing CI is qualified.
|
||||
- [ ] Final distribution of the signed 1.0.1 build and the public dependencies it waits on. Signing is done: the build was installed in place on an MC9400 through ADB, preserved enrollment, and reopened Scan Capture against the HTTPS server. Remaining device checks are listed above; no automatic APK-signing CI is qualified. Also open: signing-APK download publication, owned cleanup, and a rerun of the public cohort with the final public Core/Collaboration/document/files/scripting/bridge artifacts.
|
||||
- [ ] Company profile/wallpaper is a separate tracked scope and not a blocker for this bounded release goal.
|
||||
- [ ] HTTPS deployment by the host (any non-H2 migration is host-owned and unsupported here) and the remaining gates in [production readiness](PRODUCTION-READINESS.md).
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Date: 2026-11-02. Scope: `examples/echo/demo/**`. Source checkpoint, not a relea
|
||||
|
||||
`EchoDemo` extends `MobileScannersDemo` (database, `scanner`/`admin` accounts, native server) and composes Collaboration, Record Files, Printing, Document Generation and `EchoHost.install` from their public classes on one private H2 file (`WRITE_DELAY=0`). Composition runs under a scoped system context that is restored afterwards, then `QInstanceEnricher` enriches the instance, because the server only validates and the enricher registers Collaboration's record-feature permissions. `LocalFilesystemAttachmentStorage` implements the attachment owner's storage SPI over `PrivateObjectFiles` (hashed keys, temp-file-then-link, no overwrite) and adds no policy. `TrustedLocalEchoDemo` is the explicit developer launcher; the production `EchoDemo` default fails closed. See `README.md` for build, run and environment.
|
||||
|
||||
Authentication is the existing demo password/session module plus exact grants. `scanner`: `echo.use`, `printing_operator`, `document-generation.view|generate|print`, `record-files.view|manage`, `echoScan.attach` and the `printing_tenant` row key (replaced, never appended, on each validation); then `CollaborationSecurity.applyToSession`. `admin` additionally: `printing_admin`, `document-generation.configure|publish`. No Record Files release/configure/audit for anyone.
|
||||
Authentication is the existing demo password/session module plus exact grants. `scanner`: `echo.use`, `printing_operator`, `document-generation.view|generate|print`, `record-files.view|manage`, `echoScan.attach` and the `printing_tenant` row key (replaced, never appended, on each validation); then `CollaborationSecurity.applyToSession`. `admin` additionally: `printing_admin`, `document-generation.configure|publish`, `record-files.release` (so approved captured photos release through the normal audited process). The scanner never gets release; no Record Files configure/review/audit for anyone.
|
||||
|
||||
## Test isolation
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ There is **no default port**: pass one as the argument or set `ECHO_DEMO_PORT`.
|
||||
|
||||
## Status
|
||||
|
||||
The demo and Echo library tests pass with Checkstyle clean (current cohort: Echo 68, composed demo 35 tests; see [session state](../../../docs/SESSION-STATE.md)). The QQQ default is 4.1.0-RC.21 and Printing defaults to released 1.0.0; the other owner qbits remain qualified owner inputs until their public release. The composed acceptance test passes with a controlled synthetic renderer and a simulated Printing queue, so it is **not physical output**. TC22 physical acceptance is separately operator-reported as passing (November 4, group report). Not production-ready and not a public SDK release. The dated [`CLAUDE-HANDOFF.md`](CLAUDE-HANDOFF.md) is a historical checkpoint.
|
||||
The demo and Echo library tests pass with Checkstyle clean (counts change per run; see [session state](../../../docs/SESSION-STATE.md) for the latest reported results). The QQQ default is 4.1.0-RC.21 and Printing defaults to released 1.0.0; the other owner qbits remain qualified owner inputs until their public release. The composed acceptance test passes with a controlled synthetic renderer and a simulated Printing queue, so it is **not physical output**. TC22 physical acceptance is separately operator-reported as passing (November 4, group report). Not production-ready and not a public SDK release. The dated [`CLAUDE-HANDOFF.md`](CLAUDE-HANDOFF.md) is a historical checkpoint.
|
||||
|
||||
## Trusted local development launcher
|
||||
|
||||
@@ -88,7 +88,7 @@ The legacy `ECHO_TEMPLATE_ID`, `ECHO_TEMPLATE_MEDIA_ID` and `ECHO_TEMPLATE_MEDIA
|
||||
|
||||
## Accounts and permissions
|
||||
|
||||
`scanner` receives exactly: `echo.use`, `printing_operator`, `document-generation.view|generate|print`, `record-files.view|manage` (manage is the owner's intake permission) and the `printing_tenant` row key. `admin` receives the same plus `printing_admin` (Printing's native pairing/approval/setup processes) and `document-generation.configure|publish` to prepare templates. The scanner never gets these, and nobody gets Record Files release/configure/audit. Scans still need an enrolled and approved device, so use the existing mobile enrollment flow.
|
||||
`scanner` receives exactly: `echo.use`, `printing_operator`, `document-generation.view|generate|print`, `record-files.view|manage` (manage is the owner's intake permission), `.attach` on `echoScan` and the three mobile test-data tables (`testOrder`, `testOrderItem`, `testOrderEvent`) and the `printing_tenant` row key. `admin` receives the same plus `printing_admin` (Printing's native pairing/approval/setup processes) and `document-generation.configure|publish` to prepare templates. The scanner never gets these. Only `admin` also receives `record-files.release`, so approved captured photos can be released through the normal audited process; nobody gets Record Files configure/review/audit. Scans still need an enrolled and approved device, so use the existing mobile enrollment flow.
|
||||
|
||||
## Operator order
|
||||
|
||||
@@ -101,10 +101,11 @@ The legacy `ECHO_TEMPLATE_ID`, `ECHO_TEMPLATE_MEDIA_ID` and `ECHO_TEMPLATE_MEDIA
|
||||
The host also installs the existing `qbit-mobile-scanners-record-files` integration, so an approved scanner can attach photos to one of its own retained Echo scans. Nothing new is served: Record Files' registered, versioned `record-files` upload API (`/qqq/v1/qbit/record-files/...`) and the independently versioned `mobile-record-files` widget vocabulary are advertised in `/qqq/v1/version`, behind the same native auth and device guards.
|
||||
|
||||
- **Process:** `echoScanPhotos` ("Echo scan photos"), listed in the Echo app. It requires `echo.use`, `echoScan.attach` and a verified approved device. The first step lists the actor's own scans (the table's record security lock decides; label is the barcode and type, never the record id). The server then re-reads the chosen scan through the collaboration owner's visibility and `attach` checks and builds the `RECORD_FILES_CAPTURE` widget from the record that check returned, on the fixed `echoScan` table. The client never supplies a table or record reference, and rendering the widget directly names no parent. Record Files authorizes the parent again on every upload operation.
|
||||
- **Policy:** JPEG/PNG only, 20 MiB per file, up to four files, 256 KiB chunks, private staging under the demo's `objects` directory (separate staging namespace). Retained originals follow the existing Record Files quarantine setting.
|
||||
- **Needs a real scan first:** the list is empty until the scanner has Echo scans. Nothing is seeded outside this module's tests.
|
||||
- **Policy:** JPEG/PNG only, 20 MiB per file, up to four files, 256 KiB chunks, private staging under the demo's `objects` directory (separate staging namespace). The Echo host sets Record Files' `quarantineCapturedFiles=false` (leaving `quarantineNewFiles=true` and the generated-file setting unchanged), so a JPEG/PNG saved from this process by a device that `MobileCaptureIdentityProvider` currently verifies as approved is registered `AVAILABLE` and can be previewed immediately. The same upload API on any other host, and every upload, import or attachment-panel file here, stay `QUARANTINED` until released. This is a host trust decision, not a content scan or human review; no release event is written and review status is unchanged. **Requires a Record Files version that contains `RecordFilesQBitConfig.withQuarantineCapturedFiles(Boolean)`. The owner's change is an open, unmerged PR; this checkout's dependency pin has not been updated and builds only against the local owner input until a public version is pinned.** Files already uploaded stay `QUARANTINED` until released through the normal `record_files_file_record_files_release` process.
|
||||
- **Test-data records:** the host also registers the test orders, items and events as Record Files parents, so a scanner can add photos from a record's Actions menu. The same approved-device policy and authorization re-check apply. Release of any quarantined file is admin-only (`record-files.release`).
|
||||
- **Needs a real scan first (for the `echoScanPhotos` process):** the list is empty until the scanner has Echo scans. Nothing is seeded outside this module's tests.
|
||||
- **Existing databases:** the Record Files upload tables are added by the same tolerated-reapply schema step; plan the migration for a database from another version.
|
||||
- **Not claimed:** no real photo upload, native capture or device run has been verified here. That needs the Android host against this server.
|
||||
- **Not claimed:** one synthetic gallery PNG uploaded from the signed MC9400 app was observed `AVAILABLE` with matching parent, type, size and SHA-256 (see [session state](../../../docs/SESSION-STATE.md)). No camera-hardware capture and no full preview of that photo are claimed.
|
||||
|
||||
## Existing databases
|
||||
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
<properties>
|
||||
<maven.compiler.release>21</maven.compiler.release>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<qqq.version>4.1.0-RC.21</qqq.version>
|
||||
<qqq.version>4.1.0-RC.26</qqq.version>
|
||||
<mobile.version>0.1.0-SNAPSHOT</mobile.version>
|
||||
<echo.version>0.1.0-SNAPSHOT</echo.version>
|
||||
<generation.version>0.1.0-SNAPSHOT</generation.version>
|
||||
<generation.version>1.1.0-RC.1</generation.version>
|
||||
<renderer.version>${generation.version}</renderer.version>
|
||||
<printing.version>1.0.0</printing.version>
|
||||
<recordfiles.version>0.1.0-SNAPSHOT</recordfiles.version>
|
||||
<printing.version>1.2.0-RC.1</printing.version>
|
||||
<recordfiles.version>0.4.0-RC.1</recordfiles.version>
|
||||
<mobilerecordfiles.version>0.1.0-SNAPSHOT</mobilerecordfiles.version>
|
||||
<collaboration.version>0.1.0-record-files-SNAPSHOT</collaboration.version>
|
||||
<collaboration.version>1.2.0-RC.1</collaboration.version>
|
||||
</properties>
|
||||
<dependencyManagement><dependencies>
|
||||
<dependency><groupId>com.kingsrook.qqq</groupId><artifactId>qqq-bom-pom</artifactId><version>${qqq.version}</version><type>pom</type><scope>import</scope></dependency>
|
||||
@@ -40,14 +40,14 @@
|
||||
<dependency><groupId>com.kingsrook.qbits</groupId><artifactId>qbit-mobile-scanners-record-files</artifactId><version>${mobilerecordfiles.version}</version></dependency>
|
||||
<dependency><groupId>com.kingsrook.qbits</groupId><artifactId>qbit-collaboration</artifactId><version>${collaboration.version}</version></dependency>
|
||||
<dependency><groupId>com.kingsrook.qqq</groupId><artifactId>qqq-backend-module-rdbms</artifactId></dependency>
|
||||
<dependency><groupId>com.kingsrook.qqq</groupId><artifactId>qqq-frontend-next</artifactId><version>1.0.0-RC.35</version></dependency>
|
||||
<dependency><groupId>com.kingsrook.qqq</groupId><artifactId>qqq-frontend-next</artifactId><version>1.0.0-RC.38</version></dependency>
|
||||
<dependency><groupId>com.h2database</groupId><artifactId>h2</artifactId><version>2.2.224</version></dependency>
|
||||
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter-api</artifactId><version>6.0.2</version><scope>test</scope></dependency>
|
||||
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter-engine</artifactId><version>6.0.2</version><scope>test</scope></dependency>
|
||||
</dependencies>
|
||||
<build><plugins>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.13.0</version><configuration><showWarnings>true</showWarnings><failOnWarning>true</failOnWarning><proc>none</proc><compilerArgs><arg>-Xlint:deprecation</arg><arg>-Xlint:unchecked</arg><arg>-Werror</arg></compilerArgs></configuration></plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>3.5.2</version><configuration><systemPropertyVariables><qqq.logger.logSessionId.disabled>true</qqq.logger.logSessionId.disabled></systemPropertyVariables></configuration></plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>3.5.6</version><configuration><systemPropertyVariables><qqq.logger.logSessionId.disabled>true</qqq.logger.logSessionId.disabled></systemPropertyVariables></configuration></plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-dependency-plugin</artifactId><version>3.8.1</version></plugin>
|
||||
<plugin><groupId>org.codehaus.mojo</groupId><artifactId>exec-maven-plugin</artifactId><version>3.5.0</version><configuration><mainClass>com.kingsrook.examples.echo.demo.EchoDemo</mainClass></configuration></plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-checkstyle-plugin</artifactId><version>3.6.0</version><dependencies><dependency><groupId>com.puppycrawl.tools</groupId><artifactId>checkstyle</artifactId><version>14.3.0</version></dependency></dependencies><configuration><configLocation>${project.basedir}/../../../checkstyle/checkstyle.xml</configLocation><includeTestSourceDirectory>true</includeTestSourceDirectory><failOnViolation>true</failOnViolation><violationSeverity>warning</violationSeverity></configuration><executions><execution><phase>validate</phase><goals><goal>check</goal></goals></execution></executions></plugin>
|
||||
|
||||
@@ -225,6 +225,11 @@ public class EchoDemo extends MobileScannersDemo implements AutoCloseable
|
||||
RecordFilesQBitConfig recordFiles = new RecordFilesQBitConfig().withBackendName(BACKEND)
|
||||
.withParentTables(List.of(EchoQBitProducer.SCAN_TABLE, MobileTestData.ORDERS, MobileTestData.ITEMS, MobileTestData.EVENTS))
|
||||
.withQuarantineGeneratedFiles(settings.releaseGeneratedFiles() ? Boolean.FALSE : null)
|
||||
// Narrow, host-only opt-in: only CAPTURE intake with the verified approved-device identity from
|
||||
// MobileCaptureIdentityProvider (JPEG/PNG, bounded; see EchoPhotoCapture.uploadConfiguration) is AVAILABLE
|
||||
// on registration. quarantineNewFiles stays true for uploads, imports and attachment-panel files.
|
||||
// Requires the Record Files version that contains withQuarantineCapturedFiles.
|
||||
.withQuarantineCapturedFiles(Boolean.FALSE)
|
||||
.withDownloadConfiguration(new DownloadConfiguration("http://127.0.0.1:" + settings.port() + "/qqq/v1", 20 * 1024 * 1024, 2))
|
||||
.withUploadConfiguration(EchoPhotoCapture.uploadConfiguration());
|
||||
new RecordFilesQBitProducer().withQBitConfig(recordFiles).produce(instance);
|
||||
|
||||
+7
-3
@@ -22,7 +22,10 @@ import com.kingsrook.qqq.backend.core.model.session.QSession;
|
||||
/*******************************************************************************
|
||||
** The existing demo password/session validation plus exactly the grants the
|
||||
** owners' source requires. The validated account selects the role, never a
|
||||
** request field. Printing and Record Files administration is granted to no one.
|
||||
** request field. Only the fixed admin account receives Printing administration,
|
||||
** template configure/publish and Record Files release (so approved scanner photos
|
||||
** can be released through the normal audited process); the scanner receives none
|
||||
** of them, and no one receives Record Files configure or review rights.
|
||||
*******************************************************************************/
|
||||
public class EchoDemoAuthentication extends DemoAuthenticationModule
|
||||
{
|
||||
@@ -40,9 +43,10 @@ public class EchoDemoAuthentication extends DemoAuthenticationModule
|
||||
/**
|
||||
** Admin also gets Printing's own administrator permission, which its native
|
||||
** device pairing/approval/setup processes require, and what is needed to
|
||||
** prepare and publish templates. The scanner never receives these.
|
||||
** prepare and publish templates, and Record Files release for approved
|
||||
** captured photos. The scanner never receives these.
|
||||
*/
|
||||
static final List<String> ADMIN_ADDITIONS = List.of("printing_admin", "document-generation.configure", "document-generation.publish");
|
||||
static final List<String> ADMIN_ADDITIONS = List.of("printing_admin", "document-generation.configure", "document-generation.publish", "record-files.release");
|
||||
|
||||
private static volatile String tenant;
|
||||
|
||||
|
||||
+2
-2
@@ -111,7 +111,7 @@ class EchoDemoSettingsTest
|
||||
{
|
||||
assertEquals(List.of("echo.use", "printing_operator", "document-generation.view", "document-generation.generate", "document-generation.print",
|
||||
"record-files.view", "record-files.manage", "echoScan.attach", "testOrder.attach", "testOrderItem.attach", "testOrderEvent.attach"), EchoDemoAuthentication.SCANNER);
|
||||
assertEquals(List.of("printing_admin", "document-generation.configure", "document-generation.publish"), EchoDemoAuthentication.ADMIN_ADDITIONS);
|
||||
assertFalse(EchoDemoAuthentication.SCANNER.stream().anyMatch(name -> name.endsWith(".configure") || name.endsWith(".publish") || name.endsWith("admin")));
|
||||
assertEquals(List.of("printing_admin", "document-generation.configure", "document-generation.publish", "record-files.release"), EchoDemoAuthentication.ADMIN_ADDITIONS);
|
||||
assertFalse(EchoDemoAuthentication.SCANNER.stream().anyMatch(name -> name.endsWith(".configure") || name.endsWith(".publish") || name.endsWith("admin") || name.endsWith(".release")));
|
||||
}
|
||||
}
|
||||
+6
@@ -179,6 +179,12 @@ class EchoDemoStartupTest
|
||||
assertFalse(scanner.hasPermission("printing_admin") || scanner.hasPermission("document-generation.publish"));
|
||||
assertTrue(admin.hasPermission("printing_admin") && admin.hasPermission("document-generation.publish"));
|
||||
assertFalse(stranger.hasPermission("echo.use") || stranger.hasPermission("printing_operator"));
|
||||
assertTrue(admin.hasPermission("record-files.release"));
|
||||
assertFalse(scanner.hasPermission("record-files.release") || stranger.hasPermission("record-files.release"));
|
||||
assertFalse(admin.hasPermission("record-files.configure") || admin.hasPermission("record-files.review"));
|
||||
// Revalidation keeps the role derived from the validated user, never widening or dropping it.
|
||||
assertTrue(EchoDemoAuthentication.grant(instance, admin).hasPermission("record-files.release"));
|
||||
assertFalse(EchoDemoAuthentication.grant(instance, scanner).hasPermission("record-files.release"));
|
||||
|
||||
HttpResponse<String> version = send(port, "/printing/v1/version", null, null);
|
||||
assertEquals(200, version.statusCode());
|
||||
|
||||
+3
@@ -171,6 +171,9 @@ class EchoPhotoCaptureTest
|
||||
.filter(RecordFilesQBitConfig.class::isInstance).findFirst().orElseThrow();
|
||||
assertEquals(List.of(EchoQBitProducer.SCAN_TABLE, MobileTestData.ORDERS, MobileTestData.ITEMS, MobileTestData.EVENTS), config.getParentTables());
|
||||
assertEquals(Set.of("image/jpeg", "image/png"), config.getUploadConfiguration().limits().acceptedMediaTypes());
|
||||
assertEquals(Boolean.FALSE, config.getQuarantineCapturedFiles(), "approved-device captures are admitted immediately");
|
||||
assertEquals(Boolean.TRUE, config.getQuarantineNewFiles(), "every other origin keeps the quarantine default");
|
||||
assertNull(config.getQuarantineGeneratedFiles(), "the generated-output policy is unchanged");
|
||||
assertTrue(config.getUploadConfiguration().createIdentityProvider() instanceof MobileCaptureIdentityProvider);
|
||||
assertTrue(config.getUploadConfiguration().createStorage() instanceof LocalStagingChunkStorage);
|
||||
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
<properties>
|
||||
<maven.compiler.release>21</maven.compiler.release>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<qqq.version>4.1.0-RC.21</qqq.version>
|
||||
<qqq.version>4.1.0-RC.26</qqq.version>
|
||||
<mobile.version>0.1.0-SNAPSHOT</mobile.version>
|
||||
<!-- Echo's copies per scan needs a Generation build with the print-copies change (appended copies on
|
||||
DocumentGenerationService.Request and GenerationPorts.PrintRequest, supportsCopies on the printing bridge,
|
||||
migration 20261102-print-copies-h2.sql). Printing 1.0.0 is released and qualified; only the Generation
|
||||
cohort still needs a coherent published input. Until that is published at this coordinate, override
|
||||
generation.version with a coherent build that has it; no private build is named here. -->
|
||||
<generation.version>0.1.0-SNAPSHOT</generation.version>
|
||||
<printing.version>1.0.0</printing.version>
|
||||
<generation.version>1.1.0-RC.1</generation.version>
|
||||
<printing.version>1.2.0-RC.1</printing.version>
|
||||
</properties>
|
||||
<dependencyManagement><dependencies>
|
||||
<dependency><groupId>com.kingsrook.qqq</groupId><artifactId>qqq-bom-pom</artifactId><version>${qqq.version}</version><type>pom</type><scope>import</scope></dependency>
|
||||
@@ -40,12 +40,12 @@
|
||||
<dependency><groupId>org.postgresql</groupId><artifactId>postgresql</artifactId><version>42.7.8</version><scope>test</scope></dependency>
|
||||
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter-api</artifactId><version>6.0.2</version><scope>test</scope></dependency>
|
||||
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter-engine</artifactId><version>6.0.2</version><scope>test</scope></dependency>
|
||||
<dependency><groupId>com.kingsrook.qqq</groupId><artifactId>qqq-frontend-next</artifactId><version>1.0.0-RC.35</version><scope>test</scope></dependency>
|
||||
<dependency><groupId>com.kingsrook.qqq</groupId><artifactId>qqq-frontend-next</artifactId><version>1.0.0-RC.38</version><scope>test</scope></dependency>
|
||||
<dependency><groupId>com.kingsrook.qbits</groupId><artifactId>qbit-mobile-scanners-demo</artifactId><version>${mobile.version}</version><scope>test</scope></dependency>
|
||||
</dependencies>
|
||||
<build><resources><resource><directory>src/main/resources</directory><filtering>false</filtering></resource><resource><directory>${project.basedir}/../..</directory><filtering>false</filtering><includes><include>LICENSE</include><include>NOTICE</include></includes><targetPath>META-INF/qqq-echo</targetPath></resource></resources><plugins>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.13.0</version><configuration><showWarnings>true</showWarnings><failOnWarning>true</failOnWarning><proc>none</proc><compilerArgs><arg>-Xlint:deprecation</arg><arg>-Xlint:unchecked</arg><arg>-Werror</arg></compilerArgs></configuration></plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>3.5.2</version></plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>3.5.6</version></plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-checkstyle-plugin</artifactId><version>3.6.0</version><dependencies><dependency><groupId>com.puppycrawl.tools</groupId><artifactId>checkstyle</artifactId><version>14.3.0</version></dependency></dependencies><configuration><configLocation>${project.basedir}/../../checkstyle/checkstyle.xml</configLocation><includeTestSourceDirectory>true</includeTestSourceDirectory><failOnViolation>true</failOnViolation><violationSeverity>warning</violationSeverity></configuration><executions><execution><phase>validate</phase><goals><goal>check</goal></goals></execution></executions></plugin>
|
||||
</plugins></build>
|
||||
</project>
|
||||
@@ -30,8 +30,8 @@
|
||||
<properties>
|
||||
<!-- the base module is built in the same reactor; the others are published releases from the Gitea registry -->
|
||||
<mobile.version>${project.version}</mobile.version>
|
||||
<recordfiles.version>0.1.0-RC.1</recordfiles.version>
|
||||
<collaboration.version>1.1.0-RC.1</collaboration.version>
|
||||
<recordfiles.version>0.4.0-RC.1</recordfiles.version>
|
||||
<collaboration.version>1.2.0-RC.1</collaboration.version>
|
||||
</properties>
|
||||
<dependencyManagement><dependencies>
|
||||
<dependency><groupId>com.kingsrook.qqq</groupId><artifactId>qqq-bom-pom</artifactId><version>${qqq.version}</version><type>pom</type><scope>import</scope></dependency>
|
||||
@@ -49,7 +49,7 @@
|
||||
</dependencies>
|
||||
<build><plugins>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.13.0</version></plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>3.5.2</version><configuration><systemPropertyVariables><qqq.logger.logSessionId.disabled>true</qqq.logger.logSessionId.disabled></systemPropertyVariables></configuration></plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>3.5.6</version><configuration><systemPropertyVariables><qqq.logger.logSessionId.disabled>true</qqq.logger.logSessionId.disabled></systemPropertyVariables></configuration></plugin>
|
||||
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-checkstyle-plugin</artifactId><version>3.6.0</version>
|
||||
<dependencies><dependency><groupId>com.puppycrawl.tools</groupId><artifactId>checkstyle</artifactId><version>14.3.0</version></dependency></dependencies>
|
||||
<configuration><configLocation>${maven.multiModuleProjectDirectory}/checkstyle/checkstyle.xml</configLocation><includeTestSourceDirectory>true</includeTestSourceDirectory><failOnViolation>true</failOnViolation><violationSeverity>warning</violationSeverity></configuration>
|
||||
|
||||
+65
-2
@@ -78,6 +78,7 @@ import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvSource;
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
@@ -408,6 +409,58 @@ public class MobileRecordFilesIntegrationTest extends RecordFilesFixture
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
** A host that sets quarantineCapturedFiles=false (and leaves quarantineNewFiles
|
||||
** true) makes only an approved device's camera item AVAILABLE. The device is
|
||||
** the one the real provider verified, an unapproved device is still refused,
|
||||
** an UPLOAD item stays QUARANTINED, and the permitted preview read returns the
|
||||
** exact retained bytes only for the AVAILABLE version. Requires the owner
|
||||
** version that contains withQuarantineCapturedFiles.
|
||||
***************************************************************************/
|
||||
@Test
|
||||
void approvedDeviceCameraPhotoIsAvailableOnlyWhenHostOptsIn() throws Exception
|
||||
{
|
||||
config.withQuarantineCapturedFiles(false);
|
||||
assertTrue(config.getQuarantineNewFiles(), "the broad default stays quarantined");
|
||||
String scanner = signIn("scanner");
|
||||
String admin = signIn("admin");
|
||||
enrollHttp(scanner);
|
||||
assertEquals(403, send("POST", FILES + "/uploads", scanner, manifest(UUID.randomUUID().toString(), "CAMERA", "photo.jpg", "image/jpeg", CONTENT), true, Map.of()).statusCode(),
|
||||
"an unapproved device cannot start a capture upload even with the host opt-in");
|
||||
approveHttp(admin, "mobileDeviceApprove");
|
||||
byte[] photo = {(byte) 0xFF, (byte) 0xD8, 9, 8, 7};
|
||||
byte[] other = {4, 5, 6};
|
||||
assertEquals("AVAILABLE", finalizeLifecycle(scanner, "CAMERA", "photo.jpg", "image/jpeg", photo));
|
||||
assertEquals("QUARANTINED", finalizeLifecycle(scanner, "UPLOAD", "upload.jpg", "image/jpeg", other));
|
||||
QContext.init(instance, authenticated(scanner));
|
||||
var retained = files.listForRecord("document", "1");
|
||||
assertEquals(2, retained.size());
|
||||
var available = retained.stream().filter(file -> "AVAILABLE".equals(file.lifecycle())).findFirst().orElseThrow();
|
||||
var quarantined = retained.stream().filter(file -> "QUARANTINED".equals(file.lifecycle())).findFirst().orElseThrow();
|
||||
var reader = new com.kingsrook.qbits.recordfiles.api.RetainedContentReader(
|
||||
new com.kingsrook.qbits.collaboration.attachments.AttachmentsService(collaboration, new DiskAttachmentStorage()));
|
||||
var reference = reader.reference(available.id(), "preview-" + available.id());
|
||||
assertArrayEquals(photo, reader.read(reference, 1024).bytes());
|
||||
assertThrows(QException.class, () -> reader.reference(quarantined.id(), "preview-" + quarantined.id()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
** Create, upload one chunk and finalize one item; returns its commit lifecycle.
|
||||
***************************************************************************/
|
||||
private String finalizeLifecycle(String scanner, String origin, String fileName, String mediaType, byte[] bytes) throws Exception
|
||||
{
|
||||
String request = UUID.randomUUID().toString();
|
||||
String id = ok(send("POST", FILES + "/uploads", scanner, manifest(request, origin, fileName, mediaType, bytes), true, Map.of())).path("uploadId").asText();
|
||||
ok(send("PUT", FILES + "/uploads/" + id + "/items/20000000-0000-0000-0000-000000000001/chunks/0", scanner, bytes, true,
|
||||
Map.of("Content-Type", "application/octet-stream", "X-Chunk-SHA256", UploadManifest.hash(bytes))));
|
||||
return ok(send("POST", FILES + "/uploads/" + id + "/finalize", scanner, null, true, Map.of("Idempotency-Key", request)))
|
||||
.at("/receipt/items/0/lifecycleAtCommit").asText();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
** Different actors, missing device proof and revocation cannot resume intake.
|
||||
***************************************************************************/
|
||||
@@ -822,10 +875,20 @@ public class MobileRecordFilesIntegrationTest extends RecordFilesFixture
|
||||
** Immutable manifest has no device, user or session identity fields.
|
||||
***************************************************************************/
|
||||
private byte[] manifest(String request) throws Exception
|
||||
{
|
||||
return manifest(request, "UPLOAD", "fixture.pdf", "application/pdf", CONTENT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
** The same manifest with a chosen client-declared origin and content.
|
||||
***************************************************************************/
|
||||
private byte[] manifest(String request, String origin, String fileName, String mediaType, byte[] bytes) throws Exception
|
||||
{
|
||||
return JSON.writeValueAsBytes(Map.of("requestId", request, "parent", Map.of("tableName", "document", "recordId", "1"),
|
||||
"items", List.of(Map.of("itemId", "20000000-0000-0000-0000-000000000001", "position", 0, "fileName", "fixture.pdf", "declaredMediaType", "application/pdf",
|
||||
"sizeBytes", CONTENT.length, "sha256", UploadManifest.hash(CONTENT), "origin", "UPLOAD"))));
|
||||
"items", List.of(Map.of("itemId", "20000000-0000-0000-0000-000000000001", "position", 0, "fileName", fileName, "declaredMediaType", mediaType,
|
||||
"sizeBytes", bytes.length, "sha256", UploadManifest.hash(bytes), "origin", origin))));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.kingsrook</groupId>
|
||||
<artifactId>qbit-build-parent</artifactId>
|
||||
<version>2.1.0</version>
|
||||
<version>2.2.1</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
<groupId>com.kingsrook.qbits</groupId>
|
||||
@@ -34,10 +34,10 @@
|
||||
</license>
|
||||
</licenses>
|
||||
<properties>
|
||||
<revision>0.5.0-SNAPSHOT</revision>
|
||||
<revision>0.6.0-SNAPSHOT</revision>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.release>21</maven.compiler.release>
|
||||
<qqq.version>4.1.0-RC.22</qqq.version>
|
||||
<qqq.version>4.1.0-RC.26</qqq.version>
|
||||
</properties>
|
||||
<!-- Every published module, so one root deploy builds every GAV. demo/ and examples/ are runnable demonstrations with their own coordinates and are intentionally
|
||||
not part of this reactor. Build a subset with -pl <module> -am. -->
|
||||
|
||||
Reference in new issue
Block a user