java.lang.Object | |
↳ | com.samsung.android.knox.net.firewall.DomainFilterRule |
This class encapsulates a Domain Filter Rule that will be manipulated by the firewall policies.
A rule is represented by the following fields:
The package name of the application which the attempts to access the URLs for the specified domain names must either be blocked or allowed.
A rule can represent all applications instead of a particular one, in this case, the package name
must be set to FIREWALL_ALL_PACKAGES
. This rule will be applied only for
applications which do not have specific rules on database.
A list of URLs for specified domain names to block DNS resolution. The format of the URL must be compliant with RFC's standards and must also match one of the following rules:
A list of URLs for specified domain names to allow DNS resolution. It will have precedence over deny list, so any URL matching a URL in this list will always be allowed, even if it also matches the deny list. Please note all URLs can be accessed if deny list is empty but allow list is populated. The format of the URL must be compliant with RFC's standards and must also match one of the following rules:
The primary DNS server, in the format of IP address v4(8.8.8.8) or v6(2001:4860:4860::8888), which will resolve domain names for a given application.
Since there is no interdependence between DNS and allow/deny domains list, rule objects can be created with different combinations: only DNS servers; only allow/deny lists; DNS servers and allow/deny list.
The DNS server will only be effectively applied if no VPN or Proxy is enabled for the given application.
The secondary DNS server, in the format of IP address v4(8.8.8.8) or v6(2001:4860:4860::8888), which will resolve domain names for a given application.
This is the backup DNS server to be provided along with primary DNS server.
Since there is no interdependence between DNS and allow/deny domains list, rule objects can be created with different combinations: only DNS servers; only allow/deny lists; DNS servers and allow/deny list.
The DNS server will only be effectively applied if no VPN or Proxy is enabled for the given application.
API level 19 |
MDM 5.6 |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CLEAR_ALL | Used by removeDomainFilterRules(List) to clear all Domain Filter Rules of
the current user from the database. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a DomainFilterRule instance.
| |||||||||||
Creates a DomainFilterRule instance.
| |||||||||||
Creates a DomainFilterRule instance.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieve the URLs in allow list.
| |||||||||||
Retrieve the
AppIdentity of the application this rule applies to. | |||||||||||
Retrieve the URLs in deny list.
| |||||||||||
Retrieve the primary DNS server set or
null otherwise. | |||||||||||
Retrieve the secondary DNS server set or
null otherwise. | |||||||||||
Set the allow list of URLs.
| |||||||||||
Set the
AppIdentity of the application this rule must be applied to. | |||||||||||
Set the deny list of URLs.
| |||||||||||
Set the primary DNS server to be used in DNS resolutions for the given application.
| |||||||||||
Set the secondary DNS server to be used in DNS resolutions for the given application.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
|
Used by removeDomainFilterRules(List)
to clear all Domain Filter Rules of
the current user from the database.
API level 19 |
MDM 5.6 |
Creates a DomainFilterRule instance.
appIdentity | The AppIdentity of the application this rule must be applied to. |
---|---|
denyDomainFilter | The deny list of URLs for the given application. |
allowDomainFilter | The allow list of URLs for the given application. |
API level 19 |
MDM 5.6 |
Creates a DomainFilterRule instance.
appIdentity | The AppIdentity of the application this rule must be applied to. |
---|---|
denyDomainFilter | The deny list of URLs for the given application. |
allowDomainFilter | The allow list of URLs for the given application. |
dns1 | The primary DNS server to be used by the given application. |
dns2 | The secondary DNS server to be used by the given application. |
API level 20 |
MDM 5.7 |
Creates a DomainFilterRule instance. Use the setters for needed fields: domain lists and/or DNS(s).
appIdentity | The AppIdentity of the application this rule must be applied to. |
---|
API level 20 |
MDM 5.7 |
Retrieve the URLs in allow list.
API level 19 |
MDM 5.6 |
Retrieve the AppIdentity
of the application this rule applies to.
API level 19 |
MDM 5.6 |
Retrieve the URLs in deny list.
API level 19 |
MDM 5.6 |
Retrieve the primary DNS server set or null
otherwise.
API level 20 |
MDM 5.7 |
Retrieve the secondary DNS server set or null
otherwise.
API level 20 |
MDM 5.7 |
Set the allow list of URLs. Please note all URLs can be accessed if allow list is populated but deny list is empty.
allowDomains | The list of URLs to allow (allow list). |
---|
API level 19 |
MDM 5.6 |
Set the AppIdentity
of the application this rule must be applied to.
appIdentity | The App Identity of the application this rule must be applied to. |
---|
API level 19 |
MDM 5.6 |
Set the deny list of URLs.
denyDomains | The list of URLs to block (deny list). |
---|
API level 19 |
MDM 5.6 |
Set the primary DNS server to be used in DNS resolutions for the given application. The DNS server must be in the format of IP address v4(8.8.8.8) or v6(2001:4860:4860::8888).
dns1 | The primary DNS server. |
---|
API level 20 |
MDM 5.7 |
Set the secondary DNS server to be used in DNS resolutions for the given application. This is optional and must only be provided along with primary DNS. The DNS server must be in the format of IP address v4(8.8.8.8) or v6(2001:4860:4860::8888).
dns2 | The secondary DNS server. |
---|
API level 20 |
MDM 5.7 |