VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/RedfishPkg/Include/Protocol/EdkIIRedfishCredential2.h

Last change on this file was 108794, checked in by vboxsync, 3 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
File size: 5.0 KB
Line 
1/** @file
2 This file defines the EDKII_REDFISH_CREDENTIAL2_PROTOCOL interface.
3
4 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
5 (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
6 (C) Copyright 2024 American Megatrends International LLC<BR>
7
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10**/
11
12#ifndef EDKII_REDFISH_CREDENTIAL2_H_
13#define EDKII_REDFISH_CREDENTIAL2_H_
14
15#include <Protocol/EdkIIRedfishCredential.h>
16#include <RedfishServiceData.h>
17
18typedef struct _EDKII_REDFISH_CREDENTIAL2_PROTOCOL EDKII_REDFISH_CREDENTIAL2_PROTOCOL;
19
20#define REDFISH_CREDENTIAL_PROTOCOL_REVISION 0x00010000
21
22#define EDKII_REDFISH_CREDENTIAL2_PROTOCOL_GUID \
23 { \
24 0x936b81dc, 0x348c, 0x42e3, { 0x9e, 0x82, 0x2, 0x91, 0x4f, 0xd3, 0x48, 0x86 } \
25 }
26
27/**
28 Retrieve platform's Redfish authentication information.
29
30 This functions returns the Redfish authentication method together with the user Id and
31 password.
32 - For AuthMethodNone, the UserId and Password could be used for HTTP header authentication
33 as defined by RFC7235.
34 - For AuthMethodRedfishSession, the UserId and Password could be used for Redfish
35 session login as defined by Redfish API specification (DSP0266).
36
37 Callers are responsible for and freeing the returned string storage.
38
39 @param[in] This Pointer to EDKII_REDFISH_CREDENTIAL2_PROTOCOL instance.
40 @param[out] AuthMethod Type of Redfish authentication method.
41 @param[out] UserId The pointer to store the returned UserId string.
42 @param[out] Password The pointer to store the returned Password string.
43
44 @retval EFI_SUCCESS Get the authentication information successfully.
45 @retval EFI_ACCESS_DENIED SecureBoot is disabled after EndOfDxe.
46 @retval EFI_INVALID_PARAMETER This or AuthMethod or UserId or Password is NULL.
47 @retval EFI_OUT_OF_RESOURCES There are not enough memory resources.
48 @retval EFI_UNSUPPORTED Unsupported authentication method is found.
49
50**/
51typedef
52EFI_STATUS
53(EFIAPI *EDKII_REDFISH_CREDENTIAL2_PROTOCOL_GET_AUTH_INFO)(
54 IN EDKII_REDFISH_CREDENTIAL2_PROTOCOL *This,
55 OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod,
56 OUT CHAR8 **UserId,
57 OUT CHAR8 **Password
58 );
59
60/**
61 Notifies the Redfish service provider to stop providing configuration service to this platform.
62 Deletes the bootstrap account on BMC side, so it will not be used by any other driver.
63
64 This function should be called when the platfrom is about to leave the safe environment.
65 It will delete the bootstrap account sending DELETE request to BMC.
66 It will notify the Redfish service provider to abort all logined session, and prohibit
67 further login with original auth info. GetAuthInfo() will return EFI_UNSUPPORTED once this
68 function is returned.
69
70 @param[in] This Pointer to EDKII_REDFISH_CREDENTIAL2_PROTOCOL instance.
71 @param[in] ServiceStopType Reason of stopping Redfish service.
72
73 @retval EFI_SUCCESS Service has been stopped successfully.
74 @retval EFI_INVALID_PARAMETER This is NULL.
75 @retval Others Some error happened.
76
77**/
78typedef
79EFI_STATUS
80(EFIAPI *EDKII_REDFISH_CREDENTIAL2_PROTOCOL_STOP_SERVICE)(
81 IN EDKII_REDFISH_CREDENTIAL2_PROTOCOL *This,
82 IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType
83 );
84
85/**
86 Register Redfish service instance so protocol knows that some module uses bootstrap account .
87
88 @param[in] This Pointer to EDKII_REDFISH_CREDENTIAL2_PROTOCOL instance.
89 @param[in] RedfishService Redfish service instance to register.
90
91 @retval EFI_SUCCESS This Redfish service instance has been registered successfully.
92
93**/
94typedef
95EFI_STATUS
96(EFIAPI *EDKII_REDFISH_CREDENTIAL2_PROTOCOL_REGISTER_REDFISH_SERVICE)(
97 IN EDKII_REDFISH_CREDENTIAL2_PROTOCOL *This,
98 IN REDFISH_SERVICE RedfishService
99 );
100
101/**
102 Unregister Redfish service instance and delete the bootstrap account
103 when all registered services unregistered.
104
105 @param[in] This Pointer to EDKII_REDFISH_CREDENTIAL2_PROTOCOL instance.
106 @param[in] RedfishService Redfish service instance to unregister.
107
108 @retval EFI_SUCCESS This Redfish service instance has been unregistered successfully.
109
110**/
111typedef
112EFI_STATUS
113(EFIAPI *EDKII_REDFISH_CREDENTIAL2_PROTOCOL_UNREGISTER_REDFISH_SERVICE)(
114 IN EDKII_REDFISH_CREDENTIAL2_PROTOCOL *This,
115 IN REDFISH_SERVICE RedfishService
116 );
117
118struct _EDKII_REDFISH_CREDENTIAL2_PROTOCOL {
119 UINT64 Revision;
120 EDKII_REDFISH_CREDENTIAL2_PROTOCOL_GET_AUTH_INFO GetAuthInfo;
121 EDKII_REDFISH_CREDENTIAL2_PROTOCOL_STOP_SERVICE StopService;
122 EDKII_REDFISH_CREDENTIAL2_PROTOCOL_REGISTER_REDFISH_SERVICE RegisterRedfishService;
123 EDKII_REDFISH_CREDENTIAL2_PROTOCOL_UNREGISTER_REDFISH_SERVICE UnregisterRedfishService;
124};
125
126extern EFI_GUID gEdkIIRedfishCredential2ProtocolGuid;
127
128#endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette