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.web12.1676.1608086265251480117 for ; Tue, 15 Dec 2020 18:37:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=NZST+w8c; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0619dd586b=nickle.wang@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 0BG2SnW4022515 for ; Wed, 16 Dec 2020 02:37:44 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=QUN6I3BqbDgXp8QlAi73fRrq0TjOrzQRS915afSoUMw=; b=NZST+w8ch+5InabuRRhH5ToJd7AukfN7JV7MZ/InqFcujHBzhd440wqAvj226IK2HhcT SxEdgBOV+DFo7qvjhoH2XxYca1qIWwvclPcCt9XkcnWS7IUUWbBELzp6TpLkN0J5so6c VnczoTgByzdhNtj3mt6xmbQK9lFB3rFgjZc1W7fzlxAlDO+nWoDHusOT1UQ70VnjhfzX p7caWyV5o5X8O7+fOCwKUyNX6SJs2EDcMUp+gMxBiqPL346xYqsJecMyaTDEw6cqN/vf LyMAmoLSSLn3yTyXNa+V0GAepebGjick2vzHzxBnpfreREoTmhhKzqcdJCQ/j8GJ4sO6 dA== Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0b-002e3701.pphosted.com with ESMTP id 35ew3qp4tv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 16 Dec 2020 02:37:44 +0000 Received: from G2W6311.americas.hpqcorp.net (g2w6311.austin.hp.com [16.197.64.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2352.austin.hpe.com (Postfix) with ESMTPS id 3BA01BF for ; Wed, 16 Dec 2020 02:37:43 +0000 (UTC) Received: from G9W8667.americas.hpqcorp.net (16.220.49.26) by G2W6311.americas.hpqcorp.net (16.197.64.53) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Dec 2020 02:37:23 +0000 Received: from G9W9209.americas.hpqcorp.net (2002:10dc:429c::10dc:429c) by G9W8667.americas.hpqcorp.net (2002:10dc:311a::10dc:311a) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 16 Dec 2020 02:37:23 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (15.241.52.13) 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 02:37:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oW1n+IetVI0JRmoRISZB8ycFJRZMNrbNAR73HPLSaOf3ncyAZF5sIKhnhyqaTpv9oOIcpw9GaUiseUw2riFFpGJ2F7fZusKvPyzXV6yIYZTZinyI59JI6BULJ1eqr6CdLG0PjNAFw4DCBaQJsouD9ejPZv3UNEdo/uIkuY/77FJbZnofo9yj38fy3SpXRXLVrwgZli96yMB0ZTf6FViMvgOqY02GvlZJ2nzX/yvEdRrVzFOx40YWM1YbGXdVHGTwvao5KvcRXwtguhWOKJZcXnRu4DW/ugQRtYuDLi/+9iGAqaqZQkvr0W9ow143jKBjHEcBTZ+vOl2cGb3cI/5spw== 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=QUN6I3BqbDgXp8QlAi73fRrq0TjOrzQRS915afSoUMw=; b=IXOkjjPojdGO+X8d/LLFznjeYxvUiHzKymDMD4On2iHA/JTGsmfvaubupuNKr+2UrWFJTJ0vsa983efsJkkJhXw2BaJGAO4coJH2vsrUIGwDd9SzIOz614/zNYlKO3ez+Pzz3T0umkOXL4zr++U4rE7lQxgZiuSBk9T4D/ROM2s+r5mQsKevHcU+g7gsZhy8hlo61ZIXsWVK3IBjIVuppHBHmHsZtmobnyQNMSf1KC/A/qZAxWU/NKOeb6fNRbuszHejaehxraJTfllfws4pC3tR5MoPeuz59/LEboU7dOH6pGDA4oxg//z5r6uJEqAJXu7jbPzonPC39n5RPpqmCA== 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 DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::7) by DF4PR8401MB0506.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7606::15) 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 02:37:22 +0000 Received: from DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM ([fe80::e475:6a2b:ed1c:a060]) by DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM ([fe80::e475:6a2b:ed1c:a060%11]) with mapi id 15.20.3654.025; Wed, 16 Dec 2020 02:37:22 +0000 From: "Nickle Wang" To: "Chang, Abner (HPS SW/FW Technologist)" , "devel@edk2.groups.io" CC: "O'Hanley, Peter (EXL)" Subject: Re: [PATCH 1/2] RedfishPkg/Include: EDKII Redfish Credential Header file Thread-Topic: [PATCH 1/2] RedfishPkg/Include: EDKII Redfish Credential Header file Thread-Index: AQHWzg3zm62BCP45Akys/Z3FFTjf1an5DJIw Date: Wed, 16 Dec 2020 02:37:22 +0000 Message-ID: References: <20201209084333.22422-1-abner.chang@hpe.com> <20201209084333.22422-2-abner.chang@hpe.com> In-Reply-To: <20201209084333.22422-2-abner.chang@hpe.com> Accept-Language: zh-TW, 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: [61.230.121.70] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 1748be1e-75cc-47aa-b6b3-08d8a16b8426 x-ms-traffictypediagnostic: DF4PR8401MB0506: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gxNHaEKN6ceCvhamYkc8aaSU/AVSIFQPSgVeHSB/NtaoSqIkj/Dplbt1O2pRZdwZCj22SDOfsPX0GIF6xDCEmM8xgWfG0ZnOv7V0miqVz8UGd/hbmukQi3RiZoQK9hWR1SBtGwnwH70uxXdRMon77Iq4JzpuSHNvUuBYNJxv2sjBdltLnYUa8f71r1Q1sbI4mpiVhQRlSsCqvGzG9p5Wy4mKitP8eJKrfIWwegqITfnSM35tFdmF/UVP7pjAEHras1ehD1t3qQttakCQ52ReEddHc0cvevZ+44R93Vux1JG/RmE+fGFdoXQKAx5mhZIdje9A5w2NCNdEBt7zMIe1wQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(366004)(66446008)(66556008)(76116006)(33656002)(8676002)(8936002)(66476007)(64756008)(498600001)(66946007)(83380400001)(9686003)(5660300002)(71200400001)(52536014)(86362001)(186003)(2906002)(7696005)(53546011)(26005)(6506007)(4326008)(55016002)(110136005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?wvJf2De4kgL0akILToR3XeCYk/E+aQzN0IN73DWQi/aY9kPEdQNJz0V6TmqL?= =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EUogb+OWjgCuPi4K?= =?us-ascii?Q?wFE19uREaxPMRMGn1liCFhZL5phAgt+pkgj+W/ckvAk=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 1748be1e-75cc-47aa-b6b3-08d8a16b8426 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2020 02:37:22.2368 (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: Q9RbxcDawtRp4SoBpELvoVR1zmnC8kNja4f88M2Lk4FICkY4NLYVble7V4Af0nL8iT6chFeu5RP82JiLZckPQw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0506 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-15_13:2020-12-15,2020-12-15 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-2012160012 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nickle Wang > -----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 1/2] RedfishPkg/Include: EDKII Redfish Credential Header > file >=20 > 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 >=20 > Cc: Nickle Wang > Cc: Peter O'Hanley > --- > .../Include/Protocol/EdkIIRedfishCredential.h | 101 ++++++++++++++++++ > RedfishPkg/RedfishPkg.dec | 3 + > 2 files changed, 104 insertions(+) > create mode 100644 RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h >=20 > diff --git a/RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h > b/RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h > new file mode 100644 > index 0000000000..34e33b1e00 > --- /dev/null > +++ b/RedfishPkg/Include/Protocol/EdkIIRedfishCredential.h > @@ -0,0 +1,101 @@ > +/** @file > + This file defines the EDKII_REDFISH_CREDENTIAL_PROTOCOL interface. > + > + Copyright (c) 2019, Intel Corporation. All rights reserved.
> + (C) Copyright 2020 Hewlett Packard Enterprise Development LP
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef EDKII_REDFISH_CREDENTIAL_H_ > +#define EDKII_REDFISH_CREDENTIAL_H_ > + > +typedef struct _EDKII_REDFISH_CREDENTIAL_PROTOCOL > EDKII_REDFISH_CREDENTIAL_PROTOCOL; > + > +#define EDKII_REDFISH_CREDENTIAL_PROTOCOL_GUID \ > + { \ > + 0x8804377, 0xaf7a, 0x4496, { 0x8a, 0x7b, 0x17, 0x59, 0x0, 0xe9, 0x= ab, > 0x46 } \ > + } > + > +typedef enum { > + AuthMethodNone, ///< No authentication is required. > + AuthMethodHttpBasic, ///< Basic authentication is required. > + AuthMethodRedfishSession, ///< Session authentication is required. > + AuthMethodMax > +} EDKII_REDFISH_AUTH_METHOD; > + > +typedef enum { > + ServiceStopTypeNone =3D 0, ///< Stop Redfsih service withou= t reason. > + ServiceStopTypeSecureBootDisabled, ///< Stop Redfsih service becasue > EFI > + ///< Secure Boot is disabled. > + ServiceStopTypeExitBootService, ///< Stop Redfsih service becasue > existing > + ///< Boot Service. > + ServiceStopTypeMax > +} EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE; > + > + > +/** > + 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 Use= rId > string. > + @param[out] Password The pointer to store the returned Pas= sword > 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. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *EDKII_REDFISH_CREDENTIAL_PROTOCOL_GET_AUTH_INFO) ( > + 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 servi= ce 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 sessi= on, 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. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *EDKII_REDFISH_CREDENTIAL_PROTOCOL_STOP_SERVICE) ( > + IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This, > + IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType > + ); > + > +struct _EDKII_REDFISH_CREDENTIAL_PROTOCOL { > + EDKII_REDFISH_CREDENTIAL_PROTOCOL_GET_AUTH_INFO > GetAuthInfo; > + EDKII_REDFISH_CREDENTIAL_PROTOCOL_STOP_SERVICE StopService; > +}; > + > +extern EFI_GUID gEdkIIRedfishCredentialProtocolGuid; > + > +#endif > diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec > index b38e9b4789..861f6dd0c8 100644 > --- a/RedfishPkg/RedfishPkg.dec > +++ b/RedfishPkg/RedfishPkg.dec > @@ -25,6 +25,9 @@ > ## Include/Protocol/RedfishDiscover.h > gEfiRedfishDiscoverProtocolGuid =3D { 0x5db12509, 0x4550, 0x4347,= { 0x96, > 0xb3, 0x73, 0xc0, 0xff, 0x6e, 0x86, 0x9f }} >=20 > + ## Include/Protocol/EdkIIRedfishCredential.h > + gEdkIIRedfishCredentialProtocolGuid =3D { 0x8804377, 0xaf7a, 0x4496, {= 0x8a, > 0x7b, 0x17, 0x59, 0x0, 0xe9, 0xab, 0x46 } } > + > [Guids] > gEfiRedfishPkgTokenSpaceGuid =3D { 0x4fdbccb7, 0xe829, 0x4b4c, { = 0x88, > 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }} >=20 > -- > 2.17.1