1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372
|
Message specification
=====================
Source: Provozní řád ISDS, version 2011-11-29, Page 5, 14
Source: Webové služby rozhranní ISDS pro manipulaci s datovými zprávami,
version 2.23 (2011-11-24)
Source: MIME Media Types
<http://www.iana.org/assignments/media-types/index.html>
Source: O2. Datové schránky: Informace pro dodavatele aplikací, version
2010-04-28, Page 18
Source: Vyhláška 194/2009 Sb., o stanovení podrobností užívání a provozování
informačního systému datových schránek, updated by 422/2010 Coll.
Message ::= Envelope, Content
Message format is defined in Appendix 1, file dmBaseTypes.xsd.
Content ::= (Document)+
Content involves one or more attachments (= Documents). Allowed Document
formats are defined in Vyhláška o stanovení podrobností užívání a provozování
ISDS, 194/2009 Coll.
Currently (2011-02-21) allowed formats are (quotation follows):
– pdf (Portable Document Format)
– PDF/A (Portable Document Format for the Long-term Archiving)
– xml (Extensible Markup Language Document); must be valid against
freely available XML Schema published by recipient
– fo, zfo (602XML Filler Document)
– html/htm (Hypertext Markup Language Document)
– odt (Open Document Text)
– ods (Open Document Spreadsheet)
– odp (Open Document Presentation)
– txt (plain text)
– rtf (Rich Text Format)
– doc, docx (MS Word Document)
– xls, xlsx (MS Excel Spreadsheet)
– ppt, pptx (MS PowerPoint Presentation)
– jpg, jpeg, jfif (Joint Photographic Experts Group File Interchange
Format)
– png (Portable Network Graphics)
– tif, tiff (Tagged Image File Format)
– gif (Graphics Interchange Format)
– mpeg1, mpeg2 (Moving Picture Experts Group Phase 1 / Phase 2)
– wav (Waveform Audio Format)
– mp2, mp3 (MPEG-1 Audio Layer 2 / Layer 3)
– isdoc, isdocx (Information System Document) version 5.2 or higher
- edi (international standard EDIFACT, standards for electotronic
interchange of business documents [EDI] ODETTE and EANCOM)
- dwg (AutoCAD DraWinG File Format) version 2007 or higher
- shp, dbf, shx, prj, qix, sbn, sbx (ESRI Shapefile)
- dgn (Bentley MicroStation Format) version V7 or V8
- gml, gfs, xsd (Geography Markup Language Document)
Document format declaration inside Document and conformance checks change
during time. XML Schemas provide attribute for Document MIME type and Document
annotation.
Attribute dmMimeType must present, but may be empty, may contain file name
extension, or may contain official MIME type. If MIME type is declared, ISDS
checks Document content for conformance to the MIME type.
There is MIME type blacklist: application/x-zip-compressed,
application/x-msdownload.
Attribute dmFileDescr (so called annotation) must present and must contain
file name of the Document. Even if dmMimeType exists, ISDS uses THIS attribute
to detect Document format (according file name extension) and checks content
for format conformance.
List of allowed MIME types is copied (and sometimes agumented) in appendix
of Webové služby rozhranní ISDS pro manipulaci s datovými zprávami.
There is list of allowed file name extensions and MIME type mapping
(types ordered in decreasing prefference):
Extensions MIME type Description
-------------------------------------------------------------------------------
cer, crt, der
application/x-x509-ca-cert X.509 Certificate (different serialization)
doc application/msword Microsoft Word Document
docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
Microsoft OpenXML Document
dbf, prj, qix, sbn, sbx, shp, shx
application/octet-stream ESRI Shapefile
dgn application/octet-stream Bentley Microstation Format
dwg image/vnd.dwg AutoCAD Drawing
edi application/edifact EDIFACT (ODETTE, EANCOM standards for
application/edi-x12 inernational bussines document
application/edi-consent exchange)
text/plain
text/xml
application/xml
fo application/vnd.software602.filler.form+xml
application/xml
602XML form (uncompressed)
gfs, gml application/xml Geography Markup Language Document
text/xml
gif image/gif Graphics Interchange Format
html, htm text/html Hyper Text MarkUp Language
isdoc text/isdoc Information System Document
(version >= 5.2)
isdocx text/isdocx Information System Document
(version >= 5.2)
jfif, jpeg, jpg
image/jpeg JFIF/JPEG image
image/pjpeg
mpeg, mpeg1, mpeg2, mpg
video/mpeg Motion Joint Picture Expert Group
video/mpeg1
video/mpeg2
video/mpg
mp2, mp3 audio/mpeg MPEG-1 Audio Layer II
odp application/vnd.oasis.opendocument.presentation
Open Document Format Presentation
ods application/vnd.oasis.opendocument.spreadsheet
Open Document Format Spreadsheet
odt application/vnd.oasis.opendocument.text
Open Document Format Text
pdf application/pdf Portable Document Format
p7b application/pkcs7-certificates
application/pkcs7-mime
application/x-pkcs7-certificates
Crypto Message Syntax
p7c, p7m application/pkcs7-mime Crypto Message Syntax
application/x-pkcs7-mime
p7f application/pkcs7-signature
Crypto Message Syntax
p7s application/pkcs7-signature
application/x-pkcs7-signature
Crypto Message Syntax
pk7 application/pkcs7-mime Crypto Message Syntax signatures
application/x-pkcs7-mime
png image/png Portable Network Graphics
image/x-png
ppt application/vnd.ms-powerpoint
Microsoft PowerPoint Document
pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
Microsoft OpenXML Presentation
rtf application/msword Rich Text Format
text/rtf
application/rtf
tif, tiff image/tiff Tag Image File Format
tsr, tst application/timestamp-reply
Time Stamp Token (RFC 3161)
txt text/plain Plain text
(no charset nor encoding signalled)
wav audio/wav RIFF Waveform Audio File Format
audio/wave
audio/x-wav
xls application/vnd.ms-excel Microsoft Excel Document
xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Microsoft OpenXML WorkBook
xml application/xml Extensible MarkUp Language
text/xml
xsd application/xml XML Schema
text/xml
zfo application/vnd.software602.filler.form-xml-zip
602XML form (zipped XML form with
XSL-FO styles) or data box message
Document ::= Binary_Document | XML_Document
Document is Base64 encoded binary format or XML.
There exist special Document type, ESS format, that can exist in Content only
once.
Note: ESS format is special XML language designed as interface between
Electronic Document Systems (ESS). It's defined in Appendix 4 of Provozní řád
ISDS.
Message with `malicious code' will be refused by ISDS.
Maximal total size of Documents in a Message is 10 MB. Binary document size is
size before encoding into Base64, XML document size is size in bytes as is
serialized inside SOAP request.
A Message can be addressed to 50 recipients at maximum.
Life time of Message:
– 90 days for delivered message, 100 days for system message
– unlimited for delivered through fiction messages, however they can be
moved to off-line storage after 90 days. User can request to move the
Message back into his box (off-line only currently).
Deleted messages are stored off-line as Envelope only without Content. Since
2010-06-01, some services has access to off-line stored envelopes
(Get(Signed)DeliveryInfo, MessageEnvelopeDownload, VerifyMessage,
AuthenticateMessage).
Note: Delivery through fiction is currently defined as new unread for more
than 10 days after delivery.
Digital Signatures
==================
Some SOAP services (GetSignedDeliveryInfo etc.) returns response that embeds
digitally signed ISDS message or delivery info. The digital signature is
Base64-encoded BER CMS. (xmldsig is not used to avoid expensive XML
canonicalization).
The CMS should carry one certificate and one signed body. Since 2011-04,
a time stamp is embedded into the CMS (get-message responses currently only).
The data structure is compliant with RFC 5126 (CMS Advanced Electronic
Signatures (CAdES)) and RFC 3161 (Internet X.509 Public Key Infrastructure
Time-Stamp Protocol (TSP)).
Stamp is stored in id-aa-signatureTimeStampToken object (iso(1).
member-body(2).us(840).rsadsi(113549).pkcs(1).pkcs-9(9).smime(16).
id-aa(2).14). Input for stamp is CMS SignerInfo.SignatureValue object.
The signature and time stamp is computed on-the-fly, for each reponse again.
If time stamp authority is irresponsive, CMS without time stamp is returned
with special ISDS error code 0005. Client can retry to get the same stamped
response two times in 20 minutes. Exceeding this quota leads to 50-second
delay or error code 3005.
If time stamp authority is failing, error code 9502 is returned without any
message.
Message hash
============
Message checksum is a hashed bit stream of part of a message. Exact message
part to hash must preserve physical XML serialization. The hash value is
carried inside a message, it's stored in ISDS and it's used as a input form
digital time stamp.
Currently SHA-1 and SHA-256 algortihms are defined. They are identified by
dmHash/@algorithm attribute. Algorithm name in attribute value contains hyphen
character.
System messages
===============
There exists special message type initiated by ISDS (i.e. from system, not
from other box). Such message has reserved from-box `aaaaaaa' (7 × `a') value
and sender type `0' and it always contains a document of type HTML and
sometimes a document of type XML. The XML one provides structured reason of
sending the system message, the HTML one is a human-readable form. There are
following cases defined:
Case Meaning
-------------------------------------------------------------------------------
1 Outgoing message contained malicious code.
2 You, administrator, deleted other user.
3 Outgoing message could not been delivered because recipient box had
been made inaccessible retrospectively.
4 Outgoing commercial message has been deleted before accepting it by the
recipient.
5 User has been added to your box.
6 User permissions has been changed.
7 Box has been made temporary inaccessible on court desicion (e.g. user
has been found eligable unresponsible).
8 Box has been made temporary inaccessible on box owner or administrator
request.
9 Box has been made permanently inaccessible because organization does
not exist anymore.
10 Box has been made permanently inaccessible because owner has died.
11 Personal data of box owner does not match central register.
The XML document has following structures:
SystemMessage – Attribute `type' is a number of case 1, 3, or 4.
+ dmID – message ID
+ dbIDRecipient – recipient box ID
SystemMessage – Attribute `type' is a number of case 2, 5, or 6.
+ userID – user ID
+ userName – user proper name
SystemMessage – Attribute `type' is a number of case 7, 8, 9, 10, or 11.
No elements are defined.
Notification messages
=====================
ISDS administrator can send business messages from dedicated box `zzzzzzq'.
Such a message contains a PDF document with a notification about business
activities of the ISDS administrator. Business activity is e.g. a support
for commercial messages.
Non-normative: The originating box as well as the message are of type system.
Commercial messages
===================
Users can allow commercial message receiving explicitly in opposite to
standard messages.
User can request to assign permission to send commercial messages. Permission
can be assigned by Czech Post. Or sending some commercial messages can be
offered and paid by third party. Then user don't need special permission from
Czech Post to send the specific commercial message. See PDZInfo service for
more details. Commercial recipient can not be searched. Sender must know exact
box ID.
Commercial outgoing message is automatically recognized by ISDS using sender
and recipient box type, commercial sending/receiving permission, and OVM
message flag. All messages are noncommercial, so called public, except
following combinations when the message is considered as commercial:
Sender Recipient
Gross type Commercial sending Gross type Commercial receiving OVM flag
----------------------------------------------------------------------------
non-OVM allowed non-OVM allowed any
any any non-OVM allowed false
When sending message, the commercial status can be refined by @dmType
attribute in the message envelope:
Value Meaning
-----------------------------------------------------------------------------
I Commercial message offering paying the response instead of the
recipient (so called initiatory message)
K Commercial message
O Commercial message as a response paid by sender of initiatory message
V Noncommercial standard message
Incoming message or downloaded sent message can have @dmType attribute in the
message envelope with following meaning:
Value Meaning
-----------------------------------------------------------------------------
A Subsidized initiatory commercial message which can pay a response
B Subsidized initiatory commercial message which has already paid the
response
C Subsidized initiatory commercial message where the response offer has
expired
D Externally subsidized commercial messsage
E Prepaid stamp
G Paid by a sponsor
I Initiatory commercial message which can pay a response
K Commercial message paid by sender
O Commercial message as a response paid by sended of initiatory message
X Initiatory commercial message where the response offer has expired
Y Initiatory commercial message which has already paid the response
Z Limitedly subsidized commercial message
Missing @dmType attribute means noncommercial standard message.
Relation between initiatory message and reply paid by initiatory message
sender is established by an identifier defined in dmSenderRefNumber element of
initiatory message and the same value copied into dmRecipientRefNumber element
of response message.
Message states
==============
Value Meaning
1 Message has been put into ISDS
2 Message stamped by TSA
3 Message included viruses, infected document has been removed
4 Message delivered (dmDeliveryTime stored)
5 Message delivered through fiction (dmAcceptanceTime stored)
6 Message delivered by user log-in or user explicit request (in case of
commercial message) (dmAcceptanceTime stored)
7 Message has been read by user
8 Message could not been delivered (e.g. recipient box has been made
inaccessible meantime)
9 Message content deleted (thus can not be obtained on-line)
10 Message saved in long term storage (this is optional commercial service)
|