Language: Python
Label: safe
CWE: CWE-311 \u2014 Missing Encryption of Sensitive Data
The product does not encrypt sensitive or critical information before storage or transmission.

Code:
    def connect(self) -> dict:
        """
        Set up the connection required by the handler.
        Returns:
            HandlerStatusResponse
        """

        headers = {
            'Content-Type': 'application/json',
        }

        data = '{' + f'"userName": "{self.connection_data["username"]}","password": "{self.connection_data["password"]}"' + '}'

        response = requests.post(self.base_url + '/apiv2/login', headers=headers, data=data)

        return {
            'Authorization': '_dremio' + response.json()['token'],
            'Content-Type': 'application/json',
        }