Commit Graph

14 Commits

Author SHA1 Message Date
Taylor R Campbell
19505537fd Ensure all calls to rk_dns_lookup are headed by a block_dns check.
Exception: In lib/kafs/common.c, we don't have a krb5_context in
which to check.
2024-01-08 10:22:02 -06:00
Luke Howard
69973757ce gss: remove gss_get_instance() 2022-01-30 14:20:05 -05:00
Luke Howard
144caf67fa kdc: add wrappers for heimbase object accessors
Add libkdc wrappers for heimbase object accessors so plugins can use audit and
request attribute APIs without consuming libheimbase. Exposed API surface is
minimal and is limited to reading array collections, and reading/creating base
and custom types.
2022-01-28 17:24:57 -06:00
Luke Howard
ec24edf700 kdc: add accessor functions for KDC request structure
Add accessor functions for use by Samba and other plugin developers.
Documentation is in kdc/kdc-accessors.h.
2022-01-20 17:23:24 +11:00
Luke Howard
bc37bf1afd kdc: use public audit API in altsecid authorizer plugin
Regression fix for 94ed961d02 when building
altsecid_gss_preauth_authorizer.
2022-01-18 16:27:05 +11:00
Luke Howard
4befd3e355 kdc: remove krb5_ prefix for KDC attribute functions
We will use the kdc_ rather than krb5_kdc_ prefix for new public APIs exported
from libkdc. Amend the recently introduced
request_{get,set,copy,delete}_attribute APIs to conform.
2022-01-17 23:50:04 -05:00
Luke Howard
0e8c4ccc6e hdb: eliminate hdb_entry_ex
Remove hdb_entry_ex and revert to the original design of hdb_entry (except with
an additional context member in hdb_entry which is managed by the free_entry
method in HDB).
2022-01-15 18:54:57 +11:00
Luke Howard
bb699fb819 kdc: audit requestor SID in altsecid GSS PA plugin 2022-01-04 02:30:42 +00:00
Luke Howard
b0f0ed74e8 kdc: use attribute dictionary in altsec authorizer plugin 2022-01-04 12:27:43 +11:00
Luke Howard
6b312659cb kdc: use PAC from request in _kdc_gss_finalize_pac()
Pass astgs_request_t to _kdc_gss_finalize_pac() in order to harmonize with
other functions.
2021-12-23 17:49:36 -06:00
Luke Howard
b36ac3c15e kdc: don't add REQUESTOR_SID PAC buffer for service tickets
In the altsecid GSS pre-authentication authorizer plugin, don't add the
REQUESTOR_SID PAC info buffer unless the client requested a TGT. It is not
relevant to application services.
2021-12-22 16:37:32 +11:00
Luke Howard
8590499b53 kdc: include SID in PAC with GSS authorizer
Update the sample GSS pre-authentication authorizer plugin to allow the PAC to
be pinned to the authenticating user's SID.

There is still a race condition between the time the user authenticates and the
time the SID is looked up via LDAP, but it should be sufficient as an example;
if more security is required, then users should be enrolled with their SIDs.
2021-12-22 10:36:26 +11:00
Luke Howard
971648b71e kdc: correct logic error in altsecid_gss_preauth_authorizer
check for the absence, not presence, of a GSS credential before acquiring one
2021-08-31 11:06:32 +00:00
Luke Howard
01ef38b743 kdc: add sample GSS preauth authorization plugin
Add a sample GSS preauth authorization plugin, which will be built and
installed if OpenLDAP is available, but otherwise not enabled (by virtue of not
being installed into the plugin directory).

The plugin authorizes federated GSS preauth clients by querying an Active
Directory domain controller for the altSecurityIdentities attribute.

Once the user entry is found, the name is canonicalized by reading the
sAMAccountName attribute and concatenating it with the KDC realm.
2021-08-31 11:00:13 +00:00