Entire-Metadata: .entire/metadata/fb87247f-2a75-407e-b336-cbc8c20ba5a6 Entire-Session: fb87247f-2a75-407e-b336-cbc8c20ba5a6 Entire-Strategy: manual-commit
349 lines
16 KiB
C
349 lines
16 KiB
C
/*
|
|
|
|
(c) Copyright, Real-Time Innovations, 2011-2016.
|
|
All rights reserved.
|
|
No duplications, whole or partial, manual or electronic, may be made
|
|
without express written permission. Any such copies, or
|
|
revisions thereof, must display this notice unaltered.
|
|
This code contains trade secrets of Real-Time Innovations, Inc.
|
|
|
|
Description
|
|
-----------
|
|
Properties for the user to configure logging plugin.
|
|
=========================================================================*/
|
|
#ifndef security_logging_h
|
|
#define security_logging_h
|
|
|
|
#include "security/security_infrastructure.h"
|
|
#include "security/security_default.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* General properties */
|
|
#define RTI_SECURITY_LOGGING_PROPERTY_PREFIX "logging."
|
|
#define PROPERTY_PLUGIN_SUFFIX_LOGGING_VERBOSITY_DEFAULT "ERROR"
|
|
#define PROPERTY_PLUGIN_SUFFIX_LOGGING_MODE_MASK_DEFAULT "BUILTIN"
|
|
|
|
/* Defaults */
|
|
#define RTI_SECURITY_LOGGING_LOG_LEVEL_DEFAULT DDS_LOGGING_ERROR_LEVEL
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_THRESHOLD_DEFAULT 256
|
|
#define RTI_SECURITY_LOGGING_PLUGIN_METHOD_THRESHOLD_DEFAULT 80
|
|
#define RTI_SECURITY_LOGGING_PLUGIN_CLASS_THRESHOLD_DEFAULT 32
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_COUNT_MAX_DEFAULT 64
|
|
#define RTI_SECURITY_LOGGING_STRING_BUFFER_SIZE_MAX 256
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_SIZE_MAX_DEFAULT \
|
|
RTI_SECURITY_LOGGING_QUEUE_MESSAGE_MAX_SIZE_DEFAULT
|
|
#define RTI_SECURITY_LOGGING_QUEUE_SIZE_DEFAULT \
|
|
(RTI_SECURITY_LOGGING_MESSAGE_COUNT_MAX_DEFAULT \
|
|
* RTI_SECURITY_LOGGING_MESSAGE_SIZE_MAX_DEFAULT)
|
|
#define RTI_SECURITY_LOGGING_MODE_MASK_DEFAULT RTI_SECURITY_LOG_MODE_MASK_BUILTIN
|
|
|
|
|
|
#define RTI_SECURITY_LOGGING_LOG_OPTIONS_DEFAULT { \
|
|
RTI_SECURITY_LOGGING_LOG_LEVEL_DEFAULT, /* log_level */ \
|
|
RTI_SECURITY_LOGGING_MODE_MASK_DEFAULT, /* mode_mask */ \
|
|
RTI_SECURITY_LOGGING_QUEUE_SIZE_DEFAULT, /* queue_size */ \
|
|
RTI_SECURITY_LOGGING_MESSAGE_COUNT_MAX_DEFAULT, /* queue_message_count_max */ \
|
|
RTI_SECURITY_LOGGING_MESSAGE_SIZE_MAX_DEFAULT, /* queue_message_size_max */ \
|
|
RTI_SECURITY_LOGGING_MESSAGE_THRESHOLD_DEFAULT, /* thread_message_threshold */ \
|
|
RTI_SECURITY_LOGGING_PLUGIN_METHOD_THRESHOLD_DEFAULT, /* thread_plugin_method_threshold */ \
|
|
RTI_SECURITY_LOGGING_PLUGIN_CLASS_THRESHOLD_DEFAULT, /* thread_plugin_class_threshold */ \
|
|
NULL, /* profile */ \
|
|
DDS_BOOLEAN_TRUE /* auto_enable_writer */ \
|
|
}
|
|
|
|
/* Keep these logging messages in alphabetical order. */
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_CANNOT_EXCEED_UINT64_MAX_PARTICIPANTS \
|
|
"Cannot exceed 18446744073709551615 DomainParticipants."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_CERT_UPDATE_BUT_KEY_REVISION_DISABLED \
|
|
"Updates to the local identity certificate are not allowed because " \
|
|
"the key revision feature is disabled in the Governance Document."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_CERT_UPDATE_BUT_OCSP_REQUIRED \
|
|
"Cannot update the local certificate because the Governance Document " \
|
|
"requires OCSP but the new certificate is missing the information about " \
|
|
"its responder."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_CHALLENGE_SIGNATURE_VERIFICATION_FAILURE \
|
|
"failed to verify challenge signature."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_CRL_UPDATE_BUT_KEY_REVISION_DISABLED \
|
|
"Updates to the local CRL (Certificate Revocation List) are not allowed " \
|
|
"because the key revision feature is disabled in the Governance Document."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_DECRYPT_FINAL_FAILURE \
|
|
"DecryptFinal failed. Possible GCM authentication failure."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_DECRYPT_FINAL_PSK_FAILURE \
|
|
"DecryptFinal failed. Possible GCM authentication failure. " \
|
|
"Please check that the DomainParticipants in your system are " \
|
|
"all using the same value for the " \
|
|
PROPERTY_NAME_DDS_SEC_CRYPTO_RTPS_PSK_SECRET_PASSPHRASE " property."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_DENY_RULE_FOUND_FOR_PARTICIPANT \
|
|
"Participant not allowed: deny rule found."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_DIFFERENT_PRESHARED_KEY \
|
|
"Received message encoded using a different pre-shared key."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_DUPLICATE_SUBJECT_NAME_IN_PERMISSIONS_DOCUMENT \
|
|
"Parse XML file. Duplicate <subject_name>: "
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_DUPLICATE_SUBJECT_NAME_EXPRESSION_IN_PERMISSIONS_DOCUMENT \
|
|
"Parse XML file. Duplicate <subject_name_expression>: "
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_EXTRA_PSK_PASSPHRASE_CONFLICTS_WITH_PRIMARY \
|
|
"Found an extra passphrase with the same id as the primary passphrase, " \
|
|
"but with a different secret."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_EXTRA_PSK_PASSPHRASE_MATCH_PRIMARY \
|
|
"Found one extra passphrase and it has the same id as the primary " \
|
|
"passphrase. You need at least one extra passphrase that is different " \
|
|
"from the primary."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_EXTRA_PSK_PASSPHRASES_MATCH_PRIMARY \
|
|
"Found two extra passphrases with the same id as the primary passphrase. " \
|
|
"You need at least one extra passphrase that is different from the primary."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_FAILED_TO_READ_CERTIFICATE_FROM_FILE \
|
|
"Failed to read identity certificate from file."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_GET_ENDPOINT_SEC_ATTRIBUTES \
|
|
"Error getting the local endpoint security attributes."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_HANDSHAKE_REPLY_SUCCESS \
|
|
"Successfully began handshake reply."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_INCOMPATIBLE_MAIN_AND_EXTRA_PASSPHRASES \
|
|
"Main passphrase is incompatible with extra passphrases."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_INCOMPATIBLE_PRODUCT_VERSION_AND_CLASS_ID \
|
|
"Received incompatible product version and class id values in the " \
|
|
"remote DomainParticipant identity token."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_INCONSISTENT_PROTECTION_KIND_AND_MAX_RECEIVER_SPECIFIC_MACS_DP \
|
|
"Inconsistent configuration: rtps_protection_kind has " \
|
|
"WITH_ORIGIN_AUTHENTICATION, but cryptography.max_receiver_specific_macs " \
|
|
"== 0."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_INCONSISTENT_PROTECTION_KIND_AND_MAX_RECEIVER_SPECIFIC_MACS_EP \
|
|
"Inconsistent configuration: [discovery|liveliness|metadata]_protection_kind has " \
|
|
"WITH_ORIGIN_AUTHENTICATION, but cryptography.max_receiver_specific_macs " \
|
|
"== 0 or AUTO (the default)."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_INCORRECT_CRC \
|
|
"Incorrect CRC detected."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_LIGHTWEIGHT_PLUGINS_REQUIRE_PASSPHRASE \
|
|
"The Lightweight Builtin Security Plugins library requires enabling " \
|
|
"pre-shared key protection. Configure the " \
|
|
PROPERTY_NAME_DDS_SEC_CRYPTO_RTPS_PSK_SECRET_PASSPHRASE \
|
|
" property."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_LOCAL_CERTIFICATE_UPDATE_SUCCESS \
|
|
"Successfully updated the local identity certificate."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_LOCAL_STATUS_TOKEN_UPDATE_SUCCESS \
|
|
"Successfully updated the local status token."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_LOOKUP_KEY_FAILURE \
|
|
"Failed to look up key in db."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_MATCHING_SN_AFTER_SN_EXPRESSION_IN_PERMISSIONS_DOCUMENT \
|
|
"XML file contains a matching <subject_name> after a matching " \
|
|
"<subject_name_expression>. The more specific <subject_name> grant will be " \
|
|
"used."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_MEMORY_OPTIMIZATIONS_DISABLED \
|
|
"crypto library allocators: encoding/decoding memory optimizations are " \
|
|
"disabled."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_MISMATCHED_ALGORITHMS_PSK_FAILURE \
|
|
"Mismatched algorithms. Please check that the DomainParticipants in " \
|
|
"your system are all using the same value for the " \
|
|
PROPERTY_NAME_DDS_SEC_CRYPTO_RTPS_PSK_SYMMETRIC_CIPHER_ALGORITHM " property."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_NEW_ID_CERT_INCOMPATIBLE \
|
|
"New certificate is not compatible with the old one."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_NO_GRANT_FOR_SUBJECT_NAME \
|
|
"XML file doesn't contain a grant for subject name."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_NO_RULE_FOUND_FOR_DOMAIN \
|
|
"Participant not allowed: no rule found for the participant's domain id, " \
|
|
"domain tag, or partition; default DENY."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_NO_SUBJECT_NAME_IN_PERMISSIONS_DOCUMENT \
|
|
"Parse XML file. " \
|
|
"Grant must contain <subject_name> or <subject_name_expression>."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_NON_NULL_TERMINATED_CERT \
|
|
"Identity certificate binary property contains a malformed " \
|
|
"certificate. In particular, the certificate is not properly " \
|
|
"null terminated. This is likely caused by a non-compliant " \
|
|
"DDS Security implementation."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_NONE_PSK_PROTECTION_KIND \
|
|
"The value of the " PROPERTY_NAME_DDS_SEC_ACCESS_RTPS_PSK_PROTECTION_KIND \
|
|
"property is \"NONE\" but the Lightweight Security Plugins are enabled. " \
|
|
"RTPS messages will not be protected. Consider setting the protection " \
|
|
"kind to \"ENCRYPT\" or \"SIGN\"."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_OCSP_BUT_KEY_REVISION_DISABLED \
|
|
"The local Identity certificate uses OCSP but the key revision feature is " \
|
|
"disabled in the Governance Document. <enable_key_revision> in the " \
|
|
"Governance Document must be set to \"True\" for OCSP to work."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_OCSP_CERTIFICATE_CHAIN_VERIFICATION_FAILURE \
|
|
"Failed to verify the status of the certificate chain."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_OCSP_INVALID_TIMES \
|
|
"Validating the time fields in the OCSP response failed. Status token " \
|
|
"may have expired."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_OCSP_NEXT_UPDATE_MISSING \
|
|
"The OCSP response doesn't have a nextUpdate field, which is required by " \
|
|
"the Security Plugins. See the Security Plugins User Manual for details " \
|
|
"about the required OCSP responder configuration."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_ONE_EXTRA_PSK_PASSPHRASE_SUPPORTED \
|
|
"Up to two extra pre-shared key passphrases are supported - one matching " \
|
|
"the primary passphrase (optional) and one different."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_OUT_OF_MEMORY "insufficient memory."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_PASSPHRASE_ID_REQUIRES_UPDATE \
|
|
"A change in the pre-shared secret passphrase requires an update in " \
|
|
"the passphrase id."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_PERMISSIONS_DOMAIN_TAG_CONTAINS_NAME_ELEMENT \
|
|
"<name> can't be a child of <domains>."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_PERMISSIONS_DOMAIN_TAG_CONTAINS_VALUE_ELEMENT \
|
|
"<value> can't be a child of <domains>."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_PERMISSIONS_NAME_ALREADY_SPECIFIED_FOR_TAG \
|
|
"<name> already specified for this <tag>."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_PERMISSIONS_SUBJECT_NAME_ALREADY_SPECIFIED \
|
|
"<subject_name> or <subject_name_expression> already specified for this " \
|
|
"<grant>."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_PERMISSIONS_TAG_MISSING_NAME_OR_VALUE \
|
|
"<tag> must contain <name> and <value>."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_PERMISSIONS_UPDATE_NOT_ALLOWED \
|
|
"The new Permissions Document cannot be accepted. You can only update the " \
|
|
"validity dates."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_PERMISSIONS_VALUE_ALREADY_SPECIFIED_FOR_TAG \
|
|
"<value> already specified for this <tag>."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_PERMISSIONS_VALUE_BEFORE_NAME_IN_TAG \
|
|
"<name> must precede <value> in a <tag> sequence."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_PRESHARED_PASSPHRASE_SECRET_UPDATE_SUCCESS \
|
|
"successfully updated the pre-shared passphrase secrets."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_PRESHARED_SECRET_VALIDATION_FAILURE \
|
|
"Validation of the secret in the " \
|
|
PROPERTY_NAME_DDS_SEC_CRYPTO_RTPS_PSK_SECRET_PASSPHRASE \
|
|
" property failed."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_PRIVATE_KEY_READ_FAILURE \
|
|
"failed to read " PROPERTY_NAME_DDS_SEC_AUTH_PRIVATE_KEY "."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_RECEIVER_SPECIFIC_MAC_NOT_FOUND \
|
|
"Received receiver_specific_macs does not contain expected " \
|
|
"receiver_specific_key_id. This may happen if the participant has " \
|
|
"received a directed message that was intended for another participant "\
|
|
"on the same machine."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_REMOTE_CREDENTIAL_UPDATE_SUCCESS \
|
|
"Successfully updated the remote credential token."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_REMOTE_STATUS_TOKEN_UPDATE_SUCCESS \
|
|
"Successfully updated the remote status token."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_TOO_LONG_PASSPHRASE_ID_STRING \
|
|
"The number of characters for the passphrase id is too long. " \
|
|
"The maximum number is 10, to accommodate the [0, 4294967295] range."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_TWO_EXTRA_PASSPHRASES_BUT_NEITHER_IS_PRIMARY \
|
|
"Found two extra passphrases and neither match the primary passphrase."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_UNEXPECTED_HANDSHAKE \
|
|
"Received unexpected handshake message, probably from a participant that " \
|
|
"lost liveliness with us before ongoing authentication completed."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_UNEXPECTED_NON_ORIGINAL_CRYPTO_TOKEN \
|
|
"Received unexpected non-original CryptoTokens from an RTI participant."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_WRONG_EXTRA_PRESHARED_KEY_FORMAT \
|
|
PROPERTY_NAME_DDS_SEC_CRYPTO_RTPS_PSK_SECRET_PASSPHRASE_EXTRA \
|
|
". " RTI_SECURITY_LOGGING_MESSAGE_WRONG_PRESHARED_KEY_FORMAT
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_WRONG_INFO_SRC \
|
|
"Received unacceptable RTPS message (wrong INFO_SRC)."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_WRONG_LAST_PASSPHRASE_ID_BYTE \
|
|
RTI_SECURITY_LOGGING_MESSAGE_WRONG_PASSPHRASE_ID_RANGE \
|
|
" The hexadecimal representation of the last byte can't be 0xFF."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_WRONG_PASSPHRASE_ID_CONVERSION \
|
|
RTI_SECURITY_LOGGING_MESSAGE_WRONG_PASSPHRASE_ID_RANGE \
|
|
" The value for the passphrase is: "
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_WRONG_PASSPHRASE_ID_RANGE \
|
|
"The passphrase id must be an integer value in the [0, 4294967295] range."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_WRONG_PREFIX_IN_PRESHARED_PASSPHRASE \
|
|
"The passphrase id was expected, but a prefix was found"
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_WRONG_PRESHARED_KEY_FORMAT \
|
|
"The passphrase must follow either one of two formats: (1) " \
|
|
"\"data:,<passphrase_id>:<passphrase>\", where <passphrase_id> " \
|
|
"is a " \
|
|
"unique number identifying the <passphrase> or (2) " \
|
|
"\"file:<PATH>\", " \
|
|
"where <PATH> is a path to a file containing a string in format " \
|
|
"\"<passphrase_id>:<passphrase>\"."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_WRONG_PRIMARY_PRESHARED_KEY_FORMAT \
|
|
PROPERTY_NAME_DDS_SEC_CRYPTO_RTPS_PSK_SECRET_PASSPHRASE \
|
|
". " RTI_SECURITY_LOGGING_MESSAGE_WRONG_PRESHARED_KEY_FORMAT
|
|
|
|
#ifdef RTI_SECURITY_PLUGINS_SUPPORT_JWT
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_JWT_ISS_MISMATCH \
|
|
"The Subject Name of the Permissions CA that signed the JWT Permissions" \
|
|
"Token doesn't match the 'iss' field."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_SIGNER_CERTIFICATE_NOT_FOUND \
|
|
"Couldn't find signer certificate"
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_JWT_EXPIRED \
|
|
"Permissions Status Token has expired (exp < now)"
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_JWT_NOT_YET_VALID \
|
|
"Permissions Status Token is not yet valid (now < nbf)"
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_IDENTITY_CERTIFICATE_MISMATCH \
|
|
"Permissions JWT and identity certificate subject names don't match"
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_NO_SUBJECT_NAME_OR_ROLE_IN_PERMISSIONS_DOCUMENT \
|
|
"Parse XML file. " \
|
|
"Grant must contain <subject_name>, <subject_name_expression> or <role>."
|
|
|
|
#define RTI_SECURITY_LOGGING_MESSAGE_DUPLICATE_ROLE_IN_PERMISSIONS_DOCUMENT \
|
|
"Parse XML file. Duplicate <role>: "
|
|
#endif /* RTI_SECURITY_PLUGINS_SUPPORT_JWT */
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif /* security_logging_h */
|