doc: credential for 8i4b3j account changed
[libisds.git] / doc / message
blob65b3d1d161ed06c820d052b6694f3f46e0d7ed9b
1 Message specification
2 =====================
4 Source: Provozní řád ISDS, version 2009-10-30, Page 13
5 Source: Webové služby ISDS pro manipulaci s datovými zprávami, version 2.11
6     (2010-05-20) [DataMessage_ws.pdf]
7 Source: Registration of media type FO and ZFO
8     <http://www.alvestrand.no/pipermail/ietf-types/2008-June/002037.html>
9 Source: O2. Datové schránky: Informace pro dodavatele aplikací, version
10     2010-04-28, Page 18
12 Message ::= Envelope, Content
14 Message format is defined in Appendix 1, file dmBaseTypes.xsd.
16 Content ::= (Document)+
18 Content involves one or more attachments (= Documents). Allowed Document
19 formats are defined in Appendix 3 of Vyhláška o stanovení podrobností užívání
20 a provozování ISDS.
22 Currently (2009-11-18) allowed formats are (quotation follows):
24     – pdf (Portable Document Format)
25     – PDF/A (Portable Document Format for the Long-term Archiving)
26     – xml (Extensible Markup Language Document); must be valid against
27     free available XML Schema published by recipient
28     – fo/zfo (602XML Filler dokument)
29     – html/htm (Hypertext Markup Language Document)
30     – odt (Open Document Text)
31     – ods (Open Document Spreadsheet)
32     – odp (Open Document Presentation)
33     – txt (plain text)
34     – rtf (Rich Text Format)
35     – doc (MS Word Document)
36     – xls (MS Excel Spreadsheet)
37     – ppt (MS PowerPoint Presentation)
38     – jpg/jpeg/jfif (Joint Photographic Experts Group File Interchange Format)
39     – png (Portable Network Graphics)
40     – tiff (Tagged Image File Format)
41     – gif (Graphics Interchange Format)
42     – mpeg1/mpeg2 (Moving Picture Experts Group Phase 1 / Phase 2)
43     – wav (Waveform Audio Format)
44     – mp2/mp3 (MPEG-1 Audio Layer 2 / Layer 3)
45     – isdoc/isdocx (Information System Document) version 5.2 or higher
47 Document format declaration inside Document and conformance checks change
48 during time. XML Schemas provide attribute for Document MIME type and Document
49 annotation.
51 Attribute dmMimeType must present, but may be empty, may contain file name
52 extension, or may contain official MIME type. If MIME type is declared, ISDS
53 checks Document content for conformance to the MIME type.
55 There is MIME type blacklist: application/x-zip-compressed,
56 application/x-msdownload.
58 Attribute dmFileDescr (so called annotation) must present and must contain
59 file name of the Document. Even if dmMimeType exists, ISDS uses THIS attribute
60 to detect Document format (according file name extension) and checks content
61 for format conformance.
63 There is list of allowed file name extensions: pdf, xml, fo, zfo, html, htm,
64 odt, ods, odp, txt, rtf, doc, xls, ppt, jpg, jpeg, jfif, png, tiff, gif, mpeg1
65 mpeg2, wav, mp2, mp3, isdoc, isdocx, cer, crt, der, pk7, p7b, p7c, p7f, p7m,
66 p7s, tst (time stamp).
68 Non-normative: File name extension to MIME type map:
70 Extensions  MIME type           Description
71 -------------------------------------------------------------------------------
72 pdf         application/pdf     Portable Document Format
73 xml         application/xml     Extensible MarkUp Language
74 fo          application/vnd.software602.filler.xml+form
75                                 602XML form (uncompressed)
76 zfo         application/vnd.software602.filler.xml+zip+form
77                                 602XML form (zipped XML form with XSL-FO styles)
78 html, htm   text/html           Hyper Text MarkUp Language
79 odt         application/vnd.oasis.opendocument.text
80                                 Open Document Format Text
81 ods         application/vnd.oasis.opendocument.spreadsheet
82                                 Open Document Format Spreadsheet
83 odp         application/vnd.oasis.opendocument.presentation
84                                 Open Document Format Presentation
85 txt         text/plain          Plain text (no charset nor encoding signalled)
86 rtf         application/rtf     Rich Text Format
87 doc         application/msword  Microsoft Word Document
88 xls         application/vnd.ms-excel
89                                 Microsoft Excel Document
90 ppt         application/vnd.ms-powerpoint
91                                 Microsoft PowerPoint Document
92 jpg, jpeg, jfif
93             image/jpeg          JFIF/JPEG image
94 png         image/png           Portable Network Graphics
95 tiff        image/tiff          Tag Image File Format
96 gif         image/gif           Graphics Interchange Format
97 mpeg1       video/mpeg          Motion Joint Picture Expert Group Version 1
98 mpeg2       video/mpeg2         Motion Joint Picture Expert Group Version 2
99 wav         audio/x-wav         RIFF Waveform Audio File Format
100 mp2         audio/mpeg          MPEG-1 Audio Layer II
101 mp3         audio/mpeg          MPEG-1 Audio Layer III
102 isdoc, isdocx
103                                 Information System Document (payment invoice)
104 cer, crt, der
105                                 X.509 Certificate (different serialization)
106 pk7, p7b, p7c, p7f, p7m, p7s
107                                 Crypto Message Syntax (different serialization)
108 tst                             Time Stamp Token (RFC 3161)
111 Document ::= Binary_Document | XML_Document
113 Document is Base64 encoded binary format or XML.
115 There exist special Document type, ESS format, that can exist in Content only
116 once.
118 Note: ESS format is special XML language designed as interface between
119 Electronic Document Systems (ESS). It's defined in Appendix 4 of Provozní řád
120 ISDS.
122 Message with `malicious code' will be refused by ISDS.
124 Maximal total size of Documents in a Message is 10 MB. Binary document size is
125 size before encoding into Base64, XML document size is size in bytes as is
126 serialized inside SOAP request.
128 A Message can be addressed to 50 recipients at maximum.
130 Life time of Message:
132     – 90 days for delivered message, 100 days for system message
133     – unlimited for delivered through fiction messages, however they can be
134     moved to off-line storage after 90 days. User can request to move the
135     Message back into his box (off-line only currently).
137 Deleted messages are stored off-line as Envelope only without Content. Since
138 2010-06-01, some services has access to off-line stored envelopes
139 (Get(Signed)DeliveryInfo, MessageEnvelopeDownload, VerifyMessage,
140 AuthenticateMessage).
142 Note: Delivery through fiction is currently defined as new unread for more
143 than 10 days after delivery.
146 Digital Signatures
147 ==================
149 Embedded digital signatures are PKCS#7 to avoid expensive XML canonicalization.
152 Message hash
153 ============
155 Message checksum is a hashed bit stream of part of a message. Exact message
156 part to hash must preserve physical XML serialization. The hash value is
157 carried inside a message, it's stored in ISDS and it's used as a input form
158 digital time stamp.
160 Currently SHA-1 and SHA-256 algortihms are defined. They are identified by
161 dmHash/@algorithm attribute. Algorithm name in attribute value contains hyphen
162 character.
165 System messages
166 ===============
168 There exists special message type initiated by ISDS (i.e. from system, not from
169 other box). Such message has reserved from-box `aaaaaaa' (7 × `a') value and
170 sender type `0' and it contains always document of type HTML. There are
171 following cases defined:
173 1   Outgoing message contained malicious code
174 2   You, administrator, deleted other user
175 3   Outgoing message could not been delivered because recipient box had been
176     made inaccessible
177 4   Outgoing commercial message has not been accepted by recipient
178 5   User has been added to the box
179 6   User permissions has been changed
182 Commercial messages
183 ===================
185 Users can allow commercial message receiving explicitly. Commercial message
186 are not considered as accepted by recipient automatically (in opposite to
187 standard messages), recipient must call ConfirmDelivery to move message from
188 state Delivered (4) to state Received (6).
190 User can request to assign permission to send commercial messages. Permission
191 can be assigned by Czech Post. Commercial recipient can not be searched. Sender
192 must know exact box ID.
194 Incomming commercial message can be recognised by @dmType="K" in message
195 envelope. If @dmType is "V" or attribute is missing, message is so called
196 public (i.e. standard noncommercial with acceptance time outs etc.).
198 How does ISDS determine (non-)commercial status of outgoing message?
199 The decision is based on sender and recipient box type, commercial
200 sending/receiving permission and OVM message flag:
202 All messages are public except following combinations when message is
203 considered as commercial:
205         Sender                         Recipient
206 Gross type  Commercial sending  Gross type  Commercial receiving    OVM flag
207 ----------------------------------------------------------------------------
208 non-OVM     allowed             non-OVM     allowed                 any
209 any         any                 non-OVM     allowed                 false
212 Message states
213 ==============
215 Value   Meaning
216 1       Message has been put into ISDS
217 2       Message stamped by TSA
218 3       Message included viruses, infected document has been removed
219 4       Message delivered (dmDeliveryTime stored)
220 5       Message delivered through fiction (dmAcceptanceTime stored)
221 6       Message delivered by user log-in or user explicit request (in case of
222         commercial message) (dmAcceptanceTime stored)
223 7       Message has been read by user
224 8       Message could not been delivered (e.g. recipient box has been made
225         inaccessible meantime)
226 9       Message content deleted (thus can not be obtained on-line)
227 10      Message stored into data safe (this is optional commercial service)