PasswordChangeRequired parameter value is not getting set to true during account creation or even with PATCH
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- api, authentication
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện các yêu cầu POST và PATCH được lập tài liệu tới /redfish/v1/AccountService/Accounts và kiểm tra schema ManagerAccount được tham chiếu trong phản hồi. Xác định xem PasswordChangeRequired được thiết kế để có thể ghi hay chỉ đọc, sau đó xác minh rằng hành vi tạo và cập nhật tài khoản, các giá trị phản hồi và thông báo lỗi khớp với hợp đồng được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
TestCase Description:
Create A user account with Administrator Role with PasswordChangeRequired": true : redfishtool -sssss -W 1:30 -r <BMC_IP> -u root -p dell_help_123 -d '{"UserName": "admin30", "Locked": false, "Name": "Redfish Name", "RoleId": "Administrator", "PasswordChangeRequired": true, "Enabled": true, "Password": "admin@123"}' -T 60 -S Always raw POST '/redfish/v1/AccountService/Accounts'
Result:
Account Created and PasswordChangeRequired is set to true in Response:
rkumardu@C-JSP16J3:~$ redfishtool -sssss -W 1:30 -r <BMC_IP> -u username -p password -T 60 -S Always raw GET '/redfish/v1/AccountService/Accounts/5'
num: 1, time: 30
#REQUEST: GET https://<BMC_IP>/redfish/v1/AccountService/Accounts/5
#__Request.Headers: {'User-Agent': 'python-requests/2.27.1', 'Accept': 'application/json', 'Connection': 'keep-alive', 'OData-Version': '4.0', 'Authorization': 'Basic cm9vdDpkZWxsX2hlbHBfMTIz'}
#__Request AuthType: Basic
#__Request Data: None
#__Response.status_code: 200, r.url: https://<BMC_IP>/redfish/v1/AccountService/Accounts/5
#__Response.elapsed(responseTime): 0.85 sec
#__Response.Headers: {'Date': 'Mon, 17 Nov 2025 17:08:08 GMT', 'Server': 'apache', 'X-Frame-Options': 'DENY', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'Access-Control-Allow-Origin': '*', 'Allow': 'GET, HEAD, PATCH, DELETE', 'Cache-Control': 'no-store; no-cache', 'Content-Type': 'application/json;odata.metadata=minimal;charset=utf-8', 'Etag': 'W/"gen-3"', 'Link': '</redfish/v1/Schemas/ManagerAccount.v1_13_0.json>;rel=describedby', 'Odata-Version': '4.0', 'Pragma': 'no-cache', 'X-Content-Security-Policy': "default-src 'self'", 'X-Content-Type-Options': 'nosniff', 'X-Ua-Compatible': 'IE=11', 'X-Xss-Protection': '1;mode=block', 'Content-Length': '1114', 'Vary': 'Accept-Encoding', 'Keep-Alive': 'timeout=60, max=100', 'Connection': 'Keep-Alive'}
#__Response. Data: {"AccountTypes":["Redfish","SNMP","OEM","HostConsole","ManagerConsole","IPMI","KVMIP","VirtualMedia","WebUI"],"PasswordExpiration":null,"SNMP":
{"AuthenticationKeySet":true,"AuthenticationProtocol":"HMAC256_SHA384","EncryptionKey":null,"EncryptionKeySet":true,"EncryptionProtocol":"CFB128_AES256","AuthenticationKey":null}
,"RoleId":"Administrator","@odata.type":"#ManagerAccount.v1_13_0.ManagerAccount","Description":"User Account","Enabled":true,"Id":"5","@odata.etag":"W/"gen-3"","PasswordChangeRequired":false,"Password":null,"Locked":false,"Keys":{"@odata.id":"/redfish/v1/AccountService/Accounts/5/Keys"},"OEMAccountTypes":["SOL","RACADM"],"@odata.id":"/redfish/v1/AccountService/Accounts/5","Oem":{"Dell":{"SNMPv3PassphraseEnabled":"Disabled","@odata.context":"/redfish/v1/$metadata#DellManagerAccount.DellManagerAccount","@odata.type":"#DellManagerAccount.v1_0_0.DellManagerAccount"}},"UserName":"admin30","StrictAccountTypes":false,"Name":"User Account","Links":{"Role":{"@odata.id":"/redfish/v1/AccountService/Roles/Administrator"}},"@odata.context":"/redfish/v1/$metadata#ManagerAccount.ManagerAccount"}
#STATUS: Last Response: r.status_code: 200
#STATUS: Last Response: r.url: https://<BMC_IP>/redfish/v1/AccountService/Accounts/5
#STATUS: Last Response: r.elapsed(responseTime): 0.85 sec
{
"AccountTypes": [
"Redfish",
"SNMP",
"OEM",
"HostConsole",
"ManagerConsole",
"IPMI",
"KVMIP",
"VirtualMedia",
"WebUI"
],
"PasswordExpiration": null,
"SNMP":
{ "AuthenticationKeySet": true, "AuthenticationProtocol": "HMAC256_SHA384", "EncryptionKey": null, "EncryptionKeySet": true, "EncryptionProtocol": "CFB128_AES256", "AuthenticationKey": null }
,
"RoleId": "Administrator",
"@odata.type": "#ManagerAccount.v1_13_0.ManagerAccount",
"Description": "User Account",
"Enabled": true,
"Id": "5",
"@odata.etag": "W/"gen-3"",
"PasswordChangeRequired": false,
"Password": null,
"Locked": false,
"Keys":
{ "@odata.id": "/redfish/v1/AccountService/Accounts/5/Keys" }
,
"OEMAccountTypes": [
"SOL",
"RACADM"
],
"@odata.id": "/redfish/v1/AccountService/Accounts/5",
"Oem": {
"Dell":
{ "SNMPv3PassphraseEnabled": "Disabled", "@odata.context": "/redfish/v1/$metadata#DellManagerAccount.DellManagerAccount", "@odata.type": "#DellManagerAccount.v1_0_0.DellManagerAccount" }
},
"UserName": "admin30",
"StrictAccountTypes": false,
"Name": "User Account",
"Links": {
"Role":
{ "@odata.id": "/redfish/v1/AccountService/Roles/Administrator" }
},
"@odata.context": "/redfish/v1/$metadata#ManagerAccount.ManagerAccount"
}
rkumardu@C-JSP16J3:~$
In Response I saw that the PasswordChangeRequired is still false.
I tried to change this PasswordChangeRequired to true via PATCH request but got error,
rkumardu@C-JSP16J3:~$ redfishtool -sssss -W 1:30 -r <BMC_IP> -u username -p password -d '{"PasswordChangeRequired": true}' -T 60 -S Always raw PATCH '/redfish/v1/AccountService/Accounts/5'
num: 1, time: 30
#REQUEST: GET https://<BMC_IP>/redfish/v1/AccountService/Accounts/5
#__Request.Headers: {'User-Agent': 'python-requests/2.27.1', 'Accept': 'application/json', 'Connection': 'keep-alive', 'OData-Version': '4.0', 'Authorization': 'Basic cm9vdDpkZWxsX2hlbHBfMTIz'}
#__Request AuthType: Basic
#__Request Data: None
#__Response.status_code: 200, r.url: https://<BMC_IP>/redfish/v1/AccountService/Accounts/5
#__Response.elapsed(responseTime): 1.15 sec
#__Response.Headers: {'Date': 'Mon, 17 Nov 2025 17:15:38 GMT', 'Server': 'apache', 'X-Frame-Options': 'DENY', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'Access-Control-Allow-Origin': '*', 'Allow': 'GET, HEAD, PATCH, DELETE', 'Cache-Control': 'no-store; no-cache', 'Content-Type': 'application/json;odata.metadata=minimal;charset=utf-8', 'Etag': 'W/"gen-3"', 'Link': '</redfish/v1/Schemas/ManagerAccount.v1_13_0.json>;rel=describedby', 'Odata-Version': '4.0', 'Pragma': 'no-cache', 'X-Content-Security-Policy': "default-src 'self'", 'X-Content-Type-Options': 'nosniff', 'X-Ua-Compatible': 'IE=11', 'X-Xss-Protection': '1;mode=block', 'Content-Length': '1114', 'Vary': 'Accept-Encoding', 'Keep-Alive': 'timeout=60, max=100', 'Connection': 'Keep-Alive'}
#__Response. Data: {"AccountTypes":["Redfish","SNMP","OEM","HostConsole","ManagerConsole","IPMI","KVMIP","VirtualMedia","WebUI"],"PasswordExpiration":null,"SNMP":
{"AuthenticationKeySet":true,"AuthenticationProtocol":"HMAC256_SHA384","EncryptionKey":null,"EncryptionKeySet":true,"EncryptionProtocol":"CFB128_AES256","AuthenticationKey":null}
,"RoleId":"Administrator","@odata.type":"#ManagerAccount.v1_13_0.ManagerAccount","Description":"User Account","Enabled":true,"Id":"5","@odata.etag":"W/"gen-3"","PasswordChangeRequired":false,"Password":null,"Locked":false,"Keys":{"@odata.id":"/redfish/v1/AccountService/Accounts/5/Keys"},"OEMAccountTypes":["SOL","RACADM"],"@odata.id":"/redfish/v1/AccountService/Accounts/5","Oem":{"Dell":{"SNMPv3PassphraseEnabled":"Disabled","@odata.context":"/redfish/v1/$metadata#DellManagerAccount.DellManagerAccount","@odata.type":"#DellManagerAccount.v1_0_0.DellManagerAccount"}},"UserName":"admin30","StrictAccountTypes":false,"Name":"User Account","Links":{"Role":{"@odata.id":"/redfish/v1/AccountService/Roles/Administrator"}},"@odata.context":"/redfish/v1/$metadata#ManagerAccount.ManagerAccount"}
#REQUEST: PATCH https://<BMC_IP>/redfish/v1/AccountService/Accounts/5
#__Request.Headers: {'User-Agent': 'python-requests/2.27.1', 'Accept': 'application/json', 'Connection': 'keep-alive', 'OData-Version': '4.0', 'content-type': 'application/json', 'if-match': 'W/"gen-3"', 'Content-Length': '32', 'Authorization': 'Basic cm9vdDpkZWxsX2hlbHBfMTIz'}
#__Request AuthType: Basic
#__Request Data: {"PasswordChangeRequired": true}
#__Response.status_code: 400, r.url: https://<BMC_IP>/redfish/v1/AccountService/Accounts/5
#__Response.elapsed(responseTime): 1.13 sec
#__Response.Headers: {'Date': 'Mon, 17 Nov 2025 17:15:40 GMT', 'Server': 'apache', 'X-Frame-Options': 'DENY', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'Access-Control-Allow-Origin': '*', 'Cache-Control': 'no-store; no-cache', 'Content-Type': 'application/json;odata.metadata=minimal;charset=utf-8', 'Odata-Version': '4.0', 'Pragma': 'no-cache', 'X-Content-Security-Policy': "default-src 'self'", 'X-Content-Type-Options': 'nosniff', 'X-Ua-Compatible': 'IE=11', 'X-Xss-Protection': '1;mode=block', 'Content-Length': '969', 'Connection': 'close'}
#__Response. Data: {"error":{"@Message.ExtendedInfo":[{"MessageId":"Base.1.18.PropertyNotWritable","MessageArgs":["PasswordChangeRequired"],"RelatedProperties":"#/PasswordChangeRequired","Message":"The property PasswordChangeRequired is a read-only property and cannot be assigned a value.","Severity":"Warning","Resolution":"Remove the property from the request body and resubmit the request if the operation failed."},
{"MessageId":"IDRAC.2.14.SYS427","MessageArgs":["PasswordChangeRequired"],"RelatedProperties":["#/PasswordChangeRequired"],"Message":"Unable to complete the operation because the property PasswordChangeRequired is a read only property and cannot be assigned a value.","Severity":"Warning","Resolution":"Remove the property from the request body and retry the operation."}
],"code":"Base.1.18.GeneralError","message":"A general error has occurred. See Resolution for information on how to resolve the error, or @Message.ExtendedInfo if Resolution is not provided."}}
redfishtool: Transport: Response Error: status_code: 400 – Bad Request
rkumardu@C-JSP16J3:~$
Please check this issue. If we can chnage this or not?
Regards
Rahul
- Ngôn ngữ chính
- PowerShell
- Star
- 740
- Fork
- 311
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dell/iDRAC-Redfish-Scripting
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
dell/iDRAC-Redfish-Scripting#391 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
dell/iDRAC-Redfish-Scripting#390 · 3 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
dell/iDRAC-Redfish-Scripting#384 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
dell/iDRAC-Redfish-Scripting#383 · 18 bình luận ·
Tất cả issue của dell/iDRAC-Redfish-Scripting
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Eval bug: minimax-m3: build_moe_ffn() drops the per-expert NVFP4 scale → garbled output (M3.1 Flash)Đang mởbug-unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
openminion/openminion#376 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
integration: apple_tv
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
home-assistant/core#188282 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A "since" range is worded as a career: "the past two seasons" says "regular season career (2025 on)"Đang mởP4: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
jeffknupp/association#538 ·