- Community Home
- >
- Software
- >
- HPE OneView
- >
- Re: How to set new Option "DisableWeakCyphers" wit...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 02:04 AM - last edited on 02-18-2024 08:09 PM by support_s
02-07-2024 02:04 AM - last edited on 02-18-2024 08:09 PM by support_s
Hi,
I'm trying to Enable the DisableWeakCyphers-Option with a REST Request, but getting an Error on Execution.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$bodycred = @{
"UserName"= $ilocred.UserName
"Password"=$ilocred.GetNetworkCredential().Password
} | ConvertTo-Json
$session = Invoke-WebRequest -Uri "https://$iloboard/redfish/v1/Sessions" -Method Post -Body $bodycred -ContentType "application/json" -UseBasicParsing -ErrorAction Stop
$AuthHeaders = @{ "X-Auth-Token" = $Session.Headers.'X-Auth-Token' }
$body = '{
"DisableWeakCiphers":"True",
"TLSVersion": {
"TLS1_0":"Disabled",
"TLS1_1":"Disabled"
}
}'
Invoke-WebRequest -Uri "https://$iloboard/redfish/v1/Managers/1/SecurityService/" -Method Patch -Body $body -Headers $AuthHeaders -ContentType "application/json"
Invoke-WebRequest : The remote server returned an error: (400) Bad Request.
It works, with only setting the TLS-Versions. Am I missing something or is this not possible with REST, yet?
iLo Firmware Version 3.01 Jan 23 2024
Solved! Go to Solution.
- Tags:
- iLO_OA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 05:16 PM
02-12-2024 05:16 PM
Re: How to set new Option "DisableWeakCyphers" with REST Error iLo5
Hi Marcel,
Good day!
We've discovered that TLS 1.1 and TLS 1.2 can be disabled via REST API. Please try the script below with the IP and credentials of your iLO server.
If it doesn't work, please log a new case with HPE, providing the specific server details. Our team will assist you in resolving the issue.
# Set TLS version [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # Create session $bodycred = @{ "UserName" = $ilocred.UserName "Password" = $ilocred.GetNetworkCredential().Password } | ConvertTo-Json $session = Invoke-WebRequest -Uri "https://$iloboard/redfish/v1/Sessions" -Method Post -Body $bodycred -ContentType "application/json" -UseBasicParsing -ErrorAction Stop $AuthHeaders = @{ "X-Auth-Token" = $Session.Headers.'X-Auth-Token' } # Set options $optionsBody = @{ "DisableWeakCiphers" = $true "TLSVersion" = @{ "TLS1_0" = "Disabled" "TLS1_1" = "Disabled" } } | ConvertTo-Json # Patch request $response = Invoke-WebRequest -Uri "https://$iloboard/redfish/v1/Managers/1/SecurityService/" -Method Patch -Body $optionsBody -Headers $AuthHeaders -ContentType "application/json" if ($response.StatusCode -eq 200) { Write-Host "Options set successfully." } else { Write-Host "Error: $($response.StatusCode) - $($response.StatusDescription)" Write-Host "Response content: $($response.Content)" }
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 03:15 AM
02-15-2024 03:15 AM
SolutionThat didn't work either, but I#ve found the solution.
By setting the DisableWeakCiphers to true, the TLS-Versions are automatically disabled. So you don't have to do this separately and I think the REST-Body has a Problem with that. So this would be the right code:
$bodycred = @{
"UserName"= $ilocred.UserName
"Password"=$ilocred.GetNetworkCredential().Password
} | ConvertTo-Json
$session = Invoke-WebRequest -Uri "https://$iloboard/redfish/v1/Sessions" -Method Post -Body $bodycred -ContentType "application/json" -UseBasicParsing -ErrorAction Stop
$AuthHeaders = @{ "X-Auth-Token" = $Session.Headers.'X-Auth-Token' }
$body = @{
"DisableWeakCiphers" = $true
} | ConvertTo-Json
Invoke-WebRequest -Uri "https://$iloboard/redfish/v1/Managers/1/SecurityService/" -Method Patch -Body $body -Headers $AuthHeaders -ContentType "application/json"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 08:58 PM
02-15-2024 08:58 PM
Re: How to set new Option "DisableWeakCyphers" with REST Error iLo5
Yes, as per the script, the disableweakciphers: true , does set the TLS version to disable state.
Thank you for the update, any further queries on the same.
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
