#50872 dsconf can't create GSSAPI replication agreements
Closed: wontfix 4 years ago by mreynolds. Opened 4 years ago by quentinmit.

Issue Description

dsconf repl-agmt create refuses to create a GSSAPI replication agreement because it incorrectly requires --bind-passwd to be set.

Package Version and Platform

Repros on current HEAD: https://pagure.io/389-ds-base/blob/master/f/src/lib389/lib389/cli_conf/replication.py#_666

Steps to reproduce

  1. dsconf instance repl-agmt create --suffix dc=foo --host bar.com --port 389 --conn-protocol LDAP --bind-dn uid=ldap/bar.com,dc=foo --bind-method SASL/GSSAPI "GSSAPI Replication to bar.com"

Actual results

"You need to set the bind dn (--bind-dn) and the password (--bind-passwd) for bind method (SASL/GSSAPI)"

Expected results

Replication agreement is successfully created.

The bug and fix are obvious. https://pagure.io/389-ds-base/blob/master/f/src/lib389/lib389/cli_conf/replication.py#_666 has incorrect Python syntax:

    if (bind_method == 'simple' or 'sslclientauth') and (args.bind_dn is None or args.bind_passwd is None):

bind_method == 'simple' or 'sslclientauth' evaluates as (bind_method == 'simple') or 'sslclientauth' in Python, which is always True.

The condition should instead be

    if (bind_method in ('simple', 'sslclientauth')) and (args.bind_dn is None or args.bind_passwd is None):

I confirmed that the command functions properly with that change.


Metadata Update from @mreynolds:
- Issue assigned to mreynolds

4 years ago

Thanks for code fix! We'll get this fixed right away.

Metadata Update from @mreynolds:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None

4 years ago

Metadata Update from @mreynolds:
- Issue priority set to: critical
- Issue set to the milestone: 1.4.1

4 years ago

Commit 75a51aa relates to this ticket

Commit 75a51aa relates to this ticket

2b54404..dc339c4 389-ds-base-1.4.2 -> 389-ds-base-1.4.2

3d8522b..265d4df 389-ds-base-1.4.1 -> 389-ds-base-1.4.1

@quentinmit thanks for finding and fixing this bug!! All contributions are greatly appreciated!

Metadata Update from @mreynolds:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/3925

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

3 years ago

Login to comment on this ticket.

Metadata