A cache for @azure/msal-node that uses Azure KeyVault as a store

Overview


@intility/msal-keyvault-cache

A cache for @azure/msal-node that uses Azure KeyVault as a store.

pipeline package version

Usage

Install with

npm install @intility/msal-keyvault-cache

Then, initialize the cache and use it in your client configuration

import { PublicClientApplication } from "@azure/msal-node";
import keyVaultCache from "@intility/msal-keyvault-cache";

let cachePlugin = keyVaultCache("https://YOUR_KEYVAULT_HERE.vault.azure.net/");

let publicClientConfig = {
  auth: {
    clientId: "CLIENT_ID",
    authority: "https://login.microsoftonline.com/TENANT_ID",
  },
  cache: {
    cachePlugin,
  },
};

let publicClientApplication = new PublicClientApplication(publicClientConfig);

By default, it will authenticate to the KeyVault by using DefaultAzureCredential from '@azure/identity'. This means you can authenticate a number of ways. In CI you can use environment variables, and locally you can use the Azure CLI.

Syntax

let cachePlugin = keyVaultCache(keyVaultUrl);
let cachePlugin = keyVaultCache(keyVaultUrl, secretName);
let cachePlugin = keyVaultCache(keyVaultUrl, secretName, credential);

Parameters

keyVaultUrl

A JavaScript string containing the url to your Azure KeyVault.

secretName (optional)

  • Default Value: "msal-cache"

A JavaScript string containing the name of the secret.

credential (optional)

  • Default Value: new DefaultAzureCredential()

A Credential Class used to authenticate to the Azure KeyVault.

Return value

A cachePlugin that can be used in a @azure/msal-node Client Configuration.

You might also like...

Node.js library that provide a cache for file metadata or file content.

@file-cache A cache library for file metadata or file content. It is useful for process that work a given series of files and that only need to repeat

Aug 6, 2022

A MITM cache between RPCs and a a dAPP. Useful to allow for better performance on a public RPC node

better-cosmos-rpcs A cheaper way to allow for public RPCs as a service WITHOUT scaling issues. No need to rate limit either. How it is done: User GET

Nov 19, 2022

Async cache with dedupe support

async-cache-dedupe async-cache-dedupe is a cache for asynchronous fetching of resources with full deduplication, i.e. the same resource is only asked

Dec 8, 2022

open-source implementation of the Turborepo custom remote cache server.

open-source implementation of the Turborepo custom remote cache server.

This project is an open-source implementation of the Turborepo custom remote cache server. If Vercel's official cache server isn't a viable option, th

Dec 30, 2022

A GitHub Action to cache your workload to a Google Cloud Storage bucket.

A GitHub Action to cache your workload to a Google Cloud Storage bucket.

Google Cloud Storage Cache Action GitHub already provides an awesome action to cache your workload to Azure's servers hosted in United States. However

Dec 15, 2022

A cache that automatically removes the least-recently-used items

A cache that automatically removes the least-recently-used items

Feb 27, 2022

A demo to show how to re-use Eleventy Image’s disk cache across Netlify builds.

Re-use Eleventy Image Disk Cache across Netlify Builds Live Demo This repository takes all of the high resolution browser logos and processes them thr

Apr 5, 2022

proxy 🦄 yxorp is your Web Proxy as a Service (SAAS) Multi-tenant, Multi-Threaded, with Cache & Article Spinner

proxy 🦄 yxorp is your Web Proxy as a Service (SAAS) Multi-tenant, Multi-Threaded, with Cache & Article Spinner

proxy 🦄 yxorp is your Web Proxy as a Service (SAAS) Multi-tenant, Multi-Threaded, with Cache & Article Spinner. Batteries are included, Content Spinning and Caching Engine, all housed within a stunning web GUI. A unique high-performance, plug-and-play, multi-threaded website mirror and article spinner

Dec 30, 2022

An unreliable and overall unusable sorting library for numbers with a global cache on the edge.

unsort An unreliable and overall unusable sorting library for numbers with a global cache on the edge. the algorithm This library implements a number

May 19, 2022
Owner
Intility
Intility is a fully managed platform service that covers all areas of your business. From your managed computer to the server hosting your applications.
Intility
A remote nodejs Cache Server, for you to have your perfect MAP Cache Saved and useable remotely. Easy Server and Client Creations, fast, stores the Cache before stopping and restores it again!

remote-map-cache A remote nodejs Cache Server, for you to have your perfect MAP Cache Saved and useable remotely. Easy Server and Client Creations, fa

Tomato6966 8 Oct 31, 2022
JavaScript Express.js app serving static vanilla JS. This sample app is used in Microsoft Docs to demonstrate how to integrate Azure Storage, Azure Cosmos DB, and Azure Active Directory.

JavaScript on Azure Learn Path - Module 2 - Deploying a basic app to Azure This Learn module requires the following Azure resources to deploy correctl

Azure Samples 13 Dec 31, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Chat app using Azure Web PubSub, Static Web Apps and other Azure services

Chatr - Azure Web PubSub Sample App This is a demonstration & sample application designed to be a simple multi-user web based chat system. It provides

Ben Coleman 55 Dec 31, 2022
Vamos a realizar un juego muy sencillo en TypeScript, posteriormente lo vamos a desplegar en Microsoft Azure con Servicio de Azure Static Web Apps.

Taller TypeScript Descripción Vamos a realizar un juego muy sencillo en TypeScript, posteriormente lo vamos a desplegar en Microsoft Azure con Servici

Manuel Ortiz 7 Oct 10, 2022
A modern SQLite store for node-cache-manager

SQLite store for node cache manager A modern SQlite cache store for node-cache-manager. Featuring: Async SQLite3 using sqlite3 async/await support wit

Zohaib Sibte Hassan 40 Oct 31, 2022
Webpage for a leaderboard list app that uses the Leaderboard api to store the highscores for a game

Leaderboard This Webpage is for a leaderboard list app that uses the Leaderboard api to store the highscores for a game. This is one of my first exper

Zeeshan Haider 7 Mar 12, 2022