Oracle Communications Services Gatekeeper OAM Java API Reference
7.0.0.1

E96580-01

oracle.ocsg.api_firewall.nt.management
Interface ApiFirewallMBean


public interface ApiFirewallMBean


Field Summary
static java.lang.String apiConfigXml
          Creates a "white list" of trusted APIs.
static boolean createViolationEdrs
          Specifies if a violation of firewall rules should result in an EDR to be created.
static int errorStatus
          Specifies the HTTP status code returned by this MBean when a message is rejected.
static int maxChildElementDepth
          Specifies the maximum number of nested elements allowed in a message.
static int maxItemValueLength
          Specifies the maximum size of a single message entity, such as an element, attribute, or comment.
static int maxMessageSize
          Specifies the maximum message size of the request, excluding attachments.
static int maxUnboundedItems
          Specifies the maximum number of unbound items that a message can contain.
 
Method Summary
abstract  void addClientErrorCodeMapping(java.lang.String code, int translatedCode)
          Add a client error code translation that will rewrite the status code before returned to caller.
abstract  void addClientErrorMessageMapping(java.lang.String code, java.lang.String message)
          Specify a message, or message type to use for a code that matches the code parameter.
abstract  java.lang.String getApiConfigXml()
           
abstract  boolean getCreateViolationEdrs()
           
abstract  int getErrorStatus()
           
abstract  int getMaxChildElementDepth()
           
abstract  int getMaxItemValueLength()
           
abstract  int getMaxMessageSize()
           
abstract  int getMaxUnboundedItems()
           
abstract  java.lang.String[] listClientErrorCodeMappings()
          Lists existing error code translations in a human readable format.
abstract  java.lang.String[] listClientErrorMessageMappings()
          Lists existing error messages in a human readable format.
abstract  void removeClientErrorCodeMapping(java.lang.String code)
          Removes a client error code translation.
abstract  void removeClientErrorMessageMapping(java.lang.String code)
          Removes a client error code translation.
abstract  void setApiConfigXml(java.lang.String value)
           
abstract  void setCreateViolationEdrs(boolean value)
           
abstract  void setErrorStatus(int value)
           
abstract  void setMaxChildElementDepth(int value)
           
abstract  void setMaxItemValueLength(int value)
           
abstract  void setMaxMessageSize(int value)
           
abstract  void setMaxUnboundedItems(int value)
           
 

Field Detail

apiConfigXml

public static final java.lang.String apiConfigXml
Creates a "white list" of trusted APIs. If the incoming message includes an API on this list, the message is exempt from further firewall checks.

See Also:
Constant Field Values

createViolationEdrs

public static final boolean createViolationEdrs
Specifies if a violation of firewall rules should result in an EDR to be created.

See Also:
Constant Field Values

errorStatus

public static final int errorStatus
Specifies the HTTP status code returned by this MBean when a message is rejected. The default message is 400 Bad Request, but you can specify any of the status codes.

See Also:
Constant Field Values

maxChildElementDepth

public static final int maxChildElementDepth
Specifies the maximum number of nested elements allowed in a message. Messages that exceed this limit are rejected and the status message defined by the ErrorStatus attribute is returned.

See Also:
Constant Field Values

maxItemValueLength

public static final int maxItemValueLength
Specifies the maximum size of a single message entity, such as an element, attribute, or comment. Messages that contain an oversized entity are rejected and the status message defined by the ErrorStatus attribute is returned.

See Also:
Constant Field Values

maxMessageSize

public static final int maxMessageSize
Specifies the maximum message size of the request, excluding attachments. Messages that exceed this limit are rejected and the status message defined by the ErrorStatus attribute is returned.

See Also:
Constant Field Values

maxUnboundedItems

public static final int maxUnboundedItems
Specifies the maximum number of unbound items that a message can contain. This includes items such as elements and attributes that are listed in the API schema as unbounded. Messages that exceed this limit are rejected and the status message defined by the ErrorStatus attribute is returned.

See Also:
Constant Field Values
Method Detail

addClientErrorCodeMapping

public void addClientErrorCodeMapping(java.lang.String code,
                                      int translatedCode)
                               throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException,
                                      oracle.ocsg.management.common.OamIllegalArgumentException
Add a client error code translation that will rewrite the status code before returned to caller. If a mapping with same key (from) exists already, it will be overwritten. No overlap checks are made, eg 4* -> 400 and 403 -> 401 can both be configured at the same time, but translation for code 403 is then undefined (400 or 401)

Parameters:
code - is either a fully qualified error code, eg 401 in range [400,499] or a wildcard: 40* 4*. Note 4*4 is not valid format.
translatedCode - is the resulting error code, must be in range [400,499].
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException - when there is problem saving to db.
oracle.ocsg.management.common.OamIllegalArgumentException - when supplied code is invalid.

addClientErrorMessageMapping

public void addClientErrorMessageMapping(java.lang.String code,
                                         java.lang.String message)
                                  throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException,
                                         oracle.ocsg.management.common.OamIllegalArgumentException
Specify a message, or message type to use for a code that matches the code parameter. Two reserved words exists for the message parameter: BLANK - This will remove the error message. ERROR_PAGE - this means that a standard HTML should be used (same as security providers use) The error message match is done after error code mapping eg; if 403 is translated to 401 you need to set code to 401, 40* or 4* (not 403) when adding error code message.

Parameters:
code - is either a fully qualified error code, eg 401 in range [400,499] or a wildcard: 40* 4*. Note 4*4 is not valid format.
message - is BLANK, ERROR_PAGE or a non-empty string of your choice.
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException - when there is problem with store.
oracle.ocsg.management.common.OamIllegalArgumentException - when supplied code is invalid or message is empty.

getApiConfigXml

public java.lang.String getApiConfigXml()
                                 throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

getCreateViolationEdrs

public boolean getCreateViolationEdrs()
                               throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

getErrorStatus

public int getErrorStatus()
                   throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

getMaxChildElementDepth

public int getMaxChildElementDepth()
                            throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

getMaxItemValueLength

public int getMaxItemValueLength()
                          throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

getMaxMessageSize

public int getMaxMessageSize()
                      throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

getMaxUnboundedItems

public int getMaxUnboundedItems()
                         throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

listClientErrorCodeMappings

public java.lang.String[] listClientErrorCodeMappings()
                                               throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Lists existing error code translations in a human readable format. Format: code:translatedCode

Returns:
existing error code translations in a human readable format.
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException - when there is problem with store.

listClientErrorMessageMappings

public java.lang.String[] listClientErrorMessageMappings()
                                                  throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Lists existing error messages in a human readable format. Format: code -> message

Returns:
error messages in a human readable format.
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException - when there is problem with store.

removeClientErrorCodeMapping

public void removeClientErrorCodeMapping(java.lang.String code)
                                  throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Removes a client error code translation.

Parameters:
code - must match an existing mapping key.
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException - when there is problem with store.

removeClientErrorMessageMapping

public void removeClientErrorMessageMapping(java.lang.String code)
                                     throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Removes a client error code translation.

Parameters:
code - must have a message configured.
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException - when there is problem with store.

setApiConfigXml

public void setApiConfigXml(java.lang.String value)
                     throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

setCreateViolationEdrs

public void setCreateViolationEdrs(boolean value)
                            throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

setErrorStatus

public void setErrorStatus(int value)
                    throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

setMaxChildElementDepth

public void setMaxChildElementDepth(int value)
                             throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

setMaxItemValueLength

public void setMaxItemValueLength(int value)
                           throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

setMaxMessageSize

public void setMaxMessageSize(int value)
                       throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

setMaxUnboundedItems

public void setMaxUnboundedItems(int value)
                          throws com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException
Throws:
com.bea.wlcp.wlng.api.storage.configuration.ConfigurationException

Oracle Communications Services Gatekeeper OAM Java API Reference
7.0.0.1

E96580-01

Copyright © 2008, 2018, Oracle and/or its affiliates. All rights reserved.