MapColonies Authentication
    Preparing search index...

    Module @map-colonies/auth-bundler

    A library to facilitate creating authentication bundles for consumption with Open Policy Agent.

    The library has two main parts:

    • createBundle - A function to create the bundles.
    • BundleDatabase - A helper class to make all the required database actions when creating a bundle.

    auth-bundler

    A library to facilitate creating authentication bundles for consumption with Open Policy Agent.

    TBD

    The package uses handlebars for templating the asset files. When running, the engine is supplied an array containing all the connections for the bundle to use for templating.

    For convenience we have added the following helper function to aid creating json files:

    Escapes the given string using the JSON.stringify function.

    # input
    {
    {{escapeJson name}}: {{ enabled }}
    }

    # result
    {
    "avi": true
    }

    Templated in a loop with , as a delimiter. useful for JSON arrays / objects.

    # input
    [
    {{#delimitedEach .}}
    {
    "name": {{ name }}
    }
    {{/delimitedEach}}
    ]

    # result
    [
    {
    "name": avi
    }
    ,{
    "name": iva
    }
    ]

    Classes

    BundleDatabase
    KeyNotFoundError
    MissingPolicyFilesError
    OpaBundleCreationError
    OpaCoverageTooLowError
    OpaNotFoundError
    OpaTestsFailedError
    WorkdirNotFoundError

    Interfaces

    BundleContent
    BundleContentVersions
    TestOptions

    Functions

    computeRevision
    createBundle

    logger

    setLogger