Class Authentication

Class Documentation

class Authentication

Public Functions

virtual ~Authentication() = default
virtual ValidationResult_t validate_local_identity(IdentityHandle **local_identity_handle, GUID_t &adjusted_participant_key, const uint32_t domain_id, const RTPSParticipantAttributes &participant_attr, const GUID_t &candidate_participant_key, SecurityException &exception) = 0

Validates the identity of the local RTPSParticipant.

Parameters
Returns

Validation status.

virtual ValidationResult_t validate_remote_identity(IdentityHandle **remote_identity_handle, const IdentityHandle &local_identity_handle, const IdentityToken &remote_identity_token, const GUID_t &remote_participant_key, SecurityException &exception) = 0

Initiates the process of validating the identity of the discovered remote RTPSParticipant, represented as an IdentityToken object.

Parameters
  • remote_identity_handle – (out) A handle that can be used to locally refer to the remote Authenticated Participant in subsequent interactions with the AuthenticationPlugin.

  • local_identity_handle – A handle to the local RTPSParticipant requesting the remote participant to be validate.

  • remote_identity_token – A token received as part of ParticipantProxyData, representing the identity of the remote DomainParticipant.

  • remote_participant_key

  • exception – (out) A SecurityException object.

Returns

Validation status.

virtual ValidationResult_t begin_handshake_request(HandshakeHandle **handshake_handle, HandshakeMessageToken **handshake_message, const IdentityHandle &initiator_identity_handle, IdentityHandle &replier_identity_handle, const CDRMessage_t &cdr_participant_data, SecurityException &exception) = 0

This operation is used to initiate a handshake.

Parameters
  • handshake_handle – (out) A handle returned by the Authentication plugin used to keep the state of the handshake.

  • handshake_message – (out) A HandshakeMessageToken to be sent using the BuiltinParticipantMessageWriter.

  • initiator_identity_handleHandle to the local participant that originated the handshake.

  • replier_identity_handleHandle to the remote participant whose identity is being validated.

  • cdr_participant_dataParticipant’s data.

  • exception – (out) A SecurityException object.

Returns

Validation status.

virtual ValidationResult_t begin_handshake_reply(HandshakeHandle **handshake_handle, HandshakeMessageToken **handshake_message_out, HandshakeMessageToken &&handshake_message_in, IdentityHandle &initiator_identity_handle, const IdentityHandle &replier_identity_handle, const CDRMessage_t &cdr_participant_data, SecurityException &exception) = 0

This operation shall be invoked by the implementation in reaction to the reception of the initial handshake message that originated on a RTPSParticipant that called the begin_handshake_request operation.

Parameters
  • handshake_handle – (out) A handle returned by the Authentication Plugin used to keep the state of the handshake.

  • handshake_message_out – (out) A HandshakeMessageToken containing a message to be sent using the BuiltinParticipantMessageWriter.

  • handshake_message_in – A HandshakeMessageToken containing a message received from the BuiltinParticipantMessageReader.

  • initiator_identity_handleHandle to the remote participant that originated the handshake.

  • replier_identity_handleHandle to the local participant that is initiaing the handshake.

  • cdr_participant_dataParticipant’s CDRMessage.

  • exception – A SecurityException object.

Returns

Validation status.

virtual ValidationResult_t process_handshake(HandshakeMessageToken **handshake_message_out, HandshakeMessageToken &&handshake_message_in, HandshakeHandle &handshake_handle, SecurityException &exception) = 0

This operation is used to continue a handshake.

Parameters
  • handshake_message_out – (out) A HandshakeMessageToken containing the message_data that should be place in a ParticipantStatelessMessage to be sent using the BuiltinParticipantMessageWriter.

  • handshake_message_in – The HandshakeMessageToken contained in the message_data attribute of the ParticipantStatelessMessage received.

  • handshake_handleHandle returned by a correspoing previous call to begin_handshake_request or begin_handshake_reply.

  • exception – A SecurityException object.

Returns

Validation status.

virtual std::shared_ptr<SecretHandle> get_shared_secret(const HandshakeHandle &handshake_handle, SecurityException &exception) const = 0

Retrieve the SecretHandle resulting with a successfully completed handshake.

Parameters
  • handshake_handleHandle returned bu a corresponding previous call to begin_handshake_request or begin_handshake_reply, which has successfully complete the handshake operations.

  • exceptionSecurityException object

Returns

SecretHandle.

virtual bool set_listener(AuthenticationListener *listener, SecurityException &exception) = 0

Sets the AuthenticationListener that the Authentication plugin will use to notify the infrastructure of events relevant to the Authentication of RTPSParticipants.

Parameters
virtual bool get_identity_token(IdentityToken **identity_token, const IdentityHandle &handle, SecurityException &exception) = 0
virtual bool return_identity_token(IdentityToken *token, SecurityException &exception) = 0

Returns the IdentityToken object to the plugin so it can be disposed of.

Parameters
  • token – An IdentityToken issued by the plugin on a prior call to get_identity_token.

  • exception – (out) A SecurityException object.

virtual bool return_handshake_handle(HandshakeHandle *handshake_handle, SecurityException &exception) = 0

Returns the Handshakehandle object to the plugin so it can be disposed of.

Parameters
  • handshake_handle – A HandshakeHandle issued by the plugin on a prior call to begin_handshake_request or begin_handshake_reply.

  • exception – (out) A SecurityException object.

virtual IdentityHandle *get_identity_handle(SecurityException &exception) = 0

Creates and IdentityHandle for the handshake process.

Parameters

exception – (out) A SecurityException object.

Returns

the new handle or nullptr on failure

virtual bool return_identity_handle(IdentityHandle *identity_handle, SecurityException &exception) = 0

Returns the IdentityHandle object to the plugin so it can be disposed of.

Parameters
  • identity_handle – An IdentityHandle issued by the plugin on a prior call to validate_local_identity or validate_remote_identity.

  • exception – (out) A SecurityException object.

virtual bool return_sharedsecret_handle(std::shared_ptr<SecretHandle> &sharedsecret_handle, SecurityException &exception) const = 0

Returns the SecretHandle object to the plugin so it can be disposed of.

Parameters
  • sharedsecret_handle – An SharedSecretHandle issued by the plugin on a prior call to get_shared_secret.

  • exception – (out) A SecurityException object.

virtual bool set_permissions_credential_and_token(IdentityHandle &identity_handle, PermissionsCredentialToken &permissions_credential_token, SecurityException &ex) = 0
virtual bool get_authenticated_peer_credential_token(PermissionsCredentialToken **token, const IdentityHandle &identity_handle, SecurityException &exception) = 0
virtual bool return_authenticated_peer_credential_token(PermissionsCredentialToken *token, SecurityException &ex) = 0
inline bool set_logger(Logging *logger, SecurityException&)

Protected Functions

inline const Logging *get_logger() const