2.3.1 • Published 1 year ago

@dt-esa/authorizer v2.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@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.
 * }
2.3.1

1 year ago

2.3.0

2 years ago

2.2.3

2 years ago

2.2.4

2 years ago

2.2.2

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.7.5

2 years ago

1.7.4

2 years ago

1.7.3

2 years ago

1.7.2

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago