From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id ABA89940EED for ; Thu, 16 May 2024 02:41:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=3KUg9/wvqPVPXIo08cIuxYDDqH5FuQwT+/AAu6rm0Pw=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1715827272; v=1; b=wQsBPZ80W2tHhpwplCqAY319s380DtP1/3ibOGnoovOsR/E2neWPxwf1RpqvJs24AdGUI4gu ZwJFMZ7tTgu66Uj+BHqh++OTz5CgUtdag34R87clDGNhnEhl+DTM+FBWKhrjSjnbAUnTxe1MonX 223DMvjgc3ak7/BI+gi7/6OIPGwlOHtF6q7awxUPoRgGHF9Vz72Ze0bTqYGDxM+Edjk3IYP1DER kmMDAtMakb3lw9zT5s2rATKEnYJJ8wuHk2oEgtEEWNLQYZfkIodPffHRK5v4t09AgEKTZpBopBi vkk8wBZc7CEbwiv/vmwOIAPCoZR5prPwVU9Ix9VQ0O/Yw== X-Received: by 127.0.0.2 with SMTP id jOzTYY7687511xukXUPx1mlH; Wed, 15 May 2024 19:41:12 -0700 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.86]) by mx.groups.io with SMTP id smtpd.web10.3964.1715827271669493045 for ; Wed, 15 May 2024 19:41:11 -0700 X-Received: from LV8PR12MB9452.namprd12.prod.outlook.com (2603:10b6:408:200::8) by MW4PR12MB6681.namprd12.prod.outlook.com (2603:10b6:303:1e1::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.28; Thu, 16 May 2024 02:41:04 +0000 X-Received: from LV8PR12MB9452.namprd12.prod.outlook.com ([fe80::9d67:b4b7:7bad:8c08]) by LV8PR12MB9452.namprd12.prod.outlook.com ([fe80::9d67:b4b7:7bad:8c08%4]) with mapi id 15.20.7544.052; Thu, 16 May 2024 02:41:04 +0000 From: "Chang, Abner via groups.io" To: Nickle Wang , Igor Kulchytskyy , "devel@edk2.groups.io" CC: Nick Ramirez Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg: introduce RedfishBootstrapAccountDxe Thread-Topic: [EXTERNAL] RE: [edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg: introduce RedfishBootstrapAccountDxe Thread-Index: AQHapfvnY6/29aRjAk2uMEf8FEsIPrGYZZ0AgACn7qCAAAnWgIAAC2ZA Date: Thu, 16 May 2024 02:41:04 +0000 Message-ID: References: <20240418122730.18204-1-nicklew@nvidia.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=02042108-8add-4e61-9fed-ea197e2b5c86;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2024-04-22T02:10:33Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: LV8PR12MB9452:EE_|MW4PR12MB6681:EE_ x-ms-office365-filtering-correlation-id: d4980586-7140-460b-8cdf-08dc7551a1cc x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?us-ascii?Q?y4UU6qjDXnmYt6YdLHnRTJbDVmRU6CWlHTmA7TAfw6tSHF4WC3NeZa/GjDbz?= =?us-ascii?Q?skiFfJHk4I0XB9N98RqXoWDCugkScw+Q/K2mETNQTWq6wyYKX8MhdbOPoUf+?= =?us-ascii?Q?shOJqDPolv+ELAA0RYytMr7X5Kg4ewKGrf28tQvEWG0fWVo/KsHc99yKO9Cw?= =?us-ascii?Q?zW5/QF+yKIyUrAL9BIc222zrZDf9YGnVDaiexqF+PKL+Ejt6YdCb8B8RJ5df?= =?us-ascii?Q?qL0eplAz8C+Cyf89SAM3+g+FoUgzfcscv4XX1YZ7+5izrWMH7BqN5ztFC8fK?= =?us-ascii?Q?gD/t7iEYAa9Lg6D2S2WeJFicl+JHlxqaIZpCkA8oOdvCCPN9y+6awpXchKnX?= =?us-ascii?Q?7b9K5ZrdNcOgyPtuxiQmRpapXN0dx178OmZPfX/A25Hn1WeWzmCzOf8JY9rH?= =?us-ascii?Q?fKND1eNiJ24Ryto08RSANf/FeAbJcj9IcPfyrfwcPOiXqxUfgEHLjfXPcU0G?= =?us-ascii?Q?q0JpGTLKC2d/ZJ5PxnLOgphzF/sAH4STT1vK50VQ5XsTbuCn2dZyQlCWYli0?= =?us-ascii?Q?qwnjUVAV6UGi2tL6Oj3JzmEFskdLMSnZk+7D8ct85Sq52uqTXO0fXApM0EwV?= =?us-ascii?Q?XS9vNOreRFcivERKPy9rXBIIkJEv1QmTOGXjKUfA892HfiJ7FhaigcL13GWb?= =?us-ascii?Q?8JdiHzyBVI8nd6m66gQO+2LNCZw5/RPAfoqjlgS6zw8rP+UDpBpW6my6xyVn?= =?us-ascii?Q?2sSE3qeFkBJsFHdqfPghkfgbEcDnP2KRpJQqqe9l/BBm4MBQX5HLrXt+mXQr?= =?us-ascii?Q?+focQ8jMpPkBbjaSH6cMUJMkIrG2rTpyhe0JOMktGkT7LNJn/Zq3uBVaNZtH?= =?us-ascii?Q?wBr9Ufr+ag8/82Ph4VQWtbWSrAKvmJ5F+4WmH9QmXgDUkoaVqka8ok8PoCNY?= =?us-ascii?Q?NRX3np41oOSnWahaIeNcu8+w0Gg3h5QWgypStJIkPdZ216IO115/C2jko9i7?= =?us-ascii?Q?HCh6YY/4C0vzt6BTvcFQ4M47AdhUnp5oC22SfVWuOjrisrwRDiUiEZhOo7pA?= =?us-ascii?Q?Vt6+1tHV7U1WVvF3YPe4ngfAhuFL9Jle2kbhhvDNN29d/HLtCqkX2roKxtjU?= =?us-ascii?Q?3DvTWugt7IYS4sdW5NNFu1fgKP9JqYt87HPPK1KW7ACwJQAXDR8ou6zsMbsD?= =?us-ascii?Q?nbaX658kM26IWGayVETbU2r/Thn9T/E+Z9enhwT5z3s33USgbAPvnYnqqGd9?= =?us-ascii?Q?ybvwA1TtUrZmj5EHKkQbk54IPl4h53uzp3EbQmDSLLecNQBPFk6UdEEzMdXH?= =?us-ascii?Q?2DpTdPSnz9KtbgA6vwJrMxVIpYAOgcPLpJulZmiBHeeIWry+JTvn65uaSM7B?= =?us-ascii?Q?FmS4EU+tlh8IZtKj4qpPL5OY6QyEbbm1nWeW+sjtugi0yg=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?F+O5qRYqn39f4I4mRVVV1SkpKzFUZQJU1XVaF6IVTDEyVavyIOP5j5yjdxrz?= =?us-ascii?Q?B+RnLxSLF8INysLw7UfSsqMvAOc/xJ7zEiZEmq2xW5EsUnD8Yg6XWkSuOV46?= =?us-ascii?Q?+xv+Rt463dl0oyUi3DJi425JOAqS3jAOFepxsVGp7NgZm6Hx39A/jyELnmJs?= =?us-ascii?Q?hL9GSjVNYDf/EN0QyID9teaWeyC1l7y1MyGcarrxJtdufkq2R0kAstX6jQ/Z?= =?us-ascii?Q?a4ktEu0VNLXM+IMa9006o5G36ztxHn17s24crqVOFEbHQ8rusyperpBTlRUo?= =?us-ascii?Q?9rm7co+d0GXS3J5w2AOD37K5OPRirmxrD7IE2a1A7hJXJ2FtFkY/prMmn8BC?= =?us-ascii?Q?6Hl6NLOb7suNEA5depCkgu8/ANDIUWv6G/VyrWlTCQe9JC0M2bj1xNEG8Ilu?= =?us-ascii?Q?eCph0MZrj8sofdG7JPkpeCMZtOJfYJ7eFHg1HJ5C9y6764w5e2qfW6nU0zE6?= =?us-ascii?Q?ygTpuo0UaANkE0pI9nSrF29GCGIEu15+cILWWMmaNTIi6eBiBndqCJq4lI8h?= =?us-ascii?Q?ooiyHRmZiA+wjD6kZRh3AvZippeeDFr4kTtwGaDK+6CpJkhdUo4abkHXNPGr?= =?us-ascii?Q?LbpgwoGK66TyMgHz4mrJlZAnM7BP/cllLGGhfncHWtxrghSEv1R/hK7uqE/2?= =?us-ascii?Q?3vVRGEBzFTlyhVhHOBxaxTy53gG6Ri/q5qEvqR6f88co7PxE/8fb/gJKD1sx?= =?us-ascii?Q?zbe5JgccX4Wf8Z3RS74G/sOOx/84S5aLJ9jjKjCJ183MPJC2hNIjR+hjKJct?= =?us-ascii?Q?WmtPqGpNlakup1MOZARVnMhaBE94rnkAu97VJ0lKhyCLHGHUAmanDORrQcpJ?= =?us-ascii?Q?KNmf4VJLBD+zhO3fqNaX9TNAPjAOSSU/Hb/EaapltVBSE4+JdDErF05DBEU2?= =?us-ascii?Q?bR/Ajz8tN6+kRyfSfFs4/3YdpVs5Gv8SVnBeZITiOR9yao+6TvCLRuJKTrum?= =?us-ascii?Q?EjLr/nt8Woo4yw+DAKl34GVc+/+CMjIr9J0Upr43hAlgPX/NWWtzkmci2dXT?= =?us-ascii?Q?UgsoctDnFwRshS7sPrdHbgyP9I3L8VfIsCNFrFeN38R3M2o41HdlEYX+5TYJ?= =?us-ascii?Q?Tkc1yh5zKIYbV641IQDPQ35JbH72m2SLmrRDp9nJMRRBm1CoNTfBWKyJnqHN?= =?us-ascii?Q?+85923nm2OR9r7wGMfq1apX4ngGfySGNa8QrPqrR+xKGSvtab34baTV3cAI2?= =?us-ascii?Q?4nP1tZl/pKxgY0UlRW89SH7tZfyML5FHrpkiq0A4Jx83FGN5rgmY96Jfwc3y?= =?us-ascii?Q?Jxodo6q5Os69N/jEg2uOdR1Rodml597djwID39OiZKIzqZWzQGZMfyQdJITu?= =?us-ascii?Q?sIDfQwgYOpNNNHZFAWpdjZuyQLdr8icixcB3a96A86dbcEJU17gI5Tzz/aWL?= =?us-ascii?Q?FCCx/xtn/c1yoB2nAFqR3A0cJjf8HST2NdlVdp0dh9jcTckWk0t6EbfgkpOI?= =?us-ascii?Q?vtWN6MYojF2CL72A+KIeXwZcSwdAo49qdGgK4MdmdqgtPl+xypTrL7ZQlbGV?= =?us-ascii?Q?gVSHKO5OEy4fA6q3IWMdyOMakljxqwylDoeXsAbLPvxAWtk2VfR8mOhzk6yg?= =?us-ascii?Q?iybWYQEGI+NSoVKtfmwHLlmSNfWuu3i/HiNYmTJQ?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LV8PR12MB9452.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4980586-7140-460b-8cdf-08dc7551a1cc X-MS-Exchange-CrossTenant-originalarrivaltime: 16 May 2024 02:41:04.6914 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 0IDQCNacgHwV2i5UXHQzd2zp4M3JKjN8VzcMWamuUPufsFU6khKVmUzYJlzrRibHKc3WUGY7hExSOUlbQEykQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6681 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 15 May 2024 19:41:11 -0700 Resent-From: abner.chang@amd.com Reply-To: devel@edk2.groups.io,abner.chang@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: uSD4DhFJsv1V9SbdHX0iIQrix7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=wQsBPZ80; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io [AMD Official Use Only - General] I think we probably overlook some use cases. Multiple edk2 Redfish applicat= ions running simultaneously is allowed from the design perspective. However= , we centralized GetAuthInfo in RedfishPlatformCredentialLib for all of edk= 2 Redfish client entities to leverage the same credential stored in EFI var= iable. This way we can limit the process of acquiring credential to only on= e time Redfish IPMI bootstrap command sent to BMC. RedfishFeatureCore could be one of the Redfish clients, delete the credenti= al from Redfish account service in RedfishFeatureCore lifecycle may impact = other Redfish clients that still need the communication with Redfish servic= e, right? Thanks Abner > -----Original Message----- > From: Nickle Wang > Sent: Thursday, May 16, 2024 9:38 AM > To: Chang, Abner ; Igor Kulchytskyy > ; devel@edk2.groups.io > Cc: Nick Ramirez > Subject: RE: [EXTERNAL] RE: [edk2-devel] [edk2-redfish-client][PATCH] > RedfishClientPkg: introduce RedfishBootstrapAccountDxe > > [AMD Official Use Only - General] > > Caution: This message originated from an External Source. Use proper caut= ion > when opening attachments, clicking links, or responding. > > > Hi Igor, Abner, > > > Maybe we should consider moving RedfishBootstrapAccountDxe driver to > RedfishPkg and have some register mechanism which will be used by > interested drivers to notify that they finished their job and after that > RedfishBootstrapAccountDxe driver would delete an account. > > You are saying the mechanism in runtime, right? In current design, > RedfishFeatureCore driver will send "after provisioning" signal to notify= this > driver to delete bootstrapping account. This makes sure that all feature = drivers > are done with their jobs, so this driver is safe to delete bootstrapping = account > at BMC. > > If we move it to RedfishPkg, there is no such centralized Redfish driver > managing Redfish stuff. How does a particular driver know that there is n= o > other driver running Redfish stuff after it? The way I can think of now i= s to rely > on EDK2 ready-to-boot event as the signal to do the notification, since t= here is > not supposed to have Redfish driver running jobs after this event... > > Regards, > Nickle > > > -----Original Message----- > > From: Chang, Abner > > Sent: Thursday, May 16, 2024 9:06 AM > > To: Igor Kulchytskyy ; Nickle Wang ; > > devel@edk2.groups.io > > Cc: Nick Ramirez > > Subject: RE: [EXTERNAL] RE: [edk2-devel] [edk2-redfish-client][PATCH] > > RedfishClientPkg: introduce RedfishBootstrapAccountDxe > > > > External email: Use caution opening links or attachments > > > > > > [AMD Official Use Only - General] > > > > HI Igor, > > This sounds to me reasonable to me. As you mentioned, RedfishPkg was > designed > > to support multiple Redfish applications and RedfishClientPkg is just o= ne of > them. I > > think we can review the implementation of acquiring/deleting credential= . > > > > Thanks > > Abner > > > > > > > -----Original Message----- > > > From: Igor Kulchytskyy > > > Sent: Wednesday, May 15, 2024 11:02 PM > > > To: Nickle Wang ; devel@edk2.groups.io; Chang, > > > Abner > > > Cc: Nick Ramirez > > > Subject: RE: [EXTERNAL] RE: [edk2-devel] [edk2-redfish-client][PATCH] > > > RedfishClientPkg: introduce RedfishBootstrapAccountDxe > > > > > > [AMD Official Use Only - General] > > > > > > Caution: This message originated from an External Source. Use proper > > > caution when opening attachments, clicking links, or responding. > > > > > > > > > Hi Nickle, > > > I have one more question to discuss regarding this driver. > > > We have a bootstrap account and creation of this account controlled b= y > > > RedfishCredentialDxe driver in RedfishPkg. > > > But deletion of that bootstrap account is moved to RedfishClientPkg. > > > What if we have another Redfish Client or some customer service which > > > uses RedfishPkg for the communication. > > > Architecturally it is allowed. > > > But then RedfishBootstrapAccountDxe module would delete account just > > > based on the RedfishClientPkg needs. > > > Maybe we should consider moving RedfishBootstrapAccountDxe driver to > > > RedfishPkg and have some register mechanism which will be used by > > > interested drivers to notify that they finished their job and after > > > that RedfishBootstrapAccountDxe driver would delete an account. > > > What do you think? > > > Thank you, > > > Igor > > > > > > -----Original Message----- > > > From: Nickle Wang > > > Sent: Tuesday, May 14, 2024 8:40 AM > > > To: devel@edk2.groups.io; abner.chang@amd.com; Igor Kulchytskyy > > > > > > Cc: Nick Ramirez > > > Subject: [EXTERNAL] RE: [edk2-devel] [edk2-redfish-client][PATCH] > > > RedfishClientPkg: introduce RedfishBootstrapAccountDxe > > > > > > > > > **CAUTION: The e-mail below is from an external source. Please > > > exercise caution before opening attachments, clicking links, or > > > following guidance.** > > > > > > Hi Abner, > > > > > > > Ok, then I don't have the problem with invoking GetAuthInfo again. > > > However, I > > > > will suggest to add more description in GetAuthInfo function header= , > > > mention that > > > > we will keep the auth info in EFI variable until exist boot service= . > > > > Also, give some more descriptions on the code you invoke to > GetAuthInfo. > > > > > > Thanks for your comment. I add descriptions to explain above before > > > calling GetAuthInfo(). Version 2 path is here: > > > > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk > 2 > > > > .groups.io%2Fg%2Fdevel%2Fmessage%2F118889&data=3D05%7C02%7Cnick > lew > > %40nvi > > > > > > dia.com%7C10ec4812a68a434b806008dc75445994%7C43083d15727340c > 1b7db > > 39efd > > > > > > 9ccc17a%7C0%7C0%7C638514183674607956%7CUnknown%7CTWFpbGZs > b3d8 > > eyJWIjoiM > > > > > > C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7 > C%7 > > C%7C > > > > > > &sdata=3DGNlisCnBmVQRhCLTxICGDsArv%2B64lC%2BkktUMi8Yg%2BJM%3D&r > ese > > rved=3D0 > > > > > > Regards, > > > Nickle > > > > > > > -----Original Message----- > > > > From: devel@edk2.groups.io On Behalf Of > > > > Chang, > > > Abner > > > > via groups.io > > > > Sent: Tuesday, April 23, 2024 3:42 PM > > > > To: Nickle Wang ; Igor Kulchytskyy > > > > ; devel@edk2.groups.io > > > > Cc: Nick Ramirez > > > > Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH] RedfishClien= tPkg: > > > > introduce RedfishBootstrapAccountDxe > > > > > > > > External email: Use caution opening links or attachments > > > > > > > > > > > > [AMD Official Use Only - General] > > > > > > > > > -----Original Message----- > > > > > From: Nickle Wang > > > > > Sent: Tuesday, April 23, 2024 3:09 PM > > > > > To: Igor Kulchytskyy ; Chang, Abner > > > > > ; devel@edk2.groups.io > > > > > Cc: Nick Ramirez > > > > > Subject: RE: [EXTERNAL] RE: [edk2-redfish-client][PATCH] > > > RedfishClientPkg: > > > > > introduce RedfishBootstrapAccountDxe > > > > > > > > > > [AMD Official Use Only - General] > > > > > > > > > > Caution: This message originated from an External Source. Use > > > > > proper caution when opening attachments, clicking links, or > responding. > > > > > > > > > > > > > > > Hi Igor, Abner, > > > > > > > > > > Thanks for your review. Please allow me to answer your questions > > > together. > > > > > > > > > > > 1. We suppose acquire the credential before we start to > > > > > > communicate with > > > > > Redfish. Will Redfish credential driver create another bootstrap > > > > > account here after provisioning? > > > > > No, according to the RedfishPlatformCredentialIpmiLib > > > > > implementation, Redfish credential driver requests credential fro= m > > > > > BMC and will keep it for later use. So only one credential is > > > > > requested for BIOS Redfish feature drivers during POST time. > > > > Ok, then I don't have the problem with invoking GetAuthInfo again. > > > However, I > > > > will suggest to add more description in GetAuthInfo function header= , > > > mention that > > > > we will keep the auth info in EFI variable until exist boot service= . > > > > Also, give some more descriptions on the code you invoke to > GetAuthInfo. > > > > > > > > > > > > > > > 2. And why do we delete the credential after provisioning? How > > > > > > about the > > > > > later Redfish property updating process? > > > > > In this driver, we listen to "AfterProvisioning" event. And this > > > > > is the event triggered after Redfish feature driver finish all jo= bs. > > > > > There is no feature driver which gets executed after this event. > > > > > And since we finished all Redfish operations, we remove this acco= unt > on > > BMC. > > > > Then this makes sense to me now. > > > > > > > > > > > > > > > Why do we need to delete those credentials? According to spec > > > > > > BMC should > > > > > delete the bootstrap credentials automatically on host or service= reset. > > > > > Yes, bootstrap credentials get deleted on host reset. In practice= , > > > > > server in datacenter usually takes long time running under OS > > > > > before it gets > > > > rebooted. > > > > > The bootstrap credentials are exposed to end user at > > > > > "/redfish/v1/AccountService/Accounts". I got report that there is > > > > > concern for end user to see this unused account. > > > > This sounds to me reasonable as we will give bootstrap credential a > > > > high > > > privilege > > > > to update Redfish resource. Leave this information in Account > > > > service seems > > > not a > > > > good idea. > > > > > > > > Thanks > > > > Abner > > > > > > > > > > > > > > So, I create this driver to allows us to remove bootstrap account > > > > > at BMC after we finish Redfish jobs. And this also release the BM= C > > > > > account resource since this account won't be used for a long > > > > > period of > > > time. > > > > > > > > > > Regards, > > > > > Nickle > > > > > > > > > > > -----Original Message----- > > > > > > From: Igor Kulchytskyy > > > > > > Sent: Monday, April 22, 2024 11:03 PM > > > > > > To: Chang, Abner ; Nickle Wang > > > > > > ; devel@edk2.groups.io > > > > > > Cc: Nick Ramirez > > > > > > Subject: RE: [EXTERNAL] RE: [edk2-redfish-client][PATCH] > > > RedfishClientPkg: > > > > > > introduce RedfishBootstrapAccountDxe > > > > > > > > > > > > External email: Use caution opening links or attachments > > > > > > > > > > > > > > > > > > Hi Nickle and Abner, > > > > > > I also have the same question as Abner. > > > > > > Why do we need to delete those credentials? > > > > > > According to spec BMC should delete the bootstrap credentials > > > > > > automatically > > > > > on > > > > > > host or service reset. > > > > > > Thank you, > > > > > > Igor > > > > > > > > > > > > -----Original Message----- > > > > > > From: Chang, Abner > > > > > > Sent: Sunday, April 21, 2024 10:25 PM > > > > > > To: Nickle Wang ; devel@edk2.groups.io > > > > > > Cc: Igor Kulchytskyy ; Nick Ramirez > > > > > > > > > > > Subject: [EXTERNAL] RE: [edk2-redfish-client][PATCH] > RedfishClientPkg: > > > > > > introduce RedfishBootstrapAccountDxe > > > > > > > > > > > > > > > > > > **CAUTION: The e-mail below is from an external source. Please > > > > > > exercise caution before opening attachments, clicking links, or > > > > > > following guidance.** > > > > > > > > > > > > [AMD Official Use Only - General] > > > > > > > > > > > > Hi Nickle, > > > > > > One comment and few questions, > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Nickle Wang > > > > > > > Sent: Thursday, April 18, 2024 8:28 PM > > > > > > > To: devel@edk2.groups.io > > > > > > > Cc: Chang, Abner ; Igor Kulchytskyy > > > > > > > ; Nick Ramirez > > > > > > > Subject: [edk2-redfish-client][PATCH] RedfishClientPkg: > > > > > > > introduce RedfishBootstrapAccountDxe > > > > > > > > > > > > > > Caution: This message originated from an External Source. Use > > > > > > > proper caution when opening attachments, clicking links, or > > > responding. > > > > > > > > > > > > > > > > > > > > > -Introduce RedfishBootstrapAccountDxe to delete bootstrap > > > > > > > account from /redfish/v1/AccountService/Accounts after BIOS > > > > > > > finished all Redfish jobs. The bootstrap account won't be > > > > > > > available to other > > > application. > > > > > > > So deleting bootstrap account helps to release resource at BM= C. > > > > > > > - After bootstrap account is deleted at BMC, the Redfish > > > > > > > service instance is no longer usable. Close Redfish service > > > > > > > instance to release the HTTP connection between BIOS and BMC. > > > > > > > > > > > > > > Signed-off-by: Nickle Wang > > > > > > > Cc: Abner Chang > > > > > > > Cc: Igor Kulchytskyy > > > > > > > Cc: Nick Ramirez > > > > > > > --- > > > > > > > .../RedfishClientComponents.dsc.inc | 1 + > > > > > > > .../RedfishBootstrapAccountDxe.inf | 53 +++ > > > > > > > .../RedfishBootstrapAccountDxe.h | 58 ++++ > > > > > > > .../RedfishBootstrapAccountDxe.c | 328 > ++++++++++++++++++ > > > > > > > RedfishClientPkg/RedfishClient.fdf.inc | 1 + > > > > > > > 5 files changed, 441 insertions(+) create mode 100644 > > > > > > > > > > > > > > > > RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountDxe > > > > > > > .inf > > > > > > > create mode 100644 > > > > > > > > > > > > > > > > RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountDxe > > > > > > > .h > > > > > > > create mode 100644 > > > > > > > > > > > > > > > > RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountDxe > > > > > > > .c > > > > > > > > > > > > > > diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc > > > > > > > b/RedfishClientPkg/RedfishClientComponents.dsc.inc > > > > > > > index 42fc0c299..fe5248b62 100644 > > > > > > > --- a/RedfishClientPkg/RedfishClientComponents.dsc.inc > > > > > > > +++ b/RedfishClientPkg/RedfishClientComponents.dsc.inc > > > > > > > @@ -20,6 +20,7 @@ > > > > > > > > > > RedfishClientPkg/HiiToRedfishMemoryDxe/HiiToRedfishMemoryDxe.inf > > > > > > > RedfishClientPkg/HiiToRedfishBootDxe/HiiToRedfishBootDxe.i= nf > > > > > > > > > > > > > > RedfishClientPkg/HiiToRedfishBiosDxe/HiiToRedfishBiosDxe.inf > > > > > > > + > > > > > > > > > > > > > > > > RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountDxe > > > > > > > .inf > > > > > > > !endif > > > > > > > # > > > > > > > # Below two modules should be pulled in by build tool. > > > > > > > diff --git > > > > > > > > > > > > > > > > a/RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountD > > > > > > > xe.in > > > > > > > f > > > > > > > > > > > > > > > > b/RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountD > > > > > > > xe.in > > > > > > > f > > > > > > > new file mode 100644 > > > > > > > index 000000000..4073e95f4 > > > > > > > --- /dev/null > > > > > > > +++ > > > > > > > > > > > > > > > > b/RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountD > > > > > > > xe.in > > > > > > > f > > > > > > > @@ -0,0 +1,53 @@ > > > > > > > +## @file > > > > > > > +# This driver deletes bootstrap account in BMC after BIOS > > > > > > > +Redfish finished # all jobs # # (C) Copyright 2021 Hewlett > > > > > > > +Packard Enterprise Development LP
# Copyright (c) 2023, > > > > > > > +NVIDIA CORPORATION & AFFILIATES. All rights reserved. > > > > > > > > > > > > > > > > > > Not sure if you want to update the copyright to 2024. > > > > > > > > > > > > > > > > > > > +# > > > > > > > +# SPDX-License-Identifier: BSD-2-Clause-Patent # ## > > > > > > > + > > > > > > > +[Defines] > > > > > > > + INF_VERSION =3D 0x0001000b > > > > > > > + BASE_NAME =3D RedfishBootstrapAccountDxe > > > > > > > + FILE_GUID =3D 87555253-2F7E-45FC-B469-FD35= B2E51210 > > > > > > > + MODULE_TYPE =3D DXE_DRIVER > > > > > > > + VERSION_STRING =3D 1.0 > > > > > > > + ENTRY_POINT =3D RedfishBootstrapAccountEntry= Point > > > > > > > + UNLOAD_IMAGE =3D RedfishBootstrapAccountUnloa= d > > > > > > > + > > > > > > > +[Packages] > > > > > > > + MdePkg/MdePkg.dec > > > > > > > + MdeModulePkg/MdeModulePkg.dec > > > > > > > + RedfishPkg/RedfishPkg.dec > > > > > > > + RedfishClientPkg/RedfishClientPkg.dec > > > > > > > + > > > > > > > +[Sources] > > > > > > > + RedfishBootstrapAccountDxe.h > > > > > > > + RedfishBootstrapAccountDxe.c > > > > > > > + > > > > > > > +[LibraryClasses] > > > > > > > + BaseLib > > > > > > > + BaseMemoryLib > > > > > > > + DebugLib > > > > > > > + MemoryAllocationLib > > > > > > > + PrintLib > > > > > > > + RedfishEventLib > > > > > > > + RedfishFeatureUtilityLib > > > > > > > + RedfishDebugLib > > > > > > > + RedfishVersionLib > > > > > > > + RedfishHttpLib > > > > > > > + UefiLib > > > > > > > + UefiBootServicesTableLib > > > > > > > + UefiRuntimeServicesTableLib > > > > > > > + UefiDriverEntryPoint > > > > > > > + > > > > > > > +[Protocols] > > > > > > > + gEdkIIRedfishConfigHandlerProtocolGuid ## CONSUMES ## > > > > > > > + gEdkIIRedfishCredentialProtocolGuid ## CONSUMES ## > > > > > > > + gEfiRestExProtocolGuid ## CONSUMES ## > > > > > > > + > > > > > > > +[Depex] > > > > > > > + gEdkIIRedfishCredentialProtocolGuid > > > > > > > diff --git > > > > > > > > > > > > > > > > a/RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountD > > > > > > > xe.h > > > > > > > > > > > > > > > > b/RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountD > > > > > > > xe.h > > > > > > > new file mode 100644 > > > > > > > index 000000000..5262f1e6b > > > > > > > --- /dev/null > > > > > > > +++ > > > > > > > > > > > > > > > > b/RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountD > > > > > > > xe.h > > > > > > > @@ -0,0 +1,58 @@ > > > > > > > +/** @file > > > > > > > + Common header file for RedfishBootstrapAccountDxe driver. > > > > > > > + > > > > > > > + (C) Copyright 2021-2022 Hewlett Packard Enterprise > > > > > > > + Development LP
Copyright (c) 2023, NVIDIA CORPORATION > & > > > > > > > + AFFILIATES. All > > > > > rights > > > > > > reserved. > > > > > > > + > > > > > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > > > + > > > > > > > +**/ > > > > > > > + > > > > > > > +#ifndef REDFISH_BOOTSTRAP_ACCOUNT_DXE_H_ #define > > > > > > > +REDFISH_BOOTSTRAP_ACCOUNT_DXE_H_ > > > > > > > + > > > > > > > +#include > > > > > > > +#include > > > > > > > + > > > > > > > +// > > > > > > > +// Libraries > > > > > > > +// > > > > > > > +#include > > > > > > > +#include #include > > > > > > > + > > > > > > > + > > > > > > > +#include #include > > > > > > > + #include > > > > > > > +#include > > > > > > > +#include #include > > > > > > > + #include > > > > > > > + #include > > > > > > > + > > > > > > > +#include #include > > > > > > > + #include > > > > > > > + > > > > > > > + > > > > > > > +#include > > > > > > > +#include > > > > > > > +#include > > > > > > > + > > > > > > > +#define REDFISH_BOOTSTRAP_ACCOUNT_DEBUG > > > DEBUG_VERBOSE > > > > > > > +#define REDFISH_MANAGER_ACCOUNT_COLLECTION_URI > > > > > > > L"AccountService/Accounts" > > > > > > > +#define REDFISH_URI_LENGTH 128 > > > > > > > + > > > > > > > +// > > > > > > > +// Definitions of REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE // > > > > > > > +typedef > > > > > struct > > > > > > > +{ > > > > > > > + EFI_HANDLE ImageHandle; > > > > > > > + EFI_HANDLE RestExHandle; > > > > > > > + REDFISH_SERVICE RedfishService; > > > > > > > + EFI_EVENT RedfishEvent; > > > > > > > + EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL Protocol; > > > > > > > +} REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE; > > > > > > > + > > > > > > > +#define > > > > > REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE_FROM_PROTOCOL(This) \ > > > > > > > + BASE_CR ((This), REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE= , > > > > > > > +Protocol) > > > > > > > + > > > > > > > +#endif > > > > > > > diff --git > > > > > > > > > > > > > > > > a/RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountD > > > > > > > xe.c > > > > > > > > > > > > > > > > b/RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountD > > > > > > > xe.c > > > > > > > new file mode 100644 > > > > > > > index 000000000..6fe4856f8 > > > > > > > --- /dev/null > > > > > > > +++ > > > > > > > > > > > > > > > > b/RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountD > > > > > > > xe.c > > > > > > > @@ -0,0 +1,328 @@ > > > > > > > +/** @file > > > > > > > + This driver deletes bootstrap account in BMC after BIOS > > > > > > > +Redfish finished > > > > > > > + all jobs. > > > > > > > + > > > > > > > + (C) Copyright 2021-2022 Hewlett Packard Enterprise > > > > > > > + Development LP
Copyright (c) 2023, NVIDIA CORPORATION > & > > > > > > > + AFFILIATES. All > > > > > rights > > > > > > reserved. > > > > > > > + > > > > > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > > > + > > > > > > > +**/ > > > > > > > + > > > > > > > +#include "RedfishBootstrapAccountDxe.h" > > > > > > > + > > > > > > > +REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE *mBootstrapPrivate =3D > > > NULL; > > > > > > > + > > > > > > > +/** > > > > > > > + Close Redfish service instance by calling RestEx protocol > > > > > > > +to release > > > > > instance. > > > > > > > + > > > > > > > + @param[in] RestExHandle Handle of RestEx protocol. > > > > > > > + > > > > > > > + @retval EFI_SUCCESS The Redfish service is close= d > successfully. > > > > > > > + @retval EFI_INVALID_PARAMETER RestExHandle is NULL. > > > > > > > + @retval Others Error occurs. > > > > > > > + > > > > > > > +**/ > > > > > > > +EFI_STATUS > > > > > > > +CloseRedfishService ( > > > > > > > + IN EFI_HANDLE RestExHandle > > > > > > > + ) > > > > > > > +{ > > > > > > > + EFI_REST_EX_PROTOCOL *RestEx; > > > > > > > + EFI_STATUS Status; > > > > > > > + > > > > > > > + if (RestExHandle =3D=3D NULL) { > > > > > > > + return EFI_INVALID_PARAMETER; } > > > > > > > + > > > > > > > + Status =3D gBS->HandleProtocol ( > > > > > > > + RestExHandle, > > > > > > > + &gEfiRestExProtocolGuid, > > > > > > > + (VOID **)&RestEx > > > > > > > + ); > > > > > > > + if (!EFI_ERROR (Status)) { > > > > > > > + Status =3D RestEx->Configure (RestEx, NULL); > > > > > > > + DEBUG ((REDFISH_BOOTSTRAP_ACCOUNT_DEBUG, "%a: release > > > RestEx > > > > > > > instance: %r\n", __func__, Status)); > > > > > > > + } > > > > > > > + > > > > > > > + return Status; > > > > > > > +} > > > > > > > + > > > > > > > +/** > > > > > > > + Callback function executed when the AfterProvisioning even= t > > > > > > > +group is > > > > > > > signaled. > > > > > > > + > > > > > > > + @param[in] Event Event whose notification function is= being > > > invoked. > > > > > > > + @param[out] Context Pointer to the Context buffer > > > > > > > + > > > > > > > +**/ > > > > > > > +VOID > > > > > > > +EFIAPI > > > > > > > +RedfishBootstrapAccountOnRedfishAfterProvisioning ( > > > > > > > + IN EFI_EVENT Event, > > > > > > > + OUT VOID *Context > > > > > > > + ) > > > > > > > +{ > > > > > > > + EFI_STATUS Status; > > > > > > > + REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE *Private; > > > > > > > + EDKII_REDFISH_CREDENTIAL_PROTOCOL *credentialProtocol; > > > > > > > + EDKII_REDFISH_AUTH_METHOD AuthMethod; > > > > > > > + CHAR8 *AccountName; > > > > > > > + CHAR8 *AccountCredential; > > > > > > > + CHAR16 TargetUri[REDFISH_URI_L= ENGTH]; > > > > > > > + CHAR16 *RedfishVersion; > > > > > > > + REDFISH_RESPONSE RedfishResponse; > > > > > > > + > > > > > > > + RedfishVersion =3D NULL; > > > > > > > + > > > > > > > + Private =3D (REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE *)Context; > if > > > > > > > + ((Private =3D=3D NULL) || (Private->RedfishService =3D=3D N= ULL)) { > > > > > > > + DEBUG ((DEBUG_ERROR, "%a: Redfish service is not > > > > > > > + available\n", > > > > > > > __func__)); > > > > > > > + return; > > > > > > > + } > > > > > > > + > > > > > > > + // > > > > > > > + // Locate Redfish Credential Protocol to get credential fo= r > > > > > > > + // accessing to Redfish service. > > > > > > > + // > > > > > > > + Status =3D gBS->LocateProtocol ( > > > > > > > + &gEdkIIRedfishCredentialProtocolGuid, > > > > > > > + NULL, > > > > > > > + (VOID **)&credentialProtocol > > > > > > > + ); > > > > > > > + if (EFI_ERROR (Status)) { > > > > > > > + DEBUG ((REDFISH_BOOTSTRAP_ACCOUNT_DEBUG, "%a: No > Redfish > > > > > > > Credential Protocol is installed on system.", __func__)); > > > > > > > + return; > > > > > > > + } > > > > > > > + > > > > > > > + Status =3D credentialProtocol->GetAuthInfo ( > > > > > > > + credentialProtocol, > > > > > > > + &AuthMethod, > > > > > > > + &AccountName, > > > > > > > + &AccountCredential > > > > > > > + ); > > > > > > > > > > > > HI Nickle, I am not quite understand why do we acquire a > > > > > > credential here but delete it from the Redfish account service = here > after > > provision. > > > > > > 1. We suppose acquire the credential before we start to > > > > > > communicate with Redfish. Will Redfish credential driver create > > > > > > another bootstrap account here after provisioning? > > > > > > 2. And why do we delete the credential after provisioning? How > > > > > > about the > > > > > later > > > > > > Redfish property updating process? > > > > > > Or do I misunderstand the code logic? > > > > > > > > > > > > Regards, > > > > > > Abner > > > > > > > > > > > > > + if (EFI_ERROR (Status)) { > > > > > > > + DEBUG ((DEBUG_ERROR, "%a: can not get bootstrap account > > > > > information: > > > > > > > %r\n", __func__, Status)); > > > > > > > + return; > > > > > > > + } > > > > > > > + > > > > > > > + // > > > > > > > + // Carving the URI > > > > > > > + // > > > > > > > + RedfishVersion =3D RedfishGetVersion > > > > > > > + (Private->RedfishService); if (RedfishVersion =3D=3D NULL) = { > > > > > > > + DEBUG ((DEBUG_ERROR, "%a: can not get Redfish version\n"= , > > > > > __func__)); > > > > > > > + return; > > > > > > > + } > > > > > > > + > > > > > > > + UnicodeSPrint (TargetUri, (sizeof (CHAR16) * > > > > > > > + REDFISH_URI_LENGTH), > > > > > > > L"%s%s/%a", RedfishVersion, > > > > > > REDFISH_MANAGER_ACCOUNT_COLLECTION_URI, > > > > > > > AccountName); > > > > > > > + > > > > > > > + DEBUG ((REDFISH_BOOTSTRAP_ACCOUNT_DEBUG, "%a: > bootstrap > > > > > account: > > > > > > > %a\n", __func__, AccountName)); > > > > > > > + DEBUG ((REDFISH_BOOTSTRAP_ACCOUNT_DEBUG, "%a: > bootstrap > > > > > > > credential: %a\n", __func__, AccountCredential)); > > > > > > > + DEBUG ((REDFISH_BOOTSTRAP_ACCOUNT_DEBUG, "%a: > bootstrap > > > URI: > > > > > > > %s\n", __func__, TargetUri)); > > > > > > > + > > > > > > > + // > > > > > > > + // Remove bootstrap account at > > > > > > > + /redfish/v1/AccountService/Account > > > > > > > + // > > > > > > > + ZeroMem (&RedfishResponse, sizeof (REDFISH_RESPONSE)); > > > > > > > + Status =3D RedfishHttpDeleteResource ( > > > > > > > + Private->RedfishService, > > > > > > > + TargetUri, > > > > > > > + &RedfishResponse > > > > > > > + ); > > > > > > > + if (EFI_ERROR (Status)) { > > > > > > > + DEBUG ((DEBUG_ERROR, "%a: can not remove bootstrap > > > > > > > + account at > > > > > BMC: > > > > > > > %r", __func__, Status)); > > > > > > > + DumpRedfishResponse (__func__, DEBUG_ERROR, > > > > > &RedfishResponse); } > > > > > > > + else { > > > > > > > + DEBUG ((REDFISH_BOOTSTRAP_ACCOUNT_DEBUG, "%a: > bootstrap > > > > > > account: > > > > > > > %a is removed from: %s\n", __func__, AccountName, > > > > > > > REDFISH_MANAGER_ACCOUNT_COLLECTION_URI)); > > > > > > > + } > > > > > > > + > > > > > > > + // > > > > > > > + // Clean credential > > > > > > > + // > > > > > > > + ZeroMem (AccountName, AsciiStrSize (AccountName)); > ZeroMem > > > > > > > + (AccountCredential, AsciiStrSize (AccountCredential)); > > > > > > > + > > > > > > > + // > > > > > > > + // Since the bootstrap account is deleted at BMC, the > > > > > > > + Redfish service instance > > > > > > > is no longer usable. > > > > > > > + // Close Redfish service instance to release the HTTP > > > > > > > + connection between > > > > > > > BIOS and BMC. > > > > > > > + // > > > > > > > + Status =3D CloseRedfishService (Private->RestExHandle); i= f > > > > > > > + (EFI_ERROR (Status)) { > > > > > > > + DEBUG ((DEBUG_ERROR, "%a: cannot close Redfish service > instance: > > > > > > > + %r\n", > > > > > > > __func__, Status)); > > > > > > > + } > > > > > > > + > > > > > > > + RedfishHttpFreeResponse (&RedfishResponse); > > > > > > > + > > > > > > > + return; > > > > > > > +} > > > > > > > + > > > > > > > +/** > > > > > > > + Initialize a Redfish configure handler. > > > > > > > + > > > > > > > + This function will be called by the Redfish config driver > > > > > > > + to initialize each > > > > > > > Redfish configure > > > > > > > + handler. > > > > > > > + > > > > > > > + @param[in] This Pointer to > > > > > > > EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL instance. > > > > > > > + @param[in] RedfishConfigServiceInfo Redfish service > informaiton. > > > > > > > + > > > > > > > + @retval EFI_SUCCESS The handler has been = initialized > > > > > successfully. > > > > > > > + @retval EFI_DEVICE_ERROR Failed to create or c= onfigure the > > > REST > > > > > EX > > > > > > > protocol instance. > > > > > > > + @retval EFI_ALREADY_STARTED This handler has alre= ady been > > > > > > > initialized. > > > > > > > + @retval Other Error happens during = the initialization. > > > > > > > + > > > > > > > +**/ > > > > > > > +EFI_STATUS > > > > > > > +EFIAPI > > > > > > > +RedfishBootstrapAccountInit ( > > > > > > > + IN EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL *This, > > > > > > > + IN REDFISH_CONFIG_SERVICE_INFORMATION > > > > > *RedfishConfigServiceInfo > > > > > > > + ) > > > > > > > +{ > > > > > > > + REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE *Private; > > > > > > > + > > > > > > > + Private =3D > > > REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE_FROM_PROTOCOL > > > > > > > (This); > > > > > > > + > > > > > > > + Private->RedfishService =3D RedfishCreateService > > > > > > > + (RedfishConfigServiceInfo); if (Private->RedfishService = =3D=3D NULL) { > > > > > > > + return EFI_DEVICE_ERROR; > > > > > > > + } > > > > > > > + > > > > > > > + Private->RestExHandle =3D RedfishConfigServiceInfo- > > > > > > > >RedfishServiceRestExHandle; > > > > > > > + > > > > > > > + return EFI_SUCCESS; > > > > > > > +} > > > > > > > + > > > > > > > +/** > > > > > > > + Stop a Redfish configure handler. > > > > > > > + > > > > > > > + @param[in] This Pointer to > > > > > > > EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL instance. > > > > > > > + > > > > > > > + @retval EFI_SUCCESS This handler has been sto= ped > > > successfully. > > > > > > > + @retval Others Some error happened. > > > > > > > + > > > > > > > +**/ > > > > > > > +EFI_STATUS > > > > > > > +EFIAPI > > > > > > > +RedfishBootstrapAccountStop ( > > > > > > > + IN EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL *This > > > > > > > + ) > > > > > > > +{ > > > > > > > + REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE *Private; > > > > > > > + > > > > > > > + Private =3D > > > REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE_FROM_PROTOCOL > > > > > > > (This); > > > > > > > + > > > > > > > + if (Private->RedfishService !=3D NULL) { > > > > > > > + RedfishCleanupService (Private->RedfishService); > > > > > > > + Private->RedfishService =3D NULL; } > > > > > > > + > > > > > > > + return EFI_SUCCESS; > > > > > > > +} > > > > > > > + > > > > > > > +EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL > > > mRedfishConfigHandler =3D > > > > > { > > > > > > > + RedfishBootstrapAccountInit, > > > > > > > + RedfishBootstrapAccountStop }; > > > > > > > + > > > > > > > +/** > > > > > > > + Unloads an image. > > > > > > > + > > > > > > > + @param[in] ImageHandle Handle that identifies t= he image to > > be > > > > > > > unloaded. > > > > > > > + > > > > > > > + @retval EFI_SUCCESS The image has been unloaded. > > > > > > > + @retval EFI_INVALID_PARAMETER ImageHandle is not a valid > > > > > > > + image > > > > > handle. > > > > > > > + > > > > > > > +**/ > > > > > > > +EFI_STATUS > > > > > > > +EFIAPI > > > > > > > +RedfishBootstrapAccountUnload ( > > > > > > > + IN EFI_HANDLE ImageHandle > > > > > > > + ) > > > > > > > +{ > > > > > > > + EFI_STATUS Status; > > > > > > > + > > > > > > > + if (mBootstrapPrivate =3D=3D NULL) { > > > > > > > + return EFI_SUCCESS; > > > > > > > + } > > > > > > > + > > > > > > > + if (mBootstrapPrivate->RedfishEvent !=3D NULL) { > > > > > > > + gBS->CloseEvent (mBootstrapPrivate->RedfishEvent); > > > > > > > + } > > > > > > > + > > > > > > > + Status =3D gBS->UninstallProtocolInterface ( > > > > > > > + mBootstrapPrivate->ImageHandle, > > > > > > > + &gEdkIIRedfishConfigHandlerProtocolGuid, > > > > > > > + (VOID *)&mBootstrapPrivate->Protocol > > > > > > > + ); > > > > > > > + if (EFI_ERROR (Status)) { > > > > > > > + DEBUG ((DEBUG_ERROR, "%a: can not uninstall Redfish > > > > > > > + config handler > > > > > > > protocol: %r\n", __func__, Status)); > > > > > > > + } > > > > > > > + > > > > > > > + FreePool (mBootstrapPrivate); mBootstrapPrivate =3D NULL; > > > > > > > + > > > > > > > + return EFI_SUCCESS; > > > > > > > +} > > > > > > > + > > > > > > > +/** > > > > > > > + This is the declaration of an EFI image entry point. This > > > > > > > +entry point is > > > > > > > + the same for UEFI Applications, UEFI OS Loaders, and UEFI > > > > > > > +Drivers including > > > > > > > + both device drivers and bus drivers. > > > > > > > + > > > > > > > + @param[in] ImageHandle The firmware allocated handl= e for > the > > > UEFI > > > > > > > image. > > > > > > > + @param[in] SystemTable A pointer to the EFI System = Table. > > > > > > > + > > > > > > > + @retval EFI_SUCCESS The operation completed succ= essfully. > > > > > > > + @retval Others An unexpected error occurred= . > > > > > > > +**/ > > > > > > > +EFI_STATUS > > > > > > > +EFIAPI > > > > > > > +RedfishBootstrapAccountEntryPoint ( > > > > > > > + IN EFI_HANDLE ImageHandle, > > > > > > > + IN EFI_SYSTEM_TABLE *SystemTable > > > > > > > + ) > > > > > > > +{ > > > > > > > + EFI_STATUS Status; > > > > > > > + > > > > > > > + if (mBootstrapPrivate !=3D NULL) { > > > > > > > + return EFI_ALREADY_STARTED; } > > > > > > > + > > > > > > > + mBootstrapPrivate =3D AllocateZeroPool (sizeof > > > > > > > (REDFISH_BOOTSTRAP_ACCOUNT_PRIVATE)); > > > > > > > + if (mBootstrapPrivate =3D=3D NULL) { > > > > > > > + return EFI_OUT_OF_RESOURCES; } > > > > > > > + > > > > > > > + CopyMem (&mBootstrapPrivate->Protocol, > > > &mRedfishConfigHandler, > > > > > > > + sizeof > > > > > > > (EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL)); > > > > > > > + Status =3D gBS->InstallProtocolInterface ( > > > > > > > + &ImageHandle, > > > > > > > + &gEdkIIRedfishConfigHandlerProtocolGuid, > > > > > > > + EFI_NATIVE_INTERFACE, > > > > > > > + &mBootstrapPrivate->Protocol > > > > > > > + ); > > > > > > > + if (EFI_ERROR (Status)) { > > > > > > > + DEBUG ((DEBUG_ERROR, "%a: can not install Redfish config > > > > > > > + handler > > > > > > > protocol: %r\n", __func__, Status)); > > > > > > > + goto ON_ERROR; > > > > > > > + } > > > > > > > + > > > > > > > + // > > > > > > > + // Register after provisioning event to remove bootstrap a= ccount. > > > > > > > + // > > > > > > > + Status =3D CreateAfterProvisioningEvent ( > > > > > > > + RedfishBootstrapAccountOnRedfishAfterProvisioni= ng, > > > > > > > + (VOID *)mBootstrapPrivate, > > > > > > > + &mBootstrapPrivate->RedfishEvent > > > > > > > + ); > > > > > > > + if (EFI_ERROR (Status)) { > > > > > > > + DEBUG ((DEBUG_ERROR, "%a: failed to register > > > > > > > + after-provisioning > > > > > event: > > > > > > > %r\n", __func__, Status)); > > > > > > > + goto ON_ERROR; > > > > > > > + } > > > > > > > + > > > > > > > + return EFI_SUCCESS; > > > > > > > + > > > > > > > +ON_ERROR: > > > > > > > + > > > > > > > + RedfishBootstrapAccountUnload (ImageHandle); > > > > > > > + > > > > > > > + return Status; > > > > > > > +} > > > > > > > diff --git a/RedfishClientPkg/RedfishClient.fdf.inc > > > > > > > b/RedfishClientPkg/RedfishClient.fdf.inc > > > > > > > index 154f641b2..47e5093f2 100644 > > > > > > > --- a/RedfishClientPkg/RedfishClient.fdf.inc > > > > > > > +++ b/RedfishClientPkg/RedfishClient.fdf.inc > > > > > > > @@ -15,6 +15,7 @@ > > > > > > > INF > > > RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf > > > > > > > INF RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.inf > > > > > > > INF > > > > > > > > > > > > > > > > RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf > > > > > > > + INF > > > > > > > > > > > > > > > > > > > > > > RedfishClientPkg/RedfishBootstrapAccountDxe/RedfishBootstrapAccountDxe > > > > > .inf > > > > > > > INF > > > RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.inf > > > > > > > INF > > > > > > > > > > > > > > > > RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.inf > > > > > > > INF > > > > > > > > > > > > > > > > > > > > > > RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSystemD > > > > > xe. > > > > > > > i > > > > > > > nf > > > > > > > -- > > > > > > > 2.34.1 > > > > > > > > > > > > -The information contained in this message may be confidential > > > > > > and > > > > > proprietary > > > > > > to American Megatrends (AMI). This communication is intended to > > > > > > be read > > > > > only by > > > > > > the individual or entity to whom it is addressed or by their > > > > > > designee. If the > > > > > reader > > > > > > of this message is not the intended recipient, you are on notic= e > > > > > > that any distribution of this message, in any form, is strictly > > > > > > prohibited. Please > > > > > promptly > > > > > > notify the sender by reply e-mail or by telephone at > > > > > > 770-246-8600, and > > > > > then > > > > > > delete or destroy all copies of the transmission. > > > > > > > > > > > >=20 > > > > > > > > > > -The information contained in this message may be confidential and > > > proprietary to American Megatrends (AMI). This communication is > > > intended to be read only by the individual or entity to whom it is > > > addressed or by their designee. If the reader of this message is not > > > the intended recipient, you are on notice that any distribution of > > > this message, in any form, is strictly prohibited. Please promptly > > > notify the sender by reply e-mail or by telephone at 770-246-8600, an= d > then > > delete or destroy all copies of the transmission. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118943): https://edk2.groups.io/g/devel/message/118943 Mute This Topic: https://groups.io/mt/105596648/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-