mirror of https://github.com/acidanthera/audk.git
RedfishPkg/RedfishCredentialDxe: EDKII Redfish Credential DXE driver
EDKII Redfish Credential DXE driver which abstracts platform Redfish credential implementation. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Ting Ye <ting.ye@intel.com> Signed-off-by: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Fan Wang <fan.wang@intel.com> Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Peter O'Hanley <peter.ohanley@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
This commit is contained in:
parent
2255a2b107
commit
e6ae24e1d6
|
@ -0,0 +1,91 @@
|
|||
/** @file
|
||||
Definitinos of RedfishHostInterfaceDxe driver.
|
||||
|
||||
(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
#ifndef REDFISH_CREDENTIAL_LIB_H_
|
||||
#define REDFISH_CREDENTIAL_LIB_H_
|
||||
|
||||
#include <Uefi.h>
|
||||
|
||||
/**
|
||||
Notification of Exit Boot Service.
|
||||
|
||||
@param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
LibCredentialExitBootServicesNotify (
|
||||
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This
|
||||
);
|
||||
|
||||
/**
|
||||
Notification of End of DXe.
|
||||
|
||||
@param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
LibCredentialEndOfDxeNotify (
|
||||
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This
|
||||
);
|
||||
|
||||
/**
|
||||
Retrieve platform's Redfish authentication information.
|
||||
|
||||
This functions returns the Redfish authentication method together with the user Id and
|
||||
password.
|
||||
- For AuthMethodNone, the UserId and Password could be used for HTTP header authentication
|
||||
as defined by RFC7235.
|
||||
- For AuthMethodRedfishSession, the UserId and Password could be used for Redfish
|
||||
session login as defined by Redfish API specification (DSP0266).
|
||||
|
||||
Callers are responsible for and freeing the returned string storage.
|
||||
|
||||
@param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.
|
||||
@param[out] AuthMethod Type of Redfish authentication method.
|
||||
@param[out] UserId The pointer to store the returned UserId string.
|
||||
@param[out] Password The pointer to store the returned Password string.
|
||||
|
||||
@retval EFI_SUCCESS Get the authentication information successfully.
|
||||
@retval EFI_ACCESS_DENIED SecureBoot is disabled after EndOfDxe.
|
||||
@retval EFI_INVALID_PARAMETER This or AuthMethod or UserId or Password is NULL.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough memory resources.
|
||||
@retval EFI_UNSUPPORTED Unsupported authentication method is found.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
LibCredentialGetAuthInfo (
|
||||
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
|
||||
OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod,
|
||||
OUT CHAR8 **UserId,
|
||||
OUT CHAR8 **Password
|
||||
);
|
||||
|
||||
/**
|
||||
Notify the Redfish service provide to stop provide configuration service to this platform.
|
||||
|
||||
This function should be called when the platfrom is about to leave the safe environment.
|
||||
It will notify the Redfish service provider to abort all logined session, and prohibit
|
||||
further login with original auth info. GetAuthInfo() will return EFI_UNSUPPORTED once this
|
||||
function is returned.
|
||||
|
||||
@param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.
|
||||
@param[in] ServiceStopType Reason of stopping Redfish service.
|
||||
|
||||
@retval EFI_SUCCESS Service has been stoped successfully.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@retval Others Some error happened.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
LibStopRedfishService (
|
||||
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
|
||||
IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType
|
||||
);
|
||||
#endif
|
|
@ -0,0 +1,101 @@
|
|||
/** @file
|
||||
NULL instace of RedfishPlatformCredentialLib
|
||||
|
||||
(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
#include <Uefi.h>
|
||||
#include <Protocol/EdkIIRedfishCredential.h>
|
||||
/**
|
||||
Notification of Exit Boot Service.
|
||||
|
||||
@param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
LibCredentialExitBootServicesNotify (
|
||||
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
Notification of End of DXe.
|
||||
|
||||
@param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
LibCredentialEndOfDxeNotify (
|
||||
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
Retrieve platform's Redfish authentication information.
|
||||
|
||||
This functions returns the Redfish authentication method together with the user Id and
|
||||
password.
|
||||
- For AuthMethodNone, the UserId and Password could be used for HTTP header authentication
|
||||
as defined by RFC7235.
|
||||
- For AuthMethodRedfishSession, the UserId and Password could be used for Redfish
|
||||
session login as defined by Redfish API specification (DSP0266).
|
||||
|
||||
Callers are responsible for and freeing the returned string storage.
|
||||
|
||||
@param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.
|
||||
@param[out] AuthMethod Type of Redfish authentication method.
|
||||
@param[out] UserId The pointer to store the returned UserId string.
|
||||
@param[out] Password The pointer to store the returned Password string.
|
||||
|
||||
@retval EFI_SUCCESS Get the authentication information successfully.
|
||||
@retval EFI_ACCESS_DENIED SecureBoot is disabled after EndOfDxe.
|
||||
@retval EFI_INVALID_PARAMETER This or AuthMethod or UserId or Password is NULL.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough memory resources.
|
||||
@retval EFI_UNSUPPORTED Unsupported authentication method is found.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
LibCredentialGetAuthInfo (
|
||||
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
|
||||
OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod,
|
||||
OUT CHAR8 **UserId,
|
||||
OUT CHAR8 **Password
|
||||
)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
Notify the Redfish service provide to stop provide configuration service to this platform.
|
||||
|
||||
This function should be called when the platfrom is about to leave the safe environment.
|
||||
It will notify the Redfish service provider to abort all logined session, and prohibit
|
||||
further login with original auth info. GetAuthInfo() will return EFI_UNSUPPORTED once this
|
||||
function is returned.
|
||||
|
||||
@param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.
|
||||
@param[in] ServiceStopType Reason of stopping Redfish service.
|
||||
|
||||
@retval EFI_SUCCESS Service has been stoped successfully.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL or given the worng ServiceStopType.
|
||||
@retval EFI_UNSUPPORTED Not support to stop Redfish service.
|
||||
@retval Others Some error happened.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
LibStopRedfishService (
|
||||
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
|
||||
IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType
|
||||
)
|
||||
{
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
## @file
|
||||
# NULL instance of RedfishPlatformCredentialLib
|
||||
#
|
||||
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 0x0001000b
|
||||
BASE_NAME = RedfishPlatformCredentialLibNull
|
||||
FILE_GUID = CA3BD843-0BDD-4EE0-A38A-B45CA663114F
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = RedfishPlatformCredentialLib
|
||||
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 RISCV64
|
||||
#
|
||||
|
||||
[Sources]
|
||||
PlatformCredentialLibNull.c
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
RedfishPkg/RedfishPkg.dec
|
||||
|
||||
|
|
@ -14,4 +14,5 @@
|
|||
INF RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf
|
||||
INF RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf
|
||||
INF RedfishPkg/RedfishRestExDxe/RedfishRestExDxe.inf
|
||||
INF RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.inf
|
||||
!endif
|
||||
|
|
|
@ -16,4 +16,5 @@
|
|||
RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf
|
||||
RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf
|
||||
RedfishPkg/RedfishRestExDxe/RedfishRestExDxe.inf
|
||||
RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.inf
|
||||
!endif
|
||||
|
|
|
@ -0,0 +1,209 @@
|
|||
/** @file
|
||||
RedfishCrentialDxe produces the EdkIIRedfishCredentialProtocol for the consumer
|
||||
to get the Redfish credential Info and to restrict Redfish access from UEFI side.
|
||||
|
||||
(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
#include <RedfishCredentialDxe.h>
|
||||
|
||||
EDKII_REDFISH_CREDENTIAL_PROTOCOL mRedfishCredentialProtocol = {
|
||||
RedfishCredentialGetAuthInfo,
|
||||
RedfishCredentialStopService
|
||||
};
|
||||
|
||||
/**
|
||||
Callback function executed when the ExitBootServices event group is signaled.
|
||||
|
||||
@param[in] Event Event whose notification function is being invoked.
|
||||
@param[out] Context Pointer to the buffer pass in.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
RedfishCredentialExitBootServicesEventNotify (
|
||||
IN EFI_EVENT Event,
|
||||
OUT VOID *Context
|
||||
)
|
||||
{
|
||||
LibCredentialExitBootServicesNotify ((EDKII_REDFISH_CREDENTIAL_PROTOCOL *)Context);
|
||||
}
|
||||
|
||||
/**
|
||||
Callback function executed when the EndOfDxe event group is signaled.
|
||||
|
||||
@param[in] Event Event whose notification function is being invoked.
|
||||
@param[out] Context Pointer to the buffer pass in.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
RedfishCredentialEndOfDxeEventNotify (
|
||||
IN EFI_EVENT Event,
|
||||
OUT VOID *Context
|
||||
)
|
||||
{
|
||||
LibCredentialEndOfDxeNotify ((EDKII_REDFISH_CREDENTIAL_PROTOCOL *)Context);
|
||||
|
||||
//
|
||||
// Close event, so it will not be invoked again.
|
||||
//
|
||||
gBS->CloseEvent (Event);
|
||||
}
|
||||
|
||||
/**
|
||||
Retrieve platform's Redfish authentication information.
|
||||
|
||||
This functions returns the Redfish authentication method together with the user Id and
|
||||
password.
|
||||
- For AuthMethodNone, the UserId and Password could be used for HTTP header authentication
|
||||
as defined by RFC7235.
|
||||
- For AuthMethodRedfishSession, the UserId and Password could be used for Redfish
|
||||
session login as defined by Redfish API specification (DSP0266).
|
||||
|
||||
Callers are responsible for and freeing the returned string storage.
|
||||
|
||||
@param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.
|
||||
@param[out] AuthMethod Type of Redfish authentication method.
|
||||
@param[out] UserId The pointer to store the returned UserId string.
|
||||
@param[out] Password The pointer to store the returned Password string.
|
||||
|
||||
@retval EFI_SUCCESS Get the authentication information successfully.
|
||||
@retval EFI_ACCESS_DENIED SecureBoot is disabled after EndOfDxe.
|
||||
@retval EFI_INVALID_PARAMETER This or AuthMethod or UserId or Password is NULL.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough memory resources.
|
||||
@retval EFI_UNSUPPORTED Unsupported authentication method is found.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
RedfishCredentialGetAuthInfo (
|
||||
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
|
||||
OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod,
|
||||
OUT CHAR8 **UserId,
|
||||
OUT CHAR8 **Password
|
||||
)
|
||||
{
|
||||
if (This == NULL || AuthMethod == NULL || UserId == NULL || Password == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
return LibCredentialGetAuthInfo (This, AuthMethod, UserId,Password);
|
||||
}
|
||||
|
||||
/**
|
||||
Notify the Redfish service provide to stop provide configuration service to this platform.
|
||||
|
||||
This function should be called when the platfrom is about to leave the safe environment.
|
||||
It will notify the Redfish service provider to abort all logined session, and prohibit
|
||||
further login with original auth info. GetAuthInfo() will return EFI_UNSUPPORTED once this
|
||||
function is returned.
|
||||
|
||||
@param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.
|
||||
@param[in] ServiceStopType Reason of stopping Redfish service.
|
||||
|
||||
@retval EFI_SUCCESS Service has been stoped successfully.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL or given the worng ServiceStopType.
|
||||
@retval EFI_UNSUPPORTED Not support to stop Redfish service.
|
||||
@retval Others Some error happened.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
RedfishCredentialStopService (
|
||||
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
|
||||
IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType
|
||||
)
|
||||
{
|
||||
if (This == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
return LibStopRedfishService (This, ServiceStopType);
|
||||
}
|
||||
|
||||
/**
|
||||
Main entry for this driver.
|
||||
|
||||
@param ImageHandle Image handle this driver.
|
||||
@param SystemTable Pointer to SystemTable.
|
||||
|
||||
@retval EFI_SUCESS This function always complete successfully.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
RedfishCredentialDxeDriverEntryPoint (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_HANDLE Handle;
|
||||
EFI_EVENT EndOfDxeEvent;
|
||||
EFI_EVENT ExitBootServiceEvent;
|
||||
|
||||
Handle = NULL;
|
||||
|
||||
//
|
||||
// Install the RedfishCredentialProtocol onto Handle.
|
||||
//
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&Handle,
|
||||
&gEdkIIRedfishCredentialProtocolGuid,
|
||||
&mRedfishCredentialProtocol,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// After EndOfDxe, if SecureBoot is disabled, Redfish Credential Protocol should return
|
||||
// error code to caller to avoid the 3rd code to bypass Redfish Credential Protocol and
|
||||
// retrieve userid/pwd directly. So, here, we create EndOfDxe Event to check SecureBoot
|
||||
// status.
|
||||
//
|
||||
Status = gBS->CreateEventEx (
|
||||
EVT_NOTIFY_SIGNAL,
|
||||
TPL_CALLBACK,
|
||||
RedfishCredentialEndOfDxeEventNotify,
|
||||
(VOID *)&mRedfishCredentialProtocol,
|
||||
&gEfiEndOfDxeEventGroupGuid,
|
||||
&EndOfDxeEvent
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
//
|
||||
// After ExitBootServices, Redfish Credential Protocol should stop the service.
|
||||
// So, here, we create ExitBootService Event to stop service.
|
||||
//
|
||||
Status = gBS->CreateEventEx (
|
||||
EVT_NOTIFY_SIGNAL,
|
||||
TPL_CALLBACK,
|
||||
RedfishCredentialExitBootServicesEventNotify,
|
||||
(VOID *)&mRedfishCredentialProtocol,
|
||||
&gEfiEventExitBootServicesGuid,
|
||||
&ExitBootServiceEvent
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->CloseEvent (EndOfDxeEvent);
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
ON_ERROR:
|
||||
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
Handle,
|
||||
&gEdkIIRedfishCredentialProtocolGuid,
|
||||
&mRedfishCredentialProtocol,
|
||||
NULL
|
||||
);
|
||||
|
||||
return Status;
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/** @file
|
||||
Definition of Redfish Credential DXE driver.
|
||||
|
||||
(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
#ifndef EDKII_REDFISH_CREDENTIAL_DXE_H_
|
||||
#define EDKII_REDFISH_CREDENTIAL_DXE_H_
|
||||
|
||||
#include <Protocol/EdkIIRedfishCredential.h>
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PrintLib.h>
|
||||
#include <Library/RedfishCredentialLib.h>
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
|
||||
/**
|
||||
Retrieve platform's Redfish authentication information.
|
||||
|
||||
This functions returns the Redfish authentication method together with the user Id and
|
||||
password.
|
||||
- For AuthMethodNone, the UserId and Password could be used for HTTP header authentication
|
||||
as defined by RFC7235.
|
||||
- For AuthMethodRedfishSession, the UserId and Password could be used for Redfish
|
||||
session login as defined by Redfish API specification (DSP0266).
|
||||
|
||||
Callers are responsible for and freeing the returned string storage.
|
||||
|
||||
@param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.
|
||||
@param[out] AuthMethod Type of Redfish authentication method.
|
||||
@param[out] UserId The pointer to store the returned UserId string.
|
||||
@param[out] Password The pointer to store the returned Password string.
|
||||
|
||||
@retval EFI_SUCCESS Get the authentication information successfully.
|
||||
@retval EFI_ACCESS_DENIED SecureBoot is disabled after EndOfDxe.
|
||||
@retval EFI_INVALID_PARAMETER This or AuthMethod or UserId or Password is NULL.
|
||||
@retval EFI_OUT_OF_RESOURCES There are not enough memory resources.
|
||||
@retval EFI_UNSUPPORTED Unsupported authentication method is found.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
RedfishCredentialGetAuthInfo (
|
||||
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
|
||||
OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod,
|
||||
OUT CHAR8 **UserId,
|
||||
OUT CHAR8 **Password
|
||||
);
|
||||
|
||||
/**
|
||||
Notify the Redfish service provide to stop provide configuration service to this platform.
|
||||
|
||||
This function should be called when the platfrom is about to leave the safe environment.
|
||||
It will notify the Redfish service provider to abort all logined session, and prohibit
|
||||
further login with original auth info. GetAuthInfo() will return EFI_UNSUPPORTED once this
|
||||
function is returned.
|
||||
|
||||
@param[in] This Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS Service has been stoped successfully.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@retval Others Some error happened.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
RedfishCredentialStopService (
|
||||
IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This,
|
||||
IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType
|
||||
);
|
||||
#endif
|
|
@ -0,0 +1,51 @@
|
|||
## @file
|
||||
# RedfishCredentialDxe is required to produce the
|
||||
# EdkII RedfishCredentialProtocol for the consumer to get the Redfish
|
||||
# credential Info and to restrict Redfish access from UEFI side.
|
||||
#
|
||||
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 0x0001000b
|
||||
BASE_NAME = RedfishCredentialDxe
|
||||
FILE_GUID = 458CE95A-4942-09A9-5D21-A6B16D5DAD7F
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
ENTRY_POINT = RedfishCredentialDxeDriverEntryPoint
|
||||
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 RISCV64
|
||||
#
|
||||
|
||||
[Sources]
|
||||
RedfishCredentialDxe.c
|
||||
RedfishCredentialDxe.h
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
RedfishPkg/RedfishPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
DebugLib
|
||||
PrintLib
|
||||
RedfishPlatformCredentialLib
|
||||
UefiBootServicesTableLib
|
||||
UefiDriverEntryPoint
|
||||
UefiRuntimeServicesTableLib
|
||||
UefiLib
|
||||
|
||||
[Protocols]
|
||||
gEdkIIRedfishCredentialProtocolGuid ## BY_START
|
||||
|
||||
|
||||
[Guids]
|
||||
gEfiEndOfDxeEventGroupGuid ## CONSUMES ## Event
|
||||
gEfiEventExitBootServicesGuid ## CONSUMES ## Event
|
||||
|
||||
[Depex]
|
||||
TRUE
|
|
@ -21,6 +21,10 @@
|
|||
# Platform implementation-specific Redfish Host Interface.
|
||||
RedfishPlatformHostInterfaceLib|Include/Library/RedfishHostInterfaceLib.h
|
||||
|
||||
## @libraryclass Platform Redfish Credential Library
|
||||
# Platform implementation-specific Redfish Credential Interface.
|
||||
RedfishPlatformCredentialLib|Include/Library/RedfishCredentialLib.h
|
||||
|
||||
[Protocols]
|
||||
## Include/Protocol/RedfishDiscover.h
|
||||
gEfiRedfishDiscoverProtocolGuid = { 0x5db12509, 0x4550, 0x4347, { 0x96, 0xb3, 0x73, 0xc0, 0xff, 0x6e, 0x86, 0x9f }}
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
HttpIoLib|NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.inf
|
||||
NetLib|NetworkPkg/Library/DxeNetLib/DxeNetLib.inf
|
||||
DpcLib|NetworkPkg/Library/DxeDpcLib/DxeDpcLib.inf
|
||||
RedfishPlatformCredentialLib|RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentialLibNull.inf
|
||||
|
||||
[LibraryClasses.ARM, LibraryClasses.AARCH64]
|
||||
#
|
||||
|
@ -47,5 +48,6 @@
|
|||
|
||||
[Components]
|
||||
RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf
|
||||
RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentialLibNull.inf
|
||||
|
||||
!include RedfishPkg/Redfish.dsc.inc
|
||||
|
|
Loading…
Reference in New Issue