From ca0feaae27925e1153a722d5f637f0bd72ee25ec Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 24 Apr 2024 10:01:35 +0100 Subject: [PATCH 01/30] Fixing JSON issues with ints in examples --- 103120/examples/json/response2.json | 8 ++++---- 103120/examples/json/response3.json | 2 +- utils/xml_to_json.py | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/103120/examples/json/response2.json b/103120/examples/json/response2.json index 829c8a7..f049e40 100644 --- a/103120/examples/json/response2.json +++ b/103120/examples/json/response2.json @@ -33,7 +33,7 @@ "ObjectIdentifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", "CountryCode": "XX", "OwnerIdentifier": "ACTOR01", - "Generation": "1", + "Generation": 1, "LastChanged": "2015-09-01T12:00:00Z", "auth:AuthorisationReference": "W000001", "auth:AuthorisationStatus": { @@ -46,7 +46,7 @@ "auth:EndTime": "2015-12-01T12:00:00Z" }, "auth:AuthorisationInvalidReason": { - "ErrorCode": "3000", + "ErrorCode": 3000, "ErrorDescription": "The Authorisation is not associated with a valid Warrant Document Object" } } @@ -60,7 +60,7 @@ "ObjectIdentifier": "2b36a78b-b628-416d-bd22-404e68a0cd36", "CountryCode": "XX", "OwnerIdentifier": "ACTOR01", - "Generation": "1", + "Generation": 1, "AssociatedObjects": { "AssociatedObject": [ "7dbbc880-8750-4d3c-abe7-ea4a17646045" @@ -105,7 +105,7 @@ "UniqueIdentifier": "ACTOR02" }, "task:InvalidReason": { - "ErrorCode": "3000", + "ErrorCode": 3000, "ErrorDescription": "The associated Authorisation is in an Invalid state" } } diff --git a/103120/examples/json/response3.json b/103120/examples/json/response3.json index 87bca95..b2bbbc4 100644 --- a/103120/examples/json/response3.json +++ b/103120/examples/json/response3.json @@ -41,7 +41,7 @@ "ObjectIdentifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", "CountryCode": "XX", "OwnerIdentifier": "ACTOR01", - "Generation": "2", + "Generation": 2, "AssociatedObjects": { "AssociatedObject": [ "4193f541-5e19-468e-b4a3-1c636ce115e9" diff --git a/utils/xml_to_json.py b/utils/xml_to_json.py index 7caebb6..a89777f 100644 --- a/utils/xml_to_json.py +++ b/utils/xml_to_json.py @@ -72,7 +72,9 @@ coerce_to_list = [ coerce_to_int = [ 'ActionIdentifier', 'delivery:SequenceNumber', - 'task:Order' + 'task:Order', + 'ErrorCode', + 'Generation', ] coerce_to_bool = [ -- GitLab From 2ea0bbeb76eae69ffc6277d89625783fdc0b62bf Mon Sep 17 00:00:00 2001 From: vanschelts Date: Mon, 10 Jun 2024 14:11:39 +0200 Subject: [PATCH 02/30] Added IRI packet report sequence --- 102232-3/IPAccessPDU.asn | 57 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/102232-3/IPAccessPDU.asn b/102232-3/IPAccessPDU.asn index f418ce5..312feef 100644 --- a/102232-3/IPAccessPDU.asn +++ b/102232-3/IPAccessPDU.asn @@ -20,6 +20,7 @@ iPAccessPDUObjId RELATIVE-OID ::= {li-ps(5) iPAccess(3) version17( iPIRIObjId RELATIVE-OID ::= {iPAccessPDUObjId iRI(1)} iPCCObjId RELATIVE-OID ::= {iPAccessPDUObjId cC(2)} iPIRIOnlyObjId RELATIVE-OID ::= {iPAccessPDUObjId iRIOnly(3)} +iPIRIPacketReportObjId RELATIVE-OID ::= {iPAccessPDUObjId iRIPacketReport(4)} -- definitions are relative to -- {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulintercept(2)} @@ -270,11 +271,14 @@ FramedRoute ::= CHOICE ... } - -- ===================================================== -- Intercept-related information for IRI-Only intercepts -- ===================================================== +-- This module is included for legacy/migration purposes +-- only, new implementations are encouraged to implement +-- IRI Packet Reports + IPIRIOnly ::= SEQUENCE { iPIRIOnlyObjId [0] RELATIVE-OID, @@ -371,5 +375,56 @@ PDSRSummaryTrigger ::= ENUMERATED ... } +-- ==================================================== +-- Intercept-related information for IRI Packet Reports +-- ==================================================== + +IPIRIPacketReport ::= SEQUENCE +{ + iPIRIPacketReportObjId [0] RELATIVE-OID, + trigger [1] PacketReportTrigger, + packet [2] OCTET STRING, + indications [3] PacketReportIndications, + bidirectional [4] BOOLEAN OPTIONAL, + packetCount [5] INTEGER OPTIONAL, + packetCountReverse [6] INTEGER OPTIONAL, + byteCount [7] INTEGER OPTIONAL, + byteCountReverse [8] INTEGER OPTIONAL, + firstTimestamp [9] GeneralizedTime OPTIONAL, + lastTimestamp [10] GeneralizedTime OPTIONAL, + ... +} + +PacketReportTrigger ::= ENUMERATED +{ + startOfFlow(0), + endOfFlow(1), + entireFlow(2), + flowTimeout(3), + flowTimerExpiration(4), + flowPacketCount(5), + flowByteCount(6), + headerReport(7), + endOfReport(8), + ... +} + +PacketReportIndications ::= BIT STRING +{ + zeroedIPv4TotalLength(0), + zeroedIPv4Flags(1), + zeroedIPv4TimeToLive(2), + zeroedIPv4HeaderChecksum(3), + zeroedIPv6PayloadLength(4), + removedIPv6ExtensionHeaders(5), + zeroedTCPSequenceNumber(6), + zeroedTCPAcknowledgementNumber(7), + zeroedTCPFlags(8), + zeroedTCPWindowSize(9), + zeroedTCPChecksum(10), + zeroedUDPLength(11), + zeroedUDPChecksum(12), + ... +} END -- end of IPAccessPDU -- GitLab From 1570499651ab381f2aae27ca37444b1dc67390f5 Mon Sep 17 00:00:00 2001 From: vanschelts Date: Mon, 10 Jun 2024 14:49:22 +0200 Subject: [PATCH 03/30] Import IRI Packet Report from 232-3 --- 102232-1/LI-PS-PDU.asn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/102232-1/LI-PS-PDU.asn b/102232-1/LI-PS-PDU.asn index f3b2329..e285a0a 100644 --- a/102232-1/LI-PS-PDU.asn +++ b/102232-1/LI-PS-PDU.asn @@ -39,7 +39,8 @@ IMPORTS -- from ETSI TS 102 232-3 [6] IPCC, IPIRI, - IPIRIOnly + IPIRIOnly, + IPIRIPacketReport FROM IPAccessPDU {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version17(17)} @@ -421,7 +422,8 @@ IRIContents ::= CHOICE confIRI [16] ConfIRI, proseIRI [17] ProSeIRI, gcseIRI [18] GcseIRI, - threeGPP33128DefinedIRI [19] OCTET STRING (CONTAINING TS33128Payloads.IRIPayload) + threeGPP33128DefinedIRI [19] OCTET STRING (CONTAINING TS33128Payloads.IRIPayload), + iPIRIPacketReport [20] IPAccessPDU.IPIRIPacketReport } UMTSIRI ::= CHOICE -- GitLab From ae05480387ad8944ac900882417f0d7bd22b22ac Mon Sep 17 00:00:00 2001 From: vanschelts Date: Tue, 11 Jun 2024 08:35:01 +0200 Subject: [PATCH 04/30] Revert "Added IRI packet report sequence" This reverts commit 2ea0bbeb76eae69ffc6277d89625783fdc0b62bf. --- 102232-3/IPAccessPDU.asn | 57 +--------------------------------------- 1 file changed, 1 insertion(+), 56 deletions(-) diff --git a/102232-3/IPAccessPDU.asn b/102232-3/IPAccessPDU.asn index 312feef..f418ce5 100644 --- a/102232-3/IPAccessPDU.asn +++ b/102232-3/IPAccessPDU.asn @@ -20,7 +20,6 @@ iPAccessPDUObjId RELATIVE-OID ::= {li-ps(5) iPAccess(3) version17( iPIRIObjId RELATIVE-OID ::= {iPAccessPDUObjId iRI(1)} iPCCObjId RELATIVE-OID ::= {iPAccessPDUObjId cC(2)} iPIRIOnlyObjId RELATIVE-OID ::= {iPAccessPDUObjId iRIOnly(3)} -iPIRIPacketReportObjId RELATIVE-OID ::= {iPAccessPDUObjId iRIPacketReport(4)} -- definitions are relative to -- {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulintercept(2)} @@ -271,14 +270,11 @@ FramedRoute ::= CHOICE ... } + -- ===================================================== -- Intercept-related information for IRI-Only intercepts -- ===================================================== --- This module is included for legacy/migration purposes --- only, new implementations are encouraged to implement --- IRI Packet Reports - IPIRIOnly ::= SEQUENCE { iPIRIOnlyObjId [0] RELATIVE-OID, @@ -375,56 +371,5 @@ PDSRSummaryTrigger ::= ENUMERATED ... } --- ==================================================== --- Intercept-related information for IRI Packet Reports --- ==================================================== - -IPIRIPacketReport ::= SEQUENCE -{ - iPIRIPacketReportObjId [0] RELATIVE-OID, - trigger [1] PacketReportTrigger, - packet [2] OCTET STRING, - indications [3] PacketReportIndications, - bidirectional [4] BOOLEAN OPTIONAL, - packetCount [5] INTEGER OPTIONAL, - packetCountReverse [6] INTEGER OPTIONAL, - byteCount [7] INTEGER OPTIONAL, - byteCountReverse [8] INTEGER OPTIONAL, - firstTimestamp [9] GeneralizedTime OPTIONAL, - lastTimestamp [10] GeneralizedTime OPTIONAL, - ... -} - -PacketReportTrigger ::= ENUMERATED -{ - startOfFlow(0), - endOfFlow(1), - entireFlow(2), - flowTimeout(3), - flowTimerExpiration(4), - flowPacketCount(5), - flowByteCount(6), - headerReport(7), - endOfReport(8), - ... -} - -PacketReportIndications ::= BIT STRING -{ - zeroedIPv4TotalLength(0), - zeroedIPv4Flags(1), - zeroedIPv4TimeToLive(2), - zeroedIPv4HeaderChecksum(3), - zeroedIPv6PayloadLength(4), - removedIPv6ExtensionHeaders(5), - zeroedTCPSequenceNumber(6), - zeroedTCPAcknowledgementNumber(7), - zeroedTCPFlags(8), - zeroedTCPWindowSize(9), - zeroedTCPChecksum(10), - zeroedUDPLength(11), - zeroedUDPChecksum(12), - ... -} END -- end of IPAccessPDU -- GitLab From 7f5ad7b2e1724dde2bb5dd0b68d05b97e128f015 Mon Sep 17 00:00:00 2001 From: Jay Tappen Date: Wed, 12 Jun 2024 12:02:16 -0400 Subject: [PATCH 05/30] add TargetEntityType for LD and LI, and update examples to help differentiate between the existing fields Type and ServiceType and the new field TargetEntityType --- 103120/examples/xml/request1.xml | 2 ++ 103120/examples/xml/request4.xml | 2 ++ 103120/schema/xsd/ts_103120_Task.xsd | 2 ++ 3 files changed, 6 insertions(+) diff --git a/103120/examples/xml/request1.xml b/103120/examples/xml/request1.xml index 5cba416..21892a2 100644 --- a/103120/examples/xml/request1.xml +++ b/103120/examples/xml/request1.xml @@ -56,6 +56,8 @@ 442079460223 + DataType1 + AccountType1 ETSI diff --git a/103120/examples/xml/request4.xml b/103120/examples/xml/request4.xml index 4e0671a..ac69380 100644 --- a/103120/examples/xml/request4.xml +++ b/103120/examples/xml/request4.xml @@ -58,6 +58,8 @@ 442079460223 + SubscriberData + AccountType1 diff --git a/103120/schema/xsd/ts_103120_Task.xsd b/103120/schema/xsd/ts_103120_Task.xsd index 59f45d0..648f024 100644 --- a/103120/schema/xsd/ts_103120_Task.xsd +++ b/103120/schema/xsd/ts_103120_Task.xsd @@ -38,6 +38,7 @@ + @@ -136,6 +137,7 @@ + -- GitLab From 38ebf33df2688caeaf2da05a7219fd7dc44eee1e Mon Sep 17 00:00:00 2001 From: Jay Tappen Date: Wed, 12 Jun 2024 12:02:16 -0400 Subject: [PATCH 06/30] add TargetEntityType for LD and LI, and update examples to help differentiate between the existing fields Type and ServiceType and the new field TargetEntityType --- 103120/examples/xml/request1.xml | 10 ++++++++++ 103120/examples/xml/request4.xml | 10 ++++++++++ 103120/schema/xsd/ts_103120_Task.xsd | 2 ++ 3 files changed, 22 insertions(+) diff --git a/103120/examples/xml/request1.xml b/103120/examples/xml/request1.xml index 5cba416..12615be 100644 --- a/103120/examples/xml/request1.xml +++ b/103120/examples/xml/request1.xml @@ -56,6 +56,16 @@ 442079460223 + + ETSI + TaskServiceType + DataType1 + + + CSP1 + TargetEntityType + AccountType1 + ETSI diff --git a/103120/examples/xml/request4.xml b/103120/examples/xml/request4.xml index 4e0671a..b9c1899 100644 --- a/103120/examples/xml/request4.xml +++ b/103120/examples/xml/request4.xml @@ -58,6 +58,16 @@ 442079460223 + + ETSI + RequestType + SubscriberData + + + CSP01 + TargetEntityType + AccountType1 + diff --git a/103120/schema/xsd/ts_103120_Task.xsd b/103120/schema/xsd/ts_103120_Task.xsd index 59f45d0..648f024 100644 --- a/103120/schema/xsd/ts_103120_Task.xsd +++ b/103120/schema/xsd/ts_103120_Task.xsd @@ -38,6 +38,7 @@ + @@ -136,6 +137,7 @@ + -- GitLab From 9f43f4f9cc5acf06521a28cd23d987cf05a984a0 Mon Sep 17 00:00:00 2001 From: Jay Tappen Date: Wed, 12 Jun 2024 13:06:44 -0400 Subject: [PATCH 07/30] update examples to pass xsd_process.py test --- 103120/examples/xml/request4.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/103120/examples/xml/request4.xml b/103120/examples/xml/request4.xml index b9c1899..8ff750a 100644 --- a/103120/examples/xml/request4.xml +++ b/103120/examples/xml/request4.xml @@ -47,6 +47,11 @@ XX-ACTOR01-1234 + + ETSI + RequestType + SubscriberData + 2019-09-30T12:00:00Z 2019-12-30T12:00:00Z @@ -58,11 +63,6 @@ 442079460223 - - ETSI - RequestType - SubscriberData - CSP01 TargetEntityType -- GitLab From f1540ea063b29b156181e8d4cc5bd8bafbf9f820 Mon Sep 17 00:00:00 2001 From: Jay Tappen Date: Wed, 19 Jun 2024 09:42:26 +0200 Subject: [PATCH 08/30] Update name of new field to TargetIdentifierSubtype and add a new example to explain its use. --- 103120/examples/xml/request1.xml | 6 +- .../xml/request4-TargetIdentifierSubtype.xml | 114 ++++++++++++++++++ 103120/examples/xml/request4.xml | 5 - 103120/schema/xsd/ts_103120_Task.xsd | 4 +- 4 files changed, 119 insertions(+), 10 deletions(-) create mode 100644 103120/examples/xml/request4-TargetIdentifierSubtype.xml diff --git a/103120/examples/xml/request1.xml b/103120/examples/xml/request1.xml index a3cc1cf..b5db038 100644 --- a/103120/examples/xml/request1.xml +++ b/103120/examples/xml/request1.xml @@ -61,11 +61,11 @@ TaskServiceType DataType1 - + CSP01 - TargetEntityType + TargetIdentifierSubtype AccountType1 - + ETSI diff --git a/103120/examples/xml/request4-TargetIdentifierSubtype.xml b/103120/examples/xml/request4-TargetIdentifierSubtype.xml new file mode 100644 index 0000000..99f201a --- /dev/null +++ b/103120/examples/xml/request4-TargetIdentifierSubtype.xml @@ -0,0 +1,114 @@ + + + +
+ + XX + ACTOR01 + + + XX + ACTOR02 + + c02358b2-76cf-4ba4-a8eb-f6436ccaea2e + 2019-09-30T13:37:00.000000Z + + V1.13.1 + XX + v1.0 + +
+ + + + + 0 + + + 7dbbc880-8750-4d3c-abe7-ea4a17646045 + XX + ACTOR01 + W000001 + + 2019-09-30T12:00:00Z + 2019-12-01T12:00:00Z + + + + + + 1 + + + 2b36a78b-b628-416d-bd22-404e68a0cd36 + XX + ACTOR01 + + 7dbbc880-8750-4d3c-abe7-ea4a17646045 + + XX-ACTOR01-1234 + + + ETSI + RequestType + SubscriberData + + 2019-09-30T12:00:00Z + 2019-12-30T12:00:00Z + + + + ETSI + ServiceAccessIdentifier + + 123456789 + + + + ACTOR02 + TargetIdentifierSubtype + AccountTypeB + + + + + + 192.0.2.0 + + + + + XX + ACTOR02 + + + + + + + +
diff --git a/103120/examples/xml/request4.xml b/103120/examples/xml/request4.xml index 8ff750a..b99fa9e 100644 --- a/103120/examples/xml/request4.xml +++ b/103120/examples/xml/request4.xml @@ -63,11 +63,6 @@ 442079460223 - - CSP01 - TargetEntityType - AccountType1 -
diff --git a/103120/schema/xsd/ts_103120_Task.xsd b/103120/schema/xsd/ts_103120_Task.xsd index 648f024..59343ea 100644 --- a/103120/schema/xsd/ts_103120_Task.xsd +++ b/103120/schema/xsd/ts_103120_Task.xsd @@ -38,7 +38,7 @@ - +
@@ -137,7 +137,7 @@ - + -- GitLab From baf78cc0f6901ce846a561af17b15da84d8a0e3f Mon Sep 17 00:00:00 2001 From: Rachid Date: Thu, 20 Jun 2024 16:35:13 +0200 Subject: [PATCH 09/30] Added APN and DNN --- 103280/TS_103_280.xsd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/103280/TS_103_280.xsd b/103280/TS_103_280.xsd index cdbafba..669e35d 100644 --- a/103280/TS_103_280.xsd +++ b/103280/TS_103_280.xsd @@ -286,4 +286,13 @@ + + + + + + + + + -- GitLab From 2759a55dfb52761fb693ba0b5c0e571d88541e2c Mon Sep 17 00:00:00 2001 From: Rachid Date: Thu, 20 Jun 2024 16:41:15 +0200 Subject: [PATCH 10/30] Added APN and DNN --- 103280/TS_103_280.xsd | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/103280/TS_103_280.xsd b/103280/TS_103_280.xsd index 669e35d..eb139db 100644 --- a/103280/TS_103_280.xsd +++ b/103280/TS_103_280.xsd @@ -286,13 +286,10 @@ - - - - + + - - + -- GitLab From 64e705d0918e94b649ed3a3997cd97f06e82fb4d Mon Sep 17 00:00:00 2001 From: Rachid Date: Thu, 20 Jun 2024 16:46:48 +0200 Subject: [PATCH 11/30] Added APN and DNN --- 103280/TS_103_280.xsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/103280/TS_103_280.xsd b/103280/TS_103_280.xsd index eb139db..283bebe 100644 --- a/103280/TS_103_280.xsd +++ b/103280/TS_103_280.xsd @@ -287,9 +287,9 @@ - + - + -- GitLab From 9ce2de13f03c9b4832af46e44560868669f70714 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 20 Jun 2024 15:54:06 +0100 Subject: [PATCH 12/30] Adding automatically-converted JSON --- 103280/TS_103_280.schema.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/103280/TS_103_280.schema.json b/103280/TS_103_280.schema.json index a6cca0c..4c092eb 100644 --- a/103280/TS_103_280.schema.json +++ b/103280/TS_103_280.schema.json @@ -203,6 +203,12 @@ "ServiceAccessIdentifier": { "type": "string" }, + "APN": { + "$ref": "#/$defs/LongString" + }, + "DNN": { + "$ref": "#/$defs/LongString" + }, "IPAddress": { "oneOf": [ { @@ -398,4 +404,4 @@ ] } } -} +} \ No newline at end of file -- GitLab From 62dc4c20ef6ef952efda0e703ae0e707ff14a591 Mon Sep 17 00:00:00 2001 From: marthy Date: Tue, 25 Jun 2024 12:24:38 +0000 Subject: [PATCH 13/30] Cr/102657/0147 - Addition of Cellular-Network-Info Header to MultimediaServiceUsage --- 102657/RDMessage.asn | 27 ++++++++++++++++++++++++++- 102657/RDMessage.xsd | 18 ++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/102657/RDMessage.asn b/102657/RDMessage.asn index 3e1f090..e0b99ea 100644 --- a/102657/RDMessage.asn +++ b/102657/RDMessage.asn @@ -1988,7 +1988,8 @@ MultimediaPartyInformation ::= SEQUENCE octetsDownloaded [16] INTEGER OPTIONAL, accessNetworkInformation [17] SEQUENCE OF AccessNetworkInfo OPTIONAL, privateUserIdentity [18] IMPI OPTIONAL, - iMEI [19] IMEI OPTIONAL + iMEI [19] IMEI OPTIONAL, + cellularNetworkInfo [20] CellularNetworkInfo OPTIONAL } MultimediaCallID ::= UTF8String @@ -2110,6 +2111,30 @@ PaniHeaderInfo ::= SEQUENCE -- Complete content of the P-Access-Network-Info header field } +CellularNetworkInfo ::= SEQUENCE +{ + accessType [1] UTF8String OPTIONAL, + -- ASCII string "3GPP-GERAN","3GPP-UTRAN-FDD", ... : see ETSI TS 124 229 [xx] clause 7.2.15.3 + cellularAccessInfo [2] CellularAccessInfo OPTIONAL, + cniHeaderContent [3] UTF8String OPTIONAL, + -- Complete content of the Cellular-Network-Info header field + ... +} + +CellularAccessInfo ::= SEQUENCE +{ + cgi3gpp [1] UTF8String OPTIONAL, + -- cgi-3gpp parameter in ASCII representation. See ETSI TS 124 229 [xx] clause 7.2.15.3 + utranCellId3gpp [2] UTF8String OPTIONAL, + -- utran-cell-id-3gpp parameter in ASCII representation. See ETSI TS 124 229 [xx] clause 7.2.15.3 + ci3gpp2 [3] UTF8String OPTIONAL, + -- ci-3gpp2 parameter in ASCII representation. See ETSI TS 124 229 [xx] clause 7.2.15.3 + ci3gpp2femto [4] UTF8String OPTIONAL, + -- ci-3gpp2-femto parameter in ASCII representation. See ETSI TS 124 229 [xx] clause 7.2.15.3 + cellInfoAge [5] INTEGER OPTIONAL, + -- cell-info-age parameter. See ETSI TS 124 229 [xx] clause 7.2.15.3 + ... +} -- ============================== -- Definitions of Billing Data diff --git a/102657/RDMessage.xsd b/102657/RDMessage.xsd index ce0a971..deaa16c 100644 --- a/102657/RDMessage.xsd +++ b/102657/RDMessage.xsd @@ -2961,6 +2961,7 @@ + @@ -3270,6 +3271,23 @@ + + + + + + + + + + + + + + + + + -- GitLab From 9bd287aaf6a7e83a872b2c86c9e666855c71d4e5 Mon Sep 17 00:00:00 2001 From: marthy Date: Tue, 25 Jun 2024 12:29:03 +0000 Subject: [PATCH 14/30] Cr/103280/0028 - Addition of the eUICC identifier (EID) --- 103280/TS_103_280.schema.json | 4 ++++ 103280/TS_103_280.xsd | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/103280/TS_103_280.schema.json b/103280/TS_103_280.schema.json index a6cca0c..458fdb9 100644 --- a/103280/TS_103_280.schema.json +++ b/103280/TS_103_280.schema.json @@ -203,6 +203,10 @@ "ServiceAccessIdentifier": { "type": "string" }, + "EUICCID": { + "type": "string", + "pattern": "^[0-9]{32}$" + }, "IPAddress": { "oneOf": [ { diff --git a/103280/TS_103_280.xsd b/103280/TS_103_280.xsd index cdbafba..4749a16 100644 --- a/103280/TS_103_280.xsd +++ b/103280/TS_103_280.xsd @@ -286,4 +286,9 @@ + + + + + -- GitLab From c618a1ae7e834a9e5dd28b146cb3078c7da525e9 Mon Sep 17 00:00:00 2001 From: canterburym Date: Tue, 25 Jun 2024 12:29:44 +0000 Subject: [PATCH 15/30] TS 103 280 CR029 - Adding $schema keyword --- 103280/TS_103_280.schema.json | 1 + utils/translate/__init__.py | 1 + utils/translate_spec.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/103280/TS_103_280.schema.json b/103280/TS_103_280.schema.json index 458fdb9..555df4d 100644 --- a/103280/TS_103_280.schema.json +++ b/103280/TS_103_280.schema.json @@ -1,5 +1,6 @@ { "$id": "ts_103280_2017_07", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "ShortString": { "type": "string", diff --git a/utils/translate/__init__.py b/utils/translate/__init__.py index ba05008..86a3346 100644 --- a/utils/translate/__init__.py +++ b/utils/translate/__init__.py @@ -20,6 +20,7 @@ mappings = [ def translate_schema (schema_path: str, ns_to_id_map: dict, schema_locations = []): js = { "$id" : "?", + "$schema" : "https://json-schema.org/draft/2020-12/schema", "$defs" : {} } diff --git a/utils/translate_spec.py b/utils/translate_spec.py index 01880ff..e950b4a 100644 --- a/utils/translate_spec.py +++ b/utils/translate_spec.py @@ -107,7 +107,7 @@ if __name__ == "__main__": ] } - json_string = json.dumps(js, indent=2) + json_string = json.dumps(js, indent=2) + "\n" if "Core" in schema_tuple[1]: json_string = json_string.replace('"$ref": "#/$defs/HI1Object"', '"$ref": "#/$defs/ConcreteHI1Object"') -- GitLab From fac77b0a71b193f5d6b9ef2a19ee4ecc8cd0b723 Mon Sep 17 00:00:00 2001 From: canterburym Date: Tue, 25 Jun 2024 12:30:20 +0000 Subject: [PATCH 16/30] TS 103 120 CR069 - JSON schema fixes --- .../json/ts_103120_Authorisation.schema.json | 7 +++++-- 103120/schema/json/ts_103120_Common.schema.json | 3 ++- 103120/schema/json/ts_103120_Core.schema.json | 3 ++- 103120/schema/json/ts_103120_Delivery.schema.json | 7 +++++-- 103120/schema/json/ts_103120_Document.schema.json | 7 +++++-- .../json/ts_103120_Notification.schema.json | 7 +++++-- 103120/schema/json/ts_103120_Task.schema.json | 15 +++++++++++---- .../json/ts_103120_TrafficPolicy.schema.json | 11 ++++++++--- utils/translate/SequenceMapping.py | 2 +- 9 files changed, 44 insertions(+), 18 deletions(-) diff --git a/103120/schema/json/ts_103120_Authorisation.schema.json b/103120/schema/json/ts_103120_Authorisation.schema.json index 1c9a68f..942438f 100644 --- a/103120/schema/json/ts_103120_Authorisation.schema.json +++ b/103120/schema/json/ts_103120_Authorisation.schema.json @@ -1,12 +1,15 @@ { "$id": "ts_103120_Authorisation_2020_09", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "AuthorisationObject": { "type": "object", "properties": { "@xsi:type": { "type": "string", - "enum": "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject" + "enum": [ + "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject" + ] }, "ObjectIdentifier": { "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" @@ -145,4 +148,4 @@ ] } } -} \ No newline at end of file +} diff --git a/103120/schema/json/ts_103120_Common.schema.json b/103120/schema/json/ts_103120_Common.schema.json index d11b4b4..c13f91b 100644 --- a/103120/schema/json/ts_103120_Common.schema.json +++ b/103120/schema/json/ts_103120_Common.schema.json @@ -1,5 +1,6 @@ { "$id": "ts_103120_Common_2016_02", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "ETSIVersion": { "allOf": [ @@ -161,4 +162,4 @@ ] } } -} \ No newline at end of file +} diff --git a/103120/schema/json/ts_103120_Core.schema.json b/103120/schema/json/ts_103120_Core.schema.json index 63e2ad4..71e583d 100644 --- a/103120/schema/json/ts_103120_Core.schema.json +++ b/103120/schema/json/ts_103120_Core.schema.json @@ -1,5 +1,6 @@ { "$id": "ts_103120_Core_2019_10", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "ObjectIdentifier": { "$ref": "ts_103280_2017_07#/$defs/UUID" @@ -603,4 +604,4 @@ } }, "$ref": "#/$defs/HI1Message" -} \ No newline at end of file +} diff --git a/103120/schema/json/ts_103120_Delivery.schema.json b/103120/schema/json/ts_103120_Delivery.schema.json index f87f7f5..8362950 100644 --- a/103120/schema/json/ts_103120_Delivery.schema.json +++ b/103120/schema/json/ts_103120_Delivery.schema.json @@ -1,12 +1,15 @@ { "$id": "ts_103120_Delivery_2019_10", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "DeliveryObject": { "type": "object", "properties": { "@xsi:type": { "type": "string", - "enum": "{http://uri.etsi.org/03120/common/2019/10/Delivery}DeliveryObject" + "enum": [ + "{http://uri.etsi.org/03120/common/2019/10/Delivery}DeliveryObject" + ] }, "ObjectIdentifier": { "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" @@ -229,4 +232,4 @@ "EmbeddedXMLData": {}, "EmbeddedJSONData": {} } -} \ No newline at end of file +} diff --git a/103120/schema/json/ts_103120_Document.schema.json b/103120/schema/json/ts_103120_Document.schema.json index d844092..3bc734c 100644 --- a/103120/schema/json/ts_103120_Document.schema.json +++ b/103120/schema/json/ts_103120_Document.schema.json @@ -1,12 +1,15 @@ { "$id": "ts_103120_Document_2020_09", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "DocumentObject": { "type": "object", "properties": { "@xsi:type": { "type": "string", - "enum": "{http://uri.etsi.org/03120/common/2020/09/Document}DocumentObject" + "enum": [ + "{http://uri.etsi.org/03120/common/2020/09/Document}DocumentObject" + ] }, "ObjectIdentifier": { "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" @@ -145,4 +148,4 @@ ] } } -} \ No newline at end of file +} diff --git a/103120/schema/json/ts_103120_Notification.schema.json b/103120/schema/json/ts_103120_Notification.schema.json index 84fbf04..aadb989 100644 --- a/103120/schema/json/ts_103120_Notification.schema.json +++ b/103120/schema/json/ts_103120_Notification.schema.json @@ -1,12 +1,15 @@ { "$id": "ts_103120_Notification_2016_02", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "NotificationObject": { "type": "object", "properties": { "@xsi:type": { "type": "string", - "enum": "{http://uri.etsi.org/03120/common/2016/02/Notification}NotificationObject" + "enum": [ + "{http://uri.etsi.org/03120/common/2016/02/Notification}NotificationObject" + ] }, "ObjectIdentifier": { "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" @@ -100,4 +103,4 @@ ] } } -} \ No newline at end of file +} diff --git a/103120/schema/json/ts_103120_Task.schema.json b/103120/schema/json/ts_103120_Task.schema.json index 5bb92ac..7df2c44 100644 --- a/103120/schema/json/ts_103120_Task.schema.json +++ b/103120/schema/json/ts_103120_Task.schema.json @@ -1,12 +1,15 @@ { "$id": "ts_103120_Task_2020_09", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "LITaskObject": { "type": "object", "properties": { "@xsi:type": { "type": "string", - "enum": "{http://uri.etsi.org/03120/common/2020/09/Task}LITaskObject" + "enum": [ + "{http://uri.etsi.org/03120/common/2020/09/Task}LITaskObject" + ] }, "ObjectIdentifier": { "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" @@ -372,7 +375,9 @@ "properties": { "@xsi:type": { "type": "string", - "enum": "{http://uri.etsi.org/03120/common/2020/09/Task}LDTaskObject" + "enum": [ + "{http://uri.etsi.org/03120/common/2020/09/Task}LDTaskObject" + ] }, "ObjectIdentifier": { "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" @@ -604,7 +609,9 @@ "properties": { "@xsi:type": { "type": "string", - "enum": "{http://uri.etsi.org/03120/common/2020/09/Task}LPTaskObject" + "enum": [ + "{http://uri.etsi.org/03120/common/2020/09/Task}LPTaskObject" + ] }, "ObjectIdentifier": { "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" @@ -720,4 +727,4 @@ "required": [] } } -} \ No newline at end of file +} diff --git a/103120/schema/json/ts_103120_TrafficPolicy.schema.json b/103120/schema/json/ts_103120_TrafficPolicy.schema.json index 18bb9cf..ef30cca 100644 --- a/103120/schema/json/ts_103120_TrafficPolicy.schema.json +++ b/103120/schema/json/ts_103120_TrafficPolicy.schema.json @@ -1,12 +1,15 @@ { "$id": "ts_103120_TrafficPolicy_2022_07", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "TrafficPolicyObject": { "type": "object", "properties": { "@xsi:type": { "type": "string", - "enum": "{http://uri.etsi.org/03120/common/2022/07/TrafficPolicy}TrafficPolicyObject" + "enum": [ + "{http://uri.etsi.org/03120/common/2022/07/TrafficPolicy}TrafficPolicyObject" + ] }, "ObjectIdentifier": { "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" @@ -79,7 +82,9 @@ "properties": { "@xsi:type": { "type": "string", - "enum": "{http://uri.etsi.org/03120/common/2022/07/TrafficPolicy}TrafficRuleObject" + "enum": [ + "{http://uri.etsi.org/03120/common/2022/07/TrafficPolicy}TrafficRuleObject" + ] }, "ObjectIdentifier": { "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" @@ -307,4 +312,4 @@ ] } } -} \ No newline at end of file +} diff --git a/utils/translate/SequenceMapping.py b/utils/translate/SequenceMapping.py index 4dc5c93..341ac51 100644 --- a/utils/translate/SequenceMapping.py +++ b/utils/translate/SequenceMapping.py @@ -35,7 +35,7 @@ class SequenceMapping(ComplexTypeMapping): # mapped_type['__DESCENDENT_OF__'] = TypeMapping.get_ref_for(xst.base_type, xst.namespaces['']) mapped_type['properties']['@xsi:type'] = { "type" : "string", - "enum" : xst.name + "enum" : [xst.name] } mapped_type['required'].append('@xsi:type') # if xst.abstract: -- GitLab From d9bc0dc493acd0c0be6c433ec04abe1b2c182359 Mon Sep 17 00:00:00 2001 From: Steije van Schelt <239-svs@users.noreply.forge.etsi.org> Date: Tue, 25 Jun 2024 12:31:08 +0000 Subject: [PATCH 17/30] TS 102 232-1 CR 0109 - Support for additional Digital Signature algorithms in TS 102 232-1 --- 102232-1/LI-PS-PDU.asn | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/102232-1/LI-PS-PDU.asn b/102232-1/LI-PS-PDU.asn index f3b2329..6031ba8 100644 --- a/102232-1/LI-PS-PDU.asn +++ b/102232-1/LI-PS-PDU.asn @@ -515,9 +515,12 @@ IntegrityCheck ::= SEQUENCE -- used to insert the appropriate ASN.1 DER or BER encoded structure for the -- DSS/DSA signature as described in IETF RFC 3279 [43], clause 2.2.2. ..., - hashAlgorithm [4] HashAlgorithm OPTIONAL + hashAlgorithm [4] HashAlgorithm OPTIONAL, -- Clarifies the hash function if checkType is hash(1). -- If used, it shall be present for each checkType hash(1). + signatureAlgorithm [5] SignatureAlgorithm OPTIONAL + -- Clarifies the signature algorithm if checkType is signature(2). + -- If used, it shall be present for each checkType signature(2). } CheckType ::= ENUMERATED @@ -547,6 +550,15 @@ HashAlgorithm ::= ENUMERATED ... } +SignatureAlgorithm ::= ENUMERATED +{ + dSA(1), + -- Included for legacy/migration purposes only, not to be used for new implementations + eCDSA(2), + edDSA(3), + ... +} + Option ::= CHOICE { pDUAcknowledgement [0] NULL, -- GitLab From 9bbf3f3e08350d671755d9b23715c371673d037c Mon Sep 17 00:00:00 2001 From: Miyana Stange Date: Tue, 25 Jun 2024 12:32:22 +0000 Subject: [PATCH 18/30] TS 103 120 CR 071 - TS 103 707 for LI handover --- 103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml b/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml index 242ca81..757fff3 100644 --- a/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml +++ b/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml @@ -493,6 +493,10 @@ TS102232-7 Handed over in TS 102 232 part 7 format + + TS103707 + Handed over as ETSI TS 103 707, using the DeliveryObject as described in clause 10 + -- GitLab From 867e3996305b9e6aebed619b5e0d336352e21c2a Mon Sep 17 00:00:00 2001 From: Steije van Schelt <239-svs@users.noreply.forge.etsi.org> Date: Tue, 25 Jun 2024 12:36:09 +0000 Subject: [PATCH 19/30] TS 102 232-3 CR 0046 - Next generation packet reporting --- 102232-3/IPAccessPDU.asn | 73 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/102232-3/IPAccessPDU.asn b/102232-3/IPAccessPDU.asn index f418ce5..88bee7e 100644 --- a/102232-3/IPAccessPDU.asn +++ b/102232-3/IPAccessPDU.asn @@ -20,6 +20,7 @@ iPAccessPDUObjId RELATIVE-OID ::= {li-ps(5) iPAccess(3) version17( iPIRIObjId RELATIVE-OID ::= {iPAccessPDUObjId iRI(1)} iPCCObjId RELATIVE-OID ::= {iPAccessPDUObjId cC(2)} iPIRIOnlyObjId RELATIVE-OID ::= {iPAccessPDUObjId iRIOnly(3)} +iPIRIPacketReportObjId RELATIVE-OID ::= {iPAccessPDUObjId iRIPacketReport(4)} -- definitions are relative to -- {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulintercept(2)} @@ -270,11 +271,14 @@ FramedRoute ::= CHOICE ... } - -- ===================================================== -- Intercept-related information for IRI-Only intercepts -- ===================================================== +-- The PDHR and PDSR mechanisms have been superseded by +-- the IPPR mechanism which is defined in clause 6.2.5. +-- New implementations should use the IPPR mechanism. + IPIRIOnly ::= SEQUENCE { iPIRIOnlyObjId [0] RELATIVE-OID, @@ -371,5 +375,72 @@ PDSRSummaryTrigger ::= ENUMERATED ... } +-- =================================================== +-- Intercept-related information for IP Packet Reports +-- =================================================== + +IPIRIPacketReport ::= SEQUENCE +{ + iPIRIPacketReportObjId [0] RELATIVE-OID, + report [1] PacketReport, + ... +} + +PacketReport ::= CHOICE +{ + header [1] PacketReportHeader, + summary [2] PacketReportSummary, + ... +} + +PacketReportHeader ::= SEQUENCE +{ + header [1] OCTET STRING, + ... +} + +PacketReportSummary ::= SEQUENCE +{ + header [1] OCTET STRING, + indications [2] PacketReportIndications, + trigger [3] PacketReportTrigger, + packetCount [4] INTEGER OPTIONAL, + byteCount [5] INTEGER OPTIONAL, + firstTimestamp [6] GeneralizedTime OPTIONAL, + lastTimestamp [7] GeneralizedTime OPTIONAL, + ... +} + +PacketReportTrigger ::= ENUMERATED +{ + flowStart(1), + flowEnd(2), + flowTimeout(3), + flowTimerExpiration(4), + flowPacketCount(5), + flowByteCount(6), + sessionTimerExpiration(7), + sessionPacketCount(8), + sessionByteCount(9), + reportEnd(10), + ... +} + +PacketReportIndications ::= BIT STRING +{ + zeroedIPv4TotalLength(0), + zeroedIPv4Flags(1), + zeroedIPv4TimeToLive(2), + zeroedIPv4HeaderChecksum(3), + zeroedIPv6PayloadLength(4), + removedIPv6ExtensionHeaders(5), + zeroedTCPSequenceNumber(6), + zeroedTCPAcknowledgementNumber(7), + zeroedTCPFlags(8), + zeroedTCPWindowSize(9), + zeroedTCPChecksum(10), + zeroedUDPLength(11), + zeroedUDPChecksum(12) +} END -- end of IPAccessPDU -- GitLab From e24dd8354344214ff913fc039358c2ec818cecd4 Mon Sep 17 00:00:00 2001 From: rengasamis Date: Tue, 25 Jun 2024 12:41:24 +0000 Subject: [PATCH 20/30] =?UTF-8?q?TS=20102=20232-5=20CR041r3=20-=20Reportin?= =?UTF-8?q?g=20Post=20Dialled=20Digits=20in=20IMS=20Network=20=E2=80=93=20?= =?UTF-8?q?232-5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 102232-5/IPMultimediaPDU.asn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/102232-5/IPMultimediaPDU.asn b/102232-5/IPMultimediaPDU.asn index f2e7dfa..1915031 100644 --- a/102232-5/IPMultimediaPDU.asn +++ b/102232-5/IPMultimediaPDU.asn @@ -120,10 +120,13 @@ IPIRIContents ::= CHOICE iRIOnlyOriginalIPMMMessage [5] OCTET STRING, -- Copy of the IP MM signalling packet including the original IP and UDP/TCP headers -- see clause 5.2.6. - iRIOnlySIPMessage [6] SIPMessage + iRIOnlySIPMessage [6] SIPMessage, -- Copy of the SIP content and the source and destination IP address of the intercepted -- SIP message as transmitted on the network layer. -- (see clause 5.2.6 and 5.2.7). + iRIOnlyRTPPacket [7] OCTET STRING + -- Copy of the RTP packet containing telephony events including the original IP and UDP headers + -- (see clause 5.2.X). } SIPMessage ::= SEQUENCE -- GitLab From 54c07af139a26b9d36ab5c89e2e22db1d9b2907e Mon Sep 17 00:00:00 2001 From: Rachid Louardi Date: Tue, 25 Jun 2024 12:44:03 +0000 Subject: [PATCH 21/30] ts103120cr073 - addition of ETSI TS 103 705 to the HandoverFormat --- .../dictionaries/ts_103120_ETSIDictionaryDefinitions.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml b/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml index 757fff3..11a43a9 100644 --- a/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml +++ b/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml @@ -632,6 +632,10 @@ TS103120 Handed over using the DeliveryObject as described in clause 10 + + TS103705 + Handed over as ETSI TS 103 705, using the DeliveryObject as described in clause 10 + TS103707 Handed over as ETSI TS 103 707, using the DeliveryObject as described in clause 10 @@ -732,6 +736,10 @@ TS102657-XML Delivery according to ETSI TS 102 657 using XML encoding + + TS103705 + Delivery according to ETSI TS 103 705, using JSON encoding + TS103707 Delivery according to ETSI TS 103 707 -- GitLab From 846195b66f5abcc202dcc4cd640ba8ff60412e7e Mon Sep 17 00:00:00 2001 From: kaufmannj Date: Tue, 25 Jun 2024 12:45:38 +0000 Subject: [PATCH 22/30] TS 103 120 CR067 - CONFIG verb --- .../ts_103120_ETSIDictionaryDefinitions.xml | 50 +++++++++ 103120/examples/xml/request_config.xml | 30 +++++ 103120/examples/xml/response_config.xml | 106 ++++++++++++++++++ 103120/schema/xsd/ts_103120_Common.xsd | 5 + 103120/schema/xsd/ts_103120_Config.xsd | 62 ++++++++++ 103120/schema/xsd/ts_103120_Core.xsd | 17 ++- testing/xsd_compile_targets.json | 6 + 7 files changed, 275 insertions(+), 1 deletion(-) create mode 100644 103120/examples/xml/request_config.xml create mode 100644 103120/examples/xml/response_config.xml create mode 100644 103120/schema/xsd/ts_103120_Config.xsd diff --git a/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml b/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml index 11a43a9..eb46ca4 100644 --- a/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml +++ b/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml @@ -723,6 +723,56 @@ + + + ETSI + LIWorkflowEndpoint + + + NewAuthorisation + Implementer supports the "New Authorisation" Endpoint. + + + AuthorisationExtension + Implementer supports the "Authorisation Extension" Endpoint. + + + AuthorisationCancellation + Implementer supports the "Authorisation Cancellation" Endpoint. + + + TaskAddition + Implementer supports the "Task Addition" Endpoint. + + + TaskCancellation + Implementer supports the "Task Cancellation" Endpoint. + + + ChangeOfDelivery + Implementer supports the "Change of Delivery" Endpoint. + + + + + + ETSI + LPWorkflowEndpoint + + + NewPreservation + Implementer supports the "New Preservation" Endpoint. + + + PreservationExtension + Implementer supports the "Preservation Extension" Endpoint. + + + PreservationCancellation + Implementer supports the "Preservation Cancellation" Endpoint. + + + ETSI diff --git a/103120/examples/xml/request_config.xml b/103120/examples/xml/request_config.xml new file mode 100644 index 0000000..69a98e1 --- /dev/null +++ b/103120/examples/xml/request_config.xml @@ -0,0 +1,30 @@ + + +
+ + XX + ACTOR01 + + + XX + ACTOR02 + + eb6b002d-15c3-4c3b-af6c-27ede73641e5 + 2024-06-10T08:50:31.000000Z + + V1.16.1 + XX + v1.0 + +
+ + + + + 0 + + + + + +
\ No newline at end of file diff --git a/103120/examples/xml/response_config.xml b/103120/examples/xml/response_config.xml new file mode 100644 index 0000000..bf99aa5 --- /dev/null +++ b/103120/examples/xml/response_config.xml @@ -0,0 +1,106 @@ + + +
+ + XX + ACTOR01 + + + XX + ACTOR02 + + eb6b002d-15c3-4c3b-af6c-27ede73641e5 + 2024-06-10T08:50:31.000000Z + + V1.16.1 + XX + v1.0 + +
+ + + + + 0 + + 2024-05-10T08:52:32Z + + + ACTOR2 + LIServiceTypes + + + ServiceA + This is a dictionary entry + + + ServiceB + This is a dictionary entry + + + + + + ACTOR02 + + + ProprietaryIdentifier + This is an illustration of a proprietary identifier type specific to this CSP, which consists of the string "CSP" followed by 10 digits + ^CSP[0-9]{10}$ + + + + + + InternationalE164 + ETSI + This configuration entry tells the LEA that they can use the ETSI standard format E164 number for LI of service A + + + ACTOR02 + LIServiceTypes + ServiceA + + + + + + + PropietaryIdentifier + ACTOR02 + This configuration entry tells the LEA that they can use the propietary identifier format type described in the TargetFormatTypeDefinitions for LI of both Service A and Service B + + + ACTOR02 + LIServiceTypes + ServiceA + + + ACTOR02 + LIServiceTypes + ServiceB + + + + + + + + + + ETSI + LIWorkflowEndpoint + NewAuthorisation + + This tells the LEA what endpoint to use for new warrants. For brevity, in this example, this is the only endpoint specified. + https://ts103120.example.com/li/authorisation/new + + + + + + + + + +
\ No newline at end of file diff --git a/103120/schema/xsd/ts_103120_Common.xsd b/103120/schema/xsd/ts_103120_Common.xsd index 4bc2338..cea9e81 100644 --- a/103120/schema/xsd/ts_103120_Common.xsd +++ b/103120/schema/xsd/ts_103120_Common.xsd @@ -6,6 +6,11 @@ + + + + + diff --git a/103120/schema/xsd/ts_103120_Config.xsd b/103120/schema/xsd/ts_103120_Config.xsd new file mode 100644 index 0000000..4e752e9 --- /dev/null +++ b/103120/schema/xsd/ts_103120_Config.xsd @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/103120/schema/xsd/ts_103120_Core.xsd b/103120/schema/xsd/ts_103120_Core.xsd index e0b772c..76cfe1d 100644 --- a/103120/schema/xsd/ts_103120_Core.xsd +++ b/103120/schema/xsd/ts_103120_Core.xsd @@ -1,6 +1,8 @@ - + + + @@ -71,6 +73,7 @@ + @@ -84,6 +87,7 @@ +
@@ -158,6 +162,17 @@ + + + + + + + + + + + diff --git a/testing/xsd_compile_targets.json b/testing/xsd_compile_targets.json index bb4f13e..8aa1774 100644 --- a/testing/xsd_compile_targets.json +++ b/testing/xsd_compile_targets.json @@ -19,7 +19,9 @@ "103280/TS_103_280.xsd", "103221-1/examples/ExampleGenericObjects.xsd", "103120/schema/xsd/ts_103120_Common.xsd", + "103120/schema/xsd/ts_103120_Config.xsd", "103120/schema/xsd/ts_103120_Core.xsd", + "103120/dictionaries/ts_103120_Dictionaries.xsd", "103120/schema/xsd/ts_103120_TrafficPolicy.xsd", "testing/deps/xmldsig/xmldsig-core-schema.xsd" ], @@ -39,7 +41,9 @@ "supportingSchemas" : [ "103120/schema/xsd/ts_103120_Authorisation.xsd", "103120/schema/xsd/ts_103120_Common.xsd", + "103120/schema/xsd/ts_103120_Config.xsd", "103120/schema/xsd/ts_103120_Delivery.xsd", + "103120/dictionaries/ts_103120_Dictionaries.xsd", "103120/schema/xsd/ts_103120_Document.xsd", "103120/schema/xsd/ts_103120_Notification.xsd", "103120/schema/xsd/ts_103120_Task.xsd", @@ -58,6 +62,8 @@ "103280/TS_103_280.xsd", "103120/schema/xsd/ts_103120_Common.xsd", "103120/schema/xsd/ts_103120_Core.xsd", + "103120/schema/xsd/ts_103120_Config.xsd", + "103120/dictionaries/ts_103120_Dictionaries.xsd", "103120/schema/xsd/ts_103120_Task.xsd", "testing/deps/xmldsig/xmldsig-core-schema.xsd", "103707/examples/FooServiceSchema.xsd" -- GitLab From 48ba3ec32f0d5c4390444105ef9e1e667253e0ec Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 25 Jun 2024 14:08:13 +0100 Subject: [PATCH 23/30] Correcting error from earlier merge conflict fix --- 103280/TS_103_280.xsd | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/103280/TS_103_280.xsd b/103280/TS_103_280.xsd index 8334169..c2a4f43 100644 --- a/103280/TS_103_280.xsd +++ b/103280/TS_103_280.xsd @@ -286,17 +286,15 @@ -<<<<<<< HEAD -======= + ->>>>>>> cr/103280/030 -- GitLab From 9f981102dcb6794b3a1c792a37d958930d14b671 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 25 Jun 2024 14:29:20 +0100 Subject: [PATCH 24/30] Updating JSON specifications --- .../schema/json/ts_103120_Common.schema.json | 12 +++++ 103120/schema/json/ts_103120_Core.schema.json | 44 +++++++++++++++++++ 103120/schema/json/ts_103120_Task.schema.json | 6 +++ 103280/TS_103_280.schema.json | 2 +- 4 files changed, 63 insertions(+), 1 deletion(-) diff --git a/103120/schema/json/ts_103120_Common.schema.json b/103120/schema/json/ts_103120_Common.schema.json index c13f91b..d5c94ea 100644 --- a/103120/schema/json/ts_103120_Common.schema.json +++ b/103120/schema/json/ts_103120_Common.schema.json @@ -13,6 +13,18 @@ } ] }, + "DictionaryEntries": { + "type": "object", + "properties": { + "common:DictionaryEntry": { + "type": "array", + "items": { + "$ref": "#/$defs/DictionaryEntry" + } + } + }, + "required": [] + }, "DictionaryEntry": { "type": "object", "properties": { diff --git a/103120/schema/json/ts_103120_Core.schema.json b/103120/schema/json/ts_103120_Core.schema.json index 71e583d..11ca5f5 100644 --- a/103120/schema/json/ts_103120_Core.schema.json +++ b/103120/schema/json/ts_103120_Core.schema.json @@ -254,6 +254,17 @@ "required": [ "DELIVER" ] + }, + { + "type": "object", + "properties": { + "GETCSPCONFIG": { + "$ref": "#/$defs/GETCSPCONFIGRequest" + } + }, + "required": [ + "GETCSPCONFIG" + ] } ] } @@ -340,6 +351,17 @@ "required": [ "DELIVERResponse" ] + }, + { + "type": "object", + "properties": { + "GETCSPCONFIGResponse": { + "$ref": "#/$defs/GETCSPCONFIGResponse" + } + }, + "required": [ + "GETCSPCONFIGResponse" + ] } ] } @@ -515,6 +537,28 @@ "Identifier" ] }, + "GETCSPCONFIGRequest": { + "type": "object", + "properties": {}, + "required": [] + }, + "GETCSPCONFIGResponse": { + "type": "object", + "properties": { + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "Dictionaries": {}, + "TargetFormatTypeDefinitions": {}, + "TargetingConfigurations": {}, + "SupportedLIWorkflowEndpoints": {}, + "SupportedLPWorkflowEndpoints": {} + }, + "required": [ + "LastChanged", + "TargetingConfigurations" + ] + }, "HI1Object": { "type": "object", "properties": { diff --git a/103120/schema/json/ts_103120_Task.schema.json b/103120/schema/json/ts_103120_Task.schema.json index 7df2c44..fc2ad0c 100644 --- a/103120/schema/json/ts_103120_Task.schema.json +++ b/103120/schema/json/ts_103120_Task.schema.json @@ -116,6 +116,9 @@ }, "task:ServiceType": { "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:TargetIdentifierSubtype": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" } }, "required": [] @@ -475,6 +478,9 @@ }, "task:Subtype": { "$ref": "#/$defs/RequestSubtype" + }, + "task:TargetIdentifierSubtype": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" } }, "required": [] diff --git a/103280/TS_103_280.schema.json b/103280/TS_103_280.schema.json index caf41ec..aa63f81 100644 --- a/103280/TS_103_280.schema.json +++ b/103280/TS_103_280.schema.json @@ -409,4 +409,4 @@ ] } } -} \ No newline at end of file +} -- GitLab From 55efc8800662224efd9166b797d7c295a57d2345 Mon Sep 17 00:00:00 2001 From: canterburym Date: Tue, 25 Jun 2024 14:02:56 +0000 Subject: [PATCH 25/30] Fixing JSON translation tool --- .../request4-TargetIdentifierSubtype.json | 103 ++++++++++++++ 103120/examples/json/request_config.json | 36 +++++ 103120/examples/json/response_config.json | 126 ++++++++++++++++++ .../schema/json/ts_103120_Common.schema.json | 12 ++ 103120/schema/json/ts_103120_Core.schema.json | 44 ++++++ 103120/schema/json/ts_103120_Task.schema.json | 6 + 103280/TS_103_280.schema.json | 2 +- utils/xml_to_json.py | 24 +++- 8 files changed, 351 insertions(+), 2 deletions(-) create mode 100644 103120/examples/json/request4-TargetIdentifierSubtype.json create mode 100644 103120/examples/json/request_config.json create mode 100644 103120/examples/json/response_config.json diff --git a/103120/examples/json/request4-TargetIdentifierSubtype.json b/103120/examples/json/request4-TargetIdentifierSubtype.json new file mode 100644 index 0000000..4f2a309 --- /dev/null +++ b/103120/examples/json/request4-TargetIdentifierSubtype.json @@ -0,0 +1,103 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "c02358b2-76cf-4ba4-a8eb-f6436ccaea2e", + "Timestamp": "2019-09-30T13:37:00.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "RequestPayload": { + "ActionRequests": { + "ActionRequest": [ + { + "ActionIdentifier": 0, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject", + "ObjectIdentifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "auth:AuthorisationReference": "W000001", + "auth:AuthorisationTimespan": { + "auth:StartTime": "2019-09-30T12:00:00Z", + "auth:EndTime": "2019-12-01T12:00:00Z" + } + } + } + }, + { + "ActionIdentifier": 1, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Task}LDTaskObject", + "ObjectIdentifier": "2b36a78b-b628-416d-bd22-404e68a0cd36", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "AssociatedObjects": { + "AssociatedObject": [ + "7dbbc880-8750-4d3c-abe7-ea4a17646045" + ] + }, + "task:Reference": "XX-ACTOR01-1234", + "task:RequestDetails": { + "task:Type": { + "common:Owner": "ETSI", + "common:Name": "RequestType", + "common:Value": "SubscriberData" + }, + "task:StartTime": "2019-09-30T12:00:00Z", + "task:EndTime": "2019-12-30T12:00:00Z", + "task:RequestValues": { + "task:RequestValue": [ + { + "task:FormatType": { + "task:FormatOwner": "ETSI", + "task:FormatName": "ServiceAccessIdentifier" + }, + "task:Value": "123456789" + } + ] + }, + "task:TargetIdentifierSubtype": { + "common:Owner": "ACTOR02", + "common:Name": "TargetIdentifierSubtype", + "common:Value": "AccountTypeB" + } + }, + "task:DeliveryDetails": { + "task:LDDeliveryDestination": [ + { + "task:DeliveryAddress": { + "task:IPv4Address": "192.0.2.0" + } + } + ] + }, + "task:CSPID": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + } + } + } + } + ] + } + } + } +} diff --git a/103120/examples/json/request_config.json b/103120/examples/json/request_config.json new file mode 100644 index 0000000..e8e7330 --- /dev/null +++ b/103120/examples/json/request_config.json @@ -0,0 +1,36 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "eb6b002d-15c3-4c3b-af6c-27ede73641e5", + "Timestamp": "2024-06-10T08:50:31.000000Z", + "Version": { + "ETSIVersion": "V1.16.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "RequestPayload": { + "ActionRequests": { + "ActionRequest": [ + { + "ActionIdentifier": 0, + "GETCSPCONFIG": {} + } + ] + } + } + } +} diff --git a/103120/examples/json/response_config.json b/103120/examples/json/response_config.json new file mode 100644 index 0000000..d0f4a1f --- /dev/null +++ b/103120/examples/json/response_config.json @@ -0,0 +1,126 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:config": "http://uri.etsi.org/03120/common/2024/06/Config", + "@xmlns:dictionaries": "http://uri.etsi.org/03280/common/2019/10/Dictionaries", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "eb6b002d-15c3-4c3b-af6c-27ede73641e5", + "Timestamp": "2024-06-10T08:50:31.000000Z", + "Version": { + "ETSIVersion": "V1.16.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "ResponsePayload": { + "ActionResponses": { + "ActionResponse": [ + { + "ActionIdentifier": 0, + "GETCSPCONFIGResponse": { + "LastChanged": "2024-05-10T08:52:32Z", + "Dictionaries": { + "dictionaries:Dictionary": [ + { + "dictionaries:Owner": "ACTOR2", + "dictionaries:Name": "LIServiceTypes", + "dictionaries:DictionaryEntries": { + "dictionaries:DictionaryEntry": [ + { + "dictionaries:Value": "ServiceA", + "dictionaries:Meaning": "This is a dictionary entry" + }, + { + "dictionaries:Value": "ServiceB", + "dictionaries:Meaning": "This is a dictionary entry" + } + ] + } + } + ] + }, + "TargetFormatTypeDefinitions": { + "config:FormatOwner": "ACTOR02", + "config:TargetFormatTypeDefinitionEntries": { + "config:TargetFormatTypeDefinitionEntry": [ + { + "config:FormatName": "ProprietaryIdentifier", + "config:Description": "This is an illustration of a proprietary identifier type specific to this CSP, which consists of the string \"CSP\" followed by 10 digits", + "config:FormatRegex": "^CSP[0-9]{10}$" + } + ] + } + }, + "TargetingConfigurations": { + "config:TargetingConfiguration": [ + { + "config:FormatName": "InternationalE164", + "config:FormatOwner": "ETSI", + "config:Guidance": "This configuration entry tells the LEA that they can use the ETSI standard format E164 number for LI of service A", + "config:AssociatedLIServiceTypes": { + "common:DictionaryEntry": [ + { + "common:Owner": "ACTOR02", + "common:Name": "LIServiceTypes", + "common:Value": "ServiceA" + } + ] + }, + "config:AssociatedLDRequestSubtypes": {}, + "config:AssociatedLPRequestSubtypes": {} + }, + { + "config:FormatName": "PropietaryIdentifier", + "config:FormatOwner": "ACTOR02", + "config:Guidance": "This configuration entry tells the LEA that they can use the propietary identifier format type described in the TargetFormatTypeDefinitions for LI of both Service A and Service B", + "config:AssociatedLIServiceTypes": { + "common:DictionaryEntry": [ + { + "common:Owner": "ACTOR02", + "common:Name": "LIServiceTypes", + "common:Value": "ServiceA" + }, + { + "common:Owner": "ACTOR02", + "common:Name": "LIServiceTypes", + "common:Value": "ServiceB" + } + ] + }, + "config:AssociatedLDRequestSubtypes": {}, + "config:AssociatedLPRequestSubtypes": {} + } + ] + }, + "SupportedLIWorkflowEndpoints": { + "config:SupportedLIWorkflowEndpoint": [ + { + "config:LIWorkflowEndpoint": { + "common:Owner": "ETSI", + "common:Name": "LIWorkflowEndpoint", + "common:Value": "NewAuthorisation" + }, + "config:Guidance": "This tells the LEA what endpoint to use for new warrants. For brevity, in this example, this is the only endpoint specified.", + "config:URL": "https://ts103120.example.com/li/authorisation/new" + } + ] + }, + "SupportedLPWorkflowEndpoints": {} + } + } + ] + } + } + } +} diff --git a/103120/schema/json/ts_103120_Common.schema.json b/103120/schema/json/ts_103120_Common.schema.json index c13f91b..d5c94ea 100644 --- a/103120/schema/json/ts_103120_Common.schema.json +++ b/103120/schema/json/ts_103120_Common.schema.json @@ -13,6 +13,18 @@ } ] }, + "DictionaryEntries": { + "type": "object", + "properties": { + "common:DictionaryEntry": { + "type": "array", + "items": { + "$ref": "#/$defs/DictionaryEntry" + } + } + }, + "required": [] + }, "DictionaryEntry": { "type": "object", "properties": { diff --git a/103120/schema/json/ts_103120_Core.schema.json b/103120/schema/json/ts_103120_Core.schema.json index 71e583d..11ca5f5 100644 --- a/103120/schema/json/ts_103120_Core.schema.json +++ b/103120/schema/json/ts_103120_Core.schema.json @@ -254,6 +254,17 @@ "required": [ "DELIVER" ] + }, + { + "type": "object", + "properties": { + "GETCSPCONFIG": { + "$ref": "#/$defs/GETCSPCONFIGRequest" + } + }, + "required": [ + "GETCSPCONFIG" + ] } ] } @@ -340,6 +351,17 @@ "required": [ "DELIVERResponse" ] + }, + { + "type": "object", + "properties": { + "GETCSPCONFIGResponse": { + "$ref": "#/$defs/GETCSPCONFIGResponse" + } + }, + "required": [ + "GETCSPCONFIGResponse" + ] } ] } @@ -515,6 +537,28 @@ "Identifier" ] }, + "GETCSPCONFIGRequest": { + "type": "object", + "properties": {}, + "required": [] + }, + "GETCSPCONFIGResponse": { + "type": "object", + "properties": { + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "Dictionaries": {}, + "TargetFormatTypeDefinitions": {}, + "TargetingConfigurations": {}, + "SupportedLIWorkflowEndpoints": {}, + "SupportedLPWorkflowEndpoints": {} + }, + "required": [ + "LastChanged", + "TargetingConfigurations" + ] + }, "HI1Object": { "type": "object", "properties": { diff --git a/103120/schema/json/ts_103120_Task.schema.json b/103120/schema/json/ts_103120_Task.schema.json index 7df2c44..fc2ad0c 100644 --- a/103120/schema/json/ts_103120_Task.schema.json +++ b/103120/schema/json/ts_103120_Task.schema.json @@ -116,6 +116,9 @@ }, "task:ServiceType": { "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:TargetIdentifierSubtype": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" } }, "required": [] @@ -475,6 +478,9 @@ }, "task:Subtype": { "$ref": "#/$defs/RequestSubtype" + }, + "task:TargetIdentifierSubtype": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" } }, "required": [] diff --git a/103280/TS_103_280.schema.json b/103280/TS_103_280.schema.json index caf41ec..aa63f81 100644 --- a/103280/TS_103_280.schema.json +++ b/103280/TS_103_280.schema.json @@ -409,4 +409,4 @@ ] } } -} \ No newline at end of file +} diff --git a/utils/xml_to_json.py b/utils/xml_to_json.py index a89777f..86f8ad7 100644 --- a/utils/xml_to_json.py +++ b/utils/xml_to_json.py @@ -66,7 +66,12 @@ coerce_to_list = [ 'task:LDTaskFlag', 'task:TrafficPolicyReference', 'tp:TrafficRuleReference', - 'tp:Criteria' + 'tp:Criteria', + 'common:DictionaryEntry', + 'dictionaries:Dictionary', + 'config:TargetFormatTypeDefinitionEntry', + 'config:SupportedLIWorkflowEndpoint', + 'config:SupportedLPWorkflowEndpoint', ] coerce_to_int = [ @@ -81,6 +86,18 @@ coerce_to_bool = [ 'delivery:LastSequence' ] +coerce_to_empty = [ + 'GETCSPCONFIG' +] + +coerce_null_to_empty = [ + 'SupportedLIWorkflowEndpoints', + 'SupportedLPWorkflowEndpoints', + 'config:AssociatedLDRequestSubtypes', + 'config:AssociatedLPRequestSubtypes', + 'config:AssociatedLIRequestSubtypes', +] + def postprocessor (path, key, value): if key == "@xsi:type": object_name = value.split(":")[-1] @@ -91,6 +108,11 @@ def postprocessor (path, key, value): return key, int(value) if key in coerce_to_bool: return key, bool(value) + if key in coerce_to_empty: + return key, {} + if key in coerce_null_to_empty: + if value is None: + return key, {} return key, value if __name__ == "__main__": -- GitLab From 0d26bdf54c6832bd20ee0900c43d79b881814b7a Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 25 Jun 2024 15:41:25 +0100 Subject: [PATCH 26/30] Updating OIDs, namespaces, regnerating JSON --- 102232-1/LI-PS-PDU.asn | 4 ++-- 102232-3/IPAccessPDU.asn | 6 +++--- 102657/RDMessage.asn | 4 ++-- 102657/RDMessage.xsd | 4 ++-- 103221-1/TS_103_221_01.xsd | 2 +- 103280/TS_103_280.xsd | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/102232-1/LI-PS-PDU.asn b/102232-1/LI-PS-PDU.asn index 2f8432f..10da9cf 100644 --- a/102232-1/LI-PS-PDU.asn +++ b/102232-1/LI-PS-PDU.asn @@ -1,5 +1,5 @@ LI-PS-PDU -{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version37(37)} +{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version38(38)} DEFINITIONS IMPLICIT TAGS ::= @@ -206,7 +206,7 @@ IMPORTS lawfulInterceptDomainId OBJECT IDENTIFIER ::= {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2)} -li-psDomainId OBJECT IDENTIFIER ::= {lawfulInterceptDomainId li-ps(5) genHeader(1) version37(37)} +li-psDomainId OBJECT IDENTIFIER ::= {lawfulInterceptDomainId li-ps(5) genHeader(1) version38(38)} -- ==================== -- Top-level definition diff --git a/102232-3/IPAccessPDU.asn b/102232-3/IPAccessPDU.asn index 88bee7e..b376b34 100644 --- a/102232-3/IPAccessPDU.asn +++ b/102232-3/IPAccessPDU.asn @@ -1,5 +1,5 @@ IPAccessPDU -{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version17(17)} +{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version18(18)} DEFINITIONS IMPLICIT TAGS ::= BEGIN @@ -9,14 +9,14 @@ IMPORTS IPAddress, Location FROM LI-PS-PDU - {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version37(37)}; + {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version38(38)}; -- ============================ -- Object Identifier Definition -- ============================ -iPAccessPDUObjId RELATIVE-OID ::= {li-ps(5) iPAccess(3) version17(17)} +iPAccessPDUObjId RELATIVE-OID ::= {li-ps(5) iPAccess(3) version18(18)} iPIRIObjId RELATIVE-OID ::= {iPAccessPDUObjId iRI(1)} iPCCObjId RELATIVE-OID ::= {iPAccessPDUObjId cC(2)} iPIRIOnlyObjId RELATIVE-OID ::= {iPAccessPDUObjId iRIOnly(3)} diff --git a/102657/RDMessage.asn b/102657/RDMessage.asn index e0b99ea..df26aaf 100644 --- a/102657/RDMessage.asn +++ b/102657/RDMessage.asn @@ -1,4 +1,4 @@ -RDMessage {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) retainedData(3) rdHeader(0) version30(30)} +RDMessage {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) retainedData(3) rdHeader(0) version31(31)} DEFINITIONS IMPLICIT TAGS ::= @@ -12,7 +12,7 @@ BEGIN retainedDataDomainId OBJECT IDENTIFIER ::= {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) retainedData(3)} -- rdHeader -rdHeaderId OBJECT IDENTIFIER ::= {retainedDataDomainId rdHeader(0) version30(30)} +rdHeaderId OBJECT IDENTIFIER ::= {retainedDataDomainId rdHeader(0) version31(31)} -- ====================================== -- Top level definitions for RDHI wrapper diff --git a/102657/RDMessage.xsd b/102657/RDMessage.xsd index deaa16c..d9bab77 100644 --- a/102657/RDMessage.xsd +++ b/102657/RDMessage.xsd @@ -1,8 +1,8 @@ - + - XSD translated from ASN.1 derived from outcome of TS 102 657 v2.3.1 + XSD translated from ASN.1 derived from outcome of TS 102 657 v2.4.1 diff --git a/103221-1/TS_103_221_01.xsd b/103221-1/TS_103_221_01.xsd index cfcc690..a484ba7 100644 --- a/103221-1/TS_103_221_01.xsd +++ b/103221-1/TS_103_221_01.xsd @@ -1,5 +1,5 @@ - + diff --git a/103280/TS_103_280.xsd b/103280/TS_103_280.xsd index c2a4f43..ef73723 100644 --- a/103280/TS_103_280.xsd +++ b/103280/TS_103_280.xsd @@ -1,5 +1,5 @@ - + -- GitLab From 5892bc9b304b846673b4a7a5c803487fda3b0ca4 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 25 Jun 2024 15:48:12 +0100 Subject: [PATCH 27/30] Fixing 657 OID --- 102657/RDMessage.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/102657/RDMessage.xsd b/102657/RDMessage.xsd index d9bab77..a52976f 100644 --- a/102657/RDMessage.xsd +++ b/102657/RDMessage.xsd @@ -1,5 +1,5 @@ - + XSD translated from ASN.1 derived from outcome of TS 102 657 v2.4.1 -- GitLab From 5f46404487a3c4a530d6752a98f3aa16a941f0b0 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 25 Jun 2024 16:55:53 +0100 Subject: [PATCH 28/30] Updating -5 OID --- 102232-5/IPMultimediaPDU.asn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/102232-5/IPMultimediaPDU.asn b/102232-5/IPMultimediaPDU.asn index 1915031..29b416c 100644 --- a/102232-5/IPMultimediaPDU.asn +++ b/102232-5/IPMultimediaPDU.asn @@ -1,5 +1,5 @@ IPMultimediaPDU -{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPMultimedia(5) version16(16)} +{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPMultimedia(5) version17(17)} DEFINITIONS IMPLICIT TAGS ::= BEGIN @@ -9,7 +9,7 @@ IMPORTS IPAddress, Location FROM LI-PS-PDU - {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version35(35)}; + {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version37(37)}; @@ -17,7 +17,7 @@ IMPORTS -- Object Identifier Definition -- ============================ -iPMultimediaPDUObjId RELATIVE-OID ::= {li-ps(5) iPMultimedia(5) version16(16)} +iPMultimediaPDUObjId RELATIVE-OID ::= {li-ps(5) iPMultimedia(5) version17(17)} iPMMIRIObjId RELATIVE-OID ::= {iPMultimediaPDUObjId iRI(1)} iPMMCCObjId RELATIVE-OID ::= {iPMultimediaPDUObjId cC(2)} -- GitLab From 78869041b182935a46259875fa5752af22d786ca Mon Sep 17 00:00:00 2001 From: Mark L Date: Tue, 25 Jun 2024 15:57:01 +0000 Subject: [PATCH 29/30] Fixing reference to new comment in -5 ASN.1 --- 102232-5/IPMultimediaPDU.asn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/102232-5/IPMultimediaPDU.asn b/102232-5/IPMultimediaPDU.asn index 29b416c..402e0c4 100644 --- a/102232-5/IPMultimediaPDU.asn +++ b/102232-5/IPMultimediaPDU.asn @@ -126,7 +126,7 @@ IPIRIContents ::= CHOICE -- (see clause 5.2.6 and 5.2.7). iRIOnlyRTPPacket [7] OCTET STRING -- Copy of the RTP packet containing telephony events including the original IP and UDP headers - -- (see clause 5.2.X). + -- (see clause 5.2.8.1). } SIPMessage ::= SEQUENCE -- GitLab From 20620eda3350152e1fc2063a0fb21ccd1b36c764 Mon Sep 17 00:00:00 2001 From: canterburym Date: Tue, 13 Aug 2024 15:41:07 +0000 Subject: [PATCH 30/30] Initial publication of TS 103 705 --- 103705/config.json | 58 +++ .../examples/example1/csp_records.schema.json | 25 ++ 103705/examples/example1/csp_results.json | 47 ++ 103705/examples/example1/description.txt | 6 + .../examples/example2/csp_records.schema.json | 25 ++ 103705/examples/example2/csp_results.json | 47 ++ .../examples/example2/csp_types.schema.json | 14 + 103705/examples/example2/description.txt | 8 + .../examples/example3/csp_records.schema.json | 25 ++ 103705/examples/example3/csp_results.json | 38 ++ .../examples/example3/csp_types.schema.json | 38 ++ 103705/examples/example3/description.txt | 8 + .../examples/example4/csp_records.schema.json | 24 + 103705/examples/example4/csp_results.json | 31 ++ .../examples/example4/csp_types.schema.json | 46 ++ 103705/examples/example4/description.txt | 12 + .../examples/example5/csp_records.schema.json | 25 ++ 103705/examples/example5/csp_results.json | 1 + 103705/examples/example5/description.txt | 6 + 103705/schema/etsi_types.schema.json | 411 ++++++++++++++++++ 103705/schema/records.schema.json | 23 + 103705/schema/response.schema.json | 129 ++++++ 103705/validate.py | 95 ++++ 103705/validation/validate_705.py | 97 +++++ 24 files changed, 1239 insertions(+) create mode 100644 103705/config.json create mode 100644 103705/examples/example1/csp_records.schema.json create mode 100644 103705/examples/example1/csp_results.json create mode 100644 103705/examples/example1/description.txt create mode 100644 103705/examples/example2/csp_records.schema.json create mode 100644 103705/examples/example2/csp_results.json create mode 100644 103705/examples/example2/csp_types.schema.json create mode 100644 103705/examples/example2/description.txt create mode 100644 103705/examples/example3/csp_records.schema.json create mode 100644 103705/examples/example3/csp_results.json create mode 100644 103705/examples/example3/csp_types.schema.json create mode 100644 103705/examples/example3/description.txt create mode 100644 103705/examples/example4/csp_records.schema.json create mode 100644 103705/examples/example4/csp_results.json create mode 100644 103705/examples/example4/csp_types.schema.json create mode 100644 103705/examples/example4/description.txt create mode 100644 103705/examples/example5/csp_records.schema.json create mode 100644 103705/examples/example5/csp_results.json create mode 100644 103705/examples/example5/description.txt create mode 100644 103705/schema/etsi_types.schema.json create mode 100644 103705/schema/records.schema.json create mode 100644 103705/schema/response.schema.json create mode 100644 103705/validate.py create mode 100644 103705/validation/validate_705.py diff --git a/103705/config.json b/103705/config.json new file mode 100644 index 0000000..6d4bac9 --- /dev/null +++ b/103705/config.json @@ -0,0 +1,58 @@ +[{ + "coreSchema" : "schema/response.schema.json", + "supportingSchemas" : [ + "../103280/TS_103_280.schema.json", + "examples/example1/csp_records.schema.json", + "schema/etsi_types.schema.json" + ], + "exampleFiles" : [ + "examples/example1/csp_results.json" + ] +}, +{ + "coreSchema" : "schema/response.schema.json", + "supportingSchemas" : [ + "../103280/TS_103_280.schema.json", + "examples/example2/csp_records.schema.json", + "examples/example2/csp_types.schema.json", + "schema/etsi_types.schema.json" + ], + "exampleFiles" : [ + "examples/example2/csp_results.json" + ] +}, +{ + "coreSchema" : "schema/response.schema.json", + "supportingSchemas" : [ + "../103280/TS_103_280.schema.json", + "examples/example3/csp_records.schema.json", + "examples/example3/csp_types.schema.json", + "schema/etsi_types.schema.json" + ], + "exampleFiles" : [ + "examples/example3/csp_results.json" + ] +}, +{ + "coreSchema" : "schema/response.schema.json", + "supportingSchemas" : [ + "../103280/TS_103_280.schema.json", + "examples/example4/csp_records.schema.json", + "examples/example4/csp_types.schema.json", + "schema/etsi_types.schema.json" + ], + "exampleFiles" : [ + "examples/example4/csp_results.json" + ] +}, +{ + "coreSchema" : "schema/response.schema.json", + "supportingSchemas" : [ + "../103280/TS_103_280.schema.json", + "examples/example5/csp_records.schema.json", + "schema/etsi_types.schema.json" + ], + "exampleFiles" : [ + "examples/example5/csp_results.json" + ] +}] \ No newline at end of file diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json new file mode 100644 index 0000000..344b4e3 --- /dev/null +++ b/103705/examples/example1/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "urn:etsi:li:103705:record-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CSP Record Schema", + "description": "Defines the valid set of Records that may appear in a RecordSet (see ETSI TS 103 705 clause 6.2.4)", + "cspSchemaID" : "csp.example_1", + "cspName" : "csp.example.com", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord"}}} + ]}, + { + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord"}}} + ]} + ] + } + } +} \ No newline at end of file diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json new file mode 100644 index 0000000..52dbe6f --- /dev/null +++ b/103705/examples/example1/csp_results.json @@ -0,0 +1,47 @@ +{ + "recordSetDescription": { + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", + "etsiSpecificationVersion": "0.3.0", + "cspName" : "csp.example.com", + "cspSchemaId" : "csp.example_1", + "cspSchemaVersion" : "1.0.0", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "requestReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"phoneNumber": "491713920067"}, + "role": "originating", + "initialAccessTechnology" : "5G" + }, + { + "identity": {"phoneNumber": "441632960123"}, + "role": "terminating" + } + ] + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord", + "eventTime": "2024-04-18T10:04:00.000000Z", + "parties": [ + { + "identity": {"phoneNumber": "441632960123"}, + "role": "sender" + }, + { + "identity": {"phoneNumber": "491713920067"}, + "role": "receiver" + } + ] + } + ] +} \ No newline at end of file diff --git a/103705/examples/example1/description.txt b/103705/examples/example1/description.txt new file mode 100644 index 0000000..1e567ac --- /dev/null +++ b/103705/examples/example1/description.txt @@ -0,0 +1,6 @@ +CSP elects to use only ETSI-standard types in their responses + +CSP imports the following types in their CSP record schema + +- InformationCall +- InformationMessaging diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json new file mode 100644 index 0000000..e5082c7 --- /dev/null +++ b/103705/examples/example2/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "urn:etsi:li:103705:record-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CSP Record Schema", + "description": "Defines the valid set of Records that may appear in a RecordSet (see ETSI TS 103 705 clause 6.2.4)", + "cspSchemaID" : "csp.example_2", + "cspName" : "csp.example.com", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord"}}} + ]}, + { + "allOf" : [ + { "$ref" : "csp_example_types#/$defs/CSPMessagingRecord" }, + { "properties" : { "type" : { "const" : "csp_example_types#/$defs/CSPMessagingRecord"}}} + ]} + ] + } + } +} \ No newline at end of file diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json new file mode 100644 index 0000000..c4ff7c0 --- /dev/null +++ b/103705/examples/example2/csp_results.json @@ -0,0 +1,47 @@ +{ + "recordSetDescription": { + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", + "etsiSpecificationVersion": "0.3.0", + "cspName" : "csp.example.com", + "cspSchemaId" : "csp.example_2", + "cspSchemaVersion" : "1.0.0", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "requestReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"phoneNumber": "491713920067"}, + "role": "originating" + }, + { + "identity": {"phoneNumber": "441632960123"}, + "role": "terminating" + } + ] + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "csp_example_types#/$defs/CSPMessagingRecord", + "eventTime": "2024-04-18T10:04:00.000000Z", + "parties": [ + { + "identity": {"phoneNumber": "441632960123"}, + "role": "sender" + }, + { + "identity": {"phoneNumber": "491713920067"}, + "role": "receiver" + } + ], + "CSPMessagingReference" : "0608972c-9080-4bb1-bc30-35b7cb731bbf" + } + ] +} \ No newline at end of file diff --git a/103705/examples/example2/csp_types.schema.json b/103705/examples/example2/csp_types.schema.json new file mode 100644 index 0000000..4cf437d --- /dev/null +++ b/103705/examples/example2/csp_types.schema.json @@ -0,0 +1,14 @@ +{ + "$id": "csp_example_types", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ETSI TS 103 705 Types schema", + "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", + "$defs": { + "CSPMessagingRecord" : { + "allOf" : [{ "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord"}], + "properties" : { + "CSPMessagingReference" : { "$ref" : "ts_103280_2017_07#/$defs/UUID"} + } + } + } +} \ No newline at end of file diff --git a/103705/examples/example2/description.txt b/103705/examples/example2/description.txt new file mode 100644 index 0000000..1b22fdf --- /dev/null +++ b/103705/examples/example2/description.txt @@ -0,0 +1,8 @@ +CSP uses the standard ETSI InformationCall record. + +For messaging the CSP can use the ETSI standard messaging format, +but they can also always provide a unique CSP-specific UUID for every message event. +The CSP extends the ETSI standard Messaging record by adding a single field + +- InformationCall +- CSPInformationMessaging diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json new file mode 100644 index 0000000..fca8fa5 --- /dev/null +++ b/103705/examples/example3/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "urn:etsi:li:103705:record-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CSP Record Schema", + "description": "Defines the valid set of Records that may appear in a RecordSet (see ETSI TS 103 705 clause 6.2.4)", + "cspSchemaID" : "csp.example_3", + "cspName" : "csp.example.com", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord"}}} + ]}, + { + "allOf" : [ + { "$ref" : "csp_example_types#/$defs/CSPServiceRecord" }, + { "properties" : { "type" : { "const" : "csp_example_types#/$defs/CSPServiceRecord"}}} + ]} + ] + } + } +} \ No newline at end of file diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json new file mode 100644 index 0000000..8f2f9ed --- /dev/null +++ b/103705/examples/example3/csp_results.json @@ -0,0 +1,38 @@ +{ + "recordSetDescription": { + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", + "etsiSpecificationVersion": "0.3.0", + "cspName" : "csp.example.com", + "cspSchemaId" : "csp.example_3", + "cspSchemaVersion" : "1.0.0", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "requestReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"phoneNumber": "491713920067"}, + "role": "originating" + }, + { + "identity": {"phoneNumber": "441632960123"}, + "role": "terminating" + } + ] + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "csp_example_types#/$defs/CSPServiceRecord", + "timeOfService": "2024-04-18T10:04:00.000000Z", + "numberOfService" : 7, + "serviceEnum" : "Foo" + } + ] +} \ No newline at end of file diff --git a/103705/examples/example3/csp_types.schema.json b/103705/examples/example3/csp_types.schema.json new file mode 100644 index 0000000..fde0bf8 --- /dev/null +++ b/103705/examples/example3/csp_types.schema.json @@ -0,0 +1,38 @@ +{ + "$id": "csp_example_types", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ETSI TS 103 705 Types schema", + "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", + "$defs": { + "CSPServiceRecord" : { + "type" : "object", + "title" : "CSP Service Record", + "description" : "Information about some new fictional service that this CSP provides", + "properties" : { + "timeOfService" : { + "description" : "Time at which something happened (using an ETSI TS 103 280 type)", + "$ref" : "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime" + }, + "dataVolumeUsed" : { + "description" : "A data volume associated with this service record (using an ETSI TS 103 705 type) ", + "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/DataVolume" + }, + "numberOfService" : { + "description" : "Some number associated with this service record (using a native JSON type)", + "type" : "integer" + }, + "serviceEnum" : { + "description" : "A field using a type defined elsewhere in this schema", + "$ref" : "#/$defs/CSPDefinedEnum" + } + } + }, + "CSPDefinedEnum" : { + "enum" : [ + "Foo", + "Bar", + "Baz" + ] + } + } +} \ No newline at end of file diff --git a/103705/examples/example3/description.txt b/103705/examples/example3/description.txt new file mode 100644 index 0000000..a72d3ca --- /dev/null +++ b/103705/examples/example3/description.txt @@ -0,0 +1,8 @@ +CSP uses the standard ETSI InformationCall record. + +The CSP has some novel service which is not well described by any of the standard +ETSI records; the CSP defines a completely new record, but can still re-use components +from TS 103 705 and TS 103 280. + +- InformationCall +- CSPServiceRecord diff --git a/103705/examples/example4/csp_records.schema.json b/103705/examples/example4/csp_records.schema.json new file mode 100644 index 0000000..a178670 --- /dev/null +++ b/103705/examples/example4/csp_records.schema.json @@ -0,0 +1,24 @@ +{ + "$id": "urn:etsi:li:103705:record-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CSP Record Schema", + "description": "Defines the valid set of Records that may appear in a RecordSet (see ETSI TS 103 705 clause 6.2.4)", + "cspSchemaID" : "csp.example_4", + "cspName" : "csp.example.com", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "csp_example_types#/$defs/CSPSubscriberRecord" }, + { "properties" : { "type" : { "const" : "csp_example_types#/$defs/CSPSubscriberRecord"}}} + ]},{ + "allOf" : [ + { "$ref" : "csp_example_types#/$defs/CSPAddressRecord" }, + { "properties" : { "type" : { "const" : "csp_example_types#/$defs/CSPAddressRecord"}}} + ]} + ] + } + } +} \ No newline at end of file diff --git a/103705/examples/example4/csp_results.json b/103705/examples/example4/csp_results.json new file mode 100644 index 0000000..fd290b1 --- /dev/null +++ b/103705/examples/example4/csp_results.json @@ -0,0 +1,31 @@ +{ + "recordSetDescription": { + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", + "etsiSpecificationVersion": "0.3.0", + "cspName" : "csp.example.com", + "cspSchemaId" : "csp.example_4", + "cspSchemaVersion" : "1.0.0", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "requestReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "csp_example_types#/$defs/CSPSubscriberRecord", + "subscriberName" : "Max Mustermann", + "registeredAddress" : { "destination" : "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0" }, + "deliveryAddress" : { "destination" : "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0" }, + "billingAddress" : { "destination" : "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0" }, + "contactAddress" : { "destination" : "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0" } + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "csp_example_types#/$defs/CSPAddressRecord", + "line1" : "First Line Of Address", + "line2" : "Secoond Line Of Address", + "postalCode" : "postal code", + "country" : "country code" + } + ] +} \ No newline at end of file diff --git a/103705/examples/example4/csp_types.schema.json b/103705/examples/example4/csp_types.schema.json new file mode 100644 index 0000000..8fee961 --- /dev/null +++ b/103705/examples/example4/csp_types.schema.json @@ -0,0 +1,46 @@ +{ + "$id": "csp_example_types", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ETSI TS 103 705 Types schema", + "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", + "$defs": { + "CSPSubscriberRecord" : { + "type" : "object", + "title" : "CSP Subscriber Record", + "description" : "A CSP's subscriber record. May contain four different addresses, which are often set to the same value", + "properties" : { + "subscriberName" : { + "description" : "Name of subscriber (obviously a real definition would be more complex", + "type" : "string" + }, + "registeredAddress" : { + "description" : "Points to the address registered as part of the service", + "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/Pointer" + }, + "deliveryAddress" : { + "description" : "Points to the address used for delivery", + "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/Pointer" + }, + "billingAddress" : { + "description" : "Points to the address used for billing", + "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/Pointer" + }, + "contactAddress" : { + "description" : "Points to the address used for mailing purposes", + "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/Pointer" + } + } + }, + "CSPAddressRecord" : { + "type" : "object", + "title" : "CSP Address Record", + "description" : "A simple address structure (for example purporses - a standard ETSI one is needed, FFS)", + "properties" : { + "line1" : { "type" : "string"}, + "line2" : { "type" : "string"}, + "postalCode" : { "type" : "string"}, + "country" : { "type" : "string"} + } + } + } +} \ No newline at end of file diff --git a/103705/examples/example4/description.txt b/103705/examples/example4/description.txt new file mode 100644 index 0000000..ae4259c --- /dev/null +++ b/103705/examples/example4/description.txt @@ -0,0 +1,12 @@ +CSP wants to create a simple subsciber record structure +(side note - at the moment we don't have that in the standard schema, but it is likely to come later) +The subscriber can have a number of different addresses (e.g. contact, billing, delivery, installed) +but they are often all set to the same value. To reduce the amount of repetition, +the CSP uses the Pointer record + +- CSPSubscriberRecord +- CSPAddressRecord + + +Number for reply LS? from 40408 5GSAT_Ph3_Arch +477 \ No newline at end of file diff --git a/103705/examples/example5/csp_records.schema.json b/103705/examples/example5/csp_records.schema.json new file mode 100644 index 0000000..0e8ffaf --- /dev/null +++ b/103705/examples/example5/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "urn:etsi:li:103705:record-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CSP Record Schema", + "description": "Defines the valid set of Records that may appear in a RecordSet (see ETSI TS 103 705 clause 6.2.4)", + "cspSchemaID" : "csp.example_5", + "cspName" : "csp.example.com", + "dateIssued" : "2024-06-20 09:42:37", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord"}}} + ]}, + { + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord"}}} + ]} + ] + } + } +} \ No newline at end of file diff --git a/103705/examples/example5/csp_results.json b/103705/examples/example5/csp_results.json new file mode 100644 index 0000000..f8c81d9 --- /dev/null +++ b/103705/examples/example5/csp_results.json @@ -0,0 +1 @@ +{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", "etsiSpecificationVersion": "0.3.0", "cspName" : "csp.example.com", "cspSchemaId": "csp.example_1", "cspSchemaVersion": "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "requestReference": "LDID", "created": "2024-04-25T09:31:56.000000Z"}, "recordSet": [{"id": "3da91ade-f526-4e55-b5da-0c8178f25c24", "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, "parties": [{"identity": {"phoneNumber": "491713920067"}, "role": "originating"}, {"identity": {"phoneNumber": "441632960123"}, "role": "terminating"}]}, {"id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord", "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [{"identity": {"phoneNumber": "441632960123"}, "role": "sender"}, {"identity": {"phoneNumber": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", "signature": "yvPyjRDAS7dSld9inyVfLpz02En47_AMq0J8cP82BCU"}} diff --git a/103705/examples/example5/description.txt b/103705/examples/example5/description.txt new file mode 100644 index 0000000..9e8da6b --- /dev/null +++ b/103705/examples/example5/description.txt @@ -0,0 +1,6 @@ +CSP elects to use only ETSI-standard types in their responses, but includes a signature + +CSP imports the following types in their CSP record schema + +- InformationCall +- InformationMessaging diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json new file mode 100644 index 0000000..1854183 --- /dev/null +++ b/103705/schema/etsi_types.schema.json @@ -0,0 +1,411 @@ +{ + "$id": "urn:etsi:li:103705:type-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ETSI TS 103 705 Types schema", + "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", + "$defs": { + "Pointer": { + "type": "object", + "title": "Pointer", + "description": "Allows one Record in a RecordSet to point to data in another Record in the same Recordset. See clause 5.4 and Annex A.2.2", + "properties": { + "destination": { + "type": "string", + "title": "Pointer Destination", + "description": "Identifies the Record in the RecordSet containined the referred-to data (see clause 5.3.2 and A.2.2)" + }, + "relationship": { + "type": "string", + "title": "Relationship", + "description": "Indicates the nature of the relationship. Valid values and their meaning should be provided by the CSP" + } + }, + "required": [ + "destination" + ] + }, + "CallRecord": { + "type": "object", + "title": "Information about call details", + "description": "Details about a record or event related to a call", + "required": [ + "timeBegin", "parties" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the telephony call" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Time at which the call began" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Time at which the call ended" + }, + "callDuration": { + "type": "integer", + "description": "Chargeable duration of the call in seconds" + }, + "ringingDuration": { + "type": "integer", + "description": "Non-chargeable duration of the call in seconds" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/CallPartyInformation" + } + }, + "endReason": { + "type": "integer", + "description": "ITU Q.850" + } + } + }, + "MessagingRecord": { + "type": "object", + "title": "Information about messaging details", + "description": "Details about a record or event related to a message", + "required": [ + "eventTime", "parties" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "eventTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Time at which the event happened" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/MessagingPartyInformation" + } + } + } + }, + "EmailRecord": { + "type": "object", + "title": "Information about email details", + "description": "Details about a record or event related to an email", + "required": [ + "eventTime", "parties" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "eventTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Time at which the event happened" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/EmailPartyInformation" + } + } + } + }, + "DataAccessRecord": { + "type": "object", + "title": "Data Record", + "description": "Information about a data access session (e.g. a mobile data session)", + "required": [ + "timeBegin", "parties" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Time at which the data access session began" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Time at which the data access session ended" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/DataAccessPartyInformation" + } + }, + "volume": { + "$ref": "#/$defs/DataVolume" + } + } + }, + "CallPartyInformation": { + "type": "object", + "description" : "Information about the participants and technologies related to the call", + "properties": { + "identity": { + "$ref": "#/$defs/CallPartyId" + }, + "role": { + "enum": [ + "originating", + "terminating", + "forwarding", + "unknown" + ] + }, + "initialAccessTechnology": { + "$ref": "#/$defs/AccessTechnology", + "description": "Access technology used at the start of the call" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + } + } + }, + "MessagingPartyInformation": { + "type": "object", + "description": "Information about the participants and technologies related to the messages", + "properties": { + "identity": { + "$ref": "#/$defs/MessagingPartyId" + }, + "role": { + "enum": [ + "sender", + "receiver" + ] + }, + "accessTechnology": { + "$ref": "#/$defs/AccessTechnology", + "description": "Access technology used" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + } + } + }, + "EmailPartyInformation": { + "type": "object", + "description": "Information about the participants and technologies related to the messages", + "properties": { + "identity": { + "$ref": "#/$defs/EmailPartyId" + }, + "role": { + "enum": [ + "sender", + "receiver" + ] + }, + "accessTechnology": { + "$ref": "#/$defs/AccessTechnology", + "description": "Access technology used" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + } + } + }, + "DataAccessPartyInformation": { + "type": "object", + "description": "Information about the participants and technologies related to the data service", + "properties": { + "identity": { + "$ref": "#/$defs/DataAccessPartyId" + }, + "aPNDNN": { + "description" : "APN or DNN associated with the data access", + "$ref": "ts_103280_2017_07#/$defs/DNN" + }, + "initialAccessTechnology": { + "$ref": "#/$defs/AccessTechnology", + "description": "Access technology used at the start of the data access session" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + } + } + }, + "CallPartyId": { + "type": "object", + "description": "Identifier of the party related to the call", + "properties": { + "phoneNumber": { + "$ref": "ts_103280_2017_07#/$defs/InternationalE164" + }, + "iMSI": { + "$ref": "ts_103280_2017_07#/$defs/IMSI" + }, + "iMEI": { + "$ref": "ts_103280_2017_07#/$defs/IMEI" + }, + "sIPURI": { + "$ref": "ts_103280_2017_07#/$defs/SIPURI" + }, + "tELURI": { + "$ref": "ts_103280_2017_07#/$defs/TELURI" + }, + "unstructuredPhoneNumber": { + "type": "string" + } + } + }, + "MessagingPartyId": { + "type": "object", + "description": "Identifier of the party related to the message", + "properties": { + "phoneNumber": { + "$ref": "ts_103280_2017_07#/$defs/InternationalE164" + }, + "iMSI": { + "$ref": "ts_103280_2017_07#/$defs/IMSI" + }, + "iMEI": { + "$ref": "ts_103280_2017_07#/$defs/IMEI" + }, + "sIPURI": { + "$ref": "ts_103280_2017_07#/$defs/SIPURI" + }, + "tELURI": { + "$ref": "ts_103280_2017_07#/$defs/TELURI" + }, + "unstructuredPhoneNumber": { + "type": "string" + } + } + }, + "EmailPartyId": { + "type": "object", + "description": "Identifier of the party related to the message", + "properties": { + "emailAddress": { + "$ref": "ts_103280_2017_07#/$defs/EmailAddress" + }, + "iPv4Address": { + "$ref": "ts_103280_2017_07#/$defs/IPv4Address" + }, + "iPv6Address": { + "$ref": "ts_103280_2017_07#/$defs/IPv6Address" + } + } + }, + "DataAccessPartyId": { + "type": "object", + "description": "Identifier of the party related to the data service", + "properties": { + "phoneNumber": { + "$ref": "ts_103280_2017_07#/$defs/InternationalE164" + }, + "iMSI": { + "$ref": "ts_103280_2017_07#/$defs/IMSI" + }, + "iMEI": { + "$ref": "ts_103280_2017_07#/$defs/IMEI" + }, + "sUPIIMSI": { + "$ref": "ts_103280_2017_07#/$defs/SUPIIMSI" + }, + "sUPINAI": { + "$ref": "ts_103280_2017_07#/$defs/SUPINAI" + }, + "sUCI": { + "$ref": "ts_103280_2017_07#/$defs/SUCI" + }, + "pEIIMEI": { + "$ref": "ts_103280_2017_07#/$defs/PEIIMEI" + }, + "iPv4Address": { + "$ref": "ts_103280_2017_07#/$defs/IPv4Address" + }, + "iPv4CIDR": { + "$ref": "ts_103280_2017_07#/$defs/IPv4CIDR" + }, + "iPv6Address": { + "$ref": "ts_103280_2017_07#/$defs/IPv6Address" + }, + "iPv6CIDR": { + "$ref": "ts_103280_2017_07#/$defs/IPv6CIDR" + }, + "mACAddress": { + "$ref": "ts_103280_2017_07#/$defs/MACAddress" + }, + "unstructuredPhoneNumber": { + "type": "string" + } + } + }, + "DataVolume": { + "type": "object", + "description": "quantification of the bytes exchanged", + "properties": { + "bytesUpload": { + "type": "integer" + }, + "bytesDownload": { + "type": "integer" + }, + "bytesTotal": { + "type": "integer" + } + } + }, + "AccessTechnology": { + "description": "Access technology used", + "enum": [ + "2G", + "3G", + "4G", + "5G", + "fiber", + "cable", + "wifi", + "xDSL", + "pstn" + ] + }, + "Location": { + "type": "object", + "description": "Location information", + "properties": { + "cGI": { + "$ref": "ts_103280_2017_07#/$defs/CGI" + }, + "eCGI": { + "$ref": "ts_103280_2017_07#/$defs/ECGI" + }, + "nCGI": { + "$ref": "ts_103280_2017_07#/$defs/NCGI" + }, + "modemMAC": { + "$ref": "ts_103280_2017_07#/$defs/MACAddress" + }, + "coord": { + "$ref": "ts_103280_2017_07#/$defs/WGS84CoordinateDecimal" + }, + "coordPolygon": { + "type": "array", + "items": { + "$ref": "ts_103280_2017_07#/$defs/WGS84CoordinateDecimal" + } + } + } + } + } +} diff --git a/103705/schema/records.schema.json b/103705/schema/records.schema.json new file mode 100644 index 0000000..ab59701 --- /dev/null +++ b/103705/schema/records.schema.json @@ -0,0 +1,23 @@ +{ + "$id": "urn:etsi:li:103705:record-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CSP Record Schema", + "description": "Defines the valid set of Records that may appear in a RecordSet (see ETSI TS 103 705 clause 6.2.4)", + "cspName" : "{replace with assigned CSP name - see ETSI TS 103 705 Table 6.2.4-1", + "cspSchemaID" : "{replace with assigned ID - see ETSI TS 103 705 Table 6.2.4-1}", + "dateIssued" : "{replace with date issued - see ETSI TS 103 705 Table 6.2.4-1}", + "cspSchemaVersion" : "{Replace with version - see ETSI TS 103 705 Table 6.2.4-1}", + "$defs": { + "record" : { + "oneOf" : [ + { + "$comment" : "This is an example", + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord"}}} + ] + } + ] + } + } +} \ No newline at end of file diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json new file mode 100644 index 0000000..2d6f8a0 --- /dev/null +++ b/103705/schema/response.schema.json @@ -0,0 +1,129 @@ +{ + "$id": "urn:etsi:li:103705:response-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ETSI TS 103 705 Response", + "description": "Overall Response structure, representing the results of a lawful disclosure request (see clause 5)", + "type": "object", + "properties": { + "recordSetDescription": { + "$ref": "#/$defs/recordSetDescription" + }, + "recordSet": { + "$ref": "#/$defs/recordSet" + }, + "Signature": { + "$ref" : "#/$defs/Signature" + } + }, + "required": [ + "recordSetDescription", + "recordSet" + ], + "$defs": { + "recordSetDescription": { + "type": "object", + "title": "RecordSetDescription", + "description": "Provides metadata about the records being delivered (see clause 5.2)", + "properties": { + "etsiSchemaId": { + "description" : "ID of the ETSI JSON schema used by the Response (see clause 5.2.2)", + "$ref": "#/$defs/schemaId" + }, + "etsiSpecificationVersion": { + "description" : "Version of ETSI TS 103 705 used by the Response (see clause 5.2.3)", + "$ref": "#/$defs/version" + }, + "cspName" : { + "description" : "Identifies the CSP generating the Response (see clause 5.2.4)", + "$ref": "#/$defs/schemaId" + }, + "cspSchemaId" : { + "description" : "ID of CSP Record Schema used by the Response (see clause 5.2.5)", + "$ref": "#/$defs/schemaId" + }, + "cspSchemaVersion" : { + "description" : "Version number assigned by the CSP to the CSP Record Schema identified by the cspSchemaId (see clause 5.2.6)", + "$ref": "#/$defs/version" + }, + "resultSetId": { + "description" : "Unique identifier for this result set (see clause 5.2.7)", + "$ref": "#/$defs/resultSetId" + }, + "requestReference": { + "description" : "Reference to the original request (see clause 5.2.8)", + "$ref": "#/$defs/requestReference" + }, + "created": { + "description" : "Timestamp showing the creation time of the Response (see clause 5.2.9)", + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime" + } + }, + "required": [ + "etsiSchemaId", + "etsiSpecificationVersion", + "cspName", + "cspSchemaId", + "cspSchemaVersion", + "resultSetId", + "requestReference", + "created" + ] + }, + "schemaId": { + "type": "string" + }, + "version": { + "type" : "string", + "pattern" : "^[0-9]+\\.[0-9]+\\.[0-9]+$" + }, + "resultSetId": { + "type": "string" + }, + "requestReference": { + "type": "string" + }, + "recordSet": { + "type": "array", + "title": "RecordSet", + "description": "RecordSet (see clause 5.3). Contains a set of Records.", + "items": { + "$ref": "#/$defs/record" + } + }, + "record": { + "allOf" : [{ "$ref" : "urn:etsi:li:103705:record-schema-id:v1.1.1#/$defs/record"}], + "type": "object", + "title": "Record", + "description": "Response record (see clause 5.3)", + "properties": { + "id": { + "title": "id", + "description": "Unique identifier for the Record within the RecordSet (see clause 5.3.2).", + "type": "string" + }, + "type": { + "title": "type", + "description": "A JSON Pointer to the schema definition that defines the type (see clause 5.3.3)" + } + }, + "required": [ + "id", + "type" + ] + }, + "Signature": { + "properties": { + "protected": { + "type": "string" + }, + "signature": { + "type": "string" + } + }, + "required": [ + "protected", + "signature" + ] + } + } +} diff --git a/103705/validate.py b/103705/validate.py new file mode 100644 index 0000000..fa54909 --- /dev/null +++ b/103705/validate.py @@ -0,0 +1,95 @@ +import sys +from jsonschema import validate, RefResolver, Draft202012Validator +import json +from pathlib import Path +import logging +import argparse + + + +# filename = sys.argv[1] + +# def load_json (path): +# with open(path) as f: +# s = json.load(f) +# return s + +# schema_store = {} + +# json_instance = load_json(filename) +# print (json_instance) + +# etsi_schema = load_json('response.schema.json') +# ext_schema = load_json('extended.schema.json') +# ext_ent_schema = load_json("extended_entities.schema.json") +# schema_store = { +# etsi_schema['$id'] : etsi_schema, +# ext_schema['$id'] : ext_schema, +# ext_ent_schema['$id'] : ext_ent_schema +# } + +# resolver = RefResolver(None, referrer=None, store=schema_store) + +# print (etsi_schema) + +# v = Draft202012Validator(ext_schema, resolver=resolver) +# v.validate(json_instance) + +# validate(json_instance, ext_schema) +# print ("OK") + +def handle_uri(u): + print(u) + +def load_json(path : str): + with open(path) as f: + return json.load(f) + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + + parser.add_argument('-s','--schemadir', action="append", help="Directory containing supporting schema files to use for validation") + parser.add_argument('-v', '--verbose', action="count", help="Verbose logging (can be specified multiple times)") + parser.add_argument('-i', '--input', type=argparse.FileType('r'), default=sys.stdin, help="Path to input file (if absent, stdin is used)") + parser.add_argument('schema', help="Primary schema to validate against") + + args = parser.parse_args() + + match args.verbose: + case v if v and v >= 2: + logging.basicConfig(level=logging.DEBUG) + case 1: + logging.basicConfig(level=logging.INFO) + case _: + logging.basicConfig(level=logging.WARNING) + + logging.debug(f"Arguments: {args}") + + instance_doc = json.loads(args.input.read()) + args.input.close() + main_schema = load_json(args.schema) + schema_dict = { main_schema['$id'] : main_schema } + + if args.schemadir: + schema_paths = [] + for d in args.schemadir: + schema_paths += [f for f in Path(d).rglob("*.schema.json")] + logging.info(f"Schema files loaded: {schema_paths}") + + schemas_json = [json.load(p.open()) for p in schema_paths] + schema_dict = schema_dict | { s['$id'] : s for s in schemas_json } + + logging.info(f"Schema IDs loaded: {[k for k in schema_dict.keys()]}") + + logging.debug (f"Instance doc: {instance_doc}") + logging.debug (f"Main schema: {main_schema}") + + resolver = RefResolver(None, + referrer=None, + store=schema_dict) + + v = Draft202012Validator(main_schema, resolver=resolver) + + v.validate(instance_doc) + + logging.info("Done") \ No newline at end of file diff --git a/103705/validation/validate_705.py b/103705/validation/validate_705.py new file mode 100644 index 0000000..bb6913d --- /dev/null +++ b/103705/validation/validate_705.py @@ -0,0 +1,97 @@ +import sys +from jsonschema import validate, RefResolver, Draft202012Validator +import json +from pathlib import Path +import logging +import argparse + +def handle_uri(u): + print(u) + +def load_json(path : str): + with open(path) as f: + return json.load(f) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + + parser.add_argument('-s','--schemadir', action="append", help="Directory containing supporting schema files to use for validation") + parser.add_argument('-v', '--verbose', action="count", help="Verbose logging (can be specified multiple times)") + parser.add_argument('-i', '--input', type=argparse.FileType('r'), default=sys.stdin, help="Path to input file (if absent, stdin is used)") + + args = parser.parse_args() + + match args.verbose: + case v if v and v >= 2: + logging.basicConfig(level=logging.DEBUG) + case 1: + logging.basicConfig(level=logging.INFO) + case _: + logging.basicConfig(level=logging.WARNING) + + logging.debug(f"Arguments: {args}") + + instance_doc = json.loads(args.input.read()) + args.input.close() + + config = { + 'schema_include_dirs' : [ + '../schema/', + '../../103280/', + ], + 'main_schema_doc' : '../schema/response.schema.json' + } + + rootPath = Path(sys.argv[0]).parent + main_schema = load_json(str(rootPath / config['main_schema_doc'])) + schema_dict = { main_schema['$id'] : main_schema } + + schema_paths = [] + for d in config['schema_include_dirs']: + schema_paths += [f for f in (rootPath / Path(d)).rglob("*.schema.json")] + logging.info(f"Core schema files loaded: {schema_paths}") + if args.schemadir: + for d in args.schemadir: + schema_paths += [f for f in Path(d).rglob("*.schema.json")] + logging.info(f"CSP schema files loaded: {schema_paths}") + else: + logging.info(f"No CSP schema files loaded") + schemas_json = [json.load(p.open()) for p in schema_paths] + schema_dict = schema_dict | { s['$id'] : s for s in schemas_json } + + logging.info(f"Schema IDs loaded: {[k for k in schema_dict.keys()]}") + + logging.debug (f"Instance doc: {instance_doc}") + logging.debug (f"Main schema: {main_schema}") + + resolver = RefResolver(None, + referrer=None, + store=schema_dict) + + logging.info("Performing ETSI validation") + v = Draft202012Validator(main_schema, resolver=resolver) + v.validate(instance_doc) + + logging.info("Building record type dictionary") + type_dict = instance_doc['recordSetDescription']['recordTypes'] + logging.debug(type_dict) + ref_dict = { k : {"$ref" : v} for k,v in type_dict.items()} + validator_dict = { k : Draft202012Validator(ref_dict[k], resolver=resolver) for k,v in ref_dict.items()} + logging.debug(ref_dict) + + logging.info("Validating records") + for r in instance_doc['recordSet']: + type_key = r['type'] + if type_key not in type_dict.keys(): + logging.error(f"Record {r['id']} has type {type_key}, not in recordType dict") + type_ref = type_dict[type_key] + type_schema_id = type_ref.split('#')[0] + logging.info(f"Using {type_schema_id} to validate {type_ref} in record {r['id']}") + if not (type_key in validator_dict.keys()): + logging.error(f'Type key {type_key} from type {type_ref} in record {r["id"]} not in validator dictionary') + print(ref_dict) + v = validator_dict[type_key] + v.validate(r) + + logging.info("Done") \ No newline at end of file -- GitLab