Skip to content

Add SECURITY.md and harden LDAP, XML, UI, and configuration handling - #180

Merged
OpenPj merged 3 commits into
trunkfrom
framework-connector-hardening
Nov 20, 2026
Merged

OpenPj merged 3 commits into
trunkfrom
framework-connector-hardening

Conversation

@OpenPj

@OpenPj OpenPj commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request adds SECURITY.md documenting Apache ManifoldCF's reporting process and component trust boundaries, along with routine hardening improvements across the framework and connectors:

  • Documentation: Added SECURITY.md with reporting guidelines and architectural trust boundaries for Crawler-UI, REST API, Authority Service, connectors, and credential storage.
  • LDAP query handling: Consolidated RFC 4514 / RFC 4515 escaping in org.apache.manifoldcf.core.util.LdapEscaper (keeping connector-common's LdapEscaper as a backward-compatible delegate) and updated LDAPAuthority, LDAPMapper, and LdapAuthenticator to use literal placeholder replacement with appropriate filter/DN escaping.
  • XML parsing: Added org.apache.manifoldcf.core.common.XMLParserFactory and updated GenericConnector, GenericAuthority, OpenSearchServerConnection, XMLDoc, and XMLStream to use hardened JAXP / SAXSource configurations.
  • Crawler-UI & session handling: Added per-session request token generation/validation in AdminProfile, automatic token submission in mcf.js, POST-only and token enforcement in execute.jsp, session ID rotation and relative redirect validation in setupAdminProfile.jsp, HttpOnly/SameSite=Lax cookie configuration in crawler-ui and combined-service, and updated authority-service/WEB-INF/web.xml.external to Jakarta EE 6.0.
  • Configuration parameters & obfuscation: Marked obfuscated ConfigParams nodes, masked obfuscated parameters in REST API read responses while preserving stored values when masked placeholders are submitted on PUT, and added optional org.apache.manifoldcf.obfuscation.passcode / salt (and MCF_OBFUSCATION_* env var) configuration with legacy fallback.
  • Tests: Added unit tests (LdapEscaperTest, XMLParserFactoryTest, ConfigParamsObfuscationTest, AdminProfileTest, ConfigParamsApiMaskingTest, GenericConnectorXMLTest).

Verification

  • mvn -o package across all 12 modified modules (mcf-core, mcf-connector-common, mcf-ui-core, mcf-agents, mcf-pull-agent, mcf-authority-service, mcf-crawler-ui, mcf-combined-service, mcf-ldap-connector, mcf-ldapmapper-connector, mcf-generic-connector, mcf-opensearchserver-connector): BUILD SUCCESS (17/17 unit tests passing).
  • ant deliver-framework + Ant connector builds (ldap, ldapmapper, generic, opensearchserver): BUILD SUCCESSFUL.

- Add root SECURITY.md documenting reporting guidelines and component trust boundaries
- Consolidate RFC 4514/4515 LDAP escaping in framework/core LdapEscaper and apply literal
  filter replacement in LDAPAuthority, LDAPMapper, and LdapAuthenticator
- Add XMLParserFactory helper and apply hardened JAXP/SAXSource configuration across
  GenericConnector, GenericAuthority, OpenSearchServerConnection, XMLDoc, and XMLStream
- Add per-session request token validation, POST-only enforcement, HttpOnly/SameSite
  session cookie configuration, session ID rotation on login, and relative redirect
  validation in Crawler-UI and Combined Service
- Modernize authority-service web.xml.external to Jakarta EE 6.0
- Mask obfuscated connection parameters in REST API read responses (preserving stored
  values on masked PUT round-trips) and support configurable obfuscation key/salt
  properties with legacy fallback
- Add unit tests covering LDAP escaping, XML parser configuration, request tokens,
  and parameter obfuscation/masking
@OpenPj
OpenPj merged commit 21c5d52 into trunk Nov 20, 2026
1 check passed
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.

1 participant