/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* 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
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/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 Copyrighted [year] [name of copyright owner]"
*
* $Id: LogUtil.java,v 1.12 2010/01/23 00:07:41 exu Exp $
*
*/
/**
* The <code>LogUtil</code> class defines methods which are used by
* SAML2 compoment to write logs.
*/
public class LogUtil {
/* Log Constants */
/* Log Constants for SP Assertion Consumer Service */
"RESPONSE_NOT_FOUND_FROM_CACHE";
"CANNOT_CREATE_ARTIFACT_RESOLVE";
"CANNOT_GET_SOAP_RESPONSE";
"GOT_RESPONSE_FROM_ARTIFACT";
"ARTIFACT_RESOLUTION_URL_NOT_FOUND";
"TOO_MANY_ARTIFACT_RESPONSE";
"CANNOT_INSTANTIATE_ARTIFACT_RESPONSE";
"MISSING_ARTIFACT_RESPONSE";
"ARTIFACT_RESPONSE_INVALID_SIGNATURE";
"ARTIFACT_RESPONSE_INVALID_INRESPONSETO";
"ARTIFACT_RESPONSE_INVALID_ISSUER";
"ARTIFACT_RESPONSE_INVALID_STATUS_CODE";
"CANNOT_INSTANTIATE_RESPONSE_ARTIFACT";
"MISSING_SAML_RESPONSE_FROM_POST";
"CANNOT_INSTANTIATE_RESPONSE_POST";
"CANNOT_DECODE_RESPONSE";
"CANNOT_DECODE_REQUEST";
"GOT_RESPONSE_FROM_POST";
"INVALID_INRESPONSETO_RESPONSE";
"INVALID_ISSUER_RESPONSE";
"INVALID_ISSUER_REQUEST";
"ASSERTION_NOT_ENCRYPTED";
"INVALID_ISSUER_ASSERTION";
"MISMATCH_ISSUER_ASSERTION";
"INVALID_SIGNATURE_ASSERTION";
"MISSING_SUBJECT_COMFIRMATION_DATA";
"INVALID_TIME_SUBJECT_CONFIRMATION_DATA";
"CONTAINED_NOT_BEFORE";
"WRONG_INRESPONSETO_ASSERTION";
"MISSING_AUDIENCE_RESTRICTION";
"FOUND_AUTHN_ASSERTION";
"CANNOT_CREATE_ARTIFACT";
"RECEIVED_AUTHN_REQUEST";
"SEND_ECP_RESPONSE_FAILED";
"CANNOT_INSTANTIATE_SOAP_MESSAGE_ECP";
"RECEIVE_SOAP_FAULT_ECP";
"CANNOT_INSTANTIATE_SAML_RESPONSE_FROM_ECP";
"ECP_ASSERTION_NOT_SIGNED";
"ECP_ASSERTION_INVALID_SIGNATURE";
"RECEIVED_AUTHN_REQUEST_ECP";
"RECEIVED_HTTP_REQUEST_ECP";
"SEND_ECP_PAOS_REQUEST";
"SEND_ECP_PAOS_REQUEST_FAILED";
"INVALID_REALM_GET_ENTITY_DESCRIPTOR";
"GOT_INVALID_ENTITY_DESCRIPTOR";
"CONFIG_ERROR_GET_ENTITY_DESCRIPTOR";
"NO_ENTITY_ID_SET_ENTITY_DESCRIPTOR";
"INVALID_REALM_SET_ENTITY_DESCRIPTOR";
"NO_ENTITY_DESCRIPTOR_SET_ENTITY_DESCRIPTOR";
"CONFIG_ERROR_SET_ENTITY_DESCRIPTOR";
"SET_INVALID_ENTITY_DESCRIPTOR";
"NO_ENTITY_ID_CREATE_ENTITY_DESCRIPTOR";
"INVALID_REALM_CREATE_ENTITY_DESCRIPTOR";
"ENTITY_DESCRIPTOR_EXISTS";
"ENTITY_DESCRIPTOR_CREATED";
"CONFIG_ERROR_CREATE_ENTITY_DESCRIPTOR";
"CREATE_INVALID_ENTITY_DESCRIPTOR";
"INVALID_REALM_DELETE_ENTITY_DESCRIPTOR";
"NO_ENTITY_DESCRIPTOR_DELETE_ENTITY_DESCRIPTOR";
"ENTITY_DESCRIPTOR_DELETED";
"CONFIG_ERROR_DELETE_ENTITY_DESCRIPTOR";
"INVALID_REALM_GET_ENTITY_CONFIG";
"GOT_INVALID_ENTITY_CONFIG";
"CONFIG_ERROR_GET_ENTITY_CONFIG";
"NO_ENTITY_ID_SET_ENTITY_CONFIG";
"INVALID_REALM_SET_ENTITY_CONFIG";
"NO_ENTITY_DESCRIPTOR_SET_ENTITY_CONFIG";
"CONFIG_ERROR_SET_ENTITY_CONFIG";
"SET_INVALID_ENTITY_CONFIG";
"NO_ENTITY_ID_CREATE_ENTITY_CONFIG";
"INVALID_REALM_CREATE_ENTITY_CONFIG";
"NO_ENTITY_DESCRIPTOR_CREATE_ENTITY_CONFIG";
"ENTITY_CONFIG_CREATED";
"CONFIG_ERROR_CREATE_ENTITY_CONFIG";
"CREATE_INVALID_ENTITY_CONFIG";
"INVALID_REALM_DELETE_ENTITY_CONFIG";
"NO_ENTITY_DESCRIPTOR_DELETE_ENTITY_CONFIG";
"NO_ENTITY_CONFIG_DELETE_ENTITY_CONFIG";
"ENTITY_CONFIG_DELETED";
"CONFIG_ERROR_DELETE_ENTITY_CONFIG";
"INVALID_REALM_GET_ALL_HOSTED_ENTITIES";
"CONFIG_ERROR_GET_ALL_HOSTED_ENTITIES";
"GOT_ALL_HOSTED_ENTITIES";
"INVALID_REALM_GET_ALL_REMOTE_ENTITIES";
"CONFIG_ERROR_GET_ALL_REMOTE_ENTITIES";
"GOT_ALL_REMOTE_ENTITIES";
"CANNOT_INSTANTIATE_MNI_RESPONSE";
"CANNOT_INSTANTIATE_MNI_REQUEST";
"CANNOT_INSTANTIATE_MNI_RESPONSE";
"CANNOT_INSTANTIATE_MNI_REQUEST";
"MNI_REQUEST_INVALID_SIGNATURE";
"MNI_RESPONSE_INVALID_SIGNATURE";
"SLO_REQUEST_INVALID_SIGNATURE";
"SLO_RESPONSE_INVALID_SIGNATURE";
"NAMEID_INVALID_ENCRYPTION";
"INVALID_MNI_RESPONSE";
"INVALID_SLO_RESPONSE";
"MISSING_ENTITY_ROLE";
"INVALID_REALM_GET_ALL_ENTITIES";
"CONFIG_ERROR_GET_ALL_ENTITIES";
// Log constants (message id) for SAE
/*
public static final String SAE_IDP_LOGOUT_SUCCESS =
"SAE_IDP_LOGOUT_SUCCESS";
public static final String SAE_IDP_LOGOUT_ERROR = "SAE_IDP_LOGOUT_ERROR";
*/
//public static final String SAE_SP_LOGOUT_SUCCESS = "SAE_SP_LOGOUT_SUCCESS";
//public static final String SAE_SP_LOGOUT_ERROR = "SAE_SP_LOGOUT_ERROR";
//LogConstants for SAMLv2 SOAPBinding
"NULL_PDP_SIGN_CERT_ALIAS";
"NULL_PEP_SIGN_CERT_ALIAS";
"INVALID_SIGNATURE_QUERY";
/**
* The Domain field. The Domain pertaining to the log record's
* Data field.
*/
/**
* The LoginID field. The Login ID pertaining to the log record's
* Data field.
*/
/**
* The IPAddr field. The IP Address pertaining to the log record's
* Data field.
*/
/**
* The ModuleName field. The Module pertaining to the log record's
* Data field.
*/
"INVALID_ISSUER_IN_PEP_REQUEST";
"ASSERTION_FROM_PDP_NOT_ENCRYPTED";
"MISSING_ASSERTION_IN_PDP_RESPONSE";
"INVALID_ISSUER_IN_ASSERTION_FROM_PDP";
"MISMATCH_ISSUER_IN_ASSERTION_FROM_PDP";
"INVALID_SIGNATURE_ASSERTION_FROM_PDP";
"SUCCESS_FED_TERMINATION";
"POST_RESPONSE_INVALID_SIGNATURE";
//
static {
try {
} catch (LogException le) {
}
}
/**
* Logs message to SAML2 access logs.
*
* @param level the log level , these are based on those
* defined in java.util.logging.Level, the values for
* level can be any one of the following : <br>
* <ul>
* <li>SEVERE (highest value) <br>
* <li>WARNING <br>
* <li>INFO <br>
* <li>CONFIG <br>
* <li>FINE <br>
* <li>FINER <br>
* <li>FINEST (lowest value) <br>
* </ul>
* @param msgid the message or a message identifier.
* @param data string array of dynamic data to be replaced in the message.
*/
}
/**
* Logs message to SAML2 access logs.
*
* @param level the log level , these are based on those
* defined in java.util.logging.Level, the values for
* level can be any one of the following : <br>
* <ul>
* <li>SEVERE (highest value) <br>
* <li>WARNING <br>
* <li>INFO <br>
* <li>CONFIG <br>
* <li>FINE <br>
* <li>FINER <br>
* <li>FINEST (lowest value) <br>
* </ul>
* @param msgid the message or a message identifier.
* @param data string array of dynamic data to be replaced in the message.
* @param session the User's session object
*/
public static void access(
{
}
/**
* Logs message to SAML2 access logs.
*
* @param level the log level , these are based on those
* defined in java.util.logging.Level, the values for
* level can be any one of the following : <br>
* <ul>
* <li>SEVERE (highest value) <br>
* <li>WARNING <br>
* <li>INFO <br>
* <li>CONFIG <br>
* <li>FINE <br>
* <li>FINER <br>
* <li>FINEST (lowest value) <br>
* </ul>
* @param msgid the message or a message identifier.
* @param data string array of dynamic data to be replaced in the message.
* @param session the User's session object
* @param props extra log fields
*/
public static void access(
{
try {
} catch (LogException le) {
"LogUtil.access: Couldn't write log:", le);
}
}
}
/**
* Logs error messages to SAML2 error log.
*
* @param level the log level , these are based on those
* defined in java.util.logging.Level, the values for
* level can be any one of the following : <br>
* <ul>
* <li>SEVERE (highest value) <br>
* <li>WARNING <br>
* <li>INFO <br>
* <li>CONFIG <br>
* <li>FINE <br>
* <li>FINER <br>
* <li>FINEST (lowest value) <br>
* </ul>
* @param msgid the message or a message identifier.
* @param data string array of dynamic data to be replaced in the message.
*/
}
/**
* Logs error messages to SAML2 error log.
*
* @param level the log level , these are based on those
* defined in java.util.logging.Level, the values for
* level can be any one of the following : <br>
* <ul>
* <li>SEVERE (highest value) <br>
* <li>WARNING <br>
* <li>INFO <br>
* <li>CONFIG <br>
* <li>FINE <br>
* <li>FINER <br>
* <li>FINEST (lowest value) <br>
* </ul>
* @param msgid the message or a message identifier.
* @param data string array of dynamic data to be replaced in the message.
* @param session the User's Session object.
*/
public static void error(
{
}
/**
* Logs error messages to SAML2 error log.
*
* @param level the log level , these are based on those
* defined in java.util.logging.Level, the values for
* level can be any one of the following : <br>
* <ul>
* <li>SEVERE (highest value) <br>
* <li>WARNING <br>
* <li>INFO <br>
* <li>CONFIG <br>
* <li>FINE <br>
* <li>FINER <br>
* <li>FINEST (lowest value) <br>
* </ul>
* @param msgid the message or a message identifier.
* @param data string array of dynamic data to be replaced in the message.
* @param session the User's Session object.
* @param props extra log fields
*/
public static void error(
{
try {
} catch (LogException le) {
}
}
}
/**
* Checks if the logging is enabled.
*
* @return true if logging is enabled.
*/
public boolean isLogEnabled() {
return false;
} else {
return logger.isLogEnabled();
}
}
/**
* Checks if an access message of the given level would actually be logged
* by this logger. This check is based on the Loggers effective level.
* @param level a message logging level.
* @return true if the given message level is currently being logged.
*/
return false;
} else {
}
}
/**
* Checks if an error message of the given level would actually be logged
* by this logger. This check is based on the Loggers effective level.
* @param level a message logging level.
* @return true if the given message level is currently being logged.
*/
return false;
} else {
}
}
}