Set Up the AWS Plugin for Monitoring on Panorama

Get started with installing the AWS plugin and configure it for monitoring your instances on the AWS public cloud.
To find all the resources that your organization has deployed in the AWS public cloud, you need to install the AWS plugin on Panorama and configure
Monitoring Definitions
that enable Panorama to authenticate to your AWS VPC(s) and retrieve resource information on the workloads. Panorama retrieves the IP address of the resources that are running— public IP address, and primary and secondary private IP addresses—and the associated tags. For a list of the metadata elements that Panorama supports, see List of Attributes Monitored on the AWS VPC.
After Panorama fetches the attributes, to push the information from Panorama to the firewalls, you must add the firewalls (hardware or VM-Series) as managed devices on Panorama, and group the firewalls into one or more Device Groups. You can then specify which device groups are part of the
Notify Group
, which is a configuration element in a Monitoring Definition, that Panorama uses to register the IP address-to-tag mapping it retrieves from AWS.
Finally, to consistently enforce Security policies across the AWS resources, you must set up Dynamic Address Groups and reference them in policy rules that allow or deny traffic to the IP addresses of the resources. For streamlining your configuration and managing policies and objects centrally from Panorama, you can define the Dynamic Address Groups and Security policy rules on Panorama and push them to the firewalls instead of managing the Dynamic Address Groups and Security policy rules locally on each firewall. The plugin learn tags from the AWS public cloud and push them to Panorama with associated IP address mappings. Panorama differentiates active and passive tags based on whether or not they are used on any security policies. The plugin send only the IP addresses of the active tags from the Dynamic Address Groups to the firewall.
The AWS plugin version 3.0.1 or later is for monitoring EC2 instances for up to 1000 VPCs on the AWS public cloud, AWS GovCloud, and AWS China. However, because Panorama cannot be deployed on AWS China, the IAM role does not support instance profiles on AWS China; you must provide the AWS credentials.

Planning Checklist for Monitoring on AWS

For Panorama to interact with the AWS APIs and collect information on your instances, you need to create an IAM role and assign the policies that grant the permissions required to authenticate to AWS and access the instances within your VPC. You can add 100 IAM roles to manage up to 1000 VPCs on Panorama.
  • Gather the VPC ID.
  • Tag your instances on AWS. You can tag (define a name-value pair) the instances either on the EC2 Dashboard on the AWS management console or using the AWS API or AWS CLI. See List of Attributes Monitored on the AWS VPC for the list of supported attributes.
  • Check for duplicate IP addresses across the VPCs for which you will enable monitoring. If you have duplicate IP addresses across AWS VPCs, the metadata will be appended together or swapped and this may cause unexpected results in policy enforcement.
    Duplicate IP addresses are written to the plugin_aws_ret.log file that you can access from the CLI on Panorama.
  • Review the requirements for Panorama and the managed firewalls:
    • Minimum system requirements—Panorama virtual appliance or hardware-based Panorama appliance.
      Panorama Minimum Requirements
      System Resources
      Memory
      CPUs
      Number of Monitored VPCs
      Number of Tags Registered
      16GB
      4
      1-100
      Panorama 10.0.5 or later with AWS plugin v 3.0.1 is tested to retrieve 10,000 IP addresses with 13 tags for each, or 5000 IP addresses with 25 tags for each, and successfully register them to the firewalls included within a device group.The tag length—includes name and value—for each instance is assumed to be 64 bytes per tag. For example, the instance name tag is aws.ec2.tag.Name.prod-web-app-4523-lvss6j.
      32 GB
      8
      100-500
      64 GB
      16
      500-1000
      Panorama OS version
      10.0.5 or later
      AWS plugin version
      3.0.1 or later
      Licenses
      Active support license and a device management license on Panorama for managing the firewalls.
      Next-generation firewalls must also have a valid support license.
      Roles and Permissions to retrieve metadata on the EC2 instances
    • You must add the firewalls as managed devices on Panorama and create Device Groups so that you can configure Panorama to notify these groups with the VM information it retrieves. Device groups can include VM-Series firewalls or virtual systems on the hardware firewalls.
    • If your Panorama appliances are in a high availability configuration, you must manually install the same version of the AWS plugin on both Panorama peers. Additionally, if you are using instance profiles, you must attach the same instance profile to both Panorama peers.
      You configure the AWS plugin on the active Panorama peer only. On commit, the configuration is synced to the passive Panorama peer. Only the active Panorama peer polls the AWS accounts you have configured for Monitoring.
    • Set up the credentials/permissions that Panorama requires to digitally sign API calls to the AWS services.
      You can choose whether you want to provide the long-term credentials—Access Key ID and Secret Access Key—that enable access to the resources within each AWS account, or set up an Assume Role on AWS to allow access to defined AWS resources within the same AWS account or cross-accounts. With an Assume Role, you must set up a trust relationship and define the permissions while creating the role itself. This is specifically useful in a cross-account deployment where the querying account does not have permissions to see or handle data from the queried account. For the Panorama plugin to successfully authenticate to the VPC and retrieve the tags, you must configure the Assume Role to use the AWS Security Token Service (STS) API to any AWS service. And a user from the querying account must have STS permissions to query the Assume Role and obtain the temporary security credentials to access resources. If your Panorama is deployed on AWS, you can opt to use an instance profile instead of providing the AWS credentials for the IAM role. The instance profile includes the role information and associated credentials that Panorama needs to digitally sign API calls to the AWS services. See IAM Roles and Permissions for Panorama for more details.

IAM Roles and Permissions for Panorama

Review the permissions required to enable Panorama to authenticate and retrieve metadata on the EC2 instances deployed within your AWS account(s).
With the AWS plugin version 3.0.1 or later, you can use IAM roles or instance profiles to enable Panorama to authenticate and retrieve metadata on the resources deployed within your AWS account(s).
  • When your Panorama is not deployed on AWS, you have two options. You can either provide the long-term IAM credentials for the AWS accounts you want to monitor, or set up an Assume Role on AWS to allow access to defined AWS resources within the same AWS account or cross-accounts. An Assume Role is recommended as the more secure option.
  • When your Panorama is deployed on AWS, in addition to the two options listed above, you can also add an instance profile that allows the IAM role to be passed to the EC2 instance. You can use an instance profile where all your monitored resources and Panorama are hosted within the same account, or an instance profile with Assume Role for cross account access where your Panorama and monitored resources are deployed across different AWS accounts. If you use the instance profile, you do not enter your AWS credentials on Panorama.
Option 1: IAM role with long term credentials
Roles and Permissions Required
The AWS credentials associated with the AWS account that has the VPC/EC2 instances you want to monitor.
The JSON format for the minimum permissions associated with the IAM role with long-term credentials is as follows:
{ “Version”: “2012-10-17", “Statement”: [ { “Sid”: “VisualEditor0”, “Effect”: “Allow”, “Action”: [ “elasticloadbalancing:DescribeLoadBalancerAttributes”, “elasticloadbalancing:DescribeLoadBalancers”, “elasticloadbalancing:DescribeTags”, “ec2:DescribeInstances”, “ec2:DescribeNetworkInterfaces”, “ec2:DescribeVpcs”, “ec2:DescribeVpcEndpoints”, “ec2:DescribeSubnets” ], “Resource”: “*” } ] }
Inputs on Panorama
Enter the
Access Key ID
and
Secret Access Key
for the user in
Panorama
Plugins
AWS
Setup
IAM Role
.
Option 2: IAM role with Assume Role
Roles and Permissions Required
While you can use this option to monitor VPCs within the same or cross account, this option is recommended to enable cross account access by assuming a role that allows you to access resources to which you may normally have access.
To assume a role from a different account, your AWS account must be trusted by that role and defined as a trusted entity in its trust policy. In addition, a user who wants to access a role in a different account must have a policy with secure token service (STS) access that specifies the role ARN.
On Account 1 that you want to monitor:
Create an IAM role with required permissions. For VM Monitoring you need the following permission.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "elasticloadbalancing:DescribeLoadBalancerAttributes", "elasticloadbalancing:DescribeLoadBalancers", "elasticloadbalancing:DescribeTags", "ec2:DescribeInstances", "ec2:DescribeNetworkInterfaces", "ec2:DescribeVpcs", "ec2:DescribeVpcEndpoints", "ec2:DescribeSubnets" ], "Resource": "*" } ] }
Copy the Role ARN.
Create a user and add the Account ID for Account 2 as a trusted entity. This allows Account 2 the permissions to use this role to access the resources within your Account 1.
On Account 2 that requires access to account 1
Attach the following policy with STS permissions and modify the Role ARN to match what you created on Account 1.
{ "Version": "2012-10-17", "Statement": { "Effect": “Allow", "Action": "sts:AssumeRole", "Resource":"arn:aws:iam::012347211234:role/ PAN-OS-assume-role" } }
Inputs on Panorama
Enter the
Access Key ID
and
Secret Access Key
for the user on Account 2 on
Panorama
Plugins
AWS
Setup
IAM Role
.
Enter the
Role ARN
for the AWS Account 1 which you want to monitor in the
Panorama
Plugins
AWS
Monitoring Definitions
.
Option 3: Instance profile
Roles and Permissions Required
Only when Panorama is deployed as an EC2 instance on AWS
Note that when you use the AWS Management console to create an IAM role, the console automatically creates an instance profile with the same name as the role. Because the role and the instance profile has the same name, when you launch tour Panorama (EC2 instance) with an IAM role, the instance profile of the same name is associated with it.
When Panorama and the resources you want to monitor are all in a single AWS account.
Create an IAM role with AmazonEC2ReadOnlyAccess.
Inputs on Panorama
Select
Instance Profile
as the option in
Panorama
Plugins
AWS
Setup
IAM Role
.
Option 4: Instance profile with Assume Role
Roles and Permissions Required
Use instance profile with Assume role when Panorama and the resources you want to monitor are deployed across AWS accounts.
For Panorama HA, make sure to attach the same instance profile to both Panorama peers.
On Account 1, where your EC2 instances are deployed:
Create an IAM role.
To this role, add the AWS Account ID (Account 2) where your Panorama is deployed as a trusted entity.
Attach the JSON policies as detailed above for VM Monitoring.
Copy the Role ARN.This role is required for Panorama to retrieve metadata on your EC2 instances or EKS clusters.
On Account 2, where your Panorama is deployed:
Create an IAM role and attach the JSON policy (with the STS policy and resource ARN you got from Account 1).
For each additional AWS account you want to monitor, copy the same STS policy and modify the Role ARN.
Inputs on Panorama
Select
Instance Profile
as the option in
Panorama
Plugins
AWS
Setup
IAM Role
Enter the
Role ARN
for the AWS account which you want to monitor in the
Panorama
Plugins
AWS
Monitoring Definitions
.
For example Account 1 in this example.

Install or Upgrade the AWS Plugin

To get started with monitoring your resources on AWS, refer to the Compatibility Matrix for the Panorama Plugin for AWS and VM-Series plugin versionsrequired to support VM monitoring.
To upgrade the Panorama plugin for AWS to version 3.0.1, you must first upgrade the plugin to version 2.0.2.
After you install the AWS plugin version 3.0.1 you cannot downgrade to version 2.0.x or below.
If you have a Panorama HA configuration, repeat the installation/upgrade process on each Panorama peer.
Install or uninstall plugins during a planned maintenance window.
If you currently have a Panorama plugin for any cloud platform installed, installing (or uninstalling) an additional plugin requires a Panorama reboot so commit changes.
  1. Log in to the Panorama Web Interface, select
    Panorama
    Plugins
    and click
    Check Now
    to get the
    AWS
    plugin version that supports VM monitoring.
  2. Download and Install
    the plugin.
    After you successfully install, Panorama refreshes and the AWS plugin displays on the
    Panorama
    Plugins
    tab.
    On the Panorama
    Dashboard
    General Information widget you can verify the Panorama Plugin for AWS version that is installed.
  3. (
    Panorama in HA
    )
    Commit
    Commit to Panorama
    .
    If your Panorama is in HA, commit the changes to the Panorama configuration to ensure that tags are registered to the Panorama peer on failover.

Configure the AWS Plugin for Monitoring

Retrieve VM information for your AWS workloads, use the match criteria filters to define Dynamic Address groups and enforce Security policy.
To begin monitoring the virtual machines in your AWS public cloud deployment, after you Install or Upgrade the AWS Plugin you must create a Monitoring Definition. This definition specifies the IAM Role that is authorized to access the instances within the AWS VPC you want to monitor and the Notify Group that includes the firewalls to which Panorama should push all the IP-address-to-tag mappings it retrieves. In order to enforce policy, you must then create Dynamic Address Groups and reference them in Security policy. The Dynamic Address Groups enable you to filter the tags you want to match on, so that the firewall can get the public and private IP addresses registered against each tag, and then allow or deny access to traffic to and from the workloads based on the policy rules you define.
The tag pruning integration capability of the AWS plugin helps prune tags based on whether or not they are used in the security policies configured at the Device Group level. The plugin parses all security policies during each commit on Panorama to update IP address-to-tag mapping as used in the security policies. The tags available in the Dynamic Address Groups are only propagated to the firewall if they are used in a security policy.
  1. Log in to the Panorama web interface.
  2. Set up the following objects for enabling VM Monitoring on AWS.
    • Verify that monitoring is enabled on the plugin. This setting must be enabled for Panorama to communicate with the AWS public cloud for VM Monitoring.
      1. The checkbox for
        Enable Monitoring
        is on
        Panorama
        Plugins
        AWS
        Setup
        General
        .
    • Add a notify group.
      1. Select
        Panorama
        Plugins
        AWS
        Setup
        Notify Groups
        Add
        .
      2. Enter a
        Name
        to identify the group of firewalls to which Panorama pushes the VM information it retrieves.
      3. Select the
        Device Groups
        , which are a group of firewalls or virtual systems, to which Panorama will push the VM information (IP address-to-tag mapping) it retrieves from your AWS VPCs. The firewalls use the update to determine the most current list of members that constitute dynamic address groups referenced in policy. If you are using the Panorama plugin for Azure and AWS, you can target the same firewall or virtual system with tags from both environments.
        Think through your Device Groups carefully. Because a Monitoring Definition can include only one notify group, make sure to select all the relevant Device Groups within your notify group. If you want to unregister the tags that Panorama has pushed to a firewall included in a notify group, you must delete the Monitoring Definition. To register tags to all virtual systems on a firewall enabled for multiple virtual systems, you must add each virtual system to a separate device group on Panorama and assign the device groups to the notify group. If you assign all the virtual systems to one device group, Panorama will register tags to only one virtual system on the firewall.
      4. Select the tags that you want to retrieve from the AWS VPCs. You can
        Select All 32 Tags
        (the default) or pick the
        Custom Tags
        you want to retrieve for your instances. With the Custom Tags option, you can
        Add
        the predefined tags and the user-defined tags that you want to use as match criteria in Security policy. If you are monitoring a large number of EC2 instances, reducing the number of tags you retrieve ensures more efficient use of the CPU and memory capacity on your Panorama. Refer to Planning Checklist for Monitoring on AWSfor some guidelines.
    • Add an IAM Role—An IAM Role is an entity that allows you to delegate access so that Panorama can make service requests on your behalf to the AWS resources (virtual machines that are deployed as EC2 instances).
      1. Select
        Panorama
        Plugins
        AWS
        Setup
        IAM Role
        Add
      2. Enter a
        Name
        and an optional
        Description
        to identify the IAM role.
      3. Select Account Type—
        Instance Profile
        or
        AWS Account Credentials
        . If your Panorama is deployed on AWS, you can choose to either attach an instance profile with the correct permissions to your Panorama or add the credentials associated with the IAM role on Panorama. If your Panorama is not deployed on AWS, you must enter the credentials for the IAM role locally on Panorama.
      4. (For AWS Account Credentials only)
        Enter the
        Access Key
        and
        Secret Key
        and re-enter secret key to confirm, then click
        OK
        .
      5. Click
        Use this CloudFormationTemplate(CFT) to configure Security Account prerequisites
        to open the Cloud Formation Template in the AWS cloud platform to create a group and associate a policy created by the plugin.
      6. Enter the
        FirewallARN
        from the
        Output
        tab of the CFT stack template in the AWS console created using the prerequisites link.
      7. (Optional)
        Add the application account details if the security stack and application are on different accounts.
      8. Click
        Use this CloudFormationTemplate(CFT) to configure Application Account prerequisites
        to open the Cloud Formation Template in the AWS cloud platform to create a role and attach a policy with required permissions.
        Make sure that you have chosen all required permissions to create a cross-account role. Optionally, to handle a transit gateway that is not in the security account, the cloud formation link deploys a Resource Access Manager (RAM) for the mentioned transit gateway and shares it with the security account provided in the template.
  3. Create a
    Monitoring Definition
    for each VPC you want to monitor.
    When you add a new Monitoring definition, it is enabled by default.
    • Select
      Panormam
      Plugins
      AWS
      Monitoring Definition
      to
      Add
      a new definition.
    • Enter a
      Name
      and an optional
      Description
      to identify the AWS VPC for which you use this definition.
    • Select an
      IAM Role
      you added from
      AWS
      Setup
      IAM Role
      .
    • From
      AWS Regions
      , select
      All
      to select all AWS regions, or click
      Select
      to select one or more AWS regions from the
      Member
      drop-down.
    • (Optional)
      Enter the Role ARN, if you have set up role chaining and IAM roles with temporary credentials that have permissions to use the AWS STS API to access AWS resources with the same account or cross-account. The Role ARN must belong to the VPC you want to monitor.
    • Select a
      Notify Group
      that includes the firewalls (hardware and VM-Series firewalls are supported) to which you want Panorama to push the IP-address-to-tag-mapping that it retrieves from your deployment.
    • Select your AWS
      VPC IDs
      from the drop-down. This ID uniquely identifies the virtual private network on AWS in which you have launched the instances that you want to monitor.
  4. Commit
    the changes on Panorama.
    Verify that the status for the Monitoring Definition displays as Success. If it fails, verify that you entered the AWS VPC ID accurately and provided the correct keys and IDs for authorizing access.
    Click
    Validate
    to verify that Panorama can authenticate using the IAM role and keys and to communicate with the AWS VPCs you’ve entered above.
  5. Verify that you can view the VM information on Panorama, and define the match criteria for Dynamic Address Groups.
    On HA failover, the newly active Panorama attempts to reconnect to the AWS cloud and retrieve tags for all monitoring definitions. If Panorama is unable to reconnect with even one of the monitoring definitions that you have configured and enabled, Panorama generates a system log message,
    Unable to process accounts after HA switch-over; user-intervention required.
    . If this happens, you must log into Panorama and verify the monitoring definitions to fix invalid credentials or remove invalid accounts. Although Panorama is disconnected from the AWS cloud, all tags that were retrieved for the monitoring definitions before the failover, are retained and the firewalls can continue to enforce policy on that list of IP addresses. Panorama removes all tags associated with the accounts only when you delete a monitoring definition. As a best practice, to monitor this issue, you can configure action-oriented log forwarding to an HTTPS destination from Panorama so that you can take action immediately.
  6. See the monitoring definition detailed status by clicking
    Detail
    Dashboard
    .
    • Select AWS regions and VPC IDs respectively to filter the tags based on regions and VPC IDs. You can also use the search bar to search tags based on regular expression search criteria.
    • Click
      more...
      to view IP address-to-tag mapping details.
    • Click
      Associated Tags
      to view tag-to-IP address mapping details.
  7. Know where to find the logs related to the AWS plugin on Panorama for troubleshooting.
    • Use the CLI command less plugins-log to view a list of all available logs.
      plugin_aws_ret.log
      displays logs related to IP address and tag retrieval.
      plugin_aws_proc.log
      displays logs related to processing of the registered IP address and tags.
      plugin_aws.log
      displays logs related to the AWS plugin configuration and daemons.
    • Use
      show plugins aws vm-mon-status
      for the status of the Monitoring Definitions.
      admin@Panorama> show plugins aws vm-mon-status Mon-Def Name VPC Status Last Updated Time Error Msg --------------------------------------------------------------------------- MD-Ins-Prof-ARN vpc-07986b091 Success 2019-12-02T10:24:56.007000 MD-gov vpc-7ea1cf1a Success 2019-12-02T10:24:56.008000 MD-IAM-ARN vpc-025a83c123 Success 2019-12-02T10:24:56.012000

Recommended For You