Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Ntlm Laravel Package

jamesiarmes/php-ntlm

A PHP library that adds NTLM authentication to SOAP clients, enabling PHP applications to connect to Microsoft Exchange Web Services and other Windows-integrated endpoints that require NTLM. It provides an NTLM-enabled SoapClient wrapper and supporting stream/config classes.

Deep Wiki
Context7

Technical Evaluation

What the package actually is. jamesiarmes/php-ntlm is not a Laravel package. It is a thin protocol library that implements NTLM message construction (Type 1/2/3 handshake, NTLMv1, NTLMv2, extended session security) and wraps it around two transports: a SoapClient subclass for NTLM-authenticated SOAP calls, and a cURL-based HTTP client for NTLM-authenticated REST/SOAP-over-HTTP. Its historical purpose is Exchange Web Services (EWS) and other IIS/Windows-integrated endpoints that only speak NTLM.

Architecture fit. Fit is narrow but legitimate: it is the right tool only if we must reach an on-premises Microsoft endpoint (Exchange/EWS, SharePoint, SSRS, legacy SOAP behind IIS) that offers NTLM and nothing better. It fits cleanly only if we treat it as a sealed transport adapter at the edge of the application — one service class, one config block, one interface — never as something controllers or domain code touch. If the integration is bulk mailbox sync or report pulling, it belongs behind a queued job with its own worker pool, not in the request cycle.

Integration feasibility. Mechanically easy, politically awkward:

  • composer require jamesiarmes/php-ntlm, plus ext-soap and ext-curl on the runtime image. There is no service provider, facade, or config publishing — all wiring is ours (a NtlmConnector bound in a dedicated provider, credentials in config/services.php, secrets in the vault).
  • Laravel 10/11 require PHP ^8.1; the library's last release is 2017. Expect to evaluate PHP 8.x friction directly: SoapClient subclass method signatures, dynamic-property deprecation on 8.2+, and any legacy idioms. Assume we will vendor a fork or apply a patch set rather than rely on upstream.
  • The genuinely differentiated piece is the SOAP/NTLM path. For plain HTTP calls, PHP's bundled cURL already supports CURLAUTH_NTLM and CURLAUTH_NEGOTIATE, which is maintained core code. Any use case that can be served by cURL should be served by cURL, reducing this dependency to the EWS/SOAP scenario only.

Technical risk.

  • Abandonment: no release in ~8 years, 56 stars, no vendor. We inherit full ownership of correctness and security.
  • Protocol risk: NTLM is legacy and being actively deprecated by Microsoft; NTLMv1 is cryptographically broken and must be disabled by configuration, forcing NTLMv2/ESS. NTLM is also relay-prone — this integration must be internal-network-only, never exposed to the public internet.
  • Strategic risk: anything built here has a finite lifespan; Microsoft's direction is OAuth/Graph and Kerberos.
  • Lockout risk: bad credentials or retry storms can lock the service account in AD, which is an availability incident for other systems using that account.

Key questions for the requesting team.

  1. Is the target endpoint NTLM-only, or does it support Kerberos, OAuth, or basic-over-TLS? Have we asked the vendor/AD team, or assumed?
  2. Can the requirement be met with native cURL NTLM (CURLAUTH_NTLM) and no third-party code? If yes, this package is unnecessary.
  3. Which NTLM version and what is the AD policy? Can we guarantee NTLMv2 + ESS and that NTLMv1 stays off?
  4. Is a service account with a documented rotation process available, and what is its lockout threshold?
  5. What is the exit path and date — Graph/EWS-OAuth migration, or decommissioning of the endpoint?
  6. Who owns the fork when PHP 8.5 breaks it?

Recommendation: Conditional go, scoped to a single integration, timeboxed, with a named owner and a written deprecation path. Do not let it become a shared utility.

Integration Approach

Stack fit and placement. Isolate in app/Services/Ntlm/ (or a dedicated internal package) behind a WindowsAuthTransport interface with SoapTransport and CurlTransport implementations. Domain and application layers depend on the interface only. Credentials live in config/services.php sourced from environment/vault, never in the repo. Add a FakeTransport so the test suite never performs a real handshake — this is non-negotiable for CI determinism and for avoiding AD lockouts from test runs.

Migration path. There is no migration — this is greenfield glue. The real migration is the exit migration, and it should be designed at the same time as the entry: a second implementation of WindowsAuthTransport backed by OAuth/Graph or Kerberos, selectable by config flag, so the switch is a config change rather than a rewrite. Write that exit ticket on day one.

Compatibility. Pin the dependency to an exact version and commit a fork under our VCS if any patching is required; do not rely on Packagist availability for an unmaintained package. Verify against our actual PHP minor version, not the documented one. Ensure the container image ships ext-soap and ext-curl and that this is asserted in a health check, since a missing ext-soap fails at runtime, not install time.

Sequencing.

  1. Spike (≈2–3 days). Reproduce the handshake against a real endpoint from a staging host on our PHP version. Prove or disprove that native cURL is sufficient; if it is, stop and delete the spike.
  2. Fork and pin if the spike passes; add a minimal smoke test against a mock NTLM server or recorded exchange.
  3. Adapter + interface + fake; bind in a dedicated service provider; add config and secrets wiring.
  4. Queue integration — dedicated queue/worker pool, explicit timeouts, bounded retries with jitter, and a circuit breaker so an unreachable DC cannot back up the queue.
  5. Observability — structured logs for handshake stage, HTTP status, and auth failures; alert on repeated 401s, which is the leading indicator of an imminent account lockout.
  6. Documentation and handover — runbook covering credential rotation, AD policy changes, and the exit switch.

Operational Impact

Maintenance. We own this code permanently. Upstream is dormant, so there are no security patches for the library itself; the protocol is stable, but PHP compatibility will break on a roughly annual cadence. Budget a recurring, if small, maintenance line: a compatibility review each PHP upgrade and a review each time AD/Microsoft announces NTLM policy changes. Because the surface is one adapter class, this is affordable — which is precisely why the isolation boundary matters.

Support. No vendor, no SLA, thin community. Support burden falls on whoever understands the handshake, and that knowledge is scarce. Mitigate by documenting the failure signatures (below) and by keeping the adapter small enough that any senior PHP developer can read it end to end. Do not let this become tribal knowledge held by one engineer.

Scaling. NTLM is per-connection, stateful, and does a 2–3 round-trip handshake per connection, so throughput is latency-bound rather than CPU-bound; keep-alive and connection reuse are the main levers, and horizontal scaling means every worker needs the same credential and network path. Credential rotation must be deployable without draining queues — read the secret at call time, not at boot. Also confirm with the AD team that our expected request rate is well inside lockout thresholds and that the service account is exempted from interactive logon restrictions.

Failure modes to instrument and alert on.

  • Account lockout — retry storms or a rotated credential; highest-severity, cross-system impact.
  • NTLM disabled by policy — a domain-wide change silently breaks us; the circuit breaker should fail fast rather than loop.
  • DC/endpoint unreachable or DNS failure — queue backlog; needs backpressure, not infinite retry.
  • Proxy or load balancer stripping Authorization / Connection: keep-alive — manifests as an endless 401 loop that looks like bad credentials.
  • Clock skew and Type 2 challenge changes — intermittent, environment-specific, painful to diagnose.
  • ext-soap/ext-curl missing from a rebuilt image — fails at runtime on first call; catch in the health check.

Ramp-up. Expect 1–2 weeks for a developer unfamiliar with NTLM to become productive, dominated by getting a Windows/AD test path rather than by reading the library. Prerequisites that must be arranged up front: a non-production AD service account, network access to the endpoint from staging, and a named contact on the AD/Exchange side who can confirm policy. Without those, the estimate is not the code — it is the access.

Bottom line for the business. Low opportunity score (2.27) and low strategic value are accurate: this is tactical glue with a defined expiry. Approve it only as a bounded, single-purpose bridge to a specific Microsoft endpoint, funded alongside its replacement plan. If any alternative — Kerberos, OAuth/Graph, or even native cURL NTLM — satisfies the requirement, take it and leave this dependency out of the estate entirely.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk