Skip to main content

@reapit-cdk/entra-id-application

npm version npm downloads coverage: 0%25 Integ Tests: X

This construct creates and manages a Microsoft Entra ID Application

Package Installation:

yarn add --dev @reapit-cdk/entra-id-application
# or
npm install @reapit-cdk/entra-id-application --save-dev

Usage

import { CfnOutput, Stack, App, Duration } from 'aws-cdk-lib'
import { EntraIDApplication } from '@reapit-cdk/entra-id-application'
import { Secret } from 'aws-cdk-lib/aws-secretsmanager'

const app = new App()
const stack = new Stack(app, 'stack-name')
const entraApp = new EntraIDApplication(stack, 'entra-id-app', {
  /**
   * 1. Create an application in Entra ID with scopes:
   *  - Application.ReadWrite.All
   * 2. Create a client secret which lasts a day
   * 3. Run the setup script and follow the instructions from there.
   * (Clone the repo
   *  run yarn
   *  cd packages/constructs/entra-id-application
   *  yarn setup
   *    --clientId <client id aka app id>
   *    --clientSecret <client secret value>
   *    --tenantId <your tenant id>
   *    --keyId <secret id>
   * )
   */
  bootstrapClientSecret: Secret.fromSecretCompleteArn(stack, 'bootstrap-client-secret', 'bootstrap-client-secret-arn'),
  config: {
    displayName: 'My Application',
    requiredResourceAccess: [
      {
        resourceAppId: '00000003-0000-0000-c000-000000000000', // microsoft graph
        resourceAccess: [
          {
            id: '14dad69e-099b-42c9-810b-d002981feec1', // user: profile
            type: 'Scope',
          },
          {
            id: '37f7f235-527c-4136-accd-4a02d197296e', // user: openid
            type: 'Scope',
          },
          {
            id: '64a6cdd6-aab1-4aaf-94b8-3cc8405e90d0', // user: email
            type: 'Scope',
          },
        ],
      },
    ],
    web: {
      redirectUris: ['https://example.org'],
    },
  },
})

const { secret } = entraApp.createKey(stack, 'key', {
  keyInfo: {
    displayName: 'api',
  },
  validFor: Duration.days(31),
})

new CfnOutput(stack, 'appId', {
  value: entraApp.getAttString('appId'),
})

new CfnOutput(stack, 'client-secret-arn', {
  value: secret.secretArn,
})

// This is the client secret (don't do this)
new CfnOutput(stack, 'client-secret-secretText', {
  value: secret.secretValueFromJson('secretText').toString(),
})

Metadata

Release files for reapit-cdk.entra-id-application 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reapit-cdk.entra-id-application 0.1.0
File Size Uploaded Provenance Actions
reapit-cdk.entra-id-application-0.1.0.tar.gz 259.3 kB Without provenance Details for reapit-cdk.entra-id-application-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reapit-cdk.entra-id-application 0.1.0
File Interpreter ABI Platform Actions
reapit_cdk.entra_id_application-0.1.0-py3-none-any.whl Python 3 none any Details for reapit_cdk.entra_id_application-0.1.0-py3-none-any.whl

Total release size: 523.0 kB

Release files / reapit-cdk.entra-id-application-0.1.0.tar.gz

Download URL reapit-cdk.entra-id-application-0.1.0.tar.gz
Size 259.3 kB
Tags Source
SHA-256 checksum
How to use checksums
08979b595a3e63ba047b63a7d3bf522b0f1b958816a79e9114b923c48f16fea9
BLAKE2b-256 checksum
How to use checksums
dc9f04926a7881cad677459212fb3849b701594b1d2700290d8a065b9e485e3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / reapit_cdk.entra_id_application-0.1.0-py3-none-any.whl

Download URL reapit_cdk.entra_id_application-0.1.0-py3-none-any.whl
Size 263.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35a2e26c3d2675a8bbcea8bce162438521d6671c7d36a348d0bc52220203815e
BLAKE2b-256 checksum
How to use checksums
d937c4e3baff07f69d4ff0447fa90e1d212ef58e148537ded80a581a957ca45d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Security for reapit-cdk.entra-id-application 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page