Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
74a180c
DO NOT PUSH TO MASTER minimal: Initial implementation of minimal prov…
justin-stephenson Oct 21, 2025
588f4df
DO NOT PUSH TO MASTER minimal: copy paste services code
pbrezina Dec 17, 2025
6373cd2
DO NOT PUSH TO MASTER minimal: push init_ctx instead of id_ctx so we …
pbrezina Dec 18, 2025
25c672f
DO NOT PUSH TO MASTER minimal: add authentication provider
justin-stephenson Jan 14, 2026
37043c2
DO NOT PUSH TO MASTER minimal: copy paste authentication code
pbrezina Jan 21, 2026
7a8f357
DO NOT PUSH TO MASTER minimal: switch to new failover for service loo…
pbrezina Dec 17, 2025
7da4a6f
DO NOT PUSH TO MASTER minimal: update how to use it notes
pbrezina Jan 22, 2026
8bb8fd3
DO NOT PUSH TO MASTER minimal: add sssd-minimal provider package to s…
pbrezina Apr 13, 2026
e802848
DO NOT PUSH TO MASTER ci: enable failover branch
pbrezina Mar 21, 2026
cc5620f
DO NOT PUSH TO MASTER tests: add failover test with minimal provider
pbrezina May 5, 2026
587c37a
failover: implement new failover interface
pbrezina Oct 1, 2025
89cdd8d
failover: implement new failover interface
pbrezina Oct 1, 2025
54dacd5
utils: add TEVENT_REQ_ERROR_TO_ERRNO
pbrezina Feb 24, 2026
9c0cd7d
failover: implement new failover interface
pbrezina Oct 1, 2025
fe96ad5
failover: minor header fixes
justin-stephenson Mar 17, 2026
35226c1
dp: Remove sdap_ret and sdap_error
justin-stephenson Mar 13, 2026
d1f1297
ldap: Replace EIO/ETIMEDOUT with ERR_SERVER_FAILURE
justin-stephenson Mar 30, 2026
d2edbc9
dp: Reduce sssd.dataprovider methods to single return code
justin-stephenson Mar 16, 2026
23894fc
Update LDAP provider initialization for new failover
justin-stephenson Mar 11, 2026
22973b1
Port LDAP provider code to new failover
justin-stephenson Mar 12, 2026
da7790b
ldap: Remove sdap_online_check.c
justin-stephenson Mar 17, 2026
e53b7b9
ldap: Remove sdap_service related code
justin-stephenson May 21, 2026
c9bab1d
minimal: Disable building minimal provider
justin-stephenson Mar 18, 2026
18b130f
ldap: Remove sdap_id_op.c/h files
justin-stephenson Mar 24, 2026
b651bf9
AD: Initialize new failover
justin-stephenson Apr 1, 2026
b1c5d70
ad: remove no longer needed connection logic
justin-stephenson Apr 7, 2026
08d6603
AD: Port provider to new failover
justin-stephenson Apr 7, 2026
b8b2c9a
ad: Unset DPM_CHECK_ONLINE handler
justin-stephenson Apr 8, 2026
1fcbfaf
AD: Add GC usage logic function
justin-stephenson Apr 24, 2026
90149eb
AD: Switch to LDAP connection for groups membership data
justin-stephenson Apr 27, 2026
ecb0c6c
gpo: move offline processing for new failover
justin-stephenson Apr 28, 2026
0bd9ae6
ipa: remove no longer needed connection logic
justin-stephenson May 6, 2026
4801182
ipa: Add ipa subdomain GC usage logic function
justin-stephenson May 6, 2026
cd418ad
ipa: Initialize new failover
justin-stephenson May 8, 2026
1261289
ipa: Port to new failover
justin-stephenson May 8, 2026
eaacd79
refactoring ipa tests for hostname framework changes.
Apr 16, 2026
7cadeba
tests: Exclude certain tests temporarily
justin-stephenson Mar 19, 2026
5eda297
WIP IPA: Remove sdap_service related code
justin-stephenson May 21, 2026
65c1793
ci: Set temp --mh-topology=ipa
justin-stephenson May 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/analyze-target.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Analyze (target)"
on:
pull_request_target:
branches: [master]
branches: [master, failover]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: "ci"
on:
push:
branches: [master]
branches: [master, failover]
pull_request:
branches: [master]
branches: [master, failover]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -311,6 +311,8 @@ jobs:
--polarion-config=../polarion.yaml \
--output-polarion-testcase=$GITHUB_WORKSPACE/artifacts/testcase.xml \
${{ steps.select-tests.outputs.SELECT_TESTS }} \
-k "not test_logging__offline_errors_are_written_to_logs_and_syslog and not test_failover and not test_logging__dns_resolution_issue_in_logs and not test_ad__user_authentication_when_provider_is_set_to_ldap_with_gss_spnego and not test_multithreaded_pac_client and not test_autofs__propagate_offline_status and not test_failover__ and not test_ipa__subids_configured" \
--mh-topology=ipa \
--collect-only . |& tee $GITHUB_WORKSPACE/pytest-collect.log

- name: Run tests
Expand All @@ -331,6 +333,8 @@ jobs:
--output-polarion-testcase=$GITHUB_WORKSPACE/artifacts/testcase.xml \
--output-polarion-testrun=$GITHUB_WORKSPACE/artifacts/testrun.xml \
${{ steps.select-tests.outputs.SELECT_TESTS }} \
-k "not test_logging__offline_errors_are_written_to_logs_and_syslog and not test_failover and not test_logging__dns_resolution_issue_in_logs and not test_ad__user_authentication_when_provider_is_set_to_ldap_with_gss_spnego and not test_multithreaded_pac_client and not test_autofs__propagate_offline_status and not test_failover__ and not test_ipa__subids_configured" \
--mh-topology=ipa \
-vvv . |& tee $GITHUB_WORKSPACE/pytest.log

- name: Upload artifacts
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
pull_request_target:
branches:
- master
- failover
types:
- labeled
workflow_dispatch:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/static-code-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: "Static code analysis"
on:
push:
branches: [master]
branches: [master, failover]
pull_request:
branches: [master]
branches: [master, failover]
schedule:
# Everyday at midnight
- cron: '0 0 * * *'
Expand All @@ -28,6 +28,8 @@ jobs:
with:
languages: cpp, python
queries: +security-and-quality
paths-ignore: |
src/providers/minimal/**

- name: Configure sssd
uses: ./.github/actions/configure
Expand Down
56 changes: 52 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ if HAVE_CMOCKA
test_sbus_message \
test_sbus_opath \
test_fo_srv \
test_failover_server \
pam-srv-tests \
ssh-srv-tests \
test_ipa_subdom_util \
Expand Down Expand Up @@ -658,6 +659,24 @@ SSSD_FAILOVER_OBJ = \
src/providers/fail_over_srv.c \
$(SSSD_RESOLV_OBJ)

# Make sure to build new failover code to test compilation even though it is
# not used anywhere yet.
SSSD_NEW_FAILOVER_OBJ = \
src/providers/failover/failover.c \
src/providers/failover/failover_callback.c \
src/providers/failover/failover_refresh_candidates.c \
src/providers/failover/failover_group.c \
src/providers/failover/failover_server_resolve.c \
src/providers/failover/failover_server.c \
src/providers/failover/failover_srv.c \
src/providers/failover/failover_transaction.c \
src/providers/failover/failover_vtable_op.c \
src/providers/failover/failover_vtable.c \
src/providers/failover/ldap/failover_ldap_connect.c \
src/providers/failover/ldap/failover_ldap_kinit.c \
$(SSSD_RESOLV_OBJ) \
$(NULL)

SSSD_LIBS = \
$(TALLOC_LIBS) \
$(TEVENT_LIBS) \
Expand Down Expand Up @@ -850,6 +869,16 @@ dist_noinst_HEADERS = \
src/providers/be_refresh.h \
src/providers/fail_over.h \
src/providers/fail_over_srv.h \
src/providers/failover/failover.h \
src/providers/failover/failover_group.h \
src/providers/failover/failover_refresh_candidates.h \
src/providers/failover/failover_server.h \
src/providers/failover/failover_server_resolve.h \
src/providers/failover/failover_srv.h \
src/providers/failover/failover_transaction.h \
src/providers/failover/failover_vtable.h \
src/providers/failover/failover_vtable_op.h \
src/providers/failover/ldap/failover_ldap.h \
src/util/child_common.h \
src/util/child_bootstrap.h \
src/providers/simple/simple_access.h \
Expand All @@ -869,7 +898,6 @@ dist_noinst_HEADERS = \
src/providers/ldap/sdap_sudo.h \
src/providers/ldap/sdap_sudo_shared.h \
src/providers/ldap/sdap_autofs.h \
src/providers/ldap/sdap_id_op.h \
src/providers/ldap/ldap_opts.h \
src/providers/ldap/ldap_auth.h \
src/providers/ldap/sdap_range.h \
Expand Down Expand Up @@ -3510,6 +3538,24 @@ test_fo_srv_LDADD = \
libsss_test_common.la \
$(NULL)

test_failover_server_SOURCES = \
src/tests/cmocka/test_failover_server.c \
src/providers/failover/failover_server.c \
$(SSSD_RESOLV_TESTS_OBJ) \
$(NULL)
test_failover_server_CFLAGS = \
$(AM_CFLAGS) \
$(CMOCKA_CFLAGS) \
$(NULL)
test_failover_server_LDADD = \
$(CARES_LIBS) \
$(CMOCKA_LIBS) \
$(POPT_LIBS) \
$(SSSD_INTERNAL_LTLIBS) \
$(TALLOC_LIBS) \
libsss_test_common.la \
$(NULL)

test_sdap_initgr_SOURCES = \
src/tests/cmocka/common_mock_sdap.c \
src/tests/cmocka/common_mock_sysdb_objects.c \
Expand Down Expand Up @@ -4352,12 +4398,10 @@ libsss_ldap_common_la_SOURCES = \
src/providers/ldap/sdap_async_services.c \
src/providers/ldap/sdap_async_iphost.c \
src/providers/ldap/sdap_async_ipnetwork.c \
src/providers/ldap/sdap_online_check.c \
src/providers/ldap/sdap_ad_groups.c \
src/providers/ldap/sdap_child_helpers.c \
src/providers/ldap/sdap_fd_events.c \
src/providers/ldap/sdap_hostid.h \
src/providers/ldap/sdap_id_op.c \
src/providers/ldap/sdap_certmap.c \
src/providers/ldap/sdap_idmap.c \
src/providers/ldap/sdap_idmap.h \
Expand All @@ -4374,6 +4418,7 @@ libsss_ldap_common_la_SOURCES = \
src/util/sss_sockets.c \
src/util/sss_ldap.c \
src/util/cert_derb64_to_ldap_filter.c \
$(SSSD_NEW_FAILOVER_OBJ) \
$(NULL)
libsss_ldap_common_la_CFLAGS = \
$(AM_CFLAGS) \
Expand Down Expand Up @@ -4453,7 +4498,8 @@ libsss_krb5_common_la_LDFLAGS = \

libsss_ldap_la_SOURCES = \
src/providers/ldap/ldap_init.c \
src/providers/ldap/ldap_access.c
src/providers/ldap/ldap_access.c \
$(SSSD_NEW_FAILOVER_OBJ)
libsss_ldap_la_CFLAGS = \
$(AM_CFLAGS) \
$(OPENLDAP_CFLAGS)
Expand Down Expand Up @@ -4582,6 +4628,7 @@ libsss_ipa_la_SOURCES = \
src/providers/ad/ad_srv.c \
src/providers/ad/ad_domain_info.c \
src/providers/ad/ad_cldap_ping.c \
$(SSSD_NEW_FAILOVER_OBJ) \
$(NULL)
libsss_ipa_la_CFLAGS = \
$(AM_CFLAGS) \
Expand Down Expand Up @@ -4647,6 +4694,7 @@ libsss_ad_la_SOURCES = \
src/providers/ad/ad_refresh.c \
src/providers/ad/ad_resolver.c \
src/providers/ad/ad_cldap_ping.c \
$(SSSD_NEW_FAILOVER_OBJ) \
$(NULL)


Expand Down
88 changes: 88 additions & 0 deletions minimal-provider-notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Minimal SSSD provider

This is used as a proof of concept for the new failover implementation. It can
also be used to see what changes are required in order to switch to the new
code, however it really does only minimum amount of changes to get it working.
It would be very good to provide more thorough refactoring in the real
providers.

The minimal provider supports:
- services lookup (getent services)
- user authentication

## Populate LDAP

```
$ vim objects.ldif
dn: ou=users,dc=ldap,dc=test
objectClass: top
objectClass: organizationalUnit
ou: users

# Password is Secret123
dn: cn=user-1,ou=users,dc=ldap,dc=test
uid: user-1
uidNumber: 10000
homeDirectory: /home/user-1
gidNumber: 100000
cn: user-1
objectClass: posixAccount
objectClass: top
userPassword:: e1BCS0RGMi1TSEE1MTJ9MTAwMDAwJEVZU2lqOFgxTTVFZUIrMXlHQzdvZkhwZzd
XZXpYRGJwJG0vTVUyMUIrTGNNb2tkRVcvUFJ6YWlhc21zdlNDeVJWdGxPU3c3c05YbHk2NUxBcUcz
ODJqQUJWUEp2N1ZnOUtRdXhEamVlbmxEV3V5Ylg5UFdKMW5nPT0=

dn: ou=services,dc=ldap,dc=test
objectClass: top
objectClass: organizationalUnit
ou: services

dn: cn=service0,ou=services,dc=ldap,dc=test
objectClass: ipService
cn: service0
ipServiceProtocol: tcp
ipServicePort: 12345

$ ldapadd -D "cn=Directory Manager" -w Secret123 -H ldap://master.ldap.test -f objects.ldif -vv
```

## Verify LDAP contents

```
$ ldapsearch -D "cn=Directory Manager" -w Secret123 -H ldap://master.ldap.test -b dc=ldap,dc=test
```

## Configure SSSD for services lookup

```
[sssd]
domains = minimal

[domain/minimal]
debug_level = 9
id_provider = minimal

$ getent services -s sss service0
service0 12345/tcp
```

## Configure SSSD for user authentication

Note: user lookup is done by id provider

```
[sssd]
services = nss, pam
domains = minimal

[domain/minimal]
debug_level = 9
id_provider = ldap
auth_provider = minimal
ldap_uri = _srv_
dns_discovery_domain = ldap.test
ldap_tls_reqcert = never

$ su user-1
Password: Secret123
```
Loading
Loading