Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amps-kerberos-authenticator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amps-kerberos-authenticator

AMPS Kerberos Authenticator

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

AMPS JavaScript Client Kerberos Authentication for Node.js

Installation

npm install --save amps-kerberos-authenticator

Dependencies

amps-kerberos-authenticator depends on the amps and kerberos packages. In case of the installation from NPM, all the dependencies are installed automatically.

Kerberos Prerequisites

  • AMPS SPN (for example, AMPS/host.domain.com)

  • Optionally set Kerberos environment variables

    • KRB5_CONFIG set to a krb5.conf file that will override the default (the default is /etc/krb5.conf on linux)
    • KRB5_CLIENT_KTNAME set to a KeyTab for the user you want to authentication as

    In Node.js, environment variables can be set in the source code:

    process.env['KRB5_CONFIG'] = '/path/to/krb5.conf';
    process.env['KRB5_CLIENT_KTNAME'] = '/path/to/client_name.keytab';
    

Example

For Kerberos authentication using JavaScript there is a single class, AMPSKerberosAuthenticator, for authentication in Node.js environment.


const Client = require('amps').Client;
const AMPSKerberosAuthenticator = require('amps-kerberos-authenticator').AMPSKerberosAuthenticator;


async function main() {
    const client = new Client('demo');

    // connection credentials
    const login = 'username';
    const port = 10304;
    const hostName = 'hostname';
    const uri = `ws://${login}@${hostName}:${port}/amps/json`;
    const spn = `AMPS/${hostName}`;

    try {
        // connect
        await client.connect(uri, new AMPSKerberosAuthenticator(spn));
    }
    catch (err) {
        console.error('err: ', err);
    }
}


main();

See Also

Kerberos Authentication Blog Article

libamps_multi_authentication AMPS Server Module

Keywords

FAQs

Package last updated on 09 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc