URL:
https://github.com/SSSD/sssd/pull/5450
Title: #5450: kcm: add support for kerberos tgt renewals
pbrezina commented:
"""
> Also what do we need the renew hash table for? I don't see
where you take advantage of it? You always call `kcm_ccdb_renew_init` from
`kcm_renew_tgt_timer_handler` so you always iterate over all cached credentials before you
attempt to renew it. What was the intention here?
i was using krb5 renewals as a starting point for my code, `add_tgt_to_renew_table` uses
the hash table. Is it better to just use an array of `renew_data` structures?
`kcm_renew_all_tgts` is where we retrieve the hash table entries to check for renewals.
In this case the hash table is completely redundant. I think we have two options:
1. Keep the hash table. But in this case it would be better to maintain it from
store/init/destroy/remove operations instead of populating it just before the refresh.
2. Drop the hash table and make the code much more straightforward. You don't need to
renew_init on process start but only from the timer. You just want to iterate over all
ccaches and find renewable tgts in the timer handler. (I favor this as long as there
won't be performance issues since it is much easier)
In both cases, you'll probably end up with renew_init unneeded and you will gain
support for all backends not just ccdb.
"""
See the full comment at
https://github.com/SSSD/sssd/pull/5450#issuecomment-811766398