From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web11.4100.1608104640874365265 for ; Tue, 15 Dec 2020 23:44:00 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=nJ9apqhn; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0619d1d483=abner.chang@hpe.com) Received: from pps.filterd (m0134421.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 0BG7gsdU017651 for ; Wed, 16 Dec 2020 07:44:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=m+Lgmbu7acHIvIEvwhJVAn1lI/oeT5DeXjDB+4bEWP4=; b=nJ9apqhnfju9ru0YJKTcaKmcL2L0SpZrXbnJxtQeDba7kVtJ3fFjEKzOeRyZ+II5Zwrr UDlFmKkVtWcjjVYeFcKQ5ZaXK/ecG+elobiTKfsuw1+rzfMBcHoOBINAScKsuJOAA58Q NYGATUOOdmbHxDIf1yjGVs9v9EcoHjTwbMLnmh1nGdGcrUsTlKlo8It0xAXzNUS2f1Bi 0SLR6HzHMAmlKLpoRXw/Cj6qYtbg92jXl9v1ygvPw33bdiYFlTJd/fnf37Qs04dXbrsQ ZeOcRUsDsfIxvA9t8it+IxJT68f1VUS+bI6WovymP7l/JnW6YC0TxoQriwrt+VE1REHo Wg== Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com with ESMTP id 35ew3qqnus-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 Dec 2020 07:44:00 +0000 Received: from G4W10205.americas.hpqcorp.net (g4w10205.houston.hpecorp.net [16.207.82.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3425.houston.hpe.com (Postfix) with ESMTPS id 66DDF92 for ; Wed, 16 Dec 2020 07:43:59 +0000 (UTC) Received: from G9W9209.americas.hpqcorp.net (2002:10dc:429c::10dc:429c) by G4W10205.americas.hpqcorp.net (2002:10cf:520f::10cf:520f) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Dec 2020 07:43:58 +0000 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (15.241.52.12) by G9W9209.americas.hpqcorp.net (16.220.66.156) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 16 Dec 2020 07:43:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P9v8n7zwHNeCckGNxo41nscHPXyBPjoNb0se8f/q3WWDmK0wC1ObGiYw9m2OlfRa/QE1rrkFKblU1BGHZA/fm8ORKzKT+NTsM1rqt1TSOplQHYXGxgZUKSGvHBjiCdgMNKQNtCT03ov3Ipb0Wk6I/+o+WvHVzzeb8T55GD0ZrVrNthyjX2dE/cRLdpIi+z2d6v0dJ8kuEZBvqTgxGIMZZ3/piYUW4DnbzzhFPd0jfaxx3ymWW8qAmHWuMB3f45kYEqgwWLHaiQ/hPtjloCwnOo7u4LA7gV4KbLaJ5zja32RjSIe0z6/i3k5z58+KEfLYIHgmqJOKAQzTNMNf6lqF2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m+Lgmbu7acHIvIEvwhJVAn1lI/oeT5DeXjDB+4bEWP4=; b=naEroKdsRVDDGnz3JD3+vif6H7xFrNiMqhaAf6o3l8gwpt86+3eV8Dp07bbSEuk1pz0NDiJKxhyJSHfUQYYVMMS3RTRp2c8kZmQrEMOBEEFNxJN/oKkoR5v//edQCl24R1/auTC62hVHhQLI+mGYTZjlEYI2iDFJqYDaLWolU4COqQl5XFkGB6ASxO5E+flPg7JQdcpqjQ+z42YtXQDaGxwgBC1X2wlTcRSK0vPG/3U2nT0fglILnytiukwC92NNwGB/j5m09Ta5R4SugcSiL2n/w1SBxfElEU82lkpczCjIi6c8kZg5rUA5Mv8gsdTYiZ3058OEec3GvSMWMPedsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7508::16) by CS1PR8401MB0344.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7515::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.13; Wed, 16 Dec 2020 07:43:57 +0000 Received: from CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::a094:ed67:fb40:340e]) by CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::a094:ed67:fb40:340e%10]) with mapi id 15.20.3654.025; Wed, 16 Dec 2020 07:43:57 +0000 From: "Abner Chang" To: "Wang, Nickle (HPS SW)" , "devel@edk2.groups.io" CC: "O'Hanley, Peter (EXL)" Subject: Re: [PATCH 2/2] RedfishPkg/RedfishCredentialDxe: EDKII Redfish Credential DXE driver Thread-Topic: [PATCH 2/2] RedfishPkg/RedfishCredentialDxe: EDKII Redfish Credential DXE driver Thread-Index: AQHWzg30T64bER/8z0CdUjUDIPC/3an5Df/AgABJNWCAAARcUIAABICwgAACIoA= Date: Wed, 16 Dec 2020 07:43:57 +0000 Message-ID: References: <20201209084333.22422-1-abner.chang@hpe.com> <20201209084333.22422-3-abner.chang@hpe.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: hpe.com; dkim=none (message not signed) header.d=none;hpe.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [16.242.247.131] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f085d5c6-3ba5-481f-2c6e-08d8a196589a x-ms-traffictypediagnostic: CS1PR8401MB0344: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: yLXzCgyBSDHclVwebAP477rBBFIlql8Mz1b58C+7tqBqB4ZVDe37ZwaEYP0C4idZe5p0qljanrISeLfkBgNHoHAvhWfixU2R4f3kDMzrhEgzHslAr6pJUP7vQA9mxtu6MGSVmd4uJWBnzNFcp0PNtaK6B98HR4TCxmW6bhmR4yv2T3fs4NdMPqnRd1Ia2mEszHfE8EwrXyLD8Uhm1m6bRTClFSwupiDGpkW4HXoHf5AdGgp/bx5Zad84fkhjn8+jYVCTd4YQtBLZlGIVjv7hMl/zWeUO+Vb4Rer+5tuCQwhLTPg4LU2RqDh796Whvuifsla/dQyrVrlIewvq2cywNF1Uq7fyLEVpXz1m98m3bVVPso+bmaryTqpLOYL3qhPB x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(376002)(396003)(136003)(39860400002)(366004)(346002)(53546011)(33656002)(76116006)(4326008)(8936002)(71200400001)(30864003)(110136005)(52536014)(66946007)(7696005)(9686003)(66556008)(66476007)(83380400001)(64756008)(86362001)(2906002)(8676002)(26005)(5660300002)(55016002)(6506007)(478600001)(66446008)(186003)(316002)(559001)(579004)(44824005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?xPC1Q+ziWci4h9dhq3RQOO9hcVtqyy3iExz1zmiyFw+VZ1GQ1XvLDUjpI/aw?= =?us-ascii?Q?hwUehMfFEzMKMZuTvvCWb91CqrSLzxW5R3kjW4vfqkAe7xUevB6ueNrbTZ+c?= =?us-ascii?Q?rK0Ys2VxV6WonExy9hHGqm9iWfWBvXBq7905DxDrrs21KJrmL4QY40eb69KJ?= =?us-ascii?Q?1Lcv7mZHVC2ZfsLHXBivgs5iXLsG4AcGye27fsJ5VE6CVwxDCxzDp69qiqyo?= =?us-ascii?Q?Rcg9uxye4uo24dw7B/lVtCI+wguIiN7kSG4frkxSTRU8nibqKh09e++Ml3K5?= =?us-ascii?Q?XDhmW9fpL28i/Li1hRY+ulALwidUg83h7estKKasyJtsP8d0US+BmXWiYhBh?= =?us-ascii?Q?u8mZNTtJsjn781vvZnTPe3atCK+gUFbFuF6QTcozfTu7L3shu3X98hU7xlNB?= =?us-ascii?Q?I3i3geA3mtPz4XhWacd7hSvPnMxaOX+KQyCuVSY7ehMrMzZ3SmPCAt9SbMGv?= =?us-ascii?Q?ARK9U62jPg2+LkB6yBywOSaKqN4Zm2Xsoc89JUJYuKJx9wdSVpSGm9VIsYvP?= =?us-ascii?Q?brw8VQtgKnctK5r+DsrernIx7TQqXqtKFfvBXGnoYkbe7zzLcGOfTNvnCO3S?= =?us-ascii?Q?6zZjiAf4hUK0YdCkuOq7xGuygzSjERc+YgHe5edlVLjTncPitVl/FaquwQi2?= =?us-ascii?Q?oAZLPRCHixYK7wLTxAYWp3SGUng0nEwPdcyky1uA3HfJI93zImRfFb/O3gbN?= =?us-ascii?Q?2bOYKIR4gHxetd/nVDYrkdqMLVaG5wfvT4AZ2t/lGym+Uo5C6EQ5ROc/eKD9?= =?us-ascii?Q?niPl5r44AvO+CWniGB8mYwus3rTzhH86JEflXPPYjnFRK7O6Op3TRusaGjip?= =?us-ascii?Q?N+HRy0b/i3CAXxdkJaK9gg/V1l6lUOdKLF4qrIF5eWgXYJGZgrh2k2DkynTX?= =?us-ascii?Q?R/UeLYO+MK3qp6j57efdFWJc/v2y520VhNK/fXnZkyIxwvFZ0zRZvIdF22if?= =?us-ascii?Q?NOct1ecGyfuTZ6zRiVjLy0moUU5Z6do+YCzOv5JXlrA=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: f085d5c6-3ba5-481f-2c6e-08d8a196589a X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2020 07:43:57.5880 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LhShYAG/w1p1jFoqKQRcPYCB9rcxE7Jb1UK/N47Ikgn8gDd7lfT1yeEruh2DI7obr71jdONwNpPONcSiwgb4IA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB0344 X-OriginatorOrg: hpe.com X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2020-12-16_02:2020-12-15,2020-12-16 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 impostorscore=0 mlxscore=0 adultscore=0 phishscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012160048 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Wang, Nickle (HPS SW) > Sent: Wednesday, December 16, 2020 3:38 PM > To: Chang, Abner (HPS SW/FW Technologist) ; > devel@edk2.groups.io > Cc: O'Hanley, Peter (EXL) > Subject: RE: [PATCH 2/2] RedfishPkg/RedfishCredentialDxe: EDKII Redfish > Credential DXE driver >=20 > Hi Abner, >=20 > I got it. These two interfaces are defined in library so that platform li= brary has > to implement it. This makes sense to me. >=20 > Reviewed-by: Nickle Wang Yes correct, thanks. >=20 > Thanks, > Nickle >=20 > > -----Original Message----- > > From: Chang, Abner (HPS SW/FW Technologist) > > Sent: Wednesday, December 16, 2020 3:27 PM > > To: Wang, Nickle (HPS SW) ; > devel@edk2.groups.io > > Cc: O'Hanley, Peter (EXL) > > Subject: RE: [PATCH 2/2] RedfishPkg/RedfishCredentialDxe: EDKII > > Redfish Credential DXE driver > > > > > > > > > -----Original Message----- > > > From: Chang, Abner (HPS SW/FW Technologist) > > > Sent: Wednesday, December 16, 2020 3:09 PM > > > To: Wang, Nickle (HPS SW) ; > > devel@edk2.groups.io > > > Cc: O'Hanley, Peter (EXL) > > > Subject: RE: [PATCH 2/2] RedfishPkg/RedfishCredentialDxe: EDKII > > > Redfish Credential DXE driver > > > > > > > > > > > > > -----Original Message----- > > > > From: Wang, Nickle (HPS SW) > > > > Sent: Wednesday, December 16, 2020 10:46 AM > > > > To: Chang, Abner (HPS SW/FW Technologist) ; > > > > devel@edk2.groups.io > > > > Cc: O'Hanley, Peter (EXL) > > > > Subject: RE: [PATCH 2/2] RedfishPkg/RedfishCredentialDxe: EDKII > > > > Redfish Credential DXE driver > > > > > > > > Hi Abner, > > > > > > > > Overall looks good to me. Just a question about implementation. > > > > > > > > The End-Of-DXE and Exit-Boot-Service is registered in Redfish > > > > Credential driver and the implementation is provide by > > > > RedfishPlatformCredentialLib library. May I know if it is possible > > > > to register these two events in RedfishPlatformCredentialLib > > > > directly? In this way, we do not need two additional interfaces in > > > RedfishPlatformCredentialLib library. > > > Yes Nickle, I think we can do that. Will resend the patch. > > > thanks > > Hi Nickle, > > Sorry for the confusion, I just about to change the code but I still > > think we should keep these two registrations in RedfishCredentialDXe. > > That is the security concern of implementing these two notifications > > in RedfishCredentialDxe and then invoke to platform code. This forces > > OEM to consider and provide their secret sauce for preventing from 3rd > > party code to steal the Redfish credential. That is OEM's choice if > > they want to leave these two functions in empty. But I think edk2 code > > should force them not forgetting to implement that. > > So, I would like to still keep it. > > > > > > > > > > > > Thanks, > > > > Nickle > > > > > > > > > -----Original Message----- > > > > > From: Chang, Abner (HPS SW/FW Technologist) > > > > > > > > Sent: Wednesday, December 9, 2020 4:44 PM > > > > > To: devel@edk2.groups.io > > > > > Cc: Wang, Nickle (HPS SW) ; O'Hanley, Peter > > > > > (EXL) > > > > > Subject: [PATCH 2/2] RedfishPkg/RedfishCredentialDxe: EDKII > > > > > Redfish Credential DXE driver > > > > > > > > > > EDKII Redfish Credential DXE driver which abstracts platform > > > > > Redfish credential implementation. > > > > > > > > > > Signed-off-by: Jiaxin Wu > > > > > Signed-off-by: Ting Ye > > > > > Signed-off-by: Siyuan Fu > > > > > Signed-off-by: Fan Wang > > > > > Signed-off-by: Abner Chang > > > > > > > > > > Cc: Nickle Wang > > > > > Cc: Peter O'Hanley > > > > > --- > > > > > .../Include/Library/RedfishCredentialLib.h | 91 ++++++++ > > > > > .../PlatformCredentialLibNull.c | 101 +++++++++ > > > > > .../PlatformCredentialLibNull.inf | 30 +++ > > > > > RedfishPkg/Redfish.fdf.inc | 1 + > > > > > RedfishPkg/RedfishComponents.dsc.inc | 1 + > > > > > .../RedfishCredentialDxe.c | 209 ++++++++++++= ++++++ > > > > > .../RedfishCredentialDxe.h | 75 +++++++ > > > > > .../RedfishCredentialDxe.inf | 51 +++++ > > > > > RedfishPkg/RedfishPkg.dec | 4 + > > > > > RedfishPkg/RedfishPkg.dsc | 2 + > > > > > 10 files changed, 565 insertions(+) create mode 100644 > > > > > RedfishPkg/Include/Library/RedfishCredentialLib.h > > > > > create mode 100644 > > > > > RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentialL > > > > > ib > > > > > Nu > > > > > ll > > > > > .c > > > > > create mode 100644 > > > > > RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentialL > > > > > ib > > > > > Nu > > > > > ll > > > > > .inf > > > > > create mode 100644 > > > > > RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.c > > > > > create mode 100644 > > > > > RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h > > > > > create mode 100644 > > > > > RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.inf > > > > > > > > > > diff --git a/RedfishPkg/Include/Library/RedfishCredentialLib.h > > > > > b/RedfishPkg/Include/Library/RedfishCredentialLib.h > > > > > new file mode 100644 > > > > > index 0000000000..dac1b3303f > > > > > --- /dev/null > > > > > +++ b/RedfishPkg/Include/Library/RedfishCredentialLib.h > > > > > @@ -0,0 +1,91 @@ > > > > > +/** @file > > > > > + Definitinos of RedfishHostInterfaceDxe driver. > > > > > + > > > > > + (C) Copyright 2020 Hewlett Packard Enterprise Development > > > > > + LP
> > > > > + > > > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > + > > > > > +**/ > > > > > +#ifndef REDFISH_CREDENTIAL_LIB_H_ #define > > > > > +REDFISH_CREDENTIAL_LIB_H_ > > > > > + > > > > > +#include > > > > > + > > > > > +/** > > > > > + 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 (DSP0= 266). > > > > > + > > > > > + Callers are responsible for and freeing the returned string st= orage. > > > > > + > > > > > + @param[in] This Pointer to > > > > > EDKII_REDFISH_CREDENTIAL_PROTOCOL instance. > > > > > + @param[out] AuthMethod Type of Redfish authenticatio= n > > > method. > > > > > + @param[out] UserId The pointer to store the retu= rned > UserId > > > > > string. > > > > > + @param[out] Password The pointer to store the retu= rned > > > > Password > > > > > string. > > > > > + > > > > > + @retval EFI_SUCCESS Get the authentication inform= ation > > > > > 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 se= rvice. > > > > > + > > > > > + @retval EFI_SUCCESS Service has been stoped succe= ssfully. > > > > > + @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 > > > > > diff --git > > > > > a/RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentia > > > > > lL > > > > > ib > > > > > Nu > > > > > ll.c > > > > > b/RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentia > > > > > lL > > > > > ib > > > > > Nu > > > > > ll.c > > > > > new file mode 100644 > > > > > index 0000000000..39de622d59 > > > > > --- /dev/null > > > > > +++ > > > > > b/RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentia > > > > > lL > > > > > ib > > > > > Nu > > > > > ll.c > > > > > @@ -0,0 +1,101 @@ > > > > > +/** @file > > > > > + NULL instace of RedfishPlatformCredentialLib > > > > > + > > > > > + (C) Copyright 2020 Hewlett Packard Enterprise Development > > > > > + LP
> > > > > + > > > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > + > > > > > +**/ > > > > > +#include > > > > > +#include > > > > > +/** > > > > > + 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 (DSP0= 266). > > > > > + > > > > > + Callers are responsible for and freeing the returned string st= orage. > > > > > + > > > > > + @param[in] This Pointer to > > > > > EDKII_REDFISH_CREDENTIAL_PROTOCOL instance. > > > > > + @param[out] AuthMethod Type of Redfish authenticatio= n > > > method. > > > > > + @param[out] UserId The pointer to store the retu= rned > UserId > > > > > string. > > > > > + @param[out] Password The pointer to store the retu= rned > > > > Password > > > > > string. > > > > > + > > > > > + @retval EFI_SUCCESS Get the authentication inform= ation > > > > > 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 se= rvice. > > > > > + > > > > > + @retval EFI_SUCCESS Service has been stoped succe= ssfully. > > > > > + @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; > > > > > +} > > > > > + > > > > > diff --git > > > > > a/RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentia > > > > > lL > > > > > ib > > > > > Nu > > > > > ll.in > > > > > f > > > > > b/RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentia > > > > > lL > > > > > ib > > > > > Nu > > > > > ll.in > > > > > f > > > > > new file mode 100644 > > > > > index 0000000000..4c22e89718 > > > > > --- /dev/null > > > > > +++ > > > > > b/RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentia > > > > > lL > > > > > ib > > > > > Nu > > > > > ll.in > > > > > f > > > > > @@ -0,0 +1,30 @@ > > > > > +## @file > > > > > +# NULL instance of RedfishPlatformCredentialLib # # (C) > > > > > +Copyright > > > > > +2020 Hewlett Packard Enterprise Development LP
# # > > > > > +SPDX-License-Identifier: BSD-2-Clause-Patent # ## > > > > > + > > > > > +[Defines] > > > > > + INF_VERSION =3D 0x0001000b > > > > > + BASE_NAME =3D RedfishPlatformCredentialLi= bNull > > > > > + FILE_GUID =3D CA3BD843-0BDD-4EE0-A38A-B45= CA663114F > > > > > + MODULE_TYPE =3D DXE_DRIVER > > > > > + VERSION_STRING =3D 1.0 > > > > > + LIBRARY_CLASS =3D RedfishPlatformCredentialLi= b > > > > > + > > > > > +# > > > > > +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV6= 4 > > > > > +# > > > > > + > > > > > +[Sources] > > > > > + PlatformCredentialLibNull.c > > > > > + > > > > > +[Packages] > > > > > + MdePkg/MdePkg.dec > > > > > + MdeModulePkg/MdeModulePkg.dec > > > > > + RedfishPkg/RedfishPkg.dec > > > > > + > > > > > + > > > > > diff --git a/RedfishPkg/Redfish.fdf.inc > > > > > b/RedfishPkg/Redfish.fdf.inc index 19de479a80..24e32e0abf 100644 > > > > > --- a/RedfishPkg/Redfish.fdf.inc > > > > > +++ b/RedfishPkg/Redfish.fdf.inc > > > > > @@ -13,4 +13,5 @@ > > > > > !if $(REDFISH_ENABLE) =3D=3D TRUE > > > > > INF RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf > > > > > INF > > > > > RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf > > > > > + INF RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.inf > > > > > !endif > > > > > diff --git a/RedfishPkg/RedfishComponents.dsc.inc > > > > > b/RedfishPkg/RedfishComponents.dsc.inc > > > > > index ac1b57ed8f..ff32653ec8 100644 > > > > > --- a/RedfishPkg/RedfishComponents.dsc.inc > > > > > +++ b/RedfishPkg/RedfishComponents.dsc.inc > > > > > @@ -15,4 +15,5 @@ > > > > > !if $(REDFISH_ENABLE) =3D=3D TRUE > > > > > RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf > > > > > > > > > > RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf > > > > > + RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.inf > > > > > !endif > > > > > diff --git > > > > > a/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.c > > > > > b/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.c > > > > > new file mode 100644 > > > > > index 0000000000..f48d1d011c > > > > > --- /dev/null > > > > > +++ b/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.c > > > > > @@ -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
> > > > > + > > > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > + > > > > > +**/ > > > > > + > > > > > +#include > > > > > + > > > > > +EDKII_REDFISH_CREDENTIAL_PROTOCOL > mRedfishCredentialProtocol > > =3D > > > { > > > > > + RedfishCredentialGetAuthInfo, > > > > > + RedfishCredentialStopService > > > > > +}; > > > > > + > > > > > +/** > > > > > + Callback function executed when the ExitBootServices event > > > > > +group is > > > > > signaled. > > > > > + > > > > > + @param[in] Event Event whose notification function is bein= g > > 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 bein= g > > 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 (DSP0= 266). > > > > > + > > > > > + Callers are responsible for and freeing the returned string st= orage. > > > > > + > > > > > + @param[in] This Pointer to > > > > > EDKII_REDFISH_CREDENTIAL_PROTOCOL instance. > > > > > + @param[out] AuthMethod Type of Redfish authenticatio= n > > > method. > > > > > + @param[out] UserId The pointer to store the retu= rned > UserId > > > > > string. > > > > > + @param[out] Password The pointer to store the retu= rned > > > > Password > > > > > string. > > > > > + > > > > > + @retval EFI_SUCCESS Get the authentication inform= ation > > > > > 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 =3D=3D NULL || AuthMethod =3D=3D NULL || UserId =3D= =3D NULL || > > > > > +Password > > > > > =3D=3D 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 se= rvice. > > > > > + > > > > > + @retval EFI_SUCCESS Service has been stoped succe= ssfully. > > > > > + @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 =3D=3D 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 successfu= lly. > > > > > + > > > > > +**/ > > > > > +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 =3D NULL; > > > > > + > > > > > + // > > > > > + // Install the RedfishCredentialProtocol onto Handle. > > > > > + // > > > > > + Status =3D 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 =3D 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 =3D 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; > > > > > +} > > > > > diff --git > > > > > a/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h > > > > > b/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h > > > > > new file mode 100644 > > > > > index 0000000000..6e7e417b33 > > > > > --- /dev/null > > > > > +++ b/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.h > > > > > @@ -0,0 +1,75 @@ > > > > > +/** @file > > > > > + Definition of Redfish Credential DXE driver. > > > > > + > > > > > + (C) Copyright 2020 Hewlett Packard Enterprise Development > > > > > + LP
> > > > > + > > > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > + > > > > > +**/ > > > > > +#ifndef EDKII_REDFISH_CREDENTIAL_DXE_H_ #define > > > > > +EDKII_REDFISH_CREDENTIAL_DXE_H_ > > > > > + > > > > > +#include > > > > > + > > > > > +#include > > > > > +#include > > > > > +#include > > > > > +#include #include > > > > > + #include > > > > > + > > > > > + > > > > > +/** > > > > > + 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 (DSP0= 266). > > > > > + > > > > > + Callers are responsible for and freeing the returned string st= orage. > > > > > + > > > > > + @param[in] This Pointer to > > > > > EDKII_REDFISH_CREDENTIAL_PROTOCOL instance. > > > > > + @param[out] AuthMethod Type of Redfish authenticatio= n > > > method. > > > > > + @param[out] UserId The pointer to store the retu= rned > UserId > > > > > string. > > > > > + @param[out] Password The pointer to store the retu= rned > > > > Password > > > > > string. > > > > > + > > > > > + @retval EFI_SUCCESS Get the authentication inform= ation > > > > > 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 succe= ssfully. > > > > > + @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 > > > > > diff --git > > > > > a/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.inf > > > > > b/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.inf > > > > > new file mode 100644 > > > > > index 0000000000..707d9a04d9 > > > > > --- /dev/null > > > > > +++ b/RedfishPkg/RedfishCredentialDxe/RedfishCredentialDxe.inf > > > > > @@ -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
# > > > > > +SPDX-License-Identifier: BSD-2-Clause-Patent # ## > > > > > + > > > > > +[Defines] > > > > > + INF_VERSION =3D 0x0001000b > > > > > + BASE_NAME =3D RedfishCredentialDxe > > > > > + FILE_GUID =3D 458CE95A-4942-09A9-5D21-A6B= 16D5DAD7F > > > > > + MODULE_TYPE =3D DXE_DRIVER > > > > > + VERSION_STRING =3D 1.0 > > > > > + ENTRY_POINT =3D RedfishCredentialDxeDriverE= ntryPoint > > > > > + > > > > > +# > > > > > +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV6= 4 > > > > > +# > > > > > + > > > > > +[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 > > > > > diff --git a/RedfishPkg/RedfishPkg.dec > > > > > b/RedfishPkg/RedfishPkg.dec index 861f6dd0c8..fc56b4fefb 100644 > > > > > --- a/RedfishPkg/RedfishPkg.dec > > > > > +++ b/RedfishPkg/RedfishPkg.dec > > > > > @@ -21,6 +21,10 @@ > > > > > # Platform implementation-specific Redfish Host Interface. > > > > > > > > > > RedfishPlatformHostInterfaceLib|Include/Library/RedfishHostInter > > > > > RedfishPlatformHostInterfaceLib|fa > > > > > RedfishPlatformHostInterfaceLib|ce > > > > > RedfishPlatformHostInterfaceLib|Li > > > > > RedfishPlatformHostInterfaceLib|b.h > > > > > > > > > > + ## @libraryclass Platform Redfish Credential Library > > > > > + # Platform implementation-specific Redfish Credential Interf= ace. > > > > > + > > > > > + RedfishPlatformCredentialLib|Include/Library/RedfishCredentialL= ib. > > > > > + h > > > > > + > > > > > [Protocols] > > > > > ## Include/Protocol/RedfishDiscover.h > > > > > gEfiRedfishDiscoverProtocolGuid =3D { 0x5db12509, 0x4550,= 0x4347, > > > { 0x96, > > > > > 0xb3, 0x73, 0xc0, 0xff, 0x6e, 0x86, 0x9f }} diff --git > > > > > a/RedfishPkg/RedfishPkg.dsc b/RedfishPkg/RedfishPkg.dsc index > > > > > 94e7127bc6..f7d5b90918 100644 > > > > > --- a/RedfishPkg/RedfishPkg.dsc > > > > > +++ b/RedfishPkg/RedfishPkg.dsc > > > > > @@ -32,6 +32,7 @@ > > > > > > > > > > > > > > > > > > > > DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/Bas > > > > > eDebugPrintErrorLevelLib.inf > > > > > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > > > > > > > > > > RedfishPlatformHostInterfaceLib|RedfishPkg/Library/PlatformHostI > > > > > RedfishPlatformHostInterfaceLib|nt > > > > > RedfishPlatformHostInterfaceLib|er > > > > > RedfishPlatformHostInterfaceLib|fa > > > > > RedfishPlatformHostInterfaceLib|ce > > > > > LibNull/PlatformHostInterfaceLibNull.inf > > > > > + > > > > > RedfishPlatformCredentialLib|RedfishPkg/Library/PlatformCredenti > > > > > RedfishPlatformCredentialLib|al > > > > > RedfishPlatformCredentialLib|Li > > > > > RedfishPlatformCredentialLib|bN > > > > > RedfishPlatformCredentialLib|ull/ > > > > > PlatformCredentialLibNull.inf > > > > > > > > > > [LibraryClasses.ARM, LibraryClasses.AARCH64] > > > > > # > > > > > @@ -43,5 +44,6 @@ > > > > > > > > > > [Components] > > > > > > > > > > RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInte > > > > > rf > > > > > ac > > > > > eL > > > > > ibN > > > > > ull.inf > > > > > + > > > > > RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentialL > > > > > ib > > > > > Nu > > > > > ll > > > > > .inf > > > > > > > > > > !include RedfishPkg/Redfish.dsc.inc > > > > > -- > > > > > 2.17.1