Commit 02476e40 authored by Mark Canterbury's avatar Mark Canterbury
Browse files

Adding EPOC Form 1 example

parent 2ba271a8
Loading
Loading
Loading
Loading
+290 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<HI1Message 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" xmlns:doc="http://uri.etsi.org/03120/common/2020/09/Document">
    <!--
   
    Example rendering of EPOC into TS 103 120
    Form 1 (Production)
    From IssuingAuthority in country XX (technical ID = IssuingAuthorityID)
    To ServiceProvider in country YY (technical ID = ServiceProviderID)
    The request is for data on an MSISDN (cover multiple IDs / date ranges in a separate example)
    In this case, the EPOC was validated by a ValidatingAuthority (technical ID = ValidatingAuthorityID)
    This example is not an emergency (cover that in a separate example)
    This example is not related to any previous EPOC/EPOC-PR (section D - cover that in a separate example)

    Section K is not yet mapped - does this get included in the EPOC to the SP?
    -->
    <Header>
        <SenderIdentifier>
            <CountryCode>XX</CountryCode>
            <UniqueIdentifier>IssuingAuthorityID</UniqueIdentifier>
        </SenderIdentifier>
        <ReceiverIdentifier>
            <CountryCode>YY</CountryCode>
            <UniqueIdentifier>ServiceProviderID</UniqueIdentifier>
        </ReceiverIdentifier>
        <TransactionIdentifier>120fdb3a-d2c2-441e-8563-7898ecc822b9</TransactionIdentifier>
        <Timestamp>2024-12-17T08:43:00.000000Z</Timestamp>
        <Version>
            <ETSIVersion>V1.18.1</ETSIVersion>
            <!-- ? -->
            <NationalProfileOwner>EU</NationalProfileOwner>
            <NationalProfileVersion>0.1</NationalProfileVersion>
        </Version>
    </Header>
    <Payload>
        <RequestPayload>
            <ActionRequests>
                <ActionRequest>
                    <ActionIdentifier>0</ActionIdentifier>
                    <CREATE>
                        <HI1Object xsi:type="auth:AuthorisationObject">
                            <ObjectIdentifier>6874131d-754e-47b2-b8a4-2a869412b9f5</ObjectIdentifier>
                            <!-- Mapped from Section A - Issuing State -->
                            <CountryCode>XX</CountryCode>
                            <!-- Mapped from Section A - Issuing Authority -->
                            <OwnerIdentifier>IssuingAuthority</OwnerIdentifier>
                            <!-- Mapped from Section G - Nature and Legal Classification of offence -->
                            <!-- Seems a natural place, but it is a free text field. Thought required. -->
                            <auth:AuthorisationLegalType>
                                <common:Owner>IssuingAuthority?</common:Owner>
                                <common:Name>NatureAndClassificationOfOffence</common:Name>
                                <common:Value>SomethingThatMakesSenseToTheIA</common:Value>
                            </auth:AuthorisationLegalType>
                            <!-- Mapped from Section C - Deadlines -->
                            <!-- and potentially also from the Section B emergency flag -->
                            <auth:AuthorisationPriority>
                                <common:Owner>ETSI</common:Owner>
                                <common:Name>EPOCDeadlines</common:Name>
                                <common:Value>WithinTenDays</common:Value>
                            </auth:AuthorisationPriority>
                            <!-- Mapped from section B - Service Provider Concerned (assuming this is a techincal ID) -->
                            <auth:AuthorisationCSPID>
                                <!-- Interestingly, we can put more than one CSPID in here... -->
                                <auth:CSPID>
                                    <CountryCode>YY</CountryCode>
                                    <UniqueIdentifier>ServiceProviderID</UniqueIdentifier>
                                </auth:CSPID>
                            </auth:AuthorisationCSPID>
                            <!-- Could be useful when mapping some of the other forms? -->
                            <auth:AuthorisationCreationTimestamp>2024-12-17T09:00:00Z</auth:AuthorisationCreationTimestamp>
                            <!-- Could be useful when mapping some of the other forms? -->
                            <auth:AuthorisationServedTimestamp>2024-12-17T09:00:01Z</auth:AuthorisationServedTimestamp>
                            <auth:AuthorisationApprovalDetails>
                                <common:ApprovalType>IssuingAuthority</common:ApprovalType>
                                <!-- Mapped from section I - File Number -->
                                <common:ApprovalReference>File number</common:ApprovalReference>
                                <common:ApproverDetails>
                                    <!-- Mapped from Section I - Name of Authority -->
                                    <common:ApproverName>Name of Authority</common:ApproverName>
                                    <!-- Mapped from Section I - Post Held (title/grade)-->
                                    <common:ApproverRole>Post held</common:ApproverRole>
                                    <common:ApproverContactDetails>
                                        <!-- Mapped from Section I - Name of representative -->
                                        <common:ApproverAlternateName>Name of representative</common:ApproverAlternateName>
                                        <!-- Mapped from Section I - Email -->
                                        <common:ApproverEmailAddress>email@example.com</common:ApproverEmailAddress>
                                        <!-- Mapped from Section I - Tel No -->
                                        <common:ApproverPhoneNumber>493023125000</common:ApproverPhoneNumber>
                                        <!-- May need to extend this for Fax Number, Postal Address, Lanmguages Spoken, -->
                                        <!-- There is also a separate set of "Contact" details in Section I for some reason -->
                                        <!-- We need to work out how to map that -->
                                    </common:ApproverContactDetails>
                                </common:ApproverDetails>
                            </auth:AuthorisationApprovalDetails>
                            <auth:AuthorisationApprovalDetails>
                                <common:ApprovalType>ValidatingAuthority</common:ApprovalType>
                                <!-- Mapped from section J - File Number -->
                                <common:ApprovalReference>File number</common:ApprovalReference>
                                <common:ApproverDetails>
                                    <!-- Mapped from Section J - Name of Authority -->
                                    <common:ApproverName>Name of Authority</common:ApproverName>
                                    <!-- Mapped from Section J - Post Held (title/grade)-->
                                    <common:ApproverRole>Post held</common:ApproverRole>
                                    <common:ApproverContactDetails>
                                        <!-- Mapped from Section J - Name of representative -->
                                        <common:ApproverAlternateName>Name of representative</common:ApproverAlternateName>
                                        <!-- Mapped from Section J - Email -->
                                        <common:ApproverEmailAddress>email@example.com</common:ApproverEmailAddress>
                                        <!-- Mapped from Section J - Tel No -->
                                        <common:ApproverPhoneNumber>493023125000</common:ApproverPhoneNumber>
                                        <!-- May need to extend this for Fax Number, Postal Address, Lanmguages Spoken, -->
                                    </common:ApproverContactDetails>
                                </common:ApproverDetails>
                            </auth:AuthorisationApprovalDetails>
                            <auth:AuthorisationFlags>
                                <!-- Mapped from Section B - Designated Establishment / Legal Representative -->
                                <!-- Downside - it does allow both to be specified (which probably isn't right) -->
                                <auth:AuthorisationFlag>
                                    <common:Owner>ETSI</common:Owner>
                                    <common:Name>EPOCAuthorisationFlags</common:Name>
                                    <common:Value>SectionB_AddressedToDesignatedEstablishment</common:Value>
                                </auth:AuthorisationFlag>
                                <!-- Mapped from Section G - EPOC concerns X/Y -->
                                <!-- Could also consider mapping to auth:AuthorisationLegalType instead -->
                                <auth:AuthorisationFlag>
                                    <common:Owner>ETSI</common:Owner>
                                    <common:Name>EPOCAuthorisationFlags</common:Name>
                                    <common:Value>SectionG_EPOCConcernsCriminalOffence</common:Value>
                                </auth:AuthorisationFlag>
                                <!-- Mapped from Section G - EPOC issued for traffic data checkboxes -->
                                <!-- even though this example is actually for subscriber data -->
                                <!-- so maybe move this to another example -->
                                <auth:AuthorisationFlag>
                                    <common:Owner>ETSI</common:Owner>
                                    <common:Name>EPOCAuthorisationFlags</common:Name>
                                    <common:Value>SectionG_EPOCForTrafficDataUnderArticle3to8of2019/713</common:Value>
                                </auth:AuthorisationFlag>
                                <!-- Mapped from Section G - Controller/Processor -->
                                <auth:AuthorisationFlag>
                                    <common:Owner>ETSI</common:Owner>
                                    <common:Name>EPOCAuthorisationFlags</common:Name>
                                    <common:Value>SectionG_EPOCCAddressedToSPActingAsController</common:Value>
                                </auth:AuthorisationFlag>
                                <!-- Mapped from Section H - Informing the user -->
                                <auth:AuthorisationFlag>
                                    <common:Owner>ETSI</common:Owner>
                                    <common:Name>EPOCAuthorisationFlags</common:Name>
                                    <common:Value>SectionH_DelayInformingSubject_ToAvoidObstructingInquiries</common:Value>
                                </auth:AuthorisationFlag>
                            </auth:AuthorisationFlags>
                            <!-- Composed of a bunch of free text fields smooshed together -->
                            <!-- We can discuss if this is the right way to do it or not -->
                            <auth:AuthorisationManualInformation>
                                Section B - Any other relevant information: Some extra human readable information.
                                Section C - Procedural or other deadlines: Some extra human readable information.
                                Section C - Additional information: Some extra human readable information.
                                Section G - Any other relevant information: Some extra human readable information.
                            </auth:AuthorisationManualInformation>
                            <!-- Mapped from Section B - Addressee-->
                            <auth:AuthorisationLegalEntity>ServiceProviderAddressee</auth:AuthorisationLegalEntity>
                        </HI1Object>
                    </CREATE>
                </ActionRequest>
                <ActionRequest>
                    <ActionIdentifier>1</ActionIdentifier>
                    <CREATE>
                        <HI1Object xsi:type="task:LDTaskObject">
                            <ObjectIdentifier>83e9d910-e36a-4e18-8128-0dd1c38b8ffd</ObjectIdentifier>
                            <CountryCode>XX</CountryCode>                           <!-- Mapped from Section A - Issuing State -->
                            <OwnerIdentifier>IssuingAuthority</OwnerIdentifier>     <!-- Mapped from Section A - Issuing Authority -->
                            <AssociatedObjects>
                                <AssociatedObject>6874131d-754e-47b2-b8a4-2a869412b9f5</AssociatedObject>
                            </AssociatedObjects>
                            <!-- Mapped from Section E and F -->
                            <task:RequestDetails>
                                <!-- Mapped from Section F - Top level box (may be unecessary if they can be inferred from subtypes below)  -->
                                <task:Type>
                                    <common:Owner>ETSI</common:Owner>
                                    <common:Name>EPOCSectionFTypes</common:Name>
                                    <common:Value>SubscriberData</common:Value>
                                </task:Type>
                                <task:RequestValues>
                                    <task:RequestValue>
                                        <task:FormatType>
                                            <task:FormatOwner>ETSI</task:FormatOwner>
                                            <task:FormatName>EmailAddress</task:FormatName>
                                        </task:FormatType>
                                        <task:Value>username@example.com</task:Value>
                                    </task:RequestValue>
                                    <task:RequestValue>
                                        <task:FormatType>
                                            <task:FormatOwner>ETSI</task:FormatOwner>
                                            <task:FormatName>EPOCSectionEAdditionalInformation</task:FormatName>
                                        </task:FormatType>
                                        <task:Value>
                                            An idea for how we can map the Additional Information field in Section E
                                            Obviously such a field would require manual processing.
                                            Also, there was a proposal to use the Additional Information field on the
                                            *form* to encode any CSP-managed identifier types
                                            So some thought required.
                                        </task:Value>
                                    </task:RequestValue>
                                </task:RequestValues>
                                <task:Subtype>
                                    <!-- Mapped from section F - "EPOC concerns" tickboxes -->
                                    <!-- Although generally we would hope these are replaced with CSP-provided dictionaries -->
                                    <!-- since the tickboxes make very little sense for actual SPs -->
                                    <task:RequestSubtype>
                                        <common:Owner>ETSI</common:Owner>
                                        <common:Name>EPOCSectionFSubtypes</common:Name>
                                        <common:Value>InitialRegistrationInformation</common:Value>
                                    </task:RequestSubtype>
                                    <task:RequestSubtype>
                                        <common:Owner>ETSI</common:Owner>
                                        <common:Name>EPOCSectionFSubyypes</common:Name>
                                        <common:Value>ProfileInformation</common:Value>
                                    </task:RequestSubtype>
                                </task:Subtype>
                            </task:RequestDetails>
                            <task:DeliveryDetails>
                                <task:LDDeliveryDestination>
                                    <!-- Mapped from Section L - Transfer To... -->
                                    <!-- Could also consider introducing a new type for this (and for the Name/Contact details part) -->
                                    <task:DeliveryAddress>
                                        <task:DeliveryInformationID>ToIssuingAuthority</task:DeliveryInformationID>
                                    </task:DeliveryAddress>
                                    <!-- Mapped from Section L - Preferred Format -->
                                    <task:LDHandoverFormat>
                                        <common:Owner>ETSI</common:Owner>
                                        <common:Name>EPOCHandoverFormats</common:Name>
                                        <common:Value>SomeDictToBeAgreed</common:Value>
                                    </task:LDHandoverFormat>
                                </task:LDDeliveryDestination>
                            </task:DeliveryDetails>
                            <!-- Mapped from section B - Service Provider Concerned (assuming this is a techincal ID) -->
                            <!-- But can also be mapped in Authorisation. So maybe we don't need this one? -->
                            <task:CSPID>
                                <CountryCode>YY</CountryCode>
                                <UniqueIdentifier>ServiceProviderID</UniqueIdentifier>
                            </task:CSPID>
                        </HI1Object>
                    </CREATE>
                </ActionRequest>
                <ActionRequest>
                    <ActionIdentifier>2</ActionIdentifier>
                    <CREATE>
                        <HI1Object xsi:type="doc:DocumentObject">
                            <ObjectIdentifier>83e9d910-e36a-4e18-8128-0dd1c38b8ffd</ObjectIdentifier>
                            <CountryCode>XX</CountryCode>                           <!-- Mapped from Section A - Issuing State -->
                            <OwnerIdentifier>IssuingAuthority</OwnerIdentifier>     <!-- Mapped from Section A - Issuing Authority -->
                            <AssociatedObjects>
                                <AssociatedObject>6874131d-754e-47b2-b8a4-2a869412b9f5</AssociatedObject>
                            </AssociatedObjects>
                            <doc:DocumentProperties>
                                <!-- Mapped from Section B; only Address and TelNo are known in this instance -->
                                <!-- This can be extended to cover the other values; alternatively, we can -->
                                <!-- look for a structured way to include this (this same list of contact info -->
                                <!-- appears a lot in the EPOC forms... -->
                                <doc:DocumentProperty>
                                    <doc:PropertyType>
                                        <common:Owner>ETSI</common:Owner>
                                        <common:Name>EPOCForm1DocumentProperties</common:Name>
                                        <common:Value>SectionBAddress</common:Value>
                                    </doc:PropertyType>
                                    <doc:PropertyValue>Service Provider Address</doc:PropertyValue>
                                </doc:DocumentProperty>
                                <doc:DocumentProperty>
                                    <doc:PropertyType>
                                        <common:Owner>ETSI</common:Owner>
                                        <common:Name>EPOCForm1DocumentProperties</common:Name>
                                        <common:Value>SectionBTelNo</common:Value>
                                    </doc:PropertyType>
                                    <doc:PropertyValue>Service Provider Tel No</doc:PropertyValue>
                                </doc:DocumentProperty>
                                <!-- We can also include the fields in Section M here -->
                                <!-- Since those are only sent to an EnforcingAuthority, we'll leave that to another example -->
                            </doc:DocumentProperties>
                            <doc:DocumentBody>
                                <!-- Obviously this isn't actually a PDF -->
                                <doc:Contents>VGhlIHNpZ25lZCBQREYgd291bGQgZ28gaGVyZQ==</doc:Contents>
                                <doc:ContentType>application/pdf</doc:ContentType>
                                <doc:Checksum>checksum value</doc:Checksum>
                                <doc:ChecksumType>sha-256</doc:ChecksumType>
                            </doc:DocumentBody>
                        </HI1Object>
                    </CREATE>
                </ActionRequest>
            </ActionRequests>
        </RequestPayload>
    </Payload>
</HI1Message>