<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">01.04.2020 10:40, CS20 KFTing пишет:<br>
</div>
<blockquote type="cite"
cite="mid:HK0PR03MB4897F2703C45135D276DFFDFDBC90@HK0PR03MB4897.apcprd03.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:PMingLiU;
panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:PMingLiU;
panose-1:2 1 6 1 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi Alex:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Please help try the
patch from <a
href="https://github.com/Nuvoton-Israel/openbmc/blob/runbmc/meta-quanta/meta-olympus-nuvoton/recipes-extended/pam/libpam/pam_succeed_if_support_ldap_user_login.patch"
moz-do-not-send="true">
https://github.com/Nuvoton-Israel/openbmc/blob/runbmc/meta-quanta/meta-olympus-nuvoton/recipes-extended/pam/libpam/pam_succeed_if_support_ldap_user_login.patch</a>
to libpam and see how it goes.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Besides the patch, the
user from the ldap server needs to be in the “redfish” group
in the ldap server database and it’s already done according
to your description.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The requirement "user in
group redfish" is controlled by the pam_succeed_if module
when a user tries to login via WebUI and the original
implementation in pam_succeed_if module has some limitation
on group identification.<o:p></o:p></span></p>
<span style="font-size:12pt;line-height:0.7;font-family:
'Arial'; color:#808080"></span></div>
</blockquote>
We've tested your patch. It works, but not every time.<br>
<p>I suspect that the groups check leads to requesting all groups
from LDAP, and that takes a lot of time in our setup so
authentication times out and fails. When I repeat the auth
request, the list of groups is already in the memory and so
authentication completes successfully.</p>
<p>I believe that there should be an easy way to make a mapping
between LDAP and local permission (such as 'redfish', etc.) and
privilege (such as 'priv-admin', etc.) groups. I'd say that there
must be no need to add a user to LDAP `redfish` group, and I
personally dislike that approach because it is prone to group name
clashes. What I think would be great is have in WebUI a table like
this:</p>
<p><tt>LDAP Group | Privilege level | SSH | Redfish | Web</tt><tt><br>
</tt><tt>===========|=================|=====|=========|====<br>
SomeGroup | Administrator | Y | Y | Y<br>
OtherGroup | Operator | N | Y | Y</tt></p>
<p><tt>* IPMI is not listed because it requires plain-text passwords
and can't be authenticated against LDAP<br>
</tt></p>
<p>What do you think?</p>
<p>WBR, Alexander<br>
</p>
</body>
</html>