8.5.6 FinishRequest

FinishRequest is used to retrieve a KeyCredential.

If a Certificate was provided in the request, then the KeyCredential secret is encrypted using an asymmetric encryption algorithm specified by the SecurityPolicyUri provided in the request.

The CredentialId is the identifier, such as a user name, which often needs to be presented when using the CredentialSecret.

The CredentialSecret is a UA Binary encoded form of one of the EncryptedSecret DataTypes defined in OPC 10000-4. If the SecurityPolicyUri requires an RSA Certificate then the RsaEncryptedSecret DataType is used. If the SecurityPolicyUri requires an ECC Certificate then the EccEncryptedSecret DataType is used.

The Signing Certificate is owned by the source of the KeyCredential. The KeyCredentialService determines the most appropriate Certificate to use.

If the return code is Bad_RequestNotComplete then the request has not been processed and the Client should call again. It is expected that a Client will periodically call this Method until the KeyCredentialService has completed the request.

This Method shall be called from an encrypted SecureChannel and from a Client that has access to the KeyCredentialAdmin Role, the ApplicationAdmin Privilege, or the ApplicationSelfAdmin Privilege (see 8.2). In addition, this Method shall only be called SecureChannel using that same Certificate that Client used to call StartRequest.

Signature

FinishRequest (
	[in]  NodeId RequestId
	[in]  Boolean CancelRequest
	[out] String CredentialId
	[out] ByteString CredentialSecret
	[out] String CertificateThumbprint
	[out] String SecurityPolicyUri
	[out] NodeId[] GrantedRoles
);
Argument Description
RequestIdThe identifier returned from a previous call to StartRequest.
CancelRequest

If TRUE the request is cancelled and no KeyCredentials are returned.

If FALSE the normal processing proceeds.

CredentialIdThe unique identifier for the KeyCredential.
CredentialSecretThe secret associated with the KeyCredential.
CertificateThumbprintThe SHA1 hash of the Certificate used to encrypt the secret for RSA SecurityPolicies. Set to NULL for ECC or RSA-DH SecurityPolicies.
SecurityPolicyUriThe SecurityPolicy used to create the CredentialSecret.
GrantedRoles

A list of Roles which have been granted to KeyCredential.

If empty then the information is not relevant or not available.

Method Result Codes (defined in Call Service)

Result Code Description
Bad_InvalidArgumentThe RequestId is does not reference to a valid request for the application.
Bad_RequestNotCompleteThe request has not been processed by the Server yet.
Bad_UserAccessDeniedThe current user does not have the rights required.
Bad_RequestNotAllowed

The KeyCredential manager rejected the request.

The text associated with the error should indicate the exact reason.

Bad_SecurityModeInsufficientThe SecureChannel is not encrypted.

Table 127 specifies the AddressSpace representation for the FinishRequest Method.

Table 127 – FinishRequest Method AddressSpace Definition
Attribute Value
BrowseName2:FinishRequest
References NodeClass BrowseName DataType TypeDefinition ModellingRule
0:HasPropertyVariable0:InputArguments0:Argument[] 0:PropertyTypeMandatory
0:HasPropertyVariable0:OutputArguments0:Argument[] 0:PropertyTypeMandatory