Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1848359

Summary: Add failover credentials to replication agreement
Product: Red Hat Enterprise Linux 8 Reporter: Thorsten Scherf <tscherf>
Component: 389-ds-baseAssignee: mreynolds
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: ldap-maint, mreynolds, mrhodes, msauton, pasik, sgouvern, spichugi, tbordaz, tmihinto, vashirov, wwinter
Target Milestone: rcKeywords: TestCaseProvided
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sync-to-jira
Fixed In Version: 389-ds-devel-1.4-8040020201105165416.866effaa Doc Type: Enhancement
Doc Text:
.Directory Server supports setting replication agreement bootstrap credentials When you use bind distinguished name (DN) groups in a replication agreement, there can be situations where the group is outdated or not present.: * During online initialization where you must authenticate to the replica before the database is initialized * When you use GSSAPI as authentication method and the Kerberos credentials are changed If you configured bootstrap credentials in a replication agreement, Directory Server uses these credentials in case that the connection failed, for example, because of an `LDAP_INVALID_CREDENTIALS (err=49)` error. Setting bootstrap credentials when you create a replication agreement solves the problem in case that credentials with bind groups get out of sync. For further details about configuring this feature, see the link:https://access.redhat.com/documentation/en-us/red_hat_directory_server/11/html/administration_guide/configuring-bootstrap-credentials[Configuring Bootstrap Credentials] section in the Directory Server 11 Administration Guide.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 15:45:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1894575    

Description Thorsten Scherf 2020-06-18 08:46:25 UTC
This bug is created as a clone of upstream ticket:
https://pagure.io/389-ds-base/issue/51156

#### Issue Description

When using a Bind DN Group for a replicated suffix it opens up issues where the Bind DN Group can get out of sync, and then replication breaks.  For  example, if you are using a Bind DN Group and GSSAPI authentication.  If the krb credentials change for a member of the group it will fail to authenticate to the remote replica.  Chicken vs egg,  We need to replicate the credential update but we can not authenticate to replicate that change.

I'm proposing adding a failover account/credentials to an agreement.

nsDS5ReplicaFailoverBindDN:  REPL_MANAGER_DN
nsDS5ReplicaFailoverCredentials: PASSWORD
nsDS5ReplicaFailoverBindMethod: SIMPLE
nsDS5ReplicaFailoverTransportInfo: LDAPS

So at the start of each replication session if we fail to bind with the default credentials we can fall back to "cn=replication manager,cn=config" for example.  In the scenario above, after this failover bind, the server will be in sync and on the next session it will go back to trying the default credentials.

Comment 5 mreynolds 2020-09-22 15:55:49 UTC
Fixed upstream

Comment 7 sgouvern 2020-11-13 15:13:10 UTC
With build 389-ds-base-1.4.3.16-1.module+el8.4.0+8740+d5ec8778.x86_64


[root@ci-vm-10-0-138-157 ds]# PYTHONPATH=src/lib389/ py.test -s -v dirsrvtests/tests/suites/replication/repl_agmt_bootstrap_test.py

====================================================================== test session starts ======================================================================
platform linux -- Python 3.6.8, pytest-6.1.2, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3.6
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-247.el8.x86_64-x86_64-with-redhat-8.4-Ootpa', 'Packages': {'pytest': '6.1.2', 'py': '1.9.0', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.10.0', 'html': '2.1.1', 'libfaketime': '0.1.2'}}
389-ds-base: 1.4.3.16-1.module+el8.4.0+8740+d5ec8778
nss: 3.53.1-11.el8_2
nspr: 4.25.0-2.el8_2
openldap: 2.4.46-16.el8
cyrus-sasl: 2.1.27-5.el8
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, configfile: pytest.ini
plugins: metadata-1.10.0, html-2.1.1, libfaketime-0.1.2
collected 1 item 
dirsrvtests/tests/suites/replication/repl_agmt_bootstrap_test.py::test_repl_agmt_bootstrap_credentials INFO:lib389.topologies:Instance with parameters {'ldap-port': 39001, 'ldap-secureport': 63701, 'server-id': 'master1', 'suffix': 'dc=example,dc=com'} was created.

PASSEDInstance slapd-master1 removed.
Instance slapd-master2 removed.


================================================================= 1 passed in 160.39s (0:02:40) ================================================================  

Marking as Verfied:tested

Comment 10 sgouvern 2020-11-16 15:25:32 UTC
verified:tested (see comment 7) with build https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1383684 
-> marking as VERIFIED

Comment 14 errata-xmlrpc 2021-05-18 15:45:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (389-ds:1.4 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1835