CiscoTestAutomation / rest

pyATS | Genie REST API Connector
10 stars 23 forks source link

Rest Connector for nd (Nexus Dashboard) will not work for remote authentication #131

Closed vijperum closed 1 month ago

vijperum commented 1 month ago

Rest Connector for nd (Nexus Dashboard) will not work for remote authentication as payload defaults to DefaultAuth

SohanTirpude commented 1 month ago

Hello @vijperum,

Can you please provide the complete description of the error you are facing with the script, logs, etc. details?

Thank you.

vijperum commented 1 month ago

line number 109 payload = { "userName": username, "userPasswd": password, "domain": "DefaultAuth" } domain cannot be DefaultAuth for Remote Authentication. domain needs should also be from testbed file

domain by default DefaultAuth it can change.

    domain = self.connection.connection_info['credentials']['rest'].get('domain', 'DefaultAuth')

    payload = {
        "userName": username,
        "userPasswd": password,
        "domain": domain
    }

Example: I have created a domain MSLDAP for LDAP (Remote Authentication) so the payload becomes {"userName":[REDACTED],"userPasswd":[REDACTED],"domain":"MSLDAP","uiLogin":true}

sowmyadn010501 commented 1 month ago

Hi, I have seen that you have raised the PR for this issue. Please let me know is there anything help you need on this

sowmyadn010501 commented 1 month ago

Hi, As you have raised the PR with fix for this issue I will be closing this ticket. If have any queries on this and any help you need regarding this issue, Kindly let me know.