Registry / security / axios-kerberos

axios-kerberos

JSON →
library2.0.0jsnpmunverified

Axios wrapper for Kerberos authentication, version 2.0.0. Uses the `kerberos` npm package to negotiate SPNEGO tokens for HTTP requests against Kerberos-authenticated endpoints. No active release cadence; last update may be stale. Simpler than full GSSAPI libraries but tightly coupled to the `kerberos` native addon, which requires system Kerberos libraries (krb5). Not actively maintained since 2021.

npm install axios-kerberos
INSTALL
IMPORT
SIG · AXIOS-KERBEROS
A
axios-kerberos
securityjavascriptv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

kerberos
import kerberos from 'axios-kerberos'
const kerberos = require('axios-kerberos')
ESM-only; default export is the kerberos instance.

Creates an Axios instance with Kerberos authentication and makes a GET request.

import axios from 'axios'; import kerberos from 'axios-kerberos'; const client = kerberos.client(); async function makeRequest() { try { const response = await client.get('http://example.com/secure', { kerberos: true, }); console.log(response.data); } catch (error) { console.error(error); } } makeRequest();
Debug
Known issues
breakingkerberos package v2+ requires Python for native compilation; may fail on systems without Python build tools.
fix
Ensure Python 3.x and build-essential are installed.
affects: >=2.0.0
deprecatedThe 'kerberos' npm package is deprecated; consider using 'kerberos-client' or 'node-gyp' alternatives.
fix
Switch to 'axios-negotiate' or implement your own SPNEGO with 'http-negotiate'.
affects: >=1.0.0
gotchaIf the Kerberos ticket is expired, the library silently falls back to unauthenticated requests.
fix
Set KRB5CCNAME environment variable or call kinit before making requests.
affects: >=1.0.0
gotchaAxios instance creation must be called synchronously; async initialization not supported.
fix
Initialize the client at module load time, not inside async functions.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'kerberos'
Missing kerberos native addon installation.
fix
npm install kerberos and ensure Python build tools are available.
TypeError: kerberos.client is not a function
Using CommonJS require instead of ESM import.
fix
Use import kerberos from 'axios-kerberos' or set "type": "module" in package.json.
Error: kerberos: Could not find Kerberos library
System Kerberos libraries (libkrb5) not installed.
fix
Install krb5-dev on Linux, or leave the package on macOS (KDC provided).
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
axiosrequiredHTTP client that is wrapped
kerberosrequiredNative addon for Kerberos ticket negotiation
Agent activity
28 hits · last 30 days
node
26
OpenAI (training)
1
Resources
axios-kerberos — npm install axios-kerberos · libregistry