• Solutions
  • Services
  • Team
  • Blog
  • About
Get More Info

Month: January 2020

Identity Services Engine

Posted on January 12, 2020January 12, 2020 by Aman

Cisco Identity Services Engine (ISE) is a powerful IAM and policy-based network access solution. ISE allows you to define role and policy-based access controls using secure communications protocols. ISE also features powerful dashboards and reports to give you realtime visibility into network authentication events. With ISE, you can simplify and unify all access into your […]

Cisco Identity Services Engine (ISE) is a powerful IAM and policy-based network access solution. ISE allows you to define role and policy-based access controls using secure communications protocols. ISE also features powerful dashboards and reports to give you realtime visibility into network authentication events. With ISE, you can simplify and unify all access into your network and services including LAN, wireless, VPN and guest. ISE also supports multi-vendor ecosystem in which ISE provides and sends data to other tools and services within your environment to provide unparalleled visibility.

Automating DNS to IP update for ISE DACLs

Posted on January 2, 2020January 3, 2020 by Aman

In this blog, we walk through the implementation of a Python script that checks if the IP for a DNS A record has changed, then automatically updates the ISE DACL. Understand the ISE API As with any other automation, understanding the flow and data source requirements is useful.  In the attached diagram, I document the […]

In this blog, we walk through the implementation of a Python script that checks if the IP for a DNS A record has changed, then automatically updates the ISE DACL.

Understand the ISE API

As with any other automation, understanding the flow and data source requirements is useful.  In the attached diagram, I document the dataflow as well as important aspects of the scripts before writing it.  Reading through Cisco’s ISE ERS API documentation is extremely useful here.  The documentation includes enough information to get started, however,  involves some trial and error.  The “Update” PUT method allows you to update the DACL, and to my pleasure, it completely replaces the old DACL with a new one instead of simply appending lines to it. This makes life easier, as it simplifies regex substitution and insertion operations.  Now that we understand the specific call we need to make, lets review other aspects of the API call.  Some request fields are ISE version specific, such as the “ERS-Media-Type” header field. This field isn’t mandatory, however, it varies with ISE versions.

ISE "Update" API call

In order to get the DACL ID, you’ll first need to make a “Get-All” GET request. This will return all ACL IDs as well as their names in order to make identification easier. The PUT request is just a tad tricky and I’ll show you how to send the DACL in that request.

Get the right libraries

To make life easier, you’ll need a couple of libraries. Python’s “re”, “requests”, “json”, and “dns.resolver” libraries are needed in order to create requests, parse the JSON and finally, search through the dacl using “re”.  The “dns.resolver” library parses the IP address of the A record easily.

First Expressions Count

One of the more challenging aspects of updating a string such as the DACL is finding the item to replace.  I use remarks in the DACL to divide the larger piece into groups of IPs based on the application or server.  I use “start” and “end” in the remarks to accomplish this. For example, “remark start app1.site.com” and “remark end app1.site.com” to identify a set of IPs associated with app1.site.com.  I use regex101.com for helping parse and create expressions. The site can create expressions for a specific language which is extremely useful.  An example of an expression is r”(?<=remark start app1\.site\.com\n)([\s\S]+?)(?=remark\send\sapp1\.site\.com)”.

Wrapping it up

The great thing about dns.resolver is that it provides a class-based approach to retrieving the IP portion of an “A” record.  This saves us from using regex to search for the IP.  To start with, we search and isolate the group of IPs associated with the application.  Then, we find and replace those IPs with the ones returned by dns.resolver.  Finally, we use the UPDATE API to PUT the newly updated DACL into ISE.  The DACL goes in the payload and not the header section of the HTTP PUT, in another article, we’ll look at how we can use Postman to make our lives easier when testing out ISE APIs.

Recent Posts

  • Identity Services Engine
  • Automating DNS to IP update for ISE DACLs
  • Data classification strategies for 2020
  • Improve your vuln management program in 2020
  • New Team Members

Recent Comments

    Archives

    • January 2020
    • December 2019
    • March 2019

    Categories

    • Featured
    • New Posts
    • Service
    • Uncategorized

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    Services
    • Design
    • Anti-Malware
    • Firewall
    • ISE
    Site Nav
    • Design
    • Anti-Malware
    • Firewall
    • ISE
    About Us
    • Solutions
    • Services
    • Team
    • Blog
    • About
    Connect
    • Facebook
    • Twitter
    • LinkedIn
    Sign Up For Our Newsletter
    Copyright© 2020 Arrowhead Information Security | San Jose, CA
    • Solutions
    • Services
    • Team
    • Blog
    • About