x-road in finland & rest gateway
TRANSCRIPT
X-Road in Finland – TheNational Data ExchangeLayer
Petteri KivimäkiInformation Systems Manager
Index
• National Architecture for Digital Services• The National Data Exchange Layer
– Schedule– Organization– Interest Groups– Work Groups
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
National Architecture for Digital Services
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.
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)
Responsibilities
Interest Groups
• Public sector– Governmental organizations, municipalities
• Private sector– Companies, private persons
• Other– Associations, non-profit organizations, educational institutions
etc.
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…
REST Gateway – RESTSupport for X-Road
Petteri KivimäkiInformation Systems Manager
Index
• Backround• Requirements for REST support• 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
Service Provider
Service Consumer
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
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
REST Gateway v0.0.7
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->)
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
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/
Provider Gateway v0.0.7
• HTTP POST with request body– Request body is sent as SOAP attachment identified by
Content-ID Mime header
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
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
Consumer Gateway v0.0.7
• HTTP POST request with request body– Request body is sent as SOAP attachment identified by
Content-ID Mime header
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?!
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
Questions?
Petteri KivimäkiInformation Systems ManagerPopulation Register [email protected].: +358 50 593 1710