Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Modifying Auth TACACS config with Python or REST

Is it possible to use Python SDK or the REST API to change the TACACS+ configuration? I am running 11.5.3 and am having trouble finding documentation on either the REST calls themselves or how to script the calls using Python.

Ultimately I'll need to change a couple hundred vCMP hosts, LTM's and GTM's to point to a new TACACS+ server. I wanted to write a quick pythons script to look through my devices something like this...

for loadBalancer in loadBalancers:
    mgmt = ManagementRoot(loadBalancer['DeviceName'], username, password)
    tacacs = mgmt.tm.auth.tacacs.modify(\
        name="system-auth",\
        description="new tacacs server",\
        protocol="ip",\
        secret="$M$*******************",\
        servers="{ 10.10.10.1 10.10.10.2 }",\
        service="ppp"\
        )

Thanks in advance for any help!

Jeff

0
Rate this Question
Comments on this Question
Comment made 02-Feb-2017 by Eric Flores

Jeff, I have not used the SDK before, but have you been able to make the config change in TMSH ? If you can do it in TMSH most of the time you can do things in REST. The only thing that might cause issues is how the secret is passed as an argument.

0
Comment made 03-Feb-2017 by Jeff 2

Yes, I was having that problem as well that the secret couldn't be decrypted. I ended up getting by it escaping special chars with '/'.

Image Text

0

Answers to this Question