Skip to main content
Table of contents

Matching Service Adapter

The Matching Service Adapter (MSA) is a software tool supplied free of charge by the GOV.UK Verify team. It simplifies communication between your Local Matching Service and the GOV.UK Verify Hub.

Set up your MSA

The Matching Service Adapter (MSA) is a software tool supplied free of charge by the GOV.UK Verify team. It simplifies communication between your Local Matching Service and the GOV.UK Verify Hub.

The MSA handles complex matching requirements. We recommend that you use the MSA and always make sure you have the latest version.

You need to host the MSA so the GOV.UK Verify Hub can make requests to it.

If you do not want to use the MSA, contact the GOV.UK Verify team.

To run the Matching Service Adapter (MSA) you need:

  • Java Runtime Environment (JRE) version 8
  • 512 MB to 1 GB of RAM, on top of what you need to run your operating system
  1. Download the latest release of the MSA. It contains:

    • a JAR (Java Archive) file containing the MSA implementation, as well as the trust stores prod_ida_idp_metadata.ts, prod_ida_hub_metadata.ts, test_ida_idp_metadata.ts, and test_ida_hub_metadata.ts
    • a truststore metadata file for non-production environments (the SAML compliance tool and the integration environment) - test_ida_metadata.ts
    • a truststore metadata file for the production environment - prod_ida_metadata.ts
    • a sample YAML configuration file for non-production environments - test-config.yml
    • a sample YAML configuration file for the production environment - prod-config.yml
  2. To extract the files, run the following command::

      unzip verify-matching-service-adapter-[build number].zip
    

Versioning

Typically, GOV.UK Verify releases a new version of the MSA every 2 or 3 months. Some releases are essential updates and we may remove support for older versions. To keep updated, contact the GOV.UK Verify support team to ensure you are on the MSA email distribution list.

Get certificates for your MSA

Your MSA needs a signing certificate and an encryption certificate. You must use different certificates for each environment.

To obtain certificates:

Configure your MSA

When you start the MSA, you need to supply a YAML configuration file.

The MSA zip file contains two sample YAML configuration files:

  • test-config.yml for the SAML compliance tool and the integration environment
  • prod-config.yml for the production environment

Adapt the YAML configuration file where required.

 Start the Matching Service Adapter

To start using the MSA, run the following command, supplying the path to your configuration file:

java -jar [filename].jar server [path to configuration file].yml

You can now run SAML compliance tests between the hub and your MSA. To help build your local matching service, you can use the example of the JSON request that the MSA posts to your service.

Error: Signature verification failed

When starting the MSA, you may receive an error message with the phrase ‘signature verification failed’. This is expected behaviour and is logged from a third-party library.

The Verify hub metadata contains multiple signing certificates, but only one private key is in use at a time. The metadata refreshes automatically approximately every 10 minutes.

The MSA checks each of the certificates in turn. The MSA will return ‘Signature verification failed’ if it checks an unused certificate. It will then continue to check each certificate until it finds a valid certificate.

Monitoring

When the MSA is installed in your integration or production environment, health checks run every 60 seconds to ensure that the MSA is functioning correctly. They test:

  • connectivity
  • that the MSA accepts the hub signature
  • that the hub accepts the MSA signature

Configure HTTP proxies

The MSA supports HTTP and HTTPS proxies configured by Java properties.

For information on configuring HTTPS proxies, refer to the Java documentation.

Secure your MSA

MSA TLS certificates

The table below shows the root certificate authorities that GOV.UK Verify trusts for HTTPS connections to your matching service in the integration and production environments.

Root certificate authority Common name X509v3 subject key identifier
AddTrust External CA Root AddTrust External CA Root AD:BD:98:7A:34:B4:26:F7:FA:C4:26:54:EF:03:BD:E0:24:CB:54:1A
GeoTrust Global CA GeoTrust Global CA C0:7A:98:68:8D:89:FB:AB:05:64:0C:11:7D:AA:7D:65:B8:CA:CC:4E
QuoVadis Root CA 2 QuoVadis Root CA 2 1A:84:62:BC:48:4C:33:25:04:D4:EE:D0:F6:03:C4:19:46:D1:94:6B

For the SAML compliance tool, use self-signed certificates.

If you want to use a root certificate authority for your matching service that isn’t in the above table, raise a ticket with us by sending an email to idasupport+onboarding@digital.cabinet-office.gov.uk. We’ll review your chosen root certificate authority before adding it to this list.

When you raise a ticket, indicate the chain of trust with your SSL/TLS certificate. You’ll also need the chain of trust when you configure your server.

Connect your MSA to the internet securely

Your MSA must only respond to matching requests from the GOV.UK Verify hub, otherwise there’s a risk of user data being compromised.

The MSA checks that matching service requests are genuine by checking their cryptographic signatures.

To ensure that only the GOV.UK Verify hub can access the MSA, make sure your MSA:

  • is only exposed as HTTPS endpoints
  • only uses strong recent versions of TLS (for example TLS 1.2); turn off obsolete and insecure versions (for example SSLv1, SSLv2, and SSLv3)
  • supports multiple strong cipher suites

    GOV.UK Verify will remove support for TLS cipher suites if serious weaknesses become known. Having multiple suites provides resilience.

  • allows requests and health checks only from the IP addresses of hub services provided by your engagement lead

    Each MSA should communicate with only 1 hub service (SAML compliance tool, integration environment, or production environment).