History log of /openbmc/bmcweb/features/redfish/include/error_messages.hpp (Results 51 – 67 of 67)
Revision Date Author Comments
# 81856681 24-Sep-2021 Asmitha Karunanithi <asmitk01@in.ibm.com>

Update error messages file w.r.t Base.1.11.0

Tested By:
Code compiles

The error message is as follows:
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.

Update error messages file w.r.t Base.1.11.0

Tested By:
Code compiles

The error message is as follows:
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The operation failed because the service at /redfish/v1/Systems/system/LogServices/Dump/ is disabled and cannot accept requests.",
"MessageArgs": [
"/redfish/v1/Systems/system/LogServices/Dump/"
],
"MessageId": "Base.1.11.0.ServiceDisabled",
"MessageSeverity": "Warning",
"Resolution": "Enable the service and resubmit the request if the operation failed."
}
],
"code": "Base.1.11.0.ServiceDisabled",
"message": "he operation failed because the service at /redfish/v1/Systems/system/LogServices/Dump/ is disabled and cannot accept requests."
}
}

Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Change-Id: I923892ecd785e3b6c071fa663fee14a2754d5ef1

show more ...


# 04e438cb 03-Oct-2020 Ed Tanous <ed@tanous.net>

fix include names

cppcheck isn't smart enough to recognize these are c++ headers, not c
headers. Considering we're already inconsistent about our naming, it's
easier to just be consistent, and move

fix include names

cppcheck isn't smart enough to recognize these are c++ headers, not c
headers. Considering we're already inconsistent about our naming, it's
easier to just be consistent, and move the last few files to use .hpp
instead of .h.

Tested:
Code builds, no changes.

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Ic348d695f8527fa4a0ded53f433e1558c319db40

show more ...


# 65176d39 28-Sep-2020 Ed Tanous <ed@tanous.net>

Remove redundant void from error messages

It's not neeeded.

Tested:
Code compiles. No functional changes.

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I21588b8ca2bab4ddb65d9c6d910ba26db83c

Remove redundant void from error messages

It's not neeeded.

Tested:
Code compiles. No functional changes.

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I21588b8ca2bab4ddb65d9c6d910ba26db83c323b

show more ...


# 684bb4b8 11-Sep-2020 Jason M. Bills <jason.m.bills@linux.intel.com>

Update error_messages to Base 1.8.1

The Base message registry has updated to 1.8.1. This updates our
error_messages files to match.

This changes from the deprecated 'Severity' to the new
'MessageS

Update error_messages to Base 1.8.1

The Base message registry has updated to 1.8.1. This updates our
error_messages files to match.

This changes from the deprecated 'Severity' to the new
'MessageSeverity' property.

It also adds a script to compare our error_messages.cpp messages
against the Base message registry and flag any differences.

Tested:
Ran the Redfish Validator and confirmed that this change does
not introduce any new failures.

Change-Id: I2e5101a5b4d0c0963569493451f99521e42b0f4d
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>

show more ...


# dd28ba82 07-Sep-2020 AppaRao Puli <apparao.puli@linux.intel.com>

Add MutualExclusiveProperties registry

Add MutualExclusiveProperties message registry entry
and error message.
As per redfish specification, "RegistryPrefixes" and
"MessageIds" are mutually exclusiv

Add MutualExclusiveProperties registry

Add MutualExclusiveProperties message registry entry
and error message.
As per redfish specification, "RegistryPrefixes" and
"MessageIds" are mutually exclusive. So add check for
same in EventService and return MutualExclusiveProperties
error message.

Tested:
- Create subscription failed with error(bad request)
when the request body contain both "RegistryPrefixes"
and "MessageIds".

Change-Id: I4c14f946977bce2ced8a7f96eb85855117fde9a8
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>

show more ...


# 4cde5d90 11-Jun-2020 James Feist <james.feist@linux.intel.com>

Update Service: Change error message based on error logs

THis adds support for better error responses based on
the logs generated by phosphor-software-manager.

Tested: Got 400 error with different

Update Service: Change error message based on error logs

THis adds support for better error responses based on
the logs generated by phosphor-software-manager.

Tested: Got 400 error with different messages based
on failure type

{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "Invalid file uploaded to /redfish/v1/UpdateService: Invalid archive.",
"MessageArgs": [
"/redfish/v1/UpdateService",
"invalid archive"
],
"MessageId": "OpenBMC.0.1.0.InvalidUpload",
"Resolution": "None.",
"Severity": "Warning"
}
],
"code": "OpenBMC.0.1.0.InvalidUpload",
"message": "Invalid file uploaded to /redfish/v1/UpdateService: Invalid archive."
}
}

{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message",
"Message": "Invalid file uploaded to /redfish/v1/UpdateService: Invalid image format.",
"MessageArgs": [
"/redfish/v1/UpdateService",
"invalid image format"
],
"MessageId": "OpenBMC.0.1.0.InvalidUpload",
"Resolution": "None.",
"Severity": "Warning"
}
],
"code": "OpenBMC.0.1.0.InvalidUpload",
"message": "Invalid file uploaded to /redfish/v1/UpdateService: Invalid image format."
}
}

{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"Message": "The resource /redfish/v1/UpdateService was unable to satisfy the request due to unavailability of resources.",
"MessageArgs": [
"/redfish/v1/UpdateService"
],
"MessageId": "Base.1.4.0.ResourceExhaustion",
"Resolution": "Ensure that the resources are available and resubmit the request.",
"Severity": "Critical"
}
],
"code": "Base.1.4.0.ResourceExhaustion",
"message": "The resource /redfish/v1/UpdateService was unable to satisfy the request due to unavailability of resources."
}
}

Change-Id: Ida9a23c10aedbf9a48c96f4050a04e06bddff284
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# 1214b7e7 04-Jun-2020 Gunnar Mills <gmills@us.ibm.com>

clang-format: update to latest from docs repo

This is from openbmc/docs/style/cpp/.clang-format

Other OpenBMC repos are doing the same.

Tested: Built and validator passed.
Change-Id: Ief26c755c9ce

clang-format: update to latest from docs repo

This is from openbmc/docs/style/cpp/.clang-format

Other OpenBMC repos are doing the same.

Tested: Built and validator passed.
Change-Id: Ief26c755c9ce012823e16a506342b0547a53517a
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 3bf4e632 06-Feb-2020 Joseph Reynolds <joseph-reynolds@charter.net>

Implement Redfish PasswordChangeRequired

This implements the Redfish PasswordChangeRequired handling. See
section 13.3.7.1 "Password change required handling" in the 1.9.1 spec:
https://www.dmtf.or

Implement Redfish PasswordChangeRequired

This implements the Redfish PasswordChangeRequired handling. See
section 13.3.7.1 "Password change required handling" in the 1.9.1 spec:
https://www.dmtf.org/sites/default/files/standards/documents/DSP0266_1.9.1.pdf

These portions of the spec are implemented:
- Authenticatation with a correct but expired password creates a
session:
- The session is restricted to the ConfigureSelf privilege which
allows a user to change their own password (via GET and PATCH
Password for their own account). Support for the ConfigureSelf
privilege is already in BMCWeb.
- The session object has the PasswordChangeRequired message.
- All other operations respond with http status code 403 Forbidden
and include the PasswordChangeRequired message.
- The ManagerAccount (URI /redfish/v1/AccountService/Accounts/USER)
PasswordChangeRequired property is implemented for local accounts
but not present for remote accounts.

This has the following additional behavior:

The PasswordChangeRequired property is updated at the start of each new
REST operation, even within an existing session. This behavior
implements a "dynamic" PasswordChangeRequired handling that responds to
changes to the underlying "password expired" status. Specifically:
- Sessions restricted by the PasswordChangeRequired handling lose that
restriction when the underlying account password is changed.
- Sessions become subject to the PasswordChangeRequired handling
restrictions whenever the underlying account password expires.
- The mechanism is to check if the password is expired at the start of
every new REST API operation, effectively updating the ManagerAccount
PasswordChangeRequired property each time. This makes BMCWeb
responsive to changes in the underlying account due to other activity
on the BMC.

Notes:
1. Note that when an account password status is changed (for example,
the password becomes expired or is changed) and that account has
active sessions, those sessions remain. They are not deleted. Any
current operations are allowed to complete. Subsequent operations
with that session pick up the new password status.

2. This does not implement OWASP recommendations which call for sessions
to be dropped when there is a significant change to the underlying
account. For example, when the password is changed, the password
becomes expired, or when the account's Role changes. OWASP's
recommendation is due to the session fixation vulnerability. See the
OWASP Session Management Cheat Sheet section "Renew the Session ID
After Any Privilege Level Change":
https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html#renew-the-session-id-after-any-privilege-level-change

BMCWeb protects against session fixation vulnerabilities because it
always regenerates new session IDs when successful authentication
creates a new session.

3. Users authenticating via mTLS are not subject to the
PasswordChangeRequired behavior because mTLS takes precedence over
password-based authentication.

Tested:
0. Setup:
- The `passwd --expire USERNAME` command was used to expire
passwords. The `chage USER` command was also used.
- The following were used to change the password: Redfish API,
passwd command, and the SSH password change dialog.
- Tested the following via Basic Auth, /login, and Redfish login
(except where Basic Auth does not create a persistent session).
- Only local user account were tested.
- Did not test authentication via mTLS or with LDAP users.
1. When the password is not expired, authentication behaves as usual
for both correct and incorrect passwords.
2. When the password is incorrect and expired, authentication fails as
usual.
3. When the password is correct but expired:
A. A session is created and has the PasswordChangeRequired message.
B. That session cannot access resources that require Login privilege
and the 403 message contains the PasswordChangeRequired message.
C. That session can be used to GET the user's account, PATCH the
Password, and DELETE the session object.
D. The account PasswordChangeRequired reports true.
4. While a session is established, try expiring and changing
(unexpiring) the password using various mechanisms. Ensure both the
session object and the ManagerAccount PasswordChangeRequired property
report the correct condition, and ensure PasswordChangeRequired
handling (restricting operations to ConfigureSelf when
PasswordChangeRequired is true) is applied correctly.

Signed-off-by: Joseph Reynolds <joseph-reynolds@charter.net>
Change-Id: Iedc61dea8f949e4b182e14dc189de02d1f74d3e8

show more ...


# b5c07418 24-Feb-2020 James Feist <james.feist@linux.intel.com>

Move error_message JSON into own function

Right now all error messages requires a response object,
so they cannot be used directly in the json body. This
pulls the messages out into their own functi

Move error_message JSON into own function

Right now all error messages requires a response object,
so they cannot be used directly in the json body. This
pulls the messages out into their own function so that
they can be used at any place in the response body.

Tested: It compiles and runs, verified return codes look
ok

Change-Id: I500b2164b2366086d610f0fdc8fa22985183e438
Signed-off-by: James Feist <james.feist@linux.intel.com>

show more ...


# c94ad49b 10-Oct-2019 Ed Tanous <ed.tanous@intel.com>

Make references to crow less obvious

Recently, a number of people in the community have made the (admittedly
easy) mistake that we use a significant portion of crow.

Today, we use crow for the rout

Make references to crow less obvious

Recently, a number of people in the community have made the (admittedly
easy) mistake that we use a significant portion of crow.

Today, we use crow for the router, and the "app" structure, and even
those have been significantly modified to meet the bmc needs. All other
components have been replaced with Boost beast. This commit removes the
crow mentions from the Readme, and moves the crow folder to "http" to
camouflage it a little. No code content has changed.

Tested:
Code compiles. No functional change made to any executable code.

Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: Iceb57b26306cc8bdcfc77f3874246338864fd118

show more ...


# a08b46cc 06-Nov-2018 Jason M. Bills <jason.m.bills@linux.intel.com>

Simplify Redfish error message property interface

The error message code used a json_pointer object which must
begin with a '/' character and had to be sent as an extra
parameter. This change simpl

Simplify Redfish error message property interface

The error message code used a json_pointer object which must
begin with a '/' character and had to be sent as an extra
parameter. This change simplifies the interface by using a
string so there doesn't have to be a '/'. This allowed the
same property argument passed for the message to be used
for the property field path.

Tested: Sent an error with a property and verified that it is
correctly displayed.

Change-Id: I0571e2eee627cedf29d751588a4f1bceee66f084
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>

show more ...


# cc9139ec 30-Oct-2018 Jason M. Bills <jason.m.bills@linux.intel.com>

Update Redfish to Base.1.4.0 message registry

Update the Redfish error_messages from Base.1.2.0 to Base.1.4.0
from the Redfish standard registries.

Change-Id: I771b119372fd995bd1dc4065830485b6a848f

Update Redfish to Base.1.4.0 message registry

Update the Redfish error_messages from Base.1.2.0 to Base.1.4.0
from the Redfish standard registries.

Change-Id: I771b119372fd995bd1dc4065830485b6a848f086
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>

show more ...


# 66ac2b8c 30-Oct-2018 Jason M. Bills <jason.m.bills@linux.intel.com>

Update formatting of error string literals and message descriptions

clang-format doesn't automatically merge multi-line string
literals, so this change updates the formatting to merge some
multi-lin

Update formatting of error string literals and message descriptions

clang-format doesn't automatically merge multi-line string
literals, so this change updates the formatting to merge some
multi-line strings into fewer lines.

This change also corrects the <argx> numbering in the error message
descriptions to match the function parameter numbers.

Change-Id: Ibedcaf5793a607acacdb3bc83081599ba508c989
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>

show more ...


# f12894f8 09-Oct-2018 Jason M. Bills <jason.m.bills@linux.intel.com>

Improve the Redfish error reporting interface

Makes the Redfish error reporting interface automatically handle
setting the http status and JSON content in the response object.

When using an AsyncRe

Improve the Redfish error reporting interface

Makes the Redfish error reporting interface automatically handle
setting the http status and JSON content in the response object.

When using an AsyncResp object, this allows for simply calling
the Redfish error and returning.

Change-Id: Icfdce2de763225f070e8dd61e591f296703f46bb
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>

show more ...


# 1abe55ef 05-Sep-2018 Ed Tanous <ed.tanous@intel.com>

Move to clang-format-6.0

This commit moves the codebase to the lastest clang-format file from
upstream, as well as clang-format-6.0.

Change-Id: Ice8313468097c0c42317fbb9e10ddf036e8cff4c
Signed-off-

Move to clang-format-6.0

This commit moves the codebase to the lastest clang-format file from
upstream, as well as clang-format-6.0.

Change-Id: Ice8313468097c0c42317fbb9e10ddf036e8cff4c
Signed-off-by: Ed Tanous <ed.tanous@intel.com>

show more ...


# 55c7b7a2 22-May-2018 Ed Tanous <ed.tanous@intel.com>

Move over to upstream c++ style

This patchset moves bmcweb over to the upstream style naming
conventions for variables, classes, and functions, as well as imposes
the latest clang-format file.

This

Move over to upstream c++ style

This patchset moves bmcweb over to the upstream style naming
conventions for variables, classes, and functions, as well as imposes
the latest clang-format file.

This changeset was mostly built automatically by the included
.clang-tidy file, which has the ability to autoformat and auto rename
variables. At some point in the future I would like to see this in
greater use, but for now, we will impose it on bmcweb, and see how it
goes.

Tested: Code still compiles, and appears to run, although other issues
are possible and likely.

Change-Id: If422a2e36df924e897736b3feffa89f411d9dac1
Signed-off-by: Ed Tanous <ed.tanous@intel.com>

show more ...


# f4c4dcf4 29-Jan-2018 Kowalski, Kamil <kamil.kowalski@intel.com>

Introduce Redfish Error messages definitions

Added a python script that should be use to generate error_messages.cpp na .hpp
files. These files as are not subject to change in a dynamic manner, shou

Introduce Redfish Error messages definitions

Added a python script that should be use to generate error_messages.cpp na .hpp
files. These files as are not subject to change in a dynamic manner, should be
regenerated only when MessageRegistry changes.

Tested on x86 Ubuntu VM and Wolfpass platform:
a) No regression in BMCWeb interface
- Went through WebUI observed no changes in functionality
b) No regression in Redfish functionality
- Went through nodes and observed no changes in functionality
- Sessions now return error messages in addition to HTTP codes

Change-Id: I4aba9ee247b6cd2c46a9c158d14bdc7546e9b11b
Signed-off-by: Kowalski, Kamil <kamil.kowalski@intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>

show more ...


123