Socket
Book a DemoInstallSign in
Socket

@dt-esa/authorizer

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dt-esa/authorizer

This package provides passport handling for authorization and scope correlation.

latest
Source
npmnpm
Version
2.3.1
Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

@dt-esa/authorizer

This package provides passport handling for authorization and scope correlation.

Intended for use in Dynatrace ESA Solutions.

A dependency map can be found here.

import express, { Express } from 'express';
import cookieParser from 'cookie-parser';
import expressSession from 'express-session';
import { authentication } from '@dt-esa/authorizer';

const app: Express = express();

app.use(cookieParser());
app.use(expressSession({ secret: 'keyboard cat', resave: true, saveUninitialized: false }));
app.use(express.urlencoded({ extended : true }));

app.use(authentication({
    mode: 'dynatrace',
    dynatraceEndpoint: "https://kkr04563.sprint.dynatracelabs.com/"
}));

Available Options for Authorizations

{
 * 	   mode: 
 * 			 "client"    | // Use a seperate webserver running this middleware to authenticate & authorize transactions.
 * 			 "dynatrace" | // Use a Dynatrace instance to authenticate transactions and provide authorization.
 * 			 "azure"     | // Use Azure App Registration for Authentication. Authorization specified in `authorizations`.
 * 			 "saml",       // Use a generic SAML configuration for Authentication. Authorization specified in `authorizations`.
 * 	   authorizations?: Map<string, Array<string>>, // For `azure` and `saml` modes. An object containing Authorizations to apply.
 * 			// e.g.
 * 			// {
 * 			//     "grace.hopper@example.com": ["ReadConfig", "WriteConfig", "logs.read"],
 * 			//     "ryan.dahl@example.com":    ["WriteConfig", "logs.read"],
 * 			//     "brendan.eich@example.com": ["ReadConfig", "logs.read"],
 * 			// ...
 * 			// }
 *     saml?: Object,      // SAML configuration object provided to "passport-saml"
 *     azure?: Object,     // Azure configuration object provided to "passport-azure-ad"
 *     clientConnectionPort?: number, // When mode is `client`, the port that the seperate webserver authorizing transactions is running on.
 *     dynatraceEndpoint?:    string  // The URL that the Authorizer will check against for Dynatrace Authorization.
 * }

FAQs

Package last updated on 16 Dec 2022

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