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 2170221 - Boolean attributes should be case insensitive [rhel-7.9.z]
Summary: Boolean attributes should be case insensitive [rhel-7.9.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.9
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: 7.9
Assignee: LDAP Maintainers
QA Contact: LDAP QA Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-15 22:15 UTC by Simon Pichugin
Modified: 2023-03-07 09:57 UTC (History)
4 users (show)

Fixed In Version: 389-ds-base-1.3.11.1-1.el7_9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-03-07 09:55:00 UTC
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 5497 0 None closed Boolean LDAP Attribute Syntax too scrict 2023-02-15 22:15:14 UTC
Red Hat Issue Tracker IDMDS-2791 0 None None None 2023-02-17 08:34:30 UTC
Red Hat Issue Tracker IDMDS-2801 0 None None None 2023-02-22 09:56:37 UTC
Red Hat Issue Tracker RHELPLAN-148784 0 None None None 2023-02-15 22:15:55 UTC
Red Hat Product Errata RHBA-2023:1100 0 None None None 2023-03-07 09:55:04 UTC

Description Simon Pichugin 2023-02-15 22:15:14 UTC
Issue Description
RFC 4517 #3.3.3 defines the Boolean Attribute with OID 1.3.6.1.4.1.1466.115.121.1.7 in the ABNF

Boolean = "TRUE" / "FALSE"
RFC 4517 #3.3.3 refers to RFC 4512 #1.4 for the syntax definition, which further refers to RFC 4234 which defines ABNF as an case insensitive syntax - as does RFC 7405 #1 which enhances RFC 4234 with a case sensitive description.

Package Version and Platform:
RHEL 7.9

Package and version: 389-ds-base-1.3.10.2-16.el7_9.x86_64
Browser firefox

Steps to reproduce the behavior:

To a default installation add the following schema definition
[user@host ~]$ sudo -- cat /etc/dirsrv/slapd-ldap1-dev/schema/99user.ldif
# user schema
################################################################################
dn: cn=schema
#
################################################################################
#
attributetypes: ( 1.3.6.1.4.1.59369.1.1
  NAME 'emailVerified'
  DESC 'User has successfully verified his/her current email'
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
  SINGLE-VALUE
  USAGE userApplications
  X-ORIGIN ('APA-IT defined' 'user defined') )
#
################################################################################
#
objectclasses: ( 1.3.6.1.4.1.59369.2.1
  NAME 'apaitIamPerson'
  SUP inetOrgPerson
  AUXILIARY
  MAY (emailVerified)
  X-ORIGIN ('APA-IT defined' 'user defined') )
[user@host ~]$
Create at some path an apaitIamPerson object without our new attribute
Try to run ldapmodify with the following input
[user@host ~]$ cat meins.ldif 
dn: uid=user,ou=users,dc=top
changetype: modify
replace: emailVerified
emailVerified: false
-
[user@host ~]$ 
ds-389 will respond with
ldap_initialize( ldaps://host:636/??base )
replace emailVerified:
	false
modifying entry "uid=user,ou=users,dc=top"
ldap_modify: Invalid syntax (21)
	additional info: emailVerified: value #0 invalid per syntax

Expected results
Boolean values are treated case-insensitive

ldap_initialize( ldaps://host:636/??base )
replace emailVerified:
	false
modifying entry "dn: uid=user,ou=users,dc=top"
modify complete

Additional context
ds-389 is used as user federation storage in our Keycloak (KC) installation configured with vendor typ rhds. KC 19.0.3 sends lowercase bools - at least for the emailVerified user attribute - which are unfortunately rejected.

Comment 6 Simon Pichugin 2023-02-23 03:32:15 UTC
===================================================================================== test session starts =====================================================================================
platform linux -- Python 3.6.8, pytest-5.4.3, py-1.11.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-3.10.0-1160.87.1.el7.x86_64-x86_64-with-redhat-7.9-Maipo', 'Packages': {'pytest': '5.4.3', 'py': '1.11.0', 'pluggy': '0.13.1'}, 'Plugins': {'libfaketime': '0.1.2', 'flaky': '3.7.0', 'metadata': '1.11.0', 'html': '3.2.0'}}
389-ds-base: 1.3.11.1-1.el7_9
nss: 3.79.0-4.el7_9
nspr: 4.34.0-3.1.el7_9
openldap: 2.4.44-25.el7_9
cyrus-sasl: 2.1.26-24.el7_9
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, inifile: pytest.ini
plugins: libfaketime-0.1.2, flaky-3.7.0, metadata-1.11.0, html-3.2.0
collected 6 items                                                                                                                                                                             

dirsrvtests/tests/suites/syntax/acceptance_test.py::test_valid PASSED                                                                                                                   [ 16%]
dirsrvtests/tests/suites/syntax/acceptance_test.py::test_invalid_uidnumber PASSED                                                                                                       [ 33%]
dirsrvtests/tests/suites/syntax/acceptance_test.py::test_invalid_dn_syntax_crash PASSED                                                                                                 [ 50%]
dirsrvtests/tests/suites/syntax/acceptance_test.py::test_dn_syntax_spaces_delete[props0-cn=\\20leadingSpace,ou=Groups,dc=example,dc=com] PASSED                                         [ 66%]
dirsrvtests/tests/suites/syntax/acceptance_test.py::test_dn_syntax_spaces_delete[props1-cn=trailingSpace\\20,ou=Groups,dc=example,dc=com] PASSED                                        [ 83%]
dirsrvtests/tests/suites/syntax/acceptance_test.py::test_boolean_case PASSED                                                                                                            [100%]

===================================================================================== 6 passed in 54.35s ======================================================================================

Hence marking Verified: Tested.

Comment 7 bsmejkal 2023-02-23 12:00:47 UTC
As per comment #c6 marking as VERIFIED.

Comment 11 errata-xmlrpc 2023-03-07 09:55:00 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-base 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-2023:1100


Note You need to log in before you can comment on or make changes to this bug.