RealMe

RealMe

RealMe login service Messaging Test Site

About Saml v2.0 AuthnRequest

A RealMe login service SAML v2.0 AuthnRequest is sent from a SAML Service Provider (SP) and initiates a SAML v2.0 response at the MTS IdP.

As the majority of integrations use products or code libraries that comply with the OASIS SAML v2.0 standard, developers should focus on the RealMe requirements that differ in some way from the OASIS Standard or have additional NZ specific constraints.

The following list of the key RealMe SAML message request parameters highlights the ones that are most likely to need close attention. Refer to RealMe request parameters for more detail.

  1. Issuer – identifies which Service Provider has sent the AuthnRequest. This should conform to the recommended RealMe three-part format used for entityID in the metadata.
  2. AllowCreate (within NameID policy) - when set to FALSE informs the IdP that the user is in the returning user process and must have previously completed the agency's registration process.
  3. Format (within NameID policy) – the RealMe login service format is "persistent", but "unspecified" is also permitted in the AuthnRequest.
  4. RequestedAuthnContextClassRef – tells the IdP what type of authentication is required by the SP. The RealMe login service uses custom values, for example:
    urn:nzl:govt:ict:stds:authn:deployment:GLS:SAML:2.0:ac:classes:LowStrength
  5. Comparison (within RequestedAuthnContext) – the recommend value is "exact".
  6. AssertionConsumerServiceIndex - this indirectly informs the IdP where to return the AuthnResponse according to the corresponding values in the SAML metadata including the SP endpoint.
  7. RelayState – this optional parameter may be provided for private use by the Service Provider to maintain the session state. It must not exceed 80 bytes in length and should be integrity protected by the Service Provider.

The signature is generated by signing the base64 and URL encoded AuthnRequest combined with the RelayState (if present in the request) and the URL representation of the signature algorithm. A sample SAML v2.0 AuthnRequest is shown below:

You can submit the content of the SAMLRequest here.

Or send a request directly from your browser by appending your SAML Request to the MTS endpoint (as provided in the RealMe login service IdP metadata file).

Once your SAML v2.0 AuthnRequest passes successful SAML v2.0 messaging validation, schema validation and signature validation, you are redirected to an outcome page, where you can initiate a SAML v2.0 response.

If your SAML v2.0 AuthnRequest does not pass validation, the relevant error messages are provided to assist you in resolving the error, so you can try again.