Infoblox::Grid::Admin::TACACSPlusAuthService - TACACS+ Authentication Service object
Represents a group of TACACS+ servers that are used to authenticate administrators.
my $tacacs_auth_server = Infoblox::Grid::Admin::TACACSPlusAuthService->new( name => $string, #Required tacacsplus_servers => [$TACACSPlusAuthServer1, ...], #Required acct_retries => $num, #Optional / Default is 0 acct_timeout => $num, #Optional / Default is 1000 auth_retries => $num, #Optional / Default is 0 auth_timeout => $num, #Optional / Default is 5000 comment => $string, #Optional / Default is empty disabled => "true" | "false" #Optional / Default is false );
This section describes all the methods in the Infoblox::Session module that you can apply to a TACACS+ Authentication Service object.
Use this method to add an object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values.
#Construct an object my $service = Infoblox::Grid::Admin::TACACSPlusAuthService->new( name => 'some.name.com', tacacsplus_servers => [$tcs1, $tcs2] ); #Submit for addition my $response = $session->add( $service );
Use this method to retrieve all the matching objects from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values.
Apply the following attributes to get a specific TACACS+ Authentication Service object:
name - Required. TACACS+ Authentication Service name.
my @retrieved_objs = $session->get( object => "Infoblox::Grid::Admin::TACACSPlusAuthService", name => "some.name.com" );
Use this method to modify an object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values.
#Use this method to modify the comment. $service->comment("this is a modified comment"); #Submit modification my $response = $session->modify( $service );
Use this method to remove an object from the Infoblox appliance. See Infoblox::Session->remove() for parameters and return values.
To remove a specific object, first use get()
or search()
to retrieve the specific object, and then submit this object for removal.
#Get the objects with the same name my @retrieved_objs = $session->get( object => "Infoblox::Grid::Admin::TACACSPlusAuthService", name => "some.name.com" );
#Find the desired object on the retrieved list. my $desired_service = $retrieved_objs[0]; #Submit for removal my $response = $session->remove( $desired_service );
Use the following methods to access the attributes of an Infoblox::Grid::Admin::TACACSPlusAuthService object. Specify a parameter to set the attribute's value, or omit the parameter to get the attribute's value.
Use this method to set or retrieve the value that specifies how many times the appliance must resend the TACACS+ accounting packet if the appliance does not receive a response.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
An unsigned integer between 0 and 5, inclusive.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Getting acct_retries my $acct_retries = $tacacsplus_service->acct_retries( ); #Modifying acct_retries $tacacsplus_service->acct_retries("5");
Use this method to set or retrieve the value, in milliseconds, that specifies how long the appliance must wait for accounting response packets.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
An unsigned integer between 1000 and 30000, inclusive.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get acct_timeout my $acct_timeout = $tacacsplus_service->acct_timeout( ); #Modify acct_timeout $tacacsplus_service->acct_timeout("5000");
Use this method to set or retrieve the number of times NIOS retries authentication and authorization if there is no response or a server error occurrs.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
An unsigned integer between 0 and 5, inclusive.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get auth_retries my $auth_retries = $tacacsplus_service->auth_retries( ); #Modify auth_retries $tacacsplus_service->auth_retries("5");
Use this method to set or retrieve the number of milliseconds NIOS waits to complete admin authentication and authorization by the TACACS+ server.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
An unsigned integer between 5000 and 60000, inclusive.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get auth_timeout my $auth_timeout = $tacacsplus_service->auth_timeout( ); #Modify auth_timeout $tacacsplus_service->auth_timeout("5000");
Use this method to set or retrieve a descriptive comment about the TACACS+ Authentication Service object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The comment in string format, with a maximum of 256 characters.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get comment my $comment = $tacacsplus_service->comment( ); #Modify comment $tacacsplus_service->comment("TACACS+ Authentication Service for NAC authentication");
Use this method to set or retrieve the disable flag of the TACACS+ Authentication Service object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the disable flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get disable my $disable = $tacacsplus_service->disabled( ); #Modify disabled $tacacsplus_service->disabled("true");
Use this method to set or retrieve the name of the TACACS+ Authentication Service object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The name in string format, with a maximum of 64 characters.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get name my $name = $tacacsplus_service->name( ); #Modify name $tacacsplus_service->name("TACACS+ Authentication Service");
Use this method to set or retrieve a list of TACACS+ servers assigned to this TACACS+ service.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
An array reference that contains a list of Infoblox::Grid::Admin::TACACSPlusAuthServer objects.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get tacacsplus_servers my $tacacsplus_servers = $tacacsplus_service->tacacsplus_servers( ); #Modify tacacsplus_servers $tacacsplus_service->tacacsplus_servers([$tacacsplus_server1]);
The following sample code demonstrates the different functions that can be applied to an object, such as add, search, modify, and remove. This sample also includes error handling for the operations.
#Preparation prior to a TACACS+ Authentication Service object insertion
#PROGRAM STARTS: Include all the modules that will be used use strict; use Infoblox;
#Create a session to the Infoblox appliance my $host_ip = "192.168.1.2"; my $session = Infoblox::Session->new( master => $host_ip, username => "admin", password => "infoblox" ); unless($session){ die("Constructor for session failed: ", Infoblox::status_code(). ":" . Infoblox::status_detail()); } print "Session created successfully.\n";
my $tcs1 = Infoblox::Grid::Admin::TACACSPlusAuthServer->new( comment => 'server 1', fqdn_or_ip => '10.0.1.1', shared_secret => 'secret1', auth_type => 'ASCII', );
my $tcs2 = Infoblox::Grid::Admin::TACACSPlusAuthServer->new( comment => 'server 2', fqdn_or_ip => 'domain.com', shared_secret => 'secret2', auth_type => 'ASCII', );
#Create the TACACS+ Authentication Service.
my $service = Infoblox::Grid::Admin::TACACSPlusAuthService->new( acct_retries => 1, auth_retries => 1, disabled => 'true', acct_timeout => 1100, auth_timeout => 5000, name => 'some.name.com', tacacsplus_servers => [$tcs1, $tcs2] );
unless($service){ die("Construct service object failed: ", Infoblox::status_code(). ":" .Infoblox::status_detail()); } print "Service object created successfully.\n";
$session->add($service) or die("Add TACACS+ service failed: ", $session->status_code(). ":" .$session->status_detail());
print"Service added successfully.\n";
#Get a specific service.
my @search_result = $session->get( object => "Infoblox::Grid::Admin::TACACSPlusAuthService", name => "some.name.com" );
my $search_obj = $search_result[0]; unless($search_obj){ die("Search service failed: ", $session->status_code() . ":" . $session->status_detail()); }
print "Search service object found at least 1 matching entry\n";
#Get and modify a TACACS+ service.
$search_obj->comment("this is a modified comment.");
#Apply the change $session->modify($search_obj) or die("Modify service failed: ", $session->status_code(). ":" .$session->status_detail());
print "Service object modified successfully.\n";
#Remove a service.
my @search_result = $session->get( object => "Infoblox::Grid::Admin::TACACSPlusAuthService", name => "some.name.com" );
my $search_obj = $search_result[0]; unless($search_obj){ die("Search service failed: ", $session->status_code() . ":" . $session->status_detail()); }
print "Search service object found at least 1 matching entry\n";
$session->remove($search_obj) or die("Remove service failed: ", $session->status_code(). ":" .$session->status_detail());
print "Remove service successfull\n";
####PROGRAM ENDS####
Infoblox Inc. http://www.infoblox.com
Infoblox::Grid::Admin::TACACSPlusAuthServer, Infoblox::Session, Infoblox::Session->add(), Infoblox::Session->get(), Infoblox::Session->modify(), Infoblox::Session->remove()
Copyright (c) 2017 Infoblox Inc.