public interface AuditListener extends Shareable
To receive audit event notifications, the Client Application must:
AuditListener
interface.javacard.framework.Applet.getShareableInterfaceObject(..)
to return an AuditListener
instance.
The CSP retrieves the AuditListener
instance using
javacard.framework.JCSystem.getAppletShareableInterfaceObject(..)
with SHAREABLE_PARAMETER
.
The AuditListener
is notified of audit events as follows:
auditEventOccurred(..)
for each logged event.auditEventsPending(..)
when notifyPendingEvents(..)
is invoked and events are in the queue.
To retrieve the full log, including event details, the Client Application must call AuditService.dequeueEvent(..)
.
See AuditService
Javadoc for more details.
If multiple Client Applications register an AuditListener
to the same CSP Instance, all listeners are notified of the same event.
However, dequeueEvent(..)
can only be called once per event, as it is removed from the queue after the call.
Editor's Note: We could consider allowing each listener to call dequeueEvent once for same event.
The CSP does not hold a reference to the AuditListener
and invokes
javacard.framework.getAppletShareableInterfaceObject(..)
for each event.
For more details on events and auditing, refer to Section 6.12 of GlobalPlatform Amendment N [GPC_SPE_230].
AuditService
Modifier and Type | Field and Description |
---|---|
static byte |
SHAREABLE_PARAMETER
Shareable parameter used by the CSP to retrieve the
AuditListener via
JCSystem.getAppletShareableInterfaceObject(..) . |
Modifier and Type | Method and Description |
---|---|
void |
auditEventOccurred(byte event,
short resourceId,
short remainingCapacity)
Called by the CSP when an event to be logged occurs.
|
void |
auditEventsPending(short numberOfPendingEvents,
short remainingCapacity)
Called by the CSP after the Client Application calls
AuditService.notifyPendingEvents(..) , but only if there are pending events. |
static final byte SHAREABLE_PARAMETER
AuditListener
via
JCSystem.getAppletShareableInterfaceObject(..)
.
AuditListener l = (AuditListener) javacard.framework.JCSystem.getAppletShareableInterfaceObject( clientApplicationAID, AuditListener.SHAREABLE_PARAMETER);
void auditEventOccurred(byte event, short resourceId, short remainingCapacity)
AuditService
.event
- Event type constant.resourceId
- Identifier of the affected resource; is 0
for system events not related to resources.remainingCapacity
- Remaining capacity of the log event queue.void auditEventsPending(short numberOfPendingEvents, short remainingCapacity)
AuditService.notifyPendingEvents(..)
, but only if there are pending events.numberOfPendingEvents
- Current number of pending events in the CSP.remainingCapacity
- Remaining capacity of the log event queue.AuditService.notifyPendingEvents(..)
Copyright © 2023-2025 GlobalPlatform, Inc. All rights reserved. The technology provided or described in this specification is subject to updates, revisions, and extensions by GlobalPlatform. Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights or other intellectual property rights of which they may be aware which might be necessarily infringed by the implementation of the specification or other work product set forth in this document, and to provide supporting documentation.
THIS SPECIFICATION OR OTHER WORK PRODUCT IS BEING OFFERED WITHOUT ANY WARRANTY WHATSOEVER, AND IN PARTICULAR, ANY WARRANTY OF NON-INFRINGEMENT IS EXPRESSLY DISCLAIMED. ANY IMPLEMENTATION OF THIS SPECIFICATION OR OTHER WORK PRODUCT SHALL BE MADE ENTIRELY AT THE IMPLEMENTER'S OWN RISK, AND NEITHER THE COMPANY, NOR ANY OF ITS MEMBERS OR SUBMITTERS, SHALL HAVE ANY LIABILITY WHATSOEVER TO ANY IMPLEMENTER OR THIRD PARTY FOR ANY DAMAGES OF ANY NATURE WHATSOEVER DIRECTLY OR INDIRECTLY ARISING FROM THE IMPLEMENTATION OF THIS SPECIFICATION OR OTHER WORK PRODUCT.