Socket
Book a DemoInstallSign in
Socket

@futoin/security

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@futoin/security

FutoIn Security Concept reference implementation

latest
Source
npmnpm
Version
0.3.16
Version published
Maintainers
1
Created
Source

NPM Version NPM Downloads Build Status stable

NPM

About

FutoIn Security Concept is alternative to token based authentication & authorization mechanisms.

Features:

  • FutoIn SecVault sensitive data storage security
  • User & configuration management (FTN8):
  • Stateless Authentication (FTN8.1):
    • Clear text
    • Message Authentication Code (HMAC with static key)
  • Master Secret Authentication (FTN8.2):
    • multiple master keys with custom scope support
    • derived key per each peer
    • automatic time-based derived key rotation
    • optional automatic master key rotation

Documentation --> FutoIn Guide

Reference implementation of:

Author: Andrey Galkin

Installation for Node.js

Command line:

$ npm install @futoin/security --save

or:

$ yarn add @futoin/security --save

Examples

API documentation

Classes

CachedManageService

FTN8: Cached Manage Service

ManageFace

Manage Face

ManageService

FTN8: main Manage Service

MasterAutoregFace

FTN8.2: Master Auth Face

MasterAuthService

FTN8.2: Master Auth Service

MasterAutoregFace

FTN8.2: Master Auth Auto-registration Face

MasterAutoregService

FTN8.2: Master Auth Auto-registration Service

MasterManageFace

FTN8.2: Master Auth Manage Face

MasterManageService

FTN8.2: Master Auth Manage Service

ServiceApp

All-in-one AuthService initialization

SimpleSecurityProvider

Simple passthru FTN8 security provider for Executor.

NOTE: it's suitable for lightweight services without own SecVault.

SatelessAuthFace

FTN8.1: Stateless AuthService Face

StatelessAuthService

Manage Service

StatelessManageFace

FTN8.1: Stateless Manage Face

StatelessManageService

FTN8.1.: Stateless Manage Service

StaticMasterAuth

MasterAuth implementation for AdvancedCCM with static Master Key

NOTE: this implementation rotates only derived keys

BaseFace

Base Face with neutral common registration functionality

BaseService

Base Service with common registration logic

CachedManageService

FTN8: Cached Manage Service

Kind: global class

new CachedManageService(scope, options)

C-tor

ParamTypeDefaultDescription
scopeobjectscope of related services
optionsobjectpassed to superclass c-tor
options.scopeintegermain.globalScopescope state

ManageFace

Manage Face

Kind: global class

ManageService

FTN8: main Manage Service

Kind: global class

MasterAutoregFace

FTN8.2: Master Auth Face

Kind: global class

MasterAuthService

FTN8.2: Master Auth Service

Kind: global class

MasterAutoregFace

FTN8.2: Master Auth Auto-registration Face

Kind: global class

MasterAutoregService

FTN8.2: Master Auth Auto-registration Service

Kind: global class

MasterManageFace

FTN8.2: Master Auth Manage Face

Kind: global class

MasterManageService

FTN8.2: Master Auth Manage Service

Kind: global class

ServiceApp

All-in-one AuthService initialization

Kind: global class

new ServiceApp(as, options)

C-tor

ParamTypeDefaultDescription
asAsyncStepsAsyncSteps interface
optionsobject{}options
[options.ccm]AdvancedCCMexternal CCM instance
[options.publicExecutor]Executorexternal public executor instance
[options.privateExecutor]Executorexternal private executor instance
[options.storagePassword]stringBase64 encoded KEK for storage
[options.config]objectconfig overrides for MasterService
[options.ccmOptions]objectauto-CCM options
[options.notExpectedHandler]callable'notExpected' error handler
[options.privateExecutorOptions]objectprivate auto-Executor options
[options.publicExecutorOptions]objectpublic auto-Executor options
[options.evtOptions]objecteventstream options
[options.secVaultOptions]objectsecure vault options
[options.securityOptions]objectsecurity interface options

serviceApp.ccm() ⇒ AdvancedCCM

CCM instance accessor

Kind: instance method of ServiceApp
Returns: AdvancedCCM - instance

serviceApp.executor() ⇒ Executor

Executor instance accessor

Kind: instance method of ServiceApp
Returns: Executor - instance

serviceApp.close([done])

Shutdown of app and related instances

Kind: instance method of ServiceApp

ParamTypeDefaultDescription
[done]callabledone callback

SimpleSecurityProvider

Simple passthru FTN8 security provider for Executor.

NOTE: it's suitable for lightweight services without own SecVault.

Kind: global class

SatelessAuthFace

FTN8.1: Stateless AuthService Face

Kind: global class

StatelessAuthService

Manage Service

Kind: global class

StatelessManageFace

FTN8.1: Stateless Manage Face

Kind: global class

StatelessManageService

FTN8.1.: Stateless Manage Service

Kind: global class

StaticMasterAuth

MasterAuth implementation for AdvancedCCM with static Master Key

NOTE: this implementation rotates only derived keys

Kind: global class

new StaticMasterAuth(options, keyId, keyData, [paramFormat], [kds], [macAlgo])

C-tor

ParamTypeDefaultDescription
optionsobjectOptions
keyIdstringmaster key ID
keyDatastringmaster key data in Base64
[paramFormat]string"YYYYMMDD"format for derivation parameter
[kds]string"HKDF256"key derivation strategy
[macAlgo]string"HS256"MAC algorithm

BaseFace

Base Face with neutral common registration functionality

Kind: global class
Note: Not official API

BaseFace.LATEST_VERSION

Latest supported FTN13 version

Kind: static property of BaseFace

BaseFace.PING_VERSION

Latest supported FTN4 version

Kind: static property of BaseFace

BaseFace.register(as, ccm, name, endpoint, [credentials], [options])

CCM registration helper

Kind: static method of BaseFace

ParamTypeDefaultDescription
asAsyncStepssteps interface
ccmAdvancedCCMCCM instance
namestringCCM registration name
endpoint*see AdvancedCCM#register
[credentials]*see AdvancedCCM#register
[options]object{}interface options
[options.version]string"1.0"interface version to use

BaseService

Base Service with common registration logic

Kind: global class

new BaseService(scope, options)

C-tor

ParamTypeDescription
scopeobjectscope of related services
optionsobjectpassed to superclass c-tor

BaseService.register(as, executor, scope, options) ⇒ BaseService

Register Service with Executor

Kind: static method of BaseService
Returns: BaseService - instance

ParamTypeDescription
asAsyncStepssteps interface
executorExecutorexecutor instance
scopeobjectscope of related services
optionsobjectimplementation defined options

Keywords

futoin

FAQs

Package last updated on 27 Mar 2023

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