RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1886661 - SSH public key authentication keeps working after keys are removed from ID view (due to being cached by SSSD locally)
Summary: SSH public key authentication keeps working after keys are removed from ID vi...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sssd
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Paweł Poławski
QA Contact: sssd-qe
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-09 05:14 UTC by Ding-Yi Chen
Modified: 2023-12-15 19:43 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-16 02:13:04 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1537272 0 unspecified CLOSED SSH public key authentication keeps working after keys are removed from ID view 2021-02-22 00:41:40 UTC

Description Ding-Yi Chen 2020-10-09 05:14:29 UTC
Description of problem:
This bug is a regression of Bug 1537272 - SSH public key authentication keeps working after keys are removed from ID view
https://bugzilla.redhat.com/show_bug.cgi?id=1537272

This happened in RHEL 7.8


Version-Release number of selected component (if applicable):
ipa-client-4.6.6-11.el7.x86_64 
ipa-server-4.6.6-11.el7.x86_64
sssd-1.16.4-37.el7_8.4.x86_64

How reproducible:
Always

Steps to Reproduce:
1. ipa idoverrideuser-add 'Default Trust View' aduser1 --sshpubkey=some-public-key
2. systemctl stop sssd; rm -fr /var/lib/sss/{db,mc}/*; systemctl start sssd
3. ssh -i ~/.ssh/id_rsa -vvv aduser1@localhost
   (Should be able to login with public key)
4. ipa idoverrideuser-del 'Default Trust View' aduser1
5. ssh -i ~/.ssh/id_rsa -vvv aduser1@localhost


Actual results:

Still be able to ssh with public key

Expected results:

No public key, Password prompt should be shown


Additional info:

Workaround: Stop SSSD, clean SSSD db and mc, and start sssd fix the problem

sss_cache -E however does not fix the problem.

Comment 3 Alexey Tikhonov 2020-10-14 15:13:34 UTC
Hi,

(In reply to Ding-Yi Chen from comment #0)
> 
> Workaround: Stop SSSD, clean SSSD db and mc, and start sssd fix the problem

Does this happen on server, client or both? I guess both.


Anyway, I don't think this is a regression.
Comments https://github.com/SSSD/sssd/pull/472#discussion_r160399768 from Sumit says: "I think it might be better to postpone this patch and document that ssh-key will not be deleted immediately in the cache"
So IIUC bz 1537272 resolved issue that ssh-key wasn't removed even during cache update, but didn't address issue of outdated data cached locally.

Comment 5 Ding-Yi Chen 2020-10-16 05:53:32 UTC
> Does this happen on server, client or both? I guess both.

Yes, you are right.

> What are the expectations here: local cache entry being invalidated as soon as `ipa idoverrideuser-del` executed or merely `sss_cache -E` to destroy this attribute?

The customer expects the `ipa idoverrideuser-del` should remove the ssh-key immediately.
Customer does not mention `sss_cache -E`. I just provide it as additional information.

> So IIUC bz 1537272 resolved issue that ssh-key wasn't removed even during cache update, but didn't address issue of outdated data cached locally.

Customer would like to know how often the cache update? 
What option control the frequency of cache update?
So they might not need to manually restart thousands of computers.

Comment 6 Alexey Tikhonov 2020-10-16 10:08:03 UTC
(In reply to Ding-Yi Chen from comment #5)
>
> > So IIUC bz 1537272 resolved issue that ssh-key wasn't removed even during cache update, but didn't address issue of outdated data cached locally.
> 
> Customer would like to know how often the cache update? 
> What option control the frequency of cache update?


`entry_cache_timeout` or, I think, more specifically `entry_cache_user_timeout`.


But please take a note having those value very low can result in significant performance impact.

Comment 13 Ding-Yi Chen 2021-04-16 02:13:04 UTC
Customer has confirmed "entry_cache_timeout" in sssd.conf is working as expected. The corresponding case is closed as the request is fulfilled.

Thanks for your help!

Comment 14 Alexey Tikhonov 2021-04-16 07:32:03 UTC
I'm changing resolution because problem with cache invalidation is a real issue, but it's not something that can be easily addressed/fixed.


Note You need to log in before you can comment on or make changes to this bug.