You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -85,6 +86,38 @@ The setup.sh script can also be run without starting the emulator to just prepar
85
86
86
87
**NOTE:** If <WORK_DIR> already exists before running the setup.sh script, it will first get deleted.
87
88
89
+
<aname="redfish-auth"></a>
90
+
91
+
### Redfish Authorization
92
+
93
+
The emulator supports Basic and session authorization (X-Auth-Token). Initial accounts can be created by setting the AUTH_CONFIG environment variable. The expected format is <username>:<password>:<role> where <role> is one of Administrator, Operator, or ReadOnly as defined by DMTF as required default redfish roles.
94
+
95
+
These roles carry the following redfish privileges as defined by DMTF:
96
+
- Administrator
97
+
- Login
98
+
- ConfigureManager
99
+
- ConfigureUsers
100
+
- ConfigureSelf
101
+
- ConfigureComponents
102
+
- Operator
103
+
- Login
104
+
- ConfigureSelf
105
+
- ConfigureComponents
106
+
- ReadOnly
107
+
- Login
108
+
- ConfigureSelf
109
+
110
+
Access to the emulators URIs are privilege based and are set per HTTP method for dynamic resources. Static resources (GET only) require Login privileges for access.
111
+
112
+
Any account specified by AUTH_CONFIG will be also added under the AccountService in the emulated redfish server and, if using the dynamic resource, can be manipulated (Add/Delete/Patch) using the AccountService. Actions under the AccountService will affect the emulator's authorization accounts.
113
+
114
+
Similarly session tokens can be created with SessionService actions if the emulator is using the dynamic resource. No sessions exist by default.
115
+
116
+
By default, if AUTH_CONFIG is empty or an invalid format, the emulator will have 3 accounts created:
117
+
- root:root_password:Administrator
118
+
- operator:operator_password:Operator
119
+
- guest:guest_password:ReadOnly
120
+
88
121
<aname="creating-new-emulator"></a>
89
122
90
123
## Creating a new BMC type for emulation
@@ -147,35 +180,35 @@ The default loader is the parent Loader python class that is used as the base fo
147
180
The Loader class currently sets up dynamic resources for:
- Computer System Power Actions - [computer_systems_api.py](https://github.com/Cray-HPE/csm-redfish-interface-emulator/blob/master/src/api_emulator/redfish/computer_systems_api.py)
337
-
GET /redfish/v1/Systems/<system_id>
338
-
POST /redfish/v1/Systems/<system_id>/Actions/ComputerSystem.Reset
- Account Service - [account_service_api.py](https://github.com/Cray-HPE/csm-redfish-interface-emulator/blob/master/src/api_emulator/redfish/account_service_api.py)
- Session Service - [session_service_api.py](https://github.com/Cray-HPE/csm-redfish-interface-emulator/blob/master/src/api_emulator/redfish/session_service_api.py)
0 commit comments