x-road in finland & rest gateway

27
X-Road in Finland – The National Data Exchange Layer Petteri Kivimäki Information Systems Manager

Upload: petteri-kivimaeki

Post on 15-Apr-2017

590 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: X-Road in Finland & REST Gateway

X-Road in Finland – TheNational Data ExchangeLayer

Petteri KivimäkiInformation Systems Manager

Page 2: X-Road in Finland & REST Gateway

Index

• National Architecture for Digital Services• The National Data Exchange Layer

– Schedule– Organization– Interest Groups– Work Groups

Page 3: X-Road in Finland & REST Gateway

National Architecture for Digital Services

• Programme owned by Ministry of Finance• Operating unit Finnish Population Register Centre• Programme period 2014-2017• Building a digital infrastructure for digital services,

including four projects:– National Data Exchange Layer– Service Views (Citizens, Companies, Civil Servants)– EIdentification– Roles and Authorization

Page 4: X-Road in Finland & REST Gateway

National Architecture for Digital Services

Page 5: X-Road in Finland & REST Gateway

The National Data Exchange Layer -Schedule

31.12.2015

1.1.2015

1.4.2015

1.7.2015

1.10.2015

29.5.Procurement

Today

X-Road development environment, publicly openPilot

Production environment

VRK

PRH

Trafi

MML

Vero

Finto

Kela

Organizations joiningproduction

18.11.

Test environment

Software development

14.9.

Page 6: X-Road in Finland & REST Gateway

OrganizationDevelopment

ManagerPauli Kartano (VM)

Coordinating ProjectManager

Eero Konttaniemi

X-RoadDevelopment

Product Owner

Petteri Kivimäki Scrum Master

Developer 1 Developer 2

Speacialist(CSC)

Developer 3

Developer 4Working Groups

ServiceProduction

InformationSystems ManagerPetteri Kivimäki

Service ManagerJani-MattiKaukonen

Specialist 1(CSC)

Specialist 2(CSC)

Specialist 3(CSC)

Gofore

InformationSecurity

InformationSecurity

SpecialistOuti Juntura

Auditors

Lawyer(Procurements) Palveluväylä Concept

Information SystemsManager

Petteri Kivimäki

Service ManagerJani-MattiKaukonen

IntegrationArchitect

(ESB:t+X-Road)

Specialist

SpecialistsProject Manager

(ServiceCatalogue)

Developer 1 Developer 2

Productization

Specialists

Project Manager(Service

Management)

Specialists 2

Service ManagerJani-MattiKaukonen

Working Groups

Vendors (procurements)

VRK

Valtori / Valtori’s SubcontractorsDifferent Interest Groups

Contractors (KPMG)

Page 7: X-Road in Finland & REST Gateway

Responsibilities

Page 8: X-Road in Finland & REST Gateway

Interest Groups

• Public sector– Governmental organizations, municipalities

• Private sector– Companies, private persons

• Other– Associations, non-profit organizations, educational institutions

etc.

Page 9: X-Road in Finland & REST Gateway

Work Groups

• PERTIVA – coordinates collaboration betweenorganizations responsible for maintaining public baseregistries (e.g. population register)

• Reference groups– For organizations that want to participate in designing the

service view for citizens and organizations– Divided by field/industry

• Public sector organizations, tele operators, finance sector,libraries etc.

• LinkedIn Idea Group – open for everyone• Developer community (building up)• And many others…

Page 10: X-Road in Finland & REST Gateway

REST Gateway – RESTSupport for X-Road

Petteri KivimäkiInformation Systems Manager

Page 11: X-Road in Finland & REST Gateway

Index

• Backround• Requirements for REST support• REST Gateway

Page 12: X-Road in Finland & REST Gateway

Backround

• REST-to-SOAP conversion must be implemented inadapter server

• No off-to-shelf components available• Custom implementation for each system

– Some parts are system specific, but many parts of theimplementation could be shared between different systems

– Same features are being implemented multiple times bydifferent organizations

Page 13: X-Road in Finland & REST Gateway

Service Provider

Page 14: X-Road in Finland & REST Gateway

Service Consumer

Page 15: X-Road in Finland & REST Gateway

Requirements for REST Support

• Must have– Access REST / JSON services via WSDL-defined X-Road

services (service provider)– Access legacy WSDL-defined X-Road services via REST /

JSON (service consumer)– WSDLs in the security server must match the actual service to

facilitate service discovery

• Nice to have– Automatic conversion for service descriptions

• RAML / Swagger / JSON Schema etc. -> WSDL

Page 16: X-Road in Finland & REST Gateway

REST Gateway

• Off-the-shelf component– Configuration over coding– Can be customized

• Implements the common features that are needed inall the REST integrations– Features can be configured for a single system / service– Everything cannot be done through configuration, some

coding may also be required• Offers a framework for customizations

Page 17: X-Road in Finland & REST Gateway

REST Gateway v0.0.7

Page 18: X-Road in Finland & REST Gateway

REST Gateway v0.0.7

• Provider Gateway– access REST services (JSON, XML) via WSDL-defined X-

Road services• Consumer Gateway

– access WSDL-defined X-Road services in a RESTful manner• Automatic conversions:

– JSON -> XML– XML -> JSON

• New REST services can be added throughconfiguration - no coding needed

• Implements X-Road SOAP profile 4.0 (v6.3->)

Page 19: X-Road in Finland & REST Gateway

Provider Gateway v0.0.7

• Provider Gateway– HTTP GET, POST, PUT and DELETE supported– WSDL must be created manually– REST response can be wrapped in SOAP body or SOAP

attachment– X-Road SOAP-headers are passed via HTTP headers

• X-XRd-Client, X-XRd-Service, X-XRd-UserId, X-XRd-MessageId

Page 20: X-Road in Finland & REST Gateway

Provider Gateway v0.0.7

• Provider Gateway accepts SOAP messages followingthe X-Road SOAP profile. It translates XML requestparameters to REST service request URI.

• ConfigurationFI.GOV.123456-7.TestService.getRandom.v1=>[GET] http://www.restservice.com/

Page 21: X-Road in Finland & REST Gateway

Provider Gateway v0.0.7

• HTTP POST with request body– Request body is sent as SOAP attachment identified by

Content-ID Mime header

Page 22: X-Road in Finland & REST Gateway

Consumer Gateway v0.0.7

• Consumer Gateway– full support for services published through Provider Gateway– limited support for legacy services

• only services which requests don't contain nested elements - allthe request parameters must be request element's children

– HTTP GET, POST, PUT and DELETE supported– response's content type is defined using Accept header

• text/xml, application/json– X-Road SOAP-headers are passed via HTTP headers

• X-XRd-UserId, X-XRd-MessageId– reformatting of resource links– support for browser-based access

Page 23: X-Road in Finland & REST Gateway

Consumer Gateway v0.0.7

• Consumer Gateway accepts requests, and ittranslates them to SOAP messages following the X-Road v6 SOAP profile.

• Configuration[GET] www.restservice.com=>FI.GOV.123456-7.TestService.getRandom.v1

Page 24: X-Road in Finland & REST Gateway

Consumer Gateway v0.0.7

• HTTP POST request with request body– Request body is sent as SOAP attachment identified by

Content-ID Mime header

Page 25: X-Road in Finland & REST Gateway

Future development

• UI for managing configuration• Packaging

– RPM (Centos, RHEL)– Debian (Ubuntu)

• RAML / Swagger / JSON Schema -> WSDLconversion

• Security measures• Message queue• Other ideas – why not contribute?!

Page 26: X-Road in Finland & REST Gateway

Links

• REST Gateway in GitHub– https://github.com/educloudalliance/xroad-rest-gateway

• XRd4J – X-Road v6 Java Library– https://github.com/petkivim/xrd4j

• Adapter Server Example– https://github.com/petkivim/x-road-adapter-example

• Test Client– https://github.com/petkivim/x-road-test-client

• Test Service– https://github.com/petkivim/x-road-test-service

Page 27: X-Road in Finland & REST Gateway

Questions?

Petteri KivimäkiInformation Systems ManagerPopulation Register [email protected].: +358 50 593 1710