asserts and manadatory build instructions (was ITS#8240)
by Michael Ströder
hyc(a)symas.com wrote in ITS#8240:
> Our patch response was too hasty. There is no OpenLDAP bug here, the real
> issue is production binaries being built with asserts enabled instead of
> compiling with -DNDEBUG. That's an issue for packagers and distros to resolve.
> Closing this ITS, not an OpenLDAP bug.
Maybe I missed something. But this is the first time I've heard about -DNDEBUG
being mandatory when compiling binary packages for production use. Does it
have other effects?
And what are general rules for assert statements in OpenLDAP code?
In my own (Python) code assert statements are supposed to be only triggered if
something goes wrong *internally* (type issues etc.). If somebody manages to
trigger an assert statement with invalid input from "outside" I always
consider this to be a serious bug revealing insufficient error handling even
though e.g. web2ldap just logs the exception but won't crash. YMMV, but please
clarify.
I also wonder whether there are more mandatory rules for building packages and
where I can find them.
Please don't get me wrong: My inquiry is in good faith to avoid unnecessary
ITS based on misunderstanding.
Ciao, Michael.
1 year, 6 months
New logging system ideas
by Howard Chu
Just some initial thoughts on what a new logging daemon should do for us:
The primary goal - we want to use a binary message format with as few format conversions as possible between log
sender and log processor.
I'm thinking that we use message catalogs; we will need a tool to preprocess every logging
invocation in the source tree and replace them with a integer messageID. So at runtime only
the messageID and the message parameters need to be sent, not any plaintext.
The message catalog will be compiled into the binary. When it performs its "openlog" to talk
to the logging server, it will send the UUID of its catalog. If the logging server doesn't
know this UUID, it will transmit the message catalog to the logging server, before doing
anything else. (It may make more sense just to use a SHA hash here instead of a UUID.)
This way the logging server will work with any version of the binaries, and we don't need
to do special coordination to update message catalogs between revisions. The logging server
will just know that a specific catalog is to be used with a particular logging session.
The message protocol will be length-prefixed. We may even just use DER, since that would
allow us to encode arrays of parameters, and other such stuff.
The logging server will write the log messages to disk/network verbatim, doing no
parsing at all. It may prefix the records with a log session ID, so that a postprocessor
can lookup the catalog that belongs to the session, for dumping out as text.
The logging server can store its received catalogs in an LMDB database. The postprocessor
can then lookup individual messageIDs in this database, interpolate the parameters, and
dump out in text.
... that's what I have so far. It's a bit worrisome because of the additional moving parts:
message catalog creator, log server, log postprocessor. There's definitely more complexity
here, but most of it is moved out of the runtime hot path, which is the main goal. Suggestions?
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
1 year, 10 months
Re: New OpenLDAP TLS backend? (wolfSSL)
by Hayden Roche
Hi,
Unfortunately, all my time is allocated to other wolfSSL tasks at the
moment, so I won't be able to work on this for 2.6. This will probably be
the case until a customer of ours comes along requesting a port of OpenLDAP
to wolfSSL, as customer demands drive most of our development. If that
changes, I will let you know, though.
Thanks,
Hayden
On Thu, May 20, 2021 at 9:56 AM Quanah Gibson-Mount <quanah(a)symas.com>
wrote:
>
>
> --On Thursday, February 25, 2021 1:53 PM -0600 Hayden Roche
> <haydenroche5(a)gmail.com> wrote:
>
> >
> > Quanah and Howard,
> >
> >
> > Thanks for your quick replies! I'm glad to hear there's interest in this.
> > I think 2.6 is a more realistic target, as I'll need to get my boss to
> > allocate time for this work amongst other wolfSSL tasks I've been
> > assigned. Look forward to a merge request in the (hopefully near) future!
>
> The openldap mainline code branch is now open for 2.6 development, so this
> would be a good time for work to start on this item for inclusion.
>
> Regards,
> Quanah
>
>
> --
>
> Quanah Gibson-Mount
> Product Architect
> Symas Corporation
> Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
> <http://www.symas.com>
>
2 years
Re: New OpenLDAP TLS backend? (wolfSSL)
by Hayden Roche
Quanah and Howard,
Thanks for your quick replies! I'm glad to hear there's interest in this. I
think 2.6 is a more realistic target, as I'll need to get my boss to
allocate time for this work amongst other wolfSSL tasks I've been assigned.
Look forward to a merge request in the (hopefully near) future!
Thanks,
Hayden
On Thu, Feb 25, 2021 at 1:17 PM Quanah Gibson-Mount <quanah(a)symas.com>
wrote:
>
>
> --On Thursday, February 25, 2021 12:38 PM -0600 Hayden Roche
> <haydenroche5(a)gmail.com> wrote:
>
> > (thanks JoBbZ). I was also pointed to this
> > issue in your issue tracking system, where a developer (Quanah
> > Gibson-Mount)
>
> Same person. ;)
>
>
> > Is there still interest in getting wolfSSL working with OpenLDAP's latest
> > version and integrated upstream?
>
> OpenLDAP 2.4 is closed to development. If you want this in for OpenLDAP
> 2.5, you'll need to get the work in ASAP, otherwise it will have to wait
> for 2.6
>
> Generally:
>
> Sign up for an account on our gitlab instance: https://git.openldap.org
>
> Fork a copy of the openldap repo.
>
> Create a branch for ITS9303 and do the work in that branch
>
> Push the branch
>
> Open a merge request for review
>
> Additionally, you'll need to add an IPR statement to ITS#9303 as
> documented
> at <https://www.openldap.org/devel/contributing.html#notice>
>
> A link to the MR should also be put into the ITS.
>
> Regards,
> Quanah
>
> --
>
> Quanah Gibson-Mount
> Product Architect
> Symas Corporation
> Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
> <http://www.symas.com>
>
2 years
ssl_cipher_list_to_bytes:no ciphers available
by Michael Ströder
HI!
I have issues with OpenSSL ciphers on my openSUSE Tumbleweed and release
2.5.4 when connecting to an 2.4 provider:
TLS: can't connect: error:141A90B5:SSL
routines:ssl_cipher_list_to_bytes:no ciphers available.
An 2.4.58 consumer replica works just fine.
There is this commit in RE25 and I'm not sure whether that introduces a
regression on my system:
b72bce2400ce303766f355a1dd37f4012754c942
ITS#9521 Set TLSv1.3 cipher suites for OpenSSL 1.1
BTW: openSUSE has implemented something like a crypto policy configuration:
https://build.opensuse.org/package/view_file/security:tls/openssl-1_1/ope...
Any clue what's going on?
Ciao, Michael.
2 years
slapo-ppolicy 2.4 vs. 2.5
by Michael Ströder
HI!
slapo-ppolicy in OpenLDAP 2.5 shows slightly different behaviour in
python-ldap0 tests (see test output below).
Tests:
https://gitlab.com/ae-dir/python-ldap0/-/blob/master/tests/test_ppolicy.py
When working with Ondřej for solving ITS#9279 I finally "fixed" ldap0
tests to accomodate the behaviour of OpenLDAP 2.4.x. I did not feel
comfortable back then because it was not clear to me whether it was the
correct fix.
Do you have any tests you could run against 2.4 and 2.5 to verify
whether both have same behaviour?
Ciao, Michael.
======================================================================
FAIL: test003_ppolicy_grace_logins (tests.test_ppolicy.TestPPolicy)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/michael/Proj/ae-dir/python-ldap0/tests/test_ppolicy.py",
line 235, in test003_ppolicy_grace_logins
self.assertEqual(
AssertionError: 'Password expired! 1 grace logins left.' != 'Password
expired! 2 grace logins left.'
- Password expired! 1 grace logins left.
? ^
+ Password expired! 2 grace logins left.
? ^
======================================================================
FAIL: test001_pwdpolicy_expiration (tests.test_ppolicy.TestPwdPolicy)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/michael/Proj/ae-dir/python-ldap0/tests/test_ppolicy.py",
line 285, in test001_pwdpolicy_expiration
self.assertIsInstance(bind_res.ctrls[0], PasswordExpiringControl)
AssertionError: <ldap0.controls.pwdpolicy.PasswordExpiredControl object
at 0x7efc9d8ca760> is not an instance of <class
'ldap0.controls.pwdpolicy.PasswordExpiringControl'>
======================================================================
FAIL: test002_pwdpolicy_expired (tests.test_ppolicy.TestPwdPolicy)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/michael/Proj/ae-dir/python-ldap0/tests/test_ppolicy.py",
line 306, in test002_pwdpolicy_expired
l.simple_bind_s(self.user_dn, user_password.encode('utf-8'))
AssertionError: INVALID_CREDENTIALS not raised
2 years