<div dir="ltr">OK. I understand.<div>Thank You for an answer.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-12 9:39 GMT+02:00 Jan Pazdziora <span dir="ltr"><<a href="mailto:jpazdziora@redhat.com" target="_blank">jpazdziora@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, May 11, 2015 at 08:52:08PM +0200, Vangass wrote:<br>
> OK. But the answer granted/declined comes from IPA. So why IPA doesn't<br>
> check its own HBAC rules at all?<br>
> Maybe the line 'account      required      pam_sss.so' isn't<br>
> necessary/required. I just want to do authentication by IPA HBAC rules.<br>
<br>
</span>Note that you can have setups when you don't authenticate via PAM<br>
at all (for example when using Kerberos) yet you do authorization<br>
(access control) using PAM. Authentication is not the correct place to<br>
process HBAC rules.<br>
<br>
In your case, nobody is arguing that the password used was correct --<br>
authentication passed, the identity of the client was validated. The<br>
application (tacacs) is supposed to do additional step, now that it<br>
knows what user is attempting to log in -- verify authorization, fact<br>
that the known user should be allowed in, with pam_acct_mgmt.<br>
<br>
That's the why.<br>
<br>
You could in theory force it to work by writing a wrapper PAM module<br>
which would call both pam_sss's pam_sm_authenticate *and*<br>
pam_sm_acct_mgmt for its pam_sm_authenticate call. But it would be<br>
a hack, possibly with unexpected side effects.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Jan Pazdziora<br>
Senior Principal Software Engineer, Identity Management Engineering, Red Hat<br>
</div></div></blockquote></div><br></div>