1 / 60

HL7/XML-masterclass I

HL7/XML-masterclass I. Marc de Graauw Web Services / HL7v3 expert. 3-11-2009. Marc de Graauw. studeerde biologie & filosofie sinds 1989 in de ICT sinds 1996 zelfstandig consultant semantiek interoperabiliteit XML & Web Services

rollin
Télécharger la présentation

HL7/XML-masterclass I

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HL7/XML-masterclass I Marc de Graauw Web Services / HL7v3 expert 3-11-2009

  2. Marc de Graauw • studeerde biologie & filosofie • sinds 1989 in de ICT • sinds 1996 zelfstandig consultant • semantiek • interoperabiliteit • XML & Web Services • Landelijk Elektronisch Patiëntendossier, Strafrechtketen, verzekeraars, arbodiensten, UWV • artikelen en presentaties: zie http://www.marcdegraauw.com/

  3. XML en Unicode

  4. De geschiedenis van XML • SGML • Standard Generalized Markup Language • IBM: back to the sixties... • Markup: structuur, niet processing • HTML: SGML spinoff • 1998: XML • SGML voor het Web, zonder ballast • 2002: Hype • Standaard technologie

  5. HTML - een voorbeeld <HTML> <HEAD> <TITLE>Marc de Graauw</TITLE> </HEAD> <BODY> <H1>Marc de Graauw</H1> <P>Geslacht: Man</P> <H2>Opleidingen</H2> <OL> <LI>VWO</LI> <LI>kandidaats Biologie</LI> <LI>doctoraal filosofie</LI> </OL> </BODY> </HTML>

  6. XML - een voorbeeld <?xml version="1.0" encoding="UTF-8"?> <persoon> <persoonsgegevens geslacht="Man"> <achternaam>Graauw</achternaam> <voorvoegsel>de</voorvoegsel> <voornaam>Marc</voornaam> </persoonsgegevens> <opleiding>VWO</opleiding> <opleiding>kandidaats Biologie</opleiding> <opleiding>doctoraal filosofie</opleiding> </persoon>

  7. Vóór Unicode • 7 bits, 128 tekens, 95 afdrukbaar • Engels: cijfers, letters, leestekens • niet: Frans: ê ç Duits: ß ä Grieks: ε Ω Nederlands: ë ï • Spaans, Arabisch, Fins, Russisch, Chinees, Thais, etc. etc.

  8. Vóór Unicode bytes 128 - 255 bytes 0 - 127 ISO- 8859-1 (ISO-Latin) code page 473 West- Europees Engels, meeste Frans, Duits IBM PC ASCII DEC Multi- national Character Set code page 850 West Europees + Á ß ISO- 8859-15 ISO-Latin + ‘IJ’sland + ‘œ’uf Windows 1252 ISO-Latin + œ, € Shift- JIS EBCDIC IBM mainframe Japans etc. etc. etc....

  9. Vóór Unicode

  10. Unicode code point glyph karakter m m LATIN SMALL LETTER M (de letter ‘m’) U+006D m m m

  11. Tengwar – Tolkien - niet officieel (private use range)

  12. Unicode encodings • Unicode • U+006D = ‘m’ • karakter 0 – 255: gelijk aan ISO-Latin-1 • 1.114.112 code points (0 – 10FFFF) • UTF-16 encoding • 4 bytes • 0000 – FFFF: gelijk aan Unicode nummer • Byte Order Mark • U+FEFF (ZERO-WIDTH NO-BREAK SPACE) • byte-swapped = U+FFFE = geen legaal karakter • efficiënt voor Chinees en Japans • UTF-8 • 1 tot 4 bytes • 0 – 127: gelijk aan ASCII • ergo: ASCII tekst is altijd ook UTF-8 tekst • efficiënt voor Westerse talen

  13. Unicode encodings

  14. XML • Java • .NET

  15. XML • XML = SGML – ballast + Unicode • Een XML document is een boom • Een root node • Attributen, elementen, tekst

  16. Tokenauthenticatie

  17. Authentication • Smartcard (UZI pass) with: • private key (RSA) • X.509 certificate (includes public key) • PKI-Government • Personal pass • guard safely • no sharing • PIN protected

  18. Secure connection

  19. Secure data

  20. Tokenauthenticatie smartcard met private key Certificaat QURX_ EX990011NL token maken SignedInfo maken RSA / SHA sig maken signedData SignedInfo SignatureValue Bericht maken SOAP bericht

  21. Transformatie XML 2 SignedData Verstrekkings- Lijstquery QURX_IN990111NL_01.xml signedData.xsl signedData QURX_IN990111NL_01_signedData.xml

  22. VerstrekkingsLijstquery

  23. signedData • X.509 Strong Authentication • message id • nonce • unieke indentificatie van bericht • (if duplicate removal has already taken place) • notBefore & notAfter • time to live • security semantics can expire • time to store & check nonce • addressedParty • replay against other receivers • Koppeling met bericht • BSN • voor patiëntgerelateerde berichten • Trigger Event Id • versieonafhankelijk, itt. InteractionId

  24. signedData.xml (pretty print)

  25. Token versus bestand

  26. Whitespace eruit signedData QURX_IN990111NL_01_signedData.xml remove- whitespace- between- elements.xsl signedData QURX_IN990111NL_01_signedData.xml

  27. Exclusive Canonicalization signedData QURX_IN990111NL_01_signedData.xml excc14n (Oxygen gebruikt) signedData excc14n signedData_ excc14n.xml

  28. Exclusive Canonicalization

  29. Exclusive Canonicalization • Dubbele quotes ipv. enkele • Namespace declaraties vóór attributen • Namespaces alfabetisch rangschikken • Linefeed, geen carriage return of CR/LF • Geen Byte Order Mark • UTF-8

  30. Signed Info element signedData excc14n signedData_ excc14n.xml bits SignedInfo template SHA1 hash wsu Id 160 bits maken SignedInfo Base64 karakters SignedInfo SignedInfo.xml

  31. SHA: Cryptographic hash Wikipedia: A cryptographic hash function is a deterministic procedure that takes an arbitrary block of data and returns a fixed-size bit string, the (cryptographic) hash value, such that an accidental or intentional change to the data will change the hash value.

  32. SHA • SHA1 ... SHA256 • 1995: SHA-1 NSA • 2005: zwaktes in SHA-1 ontdekt • 2001: SHA-2 (225, 256, 384, 512) • 2008 – 12: SHA-3, open competitie • SHA-1 • input: message maximum (264 − 1) bits • output: 160 bits

  33. Base 64 • UTF-8: niet alle octets zijn toegestaan! • Ergo: binaire data kunnen niet zomaar in XML / UTF-8 • Oplossing: bits -> karakters • RFC2045 (MIME) alfabet: [A-Z][a-z][0-9]+/

  34. SHA + Base64 Input (bits) SHA1 (160 bits) 4vBP5K5M5llABaWYzxCrKIdjS2I= Base 64

  35. SignedInfo

  36. RSA with SHA SignedInfo (exc c14n) private key bits SHA1 hash 400 bits RSA 160 bits 408 bits 3021300906 052b0e0302 1a05000414 ASN.1 DER formaat Base64 karakters 3031300d06 0960864801 6503040201 05000420 SignatureValue SHA 256 -> 464 bits

  37. Sender Receiver “Hello world” “Hello world” SHA-1 hash: 5llABaWYz xCrKIdjS... Public key: MIICHzCCAY ygAwIBAgI..... OK Private key: shhhh..... RSA sig value: c9fVK7vYAdv s2DRZVtS... RSA sig value: c9fVK7vYAdv s2DRZVtS...

  38. Security Services (X.800) • Authentication • Authorization • Data Confidentiality • Data Integrity • Non-repudiation

  39. Security services

  40. Key usage

  41. SOAP bericht signedData QURX_ EX990011NL SignedInfo SignatureValue Certificaat verwijzing Header maken Header maken authentication Tokens wss:Security Bericht maken SOAP bericht

More Related