Skip to content
This repository was archived by the owner on May 27, 2024. It is now read-only.

Suggestion for adding machine_status to TACACSAuthorizationReply #45

@en-medina

Description

@en-medina

Hi team, I am not sure if this suggestion could be written in the issue section.

I'm using your package in a python application for authenticate and authorizate users against AAA servers in order to give them access to specific network application as the defined profile for the user in the AAA servers (as a requirement of the company I must use their AAA servers). Following the idea, I finished the application and is in production now (by the way, works great the package), but for retrieving the permissions of the user from the authorize method of the TACACSClient class, I was forced to read the response as string and parse it to dictionary.

I was wondering if could be added like a machine_status method to the TACACSAuthorizationReply class (instance returned by the authorize method of the TACACSClient class), for covering the use of case described above.

Testing the case:

cli = TACACSClient('host', 49, 'secret', timeout=10, family=socket.AF_INET)
authen = cli.authenticate('username', 'password')
author = cli.authorize(username)
print(author.__str__())

string method of the TACACSAuthorizationReply:

def __str__(self):
args = ', '.join([x.decode('utf-8') for x in self.arguments])
return ', '.join([
'args: %s' % args,
'args_cnt: %d' % len(self.arguments),
'data: %s' % self.data,
'data_len: %d' % len(self.data),
'server_msg: %s' % self.server_msg,
'server_msg_len: %d' % len(self.server_msg),
'status: %s' % self.human_status,
])

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions