public abstract class NetSecurityManager extends Object
NetworkInterface.getType()
is MOCA the implementation SHALL associate the getNetworkPassword and
setNetworkPassword methods in this interface to the MoCA link layer password
used for the network interface. When the network interface type returned by
NetworkInterface.getType() is WIRELESS_ETHERNET the
implementation SHALL associate the getNetworkPassword and setNetworkPassword
in this interface to the link layer password, e.g. WEP, used for the
network interface.| Modifier | Constructor and Description |
|---|---|
protected |
NetSecurityManager()
Protected constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disableMocaPrivacy(NetworkInterface networkInterface)
Disables MoCA privacy.
|
void |
enableMocaPrivacy(NetworkInterface networkInterface)
Enables MoCa privacy.
|
static NetSecurityManager |
getInstance()
Get the network security manager.
|
String |
getNetworkPassword(NetworkInterface networkInterface)
Gets a network interface password.
|
boolean |
queryTransaction(String actionName,
InetAddress inetAddress,
String macAddress,
URL url,
int activityId)
Queries the implementation to determine if it has sent a transaction
matching the parameters.
|
void |
revokeAuthorization(long activityID)
Revokes a session authorization granted by the authorization handler.
|
void |
setAuthorizationHandler(NetAuthorizationHandler nah)
Sets the authorization handler application.
|
void |
setAuthorizationHandler(NetAuthorizationHandler nah,
String[] actionNames,
boolean notifyTransportRequests)
Sets the authorization handler application.
|
void |
setNetworkPassword(NetworkInterface networkInterface,
String password)
Sets a network interface password.
|
public static NetSecurityManager getInstance()
public String getNetworkPassword(NetworkInterface networkInterface)
networkInterface - The interface to get the password for.setNetworkPassword method.UnsupportedOperationException - if a password cannot be retrieved for
the network interface.SecurityException - if the calling application has not been
granted MonitorAppPermission("handler.homenetwork").public void setNetworkPassword(NetworkInterface networkInterface, String password)
enableMocaPrivacy method. If the interface type
is MoCA and the parameter is acceptable this method writes the
corresponding mocaIfPassword MIB.networkInterface - The home network interface the password is
to be set for.password - The value of the password to set.IllegalArgumentException - if the password format
is invalid for the interface type. A password for a MoCA interface
that is less than 12 characters or greater than 17 characters or
has any non-numerical characters is invalid.UnsupportedOperationException - if a password cannot be set for
the network interface.SecurityException - if the calling application has not been
granted MonitorAppPermission("handler.homenetwork").public void setAuthorizationHandler(NetAuthorizationHandler nah)
nah - Network authorization handler interface to the authoriztaion
application.SecurityException - if the calling application is not granted
MonitorAppPermission("handler.network").public void setAuthorizationHandler(NetAuthorizationHandler nah, String[] actionNames, boolean notifyTransportRequests)
nah - Network authorization handler interface to the authoriztaion
application.actionNames - A list of action names the hander is interested in
authorizing. The format of the names is out-of-scope for this
definition.notifyTransportRequests - A true value indicates the
NetAuthorizationHandler application is always
notified. A false value indicates that once a message in a
session has been authorized subsequent messages in the same session
are not authorized. That is, the
NetAuthorizationHandler application is not notified
when the subsequent messages are received.SecurityException - if the calling application is not granted
MonitorAppPermission("handler.network").IllegalArgumentException - if the actionNames parameter contains
a name that cannot be matched to a known action.public void revokeAuthorization(long activityID)
activityID - The activity specific identifier that was passed
to the
NetAuthorizationHandler.notifyAuthorization method.SecurityException - if the calling application does not have
MonitorAppPermission("handler.network").public boolean queryTransaction(String actionName, InetAddress inetAddress, String macAddress, URL url, int activityId)
actionName - Name of the request type if known. If not known an
empty string MAY be used. The format of the name is out-of-scope
of this definition.inetAddress - IP address the transaction was sent to.macAddress - MAC address the transaction was sent from if known.
Can be empty String if not known. The format is
EUI-48 with 6 colon separated 2 digit bytes in hexadecimal notation
with no leading "0x", e.g. "00:11:22:AA:BB:CC".url - The URL requested by the transaction if known. If not known
an empty string may be used.activityId - The activity identifier this device set for the
connection. A value of -1 indicates the parameter will not be
used for transaction matching purposes.IllegalArgumentException - if the MAC address is malformed.SecurityException - if the calling application is not signed.public void enableMocaPrivacy(NetworkInterface networkInterface)
networkInterface - Interface to enable privacy on.UnsupportedOperationException - if the parameter interface is not
a MoCA interface type.SecurityException - if the calling application has not been
granted MonitorAppPermission("handler.homenetwork").public void disableMocaPrivacy(NetworkInterface networkInterface)
networkInterface - Interface to disable privacy on.UnsupportedOperationException - if the parameter interface is not
a MoCA interface type.SecurityException - if the calling application has not been
granted MonitorAppPermission("handler.homenetwork").Copyright © 2012 CableLabs. All Rights Reserved.