/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015-2016 ForgeRock AS.
*/
/**
* Makes audit logs on behalf of the Radius Server.
*/
/**
* Factory from which auditEvents can be created.
*/
/**
* Class to which audit events should be published.
*/
/**
* Constructor.
*
* @param eventBus - and event bus that the constructed object will register with in order to be notified of RADIUS
* events.
* @param eventFactory - a factory from which Audit events may be built.
* @param eventPublisher - the interface through which audit events may be published to the audit handler
* sub-system.
*/
public RadiusAuditLoggerEventBus(@Named("RadiusEventBus") EventBus eventBus, AuditEventFactory eventFactory,
this.auditEventFactory = eventFactory;
this.auditEventPublisher = eventPublisher;
}
/* (non-Javadoc)
* @see org.forgerock.openam.radius.server.audit.RadiusAuditLogger#recordAccessRequest
* (org.forgerock.openam.radius.server.events.AccessRequestEvent)
*/
}
}
}
public void recordAuthRequestChallengedEvent(AuthRequestChallengedEvent authRequestChallengedEvent) {
}
/**
* Makes an 'access' audit log entry.
*
* @param eventName - the name of the event.
* @param accessRequestEvent - the access request event.
*/
// This sets the request context so that when the OpenAM auth chains etc call AuditRequestContext.get they
// will use the same transaction id. This means log entries across the audit logs can be tied up.
AuditRequestContext.set(new AuditRequestContext(new TransactionId(accessRequestEvent.getRequestId())));
} else {
}
try {
}
} catch (RadiusAuditLoggingException e) {
}
}
private void setRequestDetails(AMAccessAuditEventBuilder builder, AcceptedRadiusEvent accessRequestEvent) {
}
}
}
}
/**
* Sets the client details via the access event builder.
*
* @param builder - the AccessAuditEventBuilder to which the client details should be added.
* @param radiusRequestContext
* @throws RadiusAuditLoggingException
*/
private void setClientDetails(AMAccessAuditEventBuilder builder, RadiusRequestContext radiusRequestContext)
throws RadiusAuditLoggingException {
throw new RadiusAuditLoggingException("Could not obtain the source address from the request context.");
} else {
throw new RadiusAuditLoggingException("Could not obtain the address from the InetSocketAddress.");
} else {
throw new RadiusAuditLoggingException("String representation of client's ip address is blank.");
} else {
}
}
}
}
/**
* Sets the response details of the builder, using the details provided in the <code>RadiusResponse</code>.
*
* @param builder
* @param response
*/
} else {
}
}
}