Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): build kerberos in RTLD mode for Linux executables MONGOSH-1628 #1751

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

addaleax
Copy link
Contributor

fix(deps): build kerberos in RTLD mode for Linux executables MONGOSH-1628
  • Update the Kerberos addon to the latest version (2.1.0).
  • Build the Kerberos addon using RTLD for Linux mongosh executables
    (i.e. opening the system Kerberos libraries using dlopen() to avoid
    the symbol conflict with OpenSSL 3 on RHEL8).
  • Update the .deb definitions to account for the fact that the
    Kerberos system libraries are no longer a strict dependency
    of mongosh.
  • Include the Kerberos version in the --build-info output.
  • Make sure that if loading the Kerberos addon fails during a
    connection attempt, a meaningful error message gets passed
    to the user, instead of the driver’s default one (which
    swallows all information about the root cause).
  • As a drive-by, also do that for mongodb-client-encryption; we
    occasionally receive bug reports about CSFLE/QE not working on
    homebrew installations, and this may help with that.
fixup: add connectivity tests running against compiled executable

…1628

- Update the Kerberos addon to the latest version (2.1.0).
- Build the Kerberos addon using RTLD for Linux mongosh executables
  (i.e. opening the system Kerberos libraries using `dlopen()` to avoid
  the symbol conflict with OpenSSL 3 on RHEL8).
- Update the `.deb` definitions to account for the fact that the
  Kerberos system libraries are no longer a strict dependency
  of mongosh.
- Include the Kerberos version in the `--build-info` output.
- Make sure that if loading the Kerberos addon fails during a
  connection attempt, a meaningful error message gets passed
  to the user, instead of the driver’s default one (which
  swallows all information about the root cause).
- As a drive-by, also do that for mongodb-client-encryption; we
  occasionally receive bug reports about CSFLE/QE not working on
  homebrew installations, and this may help with that.
SHARED_OPENSSL_TAG === 'openssl11' ? ', libssl1.1' :
SHARED_OPENSSL_TAG === 'openssl3' ? ', libssl3' : ''
),
debRecommends: 'libgssapi-krb5-2',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Kerberos system libraries are no longer strictly a dependency for mongosh)

// https://jira.mongodb.org/browse/MONGOSH-1628
...(process.platform === 'linux' && {
GYP_DEFINES: 'kerberos_use_rtld=true',
}),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ This + the version bump are the entire fix, the rest is just testing/cleanup :)

@addaleax addaleax merged commit 2bff26f into main Nov 27, 2023
61 checks passed
@addaleax addaleax deleted the 1628-dev-kerberos branch November 27, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants