public class Rauditx
extends java.lang.Object
Refer to z/OS Security Server RACF Callable Services
- SA22-7691
for more information on writing SMF 83 audit records via r_auditx.
Note: In order to use this facility, the calling userid must have READ authority to the IRR.RAUDITX profile in the FACILITY class. To define and provide this authority, issue the following:
RDEFINE FACILITY IRR.RAUDITX UACC(NONE) PERMIT IRR.RAUDITX CLASS(FACILITY) ID(<userid>) ACCESS(READ) SETROPTS RACLIST(FACILITY) REFRESH
RauditxParameters,
RauditxMessageHeader,
RauditxRelocateHeader,
RauditxException| Modifier and Type | Field and Description |
|---|---|
static long |
ATTR_ALWAYS_LOG_FAILURES |
static long |
ATTR_ALWAYS_LOG_SUCCESSES |
static long |
ATTR_AUTHENTICATION_EVENT |
static long |
ATTR_AUTHORIZATION_EVENT |
static long |
ATTR_CHECK_WARNING_MODE |
static long |
ATTR_EVENT_FAILURE
Attribute word bit values
|
static long |
ATTR_EVENT_SUCCESS |
static long |
ATTR_NEVER_LOG_FAILURES |
static long |
ATTR_NEVER_LOG_SUCCESSES |
| Constructor and Description |
|---|
Rauditx()
Construct an instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMessageSegment(java.lang.String message)
Add a message to be written to the console on Event Failure.
|
void |
addRelocateSection(int type,
byte[] data)
Add a relocate section to be written with the generated SMF 83 type record.
|
void |
addRelocateSection(int type,
java.lang.String string)
Add a relocate section to be written with the generated SMF 83 type record.
|
void |
issue()
Issue the call to the R_auditx callable service.
|
void |
setAlwaysLogFailures()
Set the callable service to always log failures.
|
void |
setAlwaysLogSuccesses()
Set the callable service to always log successes.
|
void |
setAttributes(long attributeBits)
Set the Attribute flag word with the supplied bit mask.
|
void |
setAuthenticationEvent()
Set the event type to Authentication.
|
void |
setAuthorizationEvent()
Set the event type to Authorization.
|
void |
setCheckWarningMode()
Set the callable service check warning mode.
|
void |
setComponent(java.lang.String component)
Set the component name (Required).
|
void |
setEvent(int event)
Set the event code (Required).
|
void |
setEventFailure()
Set the Event Result to failure.
|
void |
setEventSuccess()
Set the Event Result to success.
|
void |
setFmid(java.lang.String fmid)
Set the FMID of the product or component.
|
void |
setIgnoreSuccessWithNoAuditLogRecord(boolean ignoreSuccessWithNoAuditLogRecord)
Sets a flag to not throw an exception when the R_auditx callable service
is successful, but no audit record is logged.
|
void |
setLinkValue(byte[] bytes)
Set the link value, used to correlate SMF records.
|
void |
setLinkValue(java.lang.String string)
Set the link value, used to correlate SMF records.
|
void |
setLogString(java.lang.String logString)
Sets the log string - character data to be written with the audit information.
|
void |
setNeverLogFailures()
Set the callable service to never log failures.
|
void |
setNeverLogSuccesses()
Set the callable service to never log successes.
|
void |
setQualifier(int qualifier)
Sets the Event Code Qualifier.
|
void |
setRacfClass(java.lang.String racfClass)
Set the RACF class name.
|
void |
setResource(java.lang.String resource)
Sets the resource name covered by a profile defined in the RACF class specified
by
setRacfClass(String). |
void |
setSubtype(int subtype)
Sets the SMF type 83 record subtype assigned to the component (Required).
|
public static final long ATTR_EVENT_FAILURE
public static final long ATTR_EVENT_SUCCESS
public static final long ATTR_AUTHENTICATION_EVENT
public static final long ATTR_AUTHORIZATION_EVENT
public static final long ATTR_ALWAYS_LOG_SUCCESSES
public static final long ATTR_ALWAYS_LOG_FAILURES
public static final long ATTR_NEVER_LOG_SUCCESSES
public static final long ATTR_NEVER_LOG_FAILURES
public static final long ATTR_CHECK_WARNING_MODE
public void setAttributes(long attributeBits)
setAuthenticationEvent()attributeBits - the attribute bit maskpublic void setEventSuccess()
public void setEventFailure()
public void setAuthorizationEvent()
Security Server RACF Callable Services: Usage Notes.
Supersedes any previous call to setAuthenticationEvent(), which is
mutually exclusive.
public void setAuthenticationEvent()
Security Server RACF Callable Services: Usage Notes.
Supersedes any previous call to setAuthorizationEvent(), which is
mutually exclusive.
public void setAlwaysLogSuccesses()
Supersedes any previous call to setNeverLogSuccesses(), which is
mutually exclusive.
public void setNeverLogSuccesses()
Supersedes any previous call to setAlwaysLogSuccesses() and
setNeverLogFailures(), which are mutually exclusive.
public void setAlwaysLogFailures()
Supersedes any previous call to setNeverLogFailures(), which is
mutually exclusive.
public void setNeverLogFailures()
Supersedes any previous call to setAlwaysLogFailures() and
setNeverLogSuccesses(), which are mutually exclusive.
public void setCheckWarningMode()
Security Server RACF Callable Services: Usage Notesfor more information.
public void setRacfClass(java.lang.String racfClass)
racfClass - String between 1 and 8 bytespublic void setComponent(java.lang.String component)
component - a String between 1 and 255 characters.java.lang.IllegalArgumentExceptionpublic void setEvent(int event)
event - the event code int between 1 and 255java.lang.IllegalArgumentExceptionpublic void setFmid(java.lang.String fmid)
fmid - a 7 character FMID.java.lang.IllegalArgumentExceptionpublic void setIgnoreSuccessWithNoAuditLogRecord(boolean ignoreSuccessWithNoAuditLogRecord)
ignoreSuccessWithNoAuditLogRecord - public void setLinkValue(byte[] bytes)
bytes - an 8 byte link valuejava.lang.IllegalArgumentExceptionpublic void setLinkValue(java.lang.String string)
string - a 1 to 8 character link valuejava.lang.IllegalArgumentExceptionpublic void setLogString(java.lang.String logString)
logString - a String between 1 and 255 characters.java.lang.IllegalArgumentExceptionpublic void setQualifier(int qualifier)
qualifier - the event code qualifier int between 0 and 255java.lang.IllegalArgumentExceptionpublic void setResource(java.lang.String resource)
setRacfClass(String). Note that the resource name is case sensitive.resource - a String between 1 and 246 charactersjava.lang.IllegalArgumentExceptionpublic void setSubtype(int subtype)
subtype - an int between 2 and 32767java.lang.IllegalArgumentExceptionpublic void addMessageSegment(java.lang.String message)
message - a String between 1 and 70 charactersjava.lang.IllegalArgumentExceptionpublic void addRelocateSection(int type,
byte[] data)
type - the relocate section type between 100 and 65535.data - the relocate datajava.lang.IllegalArgumentExceptionpublic void addRelocateSection(int type,
java.lang.String string)
type - the relocate section type between 100 and 65535.string - the relocate datajava.lang.IllegalArgumentExceptionpublic void issue()
throws RauditxException
RauditxException - if the callable service returns a non-zero return tuple.
See Security Server RACF Callable Services: Return and reason codesfor more information.
java.lang.IllegalStateException - if the instance has not been initialized properly
prior to calling this method.to supress this exception
in cases where the call was successful, but no audit record was written.