Re-register a Member heading-link-icon

A member Corda identity that has been granted admission to a membership group. Synonym for a virtual node or group member. may request to update its own member-provided context, for example, after key rotation or changes to its endpoint information. Additionally, a member who previously attempted to register but failed may wish to try again. The membership re-registration steps described in this section can be followed for both of these scenarios.

The instructions on this page assume that you have completed the registration steps.

You can learn more about configuring the registration process in the Managing Members section.

  1. Inspect the member-provided context.

    Currently, updates to the member-provided context are limited to custom properties (keys with the ext. prefix) and endpoint information only. Changes to other Corda platform properties are not currently supported.

    You can inspect a member’s current member-provided context either by performing a member lookup, or by looking up its latest registration request. For example, to look up Alice:

    curl -k -u $REST_API_USER:$REST_API_PASSWORD -X GET $REST_API_URL/members/$HOLDING_ID?O=Alice
    
    Invoke-RestMethod -SkipCertificateCheck  -Headers @{Authorization=("Basic {0}" -f $AUTH_INFO)} -Uri "$REST_API_URL/membership/$HOLDING_ID?O=Alice" | ConvertTo-Json -Depth 4
    

    Alternatively, to retrieve the registration request:

    export REGISTRATION_ID=<registration ID>
    curl -k -u $REST_API_USER:$REST_API_PASSWORD -X GET $REST_API_URL/membership/$HOLDING_ID/$REGISTRATION_ID
    
    $REGISTRATION_ID = <registration ID>
    Invoke-RestMethod -SkipCertificateCheck  -Headers @{Authorization=("Basic {0}" -f $AUTH_INFO)} -Uri "$REST_API_URL/membership/$HOLDING_ID/$REGISTRATION_ID"
    

    To retrieve information about key pairs (for example, key ID required for the registration context) belonging to a holding identity, use:

    curl -k -u $REST_API_USER:$REST_API_PASSWORD -X GET $REST_API_URL/key/$HOLDING_ID
    

    The following is an example of a member-provided context for a member who has previously registered successfully:

    REGISTRATION_CONTEXT='{
      "corda.session.keys.0.id": "'$SESSION_KEY_ID'",
      "corda.session.keys.0.signature.spec": "SHA256withECDSA",
      "corda.ledger.keys.0.id": "'$LEDGER_KEY_ID'",
      "corda.ledger.keys.0.signature.spec": "SHA256withECDSA",
      "corda.endpoints.0.connectionURL": "https://'$P2P_GATEWAY_HOST':'$P2P_GATEWAY_PORT'",
      "corda.endpoints.0.protocolVersion": "1"
    }'
    
    $REGISTRATION_CONTEXT = @{
      'corda.session.keys.0.id' =  $SESSION_KEY_ID
      'corda.session.keys.0.signature.spec' = "SHA256withECDSA"
      'corda.ledger.keys.0.id' = $LEDGER_KEY_ID
      'corda.ledger.keys.0.signature.spec' = "SHA256withECDSA"
      'corda.endpoints.0.connectionURL' = "https://$P2P_GATEWAY_HOST`:$P2P_GATEWAY_PORT"
      'corda.endpoints.0.protocolVersion' = "1"
    }
    
  2. Add a custom property to the member-provided context. In this example, the updated context contains the new custom property with the ext. prefix:

    export REGISTRATION_CONTEXT='{
      "corda.session.keys.0.id": "'$SESSION_KEY_ID'",
      "corda.session.keys.0.signature.spec": "SHA256withECDSA",
      "corda.ledger.keys.0.id": "'$LEDGER_KEY_ID'",
      "corda.ledger.keys.0.signature.spec": "SHA256withECDSA",
      "corda.endpoints.0.connectionURL": "https://'$P2P_GATEWAY_HOST':'$P2P_GATEWAY_PORT'",
      "corda.endpoints.0.protocolVersion": "1",
      "ext.sample": "apple"
    }'
    
    $REGISTRATION_CONTEXT = @{
      'corda.session.keys.0.id' =  $SESSION_KEY_ID
      'corda.session.keys.0.signature.spec' = "SHA256withECDSA"
      'corda.ledger.keys.0.id' = $LEDGER_KEY_ID
      'corda.ledger.keys.0.signature.spec' = "SHA256withECDSA"
      'corda.endpoints.0.connectionURL' = "https://$P2P_GATEWAY_HOST`:$P2P_GATEWAY_PORT"
      'corda.endpoints.0.protocolVersion' = "1",
      'ext.sample' = "apple"
    }
    
  3. Optional: Include serial number in the registration context.

    The corda.serial Corda platform property is embedded in the MemberInfo of all members. It acts as the MemberInfo’s version, and is incremented by 1 after each registration.

    This serial number may be optionally included in the registration context to specify which version of the MemberInfo was intended to be updated. If no serial number is provided while re-registering, the platform uses the member’s latest serial number by default. Only the latest MemberInfo version may be updated - requests with an older serial number are declined. R3 recommends providing the serial number to avoid unintentional updates, in case you have an outdated version of the MemberInfo.

    You can retrieve the serial number from the MGM-provided context of the MemberInfo by performing a member lookup.

    export REGISTRATION_CONTEXT='{
      "corda.session.keys.0.id": "'$SESSION_KEY_ID'",
      "corda.session.keys.0.signature.spec": "SHA256withECDSA",
      "corda.ledger.keys.0.id": "'$LEDGER_KEY_ID'",
      "corda.ledger.keys.0.signature.spec": "SHA256withECDSA",
      "corda.endpoints.0.connectionURL": "https://'$P2P_GATEWAY_HOST':'$P2P_GATEWAY_PORT'",
      "corda.endpoints.0.protocolVersion": "1",
      "ext.sample": "apple",
      "corda.serial": "1"
    }'
    
    $REGISTRATION_CONTEXT = @{
      'corda.session.keys.0.id' =  $SESSION_KEY_ID
      'corda.session.keys.0.signature.spec' = "SHA256withECDSA"
      'corda.ledger.keys.0.id' = $LEDGER_KEY_ID
      'corda.ledger.keys.0.signature.spec' = "SHA256withECDSA"
      'corda.endpoints.0.connectionURL' = "https://$P2P_GATEWAY_HOST`:$P2P_GATEWAY_PORT"
      'corda.endpoints.0.protocolVersion' = "1",
      'ext.sample' = "apple",
      'corda.serial' = "1"
    }
    
  4. Send a re-registration request using the common registration/re-registration endpoint.

    If a member submits more than one registration request at the same time, the MGM queues the requests and processes them one by one, treating each subsequent request in the queue as a re-registration attempt.

    If a member submits multiple re-registration requests with the same serial number, the MGM processes the first request (if the serial number is valid). The MGM declines the other requests because the serial number specified in those requests is outdated after the first request is completed.

    export REGISTRATION_REQUEST='{"memberRegistrationRequest":{"context": '$REGISTRATION_CONTEXT'}}'
    curl -k -u $REST_API_USER:$REST_API_PASSWORD -d "$REGISTRATION_REQUEST" $REST_API_URL/membership/$HOLDING_ID
    
    $RESGISTER_RESPONSE = Invoke-RestMethod -SkipCertificateCheck  -Headers @{Authorization=("Basic {0}" -f $AUTH_INFO)} -Method Post -Uri "$REST_API_URL/membership/$HOLDING_ID" -Body (ConvertTo-Json -Depth 4 @{
        memberRegistrationRequest = @{
            context = $REGISTRATION_CONTEXT
        }
    })
    $RESGISTER_RESPONSE.registrationStatus
    

    This sends the request to the MGM, which should return a successful response with status SUBMITTED. You can check if the request was approved by checking the status of the registration request.

    After successful re-registration, you should be able to see the member’s information containing the ext.sample field in their member-provided context. The member retains its most recent status in the group, for example, a suspended member will remain suspended after successful re-registration.

Was this page helpful?

Thanks for your feedback!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.

We're sorry this page wasn't helpful. Let us know how we can make it better!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Create an issue

Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.