npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ieftool

v1.0.11

Published

Development tool for Azure B2C IEF policies

Downloads

879

Readme

Go port

A port of this package written in golang is available at https://github.com/judedaryl/go-ieftool. Both packages these packages will be supported. If you want to use the tool but do not want the node runtime that it requires, please check out the port.

About

ieftool is a cli library based on npm for uploading B2C TrustFramework Policies.

This tool makes it easier for B2C policies to be uploaded in-order based on the inheritance of a policy. Uploads are also faster because policies are uploaded by batch depending on its position on the inheritance tree.

src/
├─ social/
│  ├─ base.xml (1A_SBASE)
│  ├─ signupsignin.xml (1A_SSS)
├─ local/
│  ├─ base.xml (1A_LBASE)
│  ├─ signupsignin.xml (1A_LSS)
│  ├─ passwordreset.xml (1A_LPR)
├─ base.xml (1A_BASE)
├─ extension.xml (1A_EXT)

The example folder structure above has the following inheritance tree.

                1A_BASE
                    |
                 1A_EXT
                /      \
          1A_LBASE    1A_SBASE
           /    \        \      
       1A_LSS  1A_LPR    1A_SSS

These policies are then batched by their hierarchy in the tree, as well as their parent policy. The order of upload would then be.

  1. 1A_Base
  2. 1A_EXT
  3. 1A_LBASE, 1A_LSBASE
  4. 1A_LSS, 1A_LPR
  5. 1A_LSSS

Installation

Via npm

npm install -g ieftool

Via yarn

yarn global add ieftool

Supported node versions

ieftool only supports LTS releases, largely because it is using @azure/msal-node.

##Options

Usage: ieftool [options] [command]

Options:
  -V, --version     output the version number
  -h, --help        display help for command

Commands:
  deploy [options]
  help [command]    display help for command

deploy

The deploy command is responsible for uploading policies to B2C.

Usage: ieftool deploy [options]

Options:
  -t, --tenant_id <tenant_id>          B2C tenant id
  -c, --client_id <client_id>          App registration client id
  -s, --client_secret <client_secret>  App registration client secret
  -p, --path <path>                    Build path
  -h, --help                           display help for command

build

Usage: ieftool build [options]

Compiles B2C templates and policies

Options: -c, --config Specify the path to the b2c compiler configuration (default: "./b2c-template.json") -p, --source_path Specify the path to the templates folder (default: "./src") -o, --output_dir Specify the output folder (default: "./build") -h, --help display help for command

Usage

To upload policies into a B2C tenant.

ieftool deploy -t { tenant } -c { client_id } -s { client_secret } -p { source_path }

| option | description | |--|--| | tenant | The B2C tenant, this can either be the tenantId or the tenant name (mytenant.onmicrosoft.com)| | client_id | The client id of an app registration in B2C that has permissions for TrustFrameworkPolicies | | client_secret | The client secret of an app registration in B2C that has permissions for TrustFrameworkPolicies | | source_path | The path to your b2c policies. In the tree structure above it would be ./src |

To build policies

ieftool build -c { config_path } -p { source_path } -o { output_path }

| option | description | |--|--| | config | The path to the configuration file. Defaults to './b2c-template.json' | | source_path | The path to your b2c policies | | output_path | The path where the compiled policies are written to |