rnijveld/xmlseclibs
Fork of xmlseclibs for working with XML Digital Signatures and XML Encryption in PHP. Provides tools to sign, verify, encrypt, and decrypt XML documents (XMLDSig/XMLENC) commonly used in SAML, SOAP, and other security-focused XML workflows.
xmlseclibs package provides XML encryption, decryption, signing, and verification capabilities, making it a strong fit for applications requiring secure XML processing (e.g., SOAP APIs, financial transactions, healthcare data exchanges, or compliance-heavy workflows).DOMDocument/SimpleXML may conflict with xmlseclibs's DOM manipulation methods, requiring careful namespace isolation.ext-dom or ext-xml extensions, but resolvable via composer autoloading or custom service providers.App\Exceptions\XmlSecurityException).openssl_* functions or phpseclib suffice for simpler use cases?spomky-labs/xml-securities) or a custom wrapper feasible?XmlSecurityService) to encapsulate initialization and configuration.XmlSecurity::sign($xml)) for cleaner controller usage.// config/app.php
'providers' => [
App\Providers\XmlSecurityServiceProvider::class,
];
// app/Providers/XmlSecurityServiceProvider.php
public function register() {
$this->app->singleton('xmlsec', function () {
return new \XMLSecurityLibs(\XMLSecurityLibs::XMLSEC_DOM);
});
}
use Illuminate\Support\Facades\App;
$xmlSec = App::make('xmlsec');
$xmlSec->signNode($domNode, $privateKey);
ext-dom and ext-xml (enabled by default in Laravel).XmlSecurityException).XmlSigned, XmlDecrypted) for observability.SimpleXML) could mitigate this.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Invalid XML input | Crashes or silent failures | Validate XML schema pre-processing |
| Missing private key | Decryption/signing failures | Use Laravel’s config/environment checks |
| PHP extension conflicts | Runtime errors | Containerize with pinned PHP versions |
| Unmaintained package | Security vulnerabilities | Fork or migrate to spomky-labs/xml-securities |
XmlSecurityFailed events).How can I help you explore Laravel packages today?