fix: install libxml2 and libxslt so the saml-auth plugin loads#627
Open
shreemaan-abhishek wants to merge 1 commit into
Open
fix: install libxml2 and libxslt so the saml-auth plugin loads#627shreemaan-abhishek wants to merge 1 commit into
shreemaan-abhishek wants to merge 1 commit into
Conversation
The saml-auth plugin added in APISIX 3.17.0 (apache/apisix#13346) pulls in the lua-resty-saml rock, whose native saml.so links libxml2.so.2 and libxslt.so.1. Those libraries are not present in the runtime images, so every worker logs "failed to load plugin [saml-auth] ... libxml2.so.2: cannot open shared object file" on startup and the plugin is unusable. Install libxml2 + libxslt on debian, ubuntu and redhat images. Also fix the route test: it grepped compose/apisix_log/error.log, which never exists (error.log is symlinked to stderr), so the && exit 1 never fired and startup errors slipped through CI. Grep the container logs instead.
Contributor
Author
|
Upstream packaging fix (the proper long-term fix declaring these as package deps): api7/apisix-build-tools#469. This PR is the docker-image-side mitigation so the published 3.17.0 images work now. |
bzp2010
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
The
saml-authplugin added in APISIX 3.17.0 (apache/apisix#13346) pulls in thelua-resty-samlrock. Its nativesaml.sodynamically linkslibxml2.so.2andlibxslt.so.1, which are not installed in the runtime images. As a result every worker logs this on startup and the plugin cannot be used:Reproduce on the published image:
Fix
Install
libxml2+libxslt1.1(debian/ubuntu) andlibxml2+libxslt(redhat) as runtime dependencies. After the fix,lddresolves both libraries and APISIX boots with nosaml-authload errors.Why CI didn't catch it
The
Test routestep checkedcompose/apisix_log/error.log, but that file never exists (the container'serror.logis symlinked to stderr), sogrep ... && exit 1always short-circuited and startup errors slipped through green. This PR makes the step grep the container logs instead, so a failing plugin load now fails the build.Verification
Built the patched debian image locally and booted it against etcd: