NetworkFirewall / Client / create_tls_inspection_configuration

create_tls_inspection_configuration#

NetworkFirewall.Client.create_tls_inspection_configuration(**kwargs)#

Creates an Network Firewall TLS inspection configuration. Network Firewall uses TLS inspection configurations to decrypt your firewall’s inbound and outbound SSL/TLS traffic. After decryption, Network Firewall inspects the traffic according to your firewall policy’s stateful rules, and then re-encrypts it before sending it to its destination. You can enable inspection of your firewall’s inbound traffic, outbound traffic, or both. To use TLS inspection with your firewall, you must first import or provision certificates using ACM, create a TLS inspection configuration, add that configuration to a new firewall policy, and then associate that policy with your firewall.

To update the settings for a TLS inspection configuration, use UpdateTLSInspectionConfiguration.

To manage a TLS inspection configuration’s tags, use the standard Amazon Web Services resource tagging operations, ListTagsForResource, TagResource, and UntagResource.

To retrieve information about TLS inspection configurations, use ListTLSInspectionConfigurations and DescribeTLSInspectionConfiguration.

For more information about TLS inspection configurations, see Inspecting SSL/TLS traffic with TLS inspection configurations in the Network Firewall Developer Guide.

See also: AWS API Documentation

Request Syntax

response = client.create_tls_inspection_configuration(
    TLSInspectionConfigurationName='string',
    TLSInspectionConfiguration={
        'ServerCertificateConfigurations': [
            {
                'ServerCertificates': [
                    {
                        'ResourceArn': 'string'
                    },
                ],
                'Scopes': [
                    {
                        'Sources': [
                            {
                                'AddressDefinition': 'string'
                            },
                        ],
                        'Destinations': [
                            {
                                'AddressDefinition': 'string'
                            },
                        ],
                        'SourcePorts': [
                            {
                                'FromPort': 123,
                                'ToPort': 123
                            },
                        ],
                        'DestinationPorts': [
                            {
                                'FromPort': 123,
                                'ToPort': 123
                            },
                        ],
                        'Protocols': [
                            123,
                        ]
                    },
                ],
                'CertificateAuthorityArn': 'string',
                'CheckCertificateRevocationStatus': {
                    'RevokedStatusAction': 'PASS'|'DROP'|'REJECT',
                    'UnknownStatusAction': 'PASS'|'DROP'|'REJECT'
                }
            },
        ]
    },
    Description='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    EncryptionConfiguration={
        'KeyId': 'string',
        'Type': 'CUSTOMER_KMS'|'AWS_OWNED_KMS_KEY'
    }
)
Parameters:
  • TLSInspectionConfigurationName (string) –

    [REQUIRED]

    The descriptive name of the TLS inspection configuration. You can’t change the name of a TLS inspection configuration after you create it.

  • TLSInspectionConfiguration (dict) –

    [REQUIRED]

    The object that defines a TLS inspection configuration. This, along with TLSInspectionConfigurationResponse, define the TLS inspection configuration. You can retrieve all objects for a TLS inspection configuration by calling DescribeTLSInspectionConfiguration.

    Network Firewall uses a TLS inspection configuration to decrypt traffic. Network Firewall re-encrypts the traffic before sending it to its destination.

    To use a TLS inspection configuration, you add it to a new Network Firewall firewall policy, then you apply the firewall policy to a firewall. Network Firewall acts as a proxy service to decrypt and inspect the traffic traveling through your firewalls. You can reference a TLS inspection configuration from more than one firewall policy, and you can use a firewall policy in more than one firewall. For more information about using TLS inspection configurations, see Inspecting SSL/TLS traffic with TLS inspection configurations in the Network Firewall Developer Guide.

    • ServerCertificateConfigurations (list) –

      Lists the server certificate configurations that are associated with the TLS configuration.

      • (dict) –

        Configures the Certificate Manager certificates and scope that Network Firewall uses to decrypt and re-encrypt traffic using a TLSInspectionConfiguration. You can configure ServerCertificates for inbound SSL/TLS inspection, a CertificateAuthorityArn for outbound SSL/TLS inspection, or both. For information about working with certificates for TLS inspection, see Using SSL/TLS server certficiates with TLS inspection configurations in the Network Firewall Developer Guide.

        Note

        If a server certificate that’s associated with your TLSInspectionConfiguration is revoked, deleted, or expired it can result in client-side TLS errors.

        • ServerCertificates (list) –

          The list of server certificates to use for inbound SSL/TLS inspection.

          • (dict) –

            Any Certificate Manager (ACM) Secure Sockets Layer/Transport Layer Security (SSL/TLS) server certificate that’s associated with a ServerCertificateConfiguration. Used in a TLSInspectionConfiguration for inspection of inbound traffic to your firewall. You must request or import a SSL/TLS certificate into ACM for each domain Network Firewall needs to decrypt and inspect. Network Firewall uses the SSL/TLS certificates to decrypt specified inbound SSL/TLS traffic going to your firewall. For information about working with certificates in Certificate Manager, see Request a public certificate or Importing certificates in the Certificate Manager User Guide.

            • ResourceArn (string) –

              The Amazon Resource Name (ARN) of the Certificate Manager SSL/TLS server certificate that’s used for inbound SSL/TLS inspection.

        • Scopes (list) –

          A list of scopes.

          • (dict) –

            Settings that define the Secure Sockets Layer/Transport Layer Security (SSL/TLS) traffic that Network Firewall should decrypt for inspection by the stateful rule engine.

            • Sources (list) –

              The source IP addresses and address ranges to decrypt for inspection, in CIDR notation. If not specified, this matches with any source address.

              • (dict) –

                A single IP address specification. This is used in the MatchAttributes source and destination specifications.

                • AddressDefinition (string) – [REQUIRED]

                  Specify an IP address or a block of IP addresses in Classless Inter-Domain Routing (CIDR) notation. Network Firewall supports all address ranges for IPv4 and IPv6.

                  Examples:

                  • To configure Network Firewall to inspect for the IP address 192.0.2.44, specify 192.0.2.44/32.

                  • To configure Network Firewall to inspect for IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24.

                  • To configure Network Firewall to inspect for the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128.

                  • To configure Network Firewall to inspect for IP addresses from 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify 1111:0000:0000:0000:0000:0000:0000:0000/64.

                  For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing.

            • Destinations (list) –

              The destination IP addresses and address ranges to decrypt for inspection, in CIDR notation. If not specified, this matches with any destination address.

              • (dict) –

                A single IP address specification. This is used in the MatchAttributes source and destination specifications.

                • AddressDefinition (string) – [REQUIRED]

                  Specify an IP address or a block of IP addresses in Classless Inter-Domain Routing (CIDR) notation. Network Firewall supports all address ranges for IPv4 and IPv6.

                  Examples:

                  • To configure Network Firewall to inspect for the IP address 192.0.2.44, specify 192.0.2.44/32.

                  • To configure Network Firewall to inspect for IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24.

                  • To configure Network Firewall to inspect for the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128.

                  • To configure Network Firewall to inspect for IP addresses from 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify 1111:0000:0000:0000:0000:0000:0000:0000/64.

                  For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing.

            • SourcePorts (list) –

              The source ports to decrypt for inspection, in Transmission Control Protocol (TCP) format. If not specified, this matches with any source port.

              You can specify individual ports, for example 1994, and you can specify port ranges, such as 1990:1994.

              • (dict) –

                A single port range specification. This is used for source and destination port ranges in the stateless rule MatchAttributes, SourcePorts, and DestinationPorts settings.

                • FromPort (integer) – [REQUIRED]

                  The lower limit of the port range. This must be less than or equal to the ToPort specification.

                • ToPort (integer) – [REQUIRED]

                  The upper limit of the port range. This must be greater than or equal to the FromPort specification.

            • DestinationPorts (list) –

              The destination ports to decrypt for inspection, in Transmission Control Protocol (TCP) format. If not specified, this matches with any destination port.

              You can specify individual ports, for example 1994, and you can specify port ranges, such as 1990:1994.

              • (dict) –

                A single port range specification. This is used for source and destination port ranges in the stateless rule MatchAttributes, SourcePorts, and DestinationPorts settings.

                • FromPort (integer) – [REQUIRED]

                  The lower limit of the port range. This must be less than or equal to the ToPort specification.

                • ToPort (integer) – [REQUIRED]

                  The upper limit of the port range. This must be greater than or equal to the FromPort specification.

            • Protocols (list) –

              The protocols to decrypt for inspection, specified using each protocol’s assigned internet protocol number (IANA). Network Firewall currently supports only TCP.

              • (integer) –

        • CertificateAuthorityArn (string) –

          The Amazon Resource Name (ARN) of the imported certificate authority (CA) certificate within Certificate Manager (ACM) to use for outbound SSL/TLS inspection.

          The following limitations apply:

          • You can use CA certificates that you imported into ACM, but you can’t generate CA certificates with ACM.

          • You can’t use certificates issued by Private Certificate Authority.

          For more information about configuring certificates for outbound inspection, see Using SSL/TLS certificates with certificates with TLS inspection configurations in the Network Firewall Developer Guide.

          For information about working with certificates in ACM, see Importing certificates in the Certificate Manager User Guide.

        • CheckCertificateRevocationStatus (dict) –

          When enabled, Network Firewall checks if the server certificate presented by the server in the SSL/TLS connection has a revoked or unkown status. If the certificate has an unknown or revoked status, you must specify the actions that Network Firewall takes on outbound traffic. To check the certificate revocation status, you must also specify a CertificateAuthorityArn in ServerCertificateConfiguration.

          • RevokedStatusAction (string) –

            Configures how Network Firewall processes traffic when it determines that the certificate presented by the server in the SSL/TLS connection has a revoked status.

            • PASS - Allow the connection to continue, and pass subsequent packets to the stateful engine for inspection.

            • DROP - Network Firewall closes the connection and drops subsequent packets for that connection.

            • REJECT - Network Firewall sends a TCP reject packet back to your client. The service closes the connection and drops subsequent packets for that connection. REJECT is available only for TCP traffic.

          • UnknownStatusAction (string) –

            Configures how Network Firewall processes traffic when it determines that the certificate presented by the server in the SSL/TLS connection has an unknown status, or a status that cannot be determined for any other reason, including when the service is unable to connect to the OCSP and CRL endpoints for the certificate.

            • PASS - Allow the connection to continue, and pass subsequent packets to the stateful engine for inspection.

            • DROP - Network Firewall closes the connection and drops subsequent packets for that connection.

            • REJECT - Network Firewall sends a TCP reject packet back to your client. The service closes the connection and drops subsequent packets for that connection. REJECT is available only for TCP traffic.

  • Description (string) – A description of the TLS inspection configuration.

  • Tags (list) –

    The key:value pairs to associate with the resource.

    • (dict) –

      A key:value pair associated with an Amazon Web Services resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as “environment”) and the tag value represents a specific value within that category (such as “test,” “development,” or “production”). You can add up to 50 tags to each Amazon Web Services resource.

      • Key (string) – [REQUIRED]

        The part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as “customer.” Tag keys are case-sensitive.

      • Value (string) – [REQUIRED]

        The part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as “companyA” or “companyB.” Tag values are case-sensitive.

  • EncryptionConfiguration (dict) –

    A complex type that contains optional Amazon Web Services Key Management Service (KMS) encryption settings for your Network Firewall resources. Your data is encrypted by default with an Amazon Web Services owned key that Amazon Web Services owns and manages for you. You can use either the Amazon Web Services owned key, or provide your own customer managed key. To learn more about KMS encryption of your Network Firewall resources, see Encryption at rest with Amazon Web Services Key Managment Service in the Network Firewall Developer Guide.

    • KeyId (string) –

      The ID of the Amazon Web Services Key Management Service (KMS) customer managed key. You can use any of the key identifiers that KMS supports, unless you’re using a key that’s managed by another account. If you’re using a key managed by another account, then specify the key ARN. For more information, see Key ID in the Amazon Web Services KMS Developer Guide.

    • Type (string) – [REQUIRED]

      The type of Amazon Web Services KMS key to use for encryption of your Network Firewall resources.

Return type:

dict

Returns:

Response Syntax

{
    'UpdateToken': 'string',
    'TLSInspectionConfigurationResponse': {
        'TLSInspectionConfigurationArn': 'string',
        'TLSInspectionConfigurationName': 'string',
        'TLSInspectionConfigurationId': 'string',
        'TLSInspectionConfigurationStatus': 'ACTIVE'|'DELETING'|'ERROR',
        'Description': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'LastModifiedTime': datetime(2015, 1, 1),
        'NumberOfAssociations': 123,
        'EncryptionConfiguration': {
            'KeyId': 'string',
            'Type': 'CUSTOMER_KMS'|'AWS_OWNED_KMS_KEY'
        },
        'Certificates': [
            {
                'CertificateArn': 'string',
                'CertificateSerial': 'string',
                'Status': 'string',
                'StatusMessage': 'string'
            },
        ],
        'CertificateAuthority': {
            'CertificateArn': 'string',
            'CertificateSerial': 'string',
            'Status': 'string',
            'StatusMessage': 'string'
        }
    }
}

Response Structure

  • (dict) –

    • UpdateToken (string) –

      A token used for optimistic locking. Network Firewall returns a token to your requests that access the TLS inspection configuration. The token marks the state of the TLS inspection configuration resource at the time of the request.

      To make changes to the TLS inspection configuration, you provide the token in your request. Network Firewall uses the token to ensure that the TLS inspection configuration hasn’t changed since you last retrieved it. If it has changed, the operation fails with an InvalidTokenException. If this happens, retrieve the TLS inspection configuration again to get a current copy of it with a current token. Reapply your changes as needed, then try the operation again using the new token.

    • TLSInspectionConfigurationResponse (dict) –

      The high-level properties of a TLS inspection configuration. This, along with the TLSInspectionConfiguration, define the TLS inspection configuration. You can retrieve all objects for a TLS inspection configuration by calling DescribeTLSInspectionConfiguration.

      • TLSInspectionConfigurationArn (string) –

        The Amazon Resource Name (ARN) of the TLS inspection configuration.

      • TLSInspectionConfigurationName (string) –

        The descriptive name of the TLS inspection configuration. You can’t change the name of a TLS inspection configuration after you create it.

      • TLSInspectionConfigurationId (string) –

        A unique identifier for the TLS inspection configuration. This ID is returned in the responses to create and list commands. You provide it to operations such as update and delete.

      • TLSInspectionConfigurationStatus (string) –

        Detailed information about the current status of a TLSInspectionConfiguration. You can retrieve this for a TLS inspection configuration by calling DescribeTLSInspectionConfiguration and providing the TLS inspection configuration name and ARN.

      • Description (string) –

        A description of the TLS inspection configuration.

      • Tags (list) –

        The key:value pairs to associate with the resource.

        • (dict) –

          A key:value pair associated with an Amazon Web Services resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as “environment”) and the tag value represents a specific value within that category (such as “test,” “development,” or “production”). You can add up to 50 tags to each Amazon Web Services resource.

          • Key (string) –

            The part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as “customer.” Tag keys are case-sensitive.

          • Value (string) –

            The part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as “companyA” or “companyB.” Tag values are case-sensitive.

      • LastModifiedTime (datetime) –

        The last time that the TLS inspection configuration was changed.

      • NumberOfAssociations (integer) –

        The number of firewall policies that use this TLS inspection configuration.

      • EncryptionConfiguration (dict) –

        A complex type that contains the Amazon Web Services KMS encryption configuration settings for your TLS inspection configuration.

        • KeyId (string) –

          The ID of the Amazon Web Services Key Management Service (KMS) customer managed key. You can use any of the key identifiers that KMS supports, unless you’re using a key that’s managed by another account. If you’re using a key managed by another account, then specify the key ARN. For more information, see Key ID in the Amazon Web Services KMS Developer Guide.

        • Type (string) –

          The type of Amazon Web Services KMS key to use for encryption of your Network Firewall resources.

      • Certificates (list) –

        A list of the certificates associated with the TLS inspection configuration.

        • (dict) –

          Contains metadata about an Certificate Manager certificate.

          • CertificateArn (string) –

            The Amazon Resource Name (ARN) of the certificate.

          • CertificateSerial (string) –

            The serial number of the certificate.

          • Status (string) –

            The status of the certificate.

          • StatusMessage (string) –

            Contains details about the certificate status, including information about certificate errors.

      • CertificateAuthority (dict) –

        Contains metadata about an Certificate Manager certificate.

        • CertificateArn (string) –

          The Amazon Resource Name (ARN) of the certificate.

        • CertificateSerial (string) –

          The serial number of the certificate.

        • Status (string) –

          The status of the certificate.

        • StatusMessage (string) –

          Contains details about the certificate status, including information about certificate errors.

Exceptions

  • NetworkFirewall.Client.exceptions.InvalidRequestException

  • NetworkFirewall.Client.exceptions.ThrottlingException

  • NetworkFirewall.Client.exceptions.InternalServerError

  • NetworkFirewall.Client.exceptions.LimitExceededException

  • NetworkFirewall.Client.exceptions.InsufficientCapacityException