v3.24.0: the EF.ARR access rules in the FCP view
The file manager's decoded FCI shows the '8B' security attribute reference (EF_ARR 2F06, record 23). The referenced record's access rules are now rendered as indented muted lines under that row, decoded with the existing EF.ARR record decoder (AM_DO/SC_DO conditions). The server reads the card's ARR copies (MF/2F06 and ADF.USIM/6F06, best effort) once per card session in _apply_equipped_card and keeps them as server.arr; GET /api/arr serves the cache without the card lock, a disconnect clears it, and a write to an ARR copy through /api/write refreshes it. The PWA fetches it lazily per card session (pysimArrEnsure, keyed by card_session) and resolves the reference with the selected file's DF context: an ADF.USIM file uses the ADF's 6F06 copy, the implicit reference form too (ISO 7816-4 5.4.3.3 lookup order). Unresolvable references stay silent. The '8B' decode now covers all three ISO 7816-4 Table 25 forms: implicit ARR byte / FID + record / FID + (SEID, ARR) pairs - the pairs form was mis-decoded as a record before. A snapshot resolves the same references offline from its own captured EF.ARR copy. Tests: the three forms, the resolution (DF preference, out-of-range silence), the snapshot path, the server read/cache/route/write-refresh. 868 frontend + 856 Python; sw cache simple-v423.
This commit is contained in:
+22
@@ -74,6 +74,7 @@ a 3.x PWA).
|
||||
| `/api/net-sim` | POST | Run a network-condition scenario (attach, service loss, roaming, churn, 2G, SMS, CB, AUTHENTICATE) |
|
||||
| `/api/net-state` | GET | Cached network-state monitor (service, location, per-file state) |
|
||||
| `/api/net-state-refresh` | POST | Re-read the monitored files (optional `files` list) and return the updated monitor state |
|
||||
| `/api/arr` | GET | Cached EF.ARR copies (the FCP '8B' security attribute references): records per ARR file |
|
||||
| `/api/mcc-mnc` | GET | Search the optional MCC/MNC operator list (`?q=`; `?random=1&exclude=`) |
|
||||
| `/api/proactive-log` | GET | Last 50 proactive commands |
|
||||
| `/api/status-poll` | POST | Manual STATUS poll + FETCH if 91XX |
|
||||
@@ -1398,6 +1399,27 @@ optional body filters the read:
|
||||
Without a body all monitored files are re-read. Answers `503` when the reader
|
||||
is not initialized.
|
||||
|
||||
### `GET /api/arr`
|
||||
|
||||
Returns the card's cached **EF.ARR copies** — the access-rule files the FCP
|
||||
security attribute DO `'8B'` references (ISO 7816-4 Table 25). The copies
|
||||
are read once per card session when a card is equipped (`MF/2F06` and
|
||||
`ADF.USIM/6F06`, best effort) and served from memory, so this endpoint
|
||||
performs no card I/O; a disconnect clears the cache, and an `EF.ARR` write
|
||||
through `/api/write` refreshes it.
|
||||
|
||||
```json
|
||||
{"ok": true, "session": 12, "arrs": [
|
||||
{"fid": "2F06", "path": "MF/2F06", "record_len": 10, "num_records": 23,
|
||||
"records": ["FFFF...", "..."]}]}
|
||||
```
|
||||
|
||||
`ok` is `false` (with an empty `arrs`) when the card has no readable ARR.
|
||||
The PWA's file manager resolves the `'8B'` reference of the selected file's
|
||||
FCI against this cache and shows the referenced record's access rules as
|
||||
indented lines; snapshots resolve the same references from their own
|
||||
captured `EF.ARR` copy.
|
||||
|
||||
### `GET /api/proactive-log`
|
||||
|
||||
Returns the last 50 proactive commands fetched during CAT sessions, newest
|
||||
|
||||
Reference in New Issue
Block a user