New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting ServerDownOrUnreachableError with error code 401 for the password containing "$Password" #157
Comments
Not from the library's perspective. That exception occurs when the library accesses the service root to probe it prior to authenticating, so the username and password aren't even sent yet. What happens when you do this?
|
HI, I am getting 401 unauthorized error. Please find the response below:
But when I provide the "curl -u 'root:$password' -k -s https://XX.XXX.XXX.XX:8080/2/hmc/redfish/v1/" command with -u option I am getting the response data successfully. |
Issue #152 was also root caused to be the same thing. The problem is there's a requirement in the Redfish specification that states the service root needs to be accessible without credentials. There is a patch attached in the issue to help work around it, but at this time we'd like to avoid encouraging non-conformant behaviors natively in the library. It would be good to provide this feedback to the service vendor so they can fix it. |
Hi @mraineri , Thanks a lot for the response. The workaround patch did not help as it is failing in the check for " Please find the updated code below:
|
If that works for you, great! But at this time we're not comfortable introducing this type of change in the mainline library code. The Redfish specification is very clear about the fact the service root is required to be accessible without any authorization headers. It's fairly crucial for initial discovery purposes. |
Hi Team,
I am getting serverDown or UnreachableError : Server not reachable with return code 401" for the password="$password" containing "$" .
Here is my code:
import redfish
login_host = "https://XX.XXX.XXX.XX"
login_account = "root"
login_password = "$password"
REDFISH_OBJ = redfish.redfish_client(base_url=login_host, username=login_account,
password=login_password, default_prefix='/redfish/v1')
Is there any step needed to handle passwords with "$" special character.
The text was updated successfully, but these errors were encountered: