Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 2.68 KB

File metadata and controls

51 lines (38 loc) · 2.68 KB

Workbench Core Infrastructure

⚠️ $\textcolor{red}{\text{Experimental}}$ ⚠️ : Not for use in any critical, production, or otherwise important deployments

Code Coverage

Statements Branches Functions Lines
Statements Branches Functions Lines

Description

Workbench core components are designed to work with existing infrastructure when available. When infrastructure is not available this package is here to help. This package serves two purposes. First, to help fill in the gaps where organizations are diverging from reference infrastructure, but still need to deploy a few elements. Second, to assist solution developers by providing easy to configure CDK style constructs which can be used as infrastructure building blocks in their solutions.

Components

WorkbenchCognito

The WorkbenchCognito component is a CDK construct which deploys an AWS Cognito User Pool. The User Pool will be initialized with a client application for the website URL provided in the properties. One may also initialized one or more OIDC provider configurations to allow for alternate single sign on providers to be utilized using the workbench-core-authentication package's Cognito interface.

Usage

First, install the package in your solution using your prefered package manager.

npm -i @aws/workbench-core-infrastructure

Import the

import { WorkbenchCognito, WorkbenchCognitoProps } from '@aws/workbench-core-infrastructure'
// import the OidcProvider properties interface if including a SSO component.
// import { WorkbenchUserPoolOidcIdentityProvider } from '@aws/workbench-core-infrastructure'

Next, set the properties and initialize the construct.

// ...
// within a CDK app or construct

// set the cognito properites.
// If a user pool name or user pool client name are not provided, CDK will generate them for you.
const cognitoProps: WorkbenchCognitoProps = {
  domainPrefix = 'myDomainPrefix',
  websiteUrl = 'https://mysite.mydomain.com',
  // oidcIdentityProviders = [ myWorkbenchUserPoolOidcIdentityProviderConfig ]
};

this.myWorkbenchCognito = new WorkbenchCognito(this, 'my-workbench-cognito', cognitoProps);

// ...
// the rest of your app/construct code.

Now build and deploy.