Creating a custom exception message example
Create a custom exception message with the SR language THROW_EXCEPTION or by selecting the LOG EXCEPTION action in the UI for a local session-level policy.
- Session level criteria:
- Session = LOCAL
- Database type = ORACLE
- Rule action = LOG EXCEPTION
- Exception type = SECURITY INCIDENT
- Exception message = Restricted local connection $(SESSION_INFO)$
Note: The exception message is logged only once per session.
SR language examples
In the following example, if the analyzer encounters a PLAIN PASSWORD security incident, it logs
a custom message.
SR_POLICIES
{
IF ( INCIDENT = 'PLAIN_PASSWORD' )
{
THROW_EXCEPTION EXC_TYPE = SECURITY_INCIDENT EXC_MSG = 'Unencrypted database connection'
}
}
In this