oracle.oci.oci_network_firewall_policy_facts – Fetches details about one or multiple NetworkFirewallPolicy resources in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 4.11.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install oracle.oci.

To use it in a playbook, specify: oracle.oci.oci_network_firewall_policy_facts.

New in version 2.9.0: of oracle.oci

Synopsis

  • Fetches details about one or multiple NetworkFirewallPolicy resources in Oracle Cloud Infrastructure

  • Returns a list of Network Firewall Policies.

  • If network_firewall_policy_id is specified, the details of a single NetworkFirewallPolicy will be returned.

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter Choices/Defaults Comments
api_user
string
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See config_file_location). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_fingerprint
string
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See config_file_location). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_key_file
string
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See config_file_location). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided.
api_user_key_pass_phrase
string
Passphrase used by the key referenced in api_user_key_file, if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location).
auth_purpose
string
    Choices:
  • service_principal
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
auth_type
string
    Choices:
  • api_key ←
  • instance_principal
  • instance_obo_user
  • resource_principal
The type of authentication to use for making API requests. By default auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance.
cert_bundle
string
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
compartment_id
string
The ID of the compartment in which to list resources.
Required to list multiple network_firewall_policies.
config_file_location
string
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
config_profile_name
string
The profile to load from the config file referenced by config_file_location. If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location.
display_name
string
A filter to return only resources that match the entire display name given.

aliases: name
lifecycle_state
string
    Choices:
  • CREATING
  • UPDATING
  • ACTIVE
  • DELETING
  • DELETED
  • FAILED
A filter to return only resources with a lifecycleState matching the given value.
network_firewall_policy_id
string
Unique Network Firewall Policy identifier
Required to get a specific network_firewall_policy.

aliases: id
region
string
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See config_file_location). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions.
sort_by
string
    Choices:
  • timeCreated
  • displayName
The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending.
sort_order
string
    Choices:
  • ASC
  • DESC
The sort order to use, either 'ASC' or 'DESC'.
tenancy
string
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See config_file_location). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm

Examples

- name: Get a specific network_firewall_policy
  oci_network_firewall_policy_facts:
    # required
    network_firewall_policy_id: "ocid1.networkfirewallpolicy.oc1..xxxxxxEXAMPLExxxxxx"

- name: List network_firewall_policies
  oci_network_firewall_policy_facts:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    display_name: display_name_example
    lifecycle_state: CREATING
    sort_order: ASC
    sort_by: timeCreated

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
network_firewall_policies
complex
on success
List of NetworkFirewallPolicy resources

Sample:
[{'application_lists': {}, 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'decryption_profiles': {'are_certificate_extensions_restricted': True, 'is_auto_include_alt_name': True, 'is_expired_certificate_blocked': True, 'is_out_of_capacity_blocked': True, 'is_revocation_status_timeout_blocked': True, 'is_unknown_revocation_status_blocked': True, 'is_unsupported_cipher_blocked': True, 'is_unsupported_version_blocked': True, 'is_untrusted_issuer_blocked': True, 'type': 'SSL_INBOUND_INSPECTION'}, 'decryption_rules': [{'action': 'NO_DECRYPT', 'condition': {'destinations': [], 'sources': []}, 'decryption_profile': 'decryption_profile_example', 'name': 'name_example', 'secret': 'secret_example'}], 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'display_name': 'display_name_example', 'freeform_tags': {'Department': 'Finance'}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'ip_address_lists': {}, 'is_firewall_attached': True, 'lifecycle_details': 'lifecycle_details_example', 'lifecycle_state': 'CREATING', 'mapped_secrets': {'source': 'OCI_VAULT', 'type': 'SSL_INBOUND_INSPECTION', 'vault_secret_id': 'ocid1.vaultsecret.oc1..xxxxxxEXAMPLExxxxxx', 'version_number': 56}, 'security_rules': [{'action': 'ALLOW', 'condition': {'applications': [], 'destinations': [], 'sources': [], 'urls': []}, 'inspection': 'INTRUSION_DETECTION', 'name': 'name_example'}], 'system_tags': {}, 'time_created': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00', 'url_lists': {}}]
 
application_lists
dictionary
on success
Map defining application lists of the policy. The value of an entry is a list of "applications", each consisting of a protocol identifier (such as TCP, UDP, or ICMP) and protocol- specific parameters (such as a port range). The associated key is the identifier by which the application list is referenced.
Returned for get operation

 
compartment_id
string
on success
The OCID of the compartment containing the NetworkFirewall Policy.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
decryption_profiles
complex
on success
Map defining decryption profiles of the policy. The value of an entry is a decryption profile. The associated key is the identifier by which the decryption profile is referenced.
Returned for get operation

   
are_certificate_extensions_restricted
boolean
on success
Whether to block sessions if the server's certificate uses extensions other than key usage and/or extended key usage.

Sample:
True
   
is_auto_include_alt_name
boolean
on success
Whether to automatically append SAN to impersonating certificate if server certificate is missing SAN.

Sample:
True
   
is_expired_certificate_blocked
boolean
on success
Whether to block sessions if server's certificate is expired.

Sample:
True
   
is_out_of_capacity_blocked
boolean
on success
Whether to block sessions if the firewall is temporarily unable to decrypt their traffic.

Sample:
True
   
is_revocation_status_timeout_blocked
boolean
on success
Whether to block sessions if the revocation status check for server's certificate does not succeed within the maximum allowed time (defaulting to 5 seconds).

Sample:
True
   
is_unknown_revocation_status_blocked
boolean
on success
Whether to block sessions if the revocation status check for server's certificate results in "unknown".

Sample:
True
   
is_unsupported_cipher_blocked
boolean
on success
Whether to block sessions if SSL cipher suite is not supported.

Sample:
True
   
is_unsupported_version_blocked
boolean
on success
Whether to block sessions if SSL version is not supported.

Sample:
True
   
is_untrusted_issuer_blocked
boolean
on success
Whether to block sessions if server's certificate is issued by an untrusted certificate authority (CA).

Sample:
True
   
type
string
on success
Describes the type of Decryption Profile SslForwardProxy or SslInboundInspection.

Sample:
SSL_INBOUND_INSPECTION
 
decryption_rules
complex
on success
List of Decryption Rules defining the behavior of the policy. The first rule with a matching condition determines the action taken upon network traffic.
Returned for get operation

   
action
string
on success
Action:
* NO_DECRYPT - Matching traffic is not decrypted. * DECRYPT - Matching traffic is decrypted with the specified `secret` according to the specified `decryptionProfile`.

Sample:
NO_DECRYPT
   
condition
complex
on success

     
destinations
list / elements=string
on success
An array of IP address list names to be evaluated against the traffic destination address.

     
sources
list / elements=string
on success
An array of IP address list names to be evaluated against the traffic source address.

   
decryption_profile
string
on success
The name of the decryption profile to use.

Sample:
decryption_profile_example
   
name
string
on success
Name for the decryption rule, must be unique within the policy.

Sample:
name_example
   
secret
string
on success
The name of a mapped secret. Its `type` must match that of the specified decryption profile.

Sample:
secret_example
 
defined_tags
dictionary
on success
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace": {"bar-key": "value"}}`

Sample:
{'Operations': {'CostCenter': 'US'}}
 
display_name
string
on success
A user-friendly optional name for the firewall policy. Avoid entering confidential information.

Sample:
display_name_example
 
freeform_tags
dictionary
on success
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`

Sample:
{'Department': 'Finance'}
 
id
string
on success
The OCID of the resource - Network Firewall Policy.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
ip_address_lists
dictionary
on success
Map defining IP address lists of the policy. The value of an entry is a list of IP addresses or prefixes in CIDR notation. The associated key is the identifier by which the IP address list is referenced.
Returned for get operation

 
is_firewall_attached
boolean
on success
To determine if any Network Firewall is associated with this Network Firewall Policy.
Returned for get operation

Sample:
True
 
lifecycle_details
string
on success
A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

Sample:
lifecycle_details_example
 
lifecycle_state
string
on success
The current state of the Network Firewall Policy.

Sample:
CREATING
 
mapped_secrets
complex
on success
Map defining secrets of the policy. The value of an entry is a "mapped secret" consisting of a purpose and source. The associated key is the identifier by which the mapped secret is referenced.
Returned for get operation

   
source
string
on success
Source of the secrets, where the secrets are stored.

Sample:
OCI_VAULT
   
type
string
on success
Type of the secrets mapped based on the policy.
* `SSL_INBOUND_INSPECTION`: For Inbound inspection of SSL traffic. * `SSL_FORWARD_PROXY`: For forward proxy certificates for SSL inspection.

Sample:
SSL_INBOUND_INSPECTION
   
vault_secret_id
string
on success
OCID for the Vault Secret to be used.

Sample:
ocid1.vaultsecret.oc1..xxxxxxEXAMPLExxxxxx
   
version_number
integer
on success
Version number of the secret to be used.

Sample:
56
 
security_rules
complex
on success
List of Security Rules defining the behavior of the policy. The first rule with a matching condition determines the action taken upon network traffic.
Returned for get operation

   
action
string
on success
Types of Action on the Traffic flow.
* ALLOW - Allows the traffic. * DROP - Silently drops the traffic, e.g. without sending a TCP reset. * REJECT - Rejects the traffic, sending a TCP reset to client and/or server as applicable. * INSPECT - Inspects traffic for vulnerability as specified in `inspection`, which may result in rejection.

Sample:
ALLOW
   
condition
complex
on success

     
applications
list / elements=string
on success
An array of application list names to be evaluated against the traffic protocol and protocol-specific parameters.

     
destinations
list / elements=string
on success
An array of IP address list names to be evaluated against the traffic destination address.

     
sources
list / elements=string
on success
An array of IP address list names to be evaluated against the traffic source address.

     
urls
list / elements=string
on success
An array of URL pattern list names to be evaluated against the HTTP(S) request target.

   
inspection
string
on success
Type of inspection to affect the Traffic flow. This is only applicable if action is INSPECT.
* INTRUSION_DETECTION - Intrusion Detection. * INTRUSION_PREVENTION - Intrusion Detection and Prevention. Traffic classified as potentially malicious will be rejected as described in `type`.

Sample:
INTRUSION_DETECTION
   
name
string
on success
Name for the Security rule, must be unique within the policy.

Sample:
name_example
 
system_tags
dictionary
on success
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud": {"free-tier-retained": "true"}}`

 
time_created
string
on success
The time instant at which the Network Firewall Policy was created in the format defined by RFC3339. Example: `2016-08-25T21:10:29.600Z`

Sample:
2013-10-20T19:20:30+01:00
 
time_updated
string
on success
The time instant at which the Network Firewall Policy was updated in the format defined by RFC3339. Example: `2016-08-25T21:10:29.600Z`

Sample:
2013-10-20T19:20:30+01:00
 
url_lists
dictionary
on success
Map defining URL pattern lists of the policy. The value of an entry is a list of URL patterns. The associated key is the identifier by which the URL pattern list is referenced.
Returned for get operation



Authors

  • Oracle (@oracle)