1.3.2 • Published 10 months ago

@optum/pontifex-aad v1.3.2

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

Contributors Forks Stargazers Issues MIT License

About The Project

Helper package for managing App Registrations, App Roles, and permission granting within Azure Active Directory.

Built With

Getting Started

Installation

  1. Clone the repo
    git clone https://github.com/Optum/pontifex-aad.git
  2. Install NPM packages
    npm install

Usage

Creating an App Registration and associated Service Principal

const application = await pontifex.application.create({
    "displayName": `${environment}-${request.applicationName}`,
    "api": {
        "requestedAccessTokenVersion": 2 // tell AAD to use v2 OAuth2 tokens
    }
})

context.log(`application created. objectId: ${application.id}, appId: ${application.appId}`)

context.log(`creating service principal for appId ${application.appId}`)
await pontifex.servicePrincipal.create(application.appId)

Granting Access to an App Role

const roleAssignmentId = await pontifex.servicePrincipal.grantPermission(clientServicePrincipal.id,
    resourceServicePrincipal.id, appRole.id)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the Apache 2.0 License. See LICENSE.txt for more information.

Maintainers

  • Alexander Aavang
    • GitHub Enterprise: aaavang
    • Email: alexander.aavang@optum.com, alex.aavang@gmail.com