How to Test That the Security Server Is Working After Completing Installation and Configuration?

How to test that the Security Server is working as expected after completing initial installation and configuration?

The easiest way to test that everything works as expected is to use so called meta services provided by the Security Server. The meta services are built-in REST and SOAP services that can be used by X-Road participants to discover what services are available to them and download the OpenAPI and WSDL files describing these services. These services are described by the X-Road service metadata protocol for REST and SOAP.

Before starting the test, please check the client subsystem’s Connection Type and update the configuration if needed:

https://docs.x-road.global/Manuals/ug-ss_x-road_6_security_server_user_guide.html#91-communication-with-service-consumer-information-systems

Incorrect Connection Type configuration causes an error message to be returned.

Step-by-step guide

To be able to complete this test the Security Server must have at least one registered subsystem which is used as a client and a service.

Check your X-Road instance's identifier, your organization's member class and member code, and a subsystem code.

Using REST

  1. Update the below command with the information collected before.

    curl -H "accept: application/json" -H "X-Road-Client: <INSTANCE_IDENTIFIER>/<MEMBER_CLASS>/<MEMBER_CODE>/<SUBSYSTEM_CODE>" "http://{SECURITYSERVER}/r1/<INSTANCE_IDENTIFIER>/<MEMBER_CLASS>/<MEMBER_CODE>/<SUBSYSTEM_CODE>/listMethods" -k
  2. Run the above curl command.

  3. The response should look like this if there are no services under the subsystem yet. Getting the response below means that everything is working as expected.

    {"service":[]}

Using SOAP

  1. Update the message below with the information collected before.

  2. Save the message below in a file, e.g. listClients.xml.

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:iden="http://x-road.eu/xsd/identifiers" xmlns:xrd="http://x-road.eu/xsd/xroad.xsd"> <SOAP-ENV:Header> <xrd:client iden:objectType="SUBSYSTEM"> <iden:xRoadInstance>MY-ID</iden:xRoadInstance> <iden:memberClass>GOV</iden:memberClass> <iden:memberCode>12345678</iden:memberCode> <iden:subsystemCode>TestClient</iden:subsystemCode> </xrd:client> <xrd:service iden:objectType="SERVICE"> <iden:xRoadInstance>MY-ID</iden:xRoadInstance> <iden:memberClass>GOV</iden:memberClass> <iden:memberCode>12345678</iden:memberCode> <iden:subsystemCode>TestClient</iden:subsystemCode> <iden:serviceCode>listMethods</iden:serviceCode> </xrd:service> <xrd:userId>tuser</xrd:userId> <xrd:id>1</xrd:id> <xrd:protocolVersion>4.0</xrd:protocolVersion> </SOAP-ENV:Header> <SOAP-ENV:Body> <xrd:listMethods/> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
  3. Send the request using curl.

  4. The response should look like this if there are no services under the subsystem yet. Getting the response below means that everything is working as expected.