cisco-en-programmability / dnacentersdk

Cisco DNA Center Python SDK
https://dnacentersdk.readthedocs.io/en/latest/
MIT License
70 stars 31 forks source link

DNAC 2.3.5 now supports AES Encrypted Authentication -- authorization header field needs updated #119

Open jhawker09 opened 1 year ago

jhawker09 commented 1 year ago

Prerequisites

Describe the bug Access token fails when using AES Encrypted Authentication, currently encoded_auth accepts base64 and authentication.py prepends b'Basic ' to encoded_auth in the request header. Likely need an additional arg for if AES encryption is enabled to NOT prepend b'Basic'.

Expected behavior If using AES Encrypted Authentication, DNAC accepts the following string: "CSCO-AES-256 credentials=Base64Encode(AESEncrypt(username:password , aes256 key))" Source: https://developer.cisco.com/docs/dna-center/#!authentication-and-authorization/aes-key-encryption Final encoded_auth string should look like this (i.e. does not contain "Basic"): "CSCO-AES-256 credentials=[Base64 encoded AES encrypted username:password pair]"

Environment (please complete the following information):