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

@ovotech/berglas-node

v1.1.4

Published

Node library for decrypting Berglas secrets

Downloads

41

Maintainers

irina.dimitriuirina.dimitriupuzzledbythewebpuzzledbythewebpaul.gallagherpaul.gallaghermike.hollowaymike.hollowaypedro.caldeirapedro.caldeiraharrisonbaxterharrisonbaxterrob.desboisrob.desboissophiar27sophiar27ion.nasuion.nasumanoj-ovomanoj-ovojeffer_ovojeffer_ovobohdan-kozeremabohdan-kozeremaryan.lee1ryan.lee1zolegovozolegovopablomuro-ovotechpablomuro-ovotechirena3888irena3888dvoroniuc-ovodvoroniuc-ovoarpad.fesis.ovoarpad.fesis.ovopkoretsovopkoretsovomarknreynoldsmarknreynoldsovotarasrusyniakovotarasrusyniakgabriel.hulubeigabriel.hulubeijnysevillajnysevillapallaitpallaitmableyipmableyipshonnguenshonnguenik1004kaluzaik1004kaluzakseniya.belevichkseniya.belevichwillshawmediawillshawmediajoewhittlesjoewhittlesrachelknightkaluzarachelknightkaluzaphilip.fol.ovophilip.fol.ovozach-smith-kzazach-smith-kzaphala.kantanphala.kantanmikitadzianisevichmikitadzianisevichromans-ovoromans-ovoiain.rawson.ovoiain.rawson.ovokantan_m_rutterkantan_m_rutterruhi-choudhury-kaluzaruhi-choudhury-kaluzacohen990-ovocohen990-ovoandrew-brook-radandrew-brook-radsean-kantansean-kantangeorge.anthonygeorge.anthonyovoxovoxeloisechilverseloisechilverskaluzajianzukaluzajianzumikemchughmikemchughtrickkaluzatrickkaluzadavid.ovodavid.ovojubriljubrilsophiesillmanovosophiesillmanovoemmadavidsemmadavidsharry.faulknerharry.faulknerwillcorrigan-ovowillcorrigan-ovoedvinas.ovoedvinas.ovojadamiec-ovojadamiec-ovocrektekcrektekandrewinci-devandrewinci-devmbartish_ovombartish_ovosaamiyayousufsaamiyayousufveljko.popovicveljko.popovicvipul_vkvipul_vkcenkovic_ovocenkovic_ovozoelanhamzoelanhampedro.costa.kaluzapedro.costa.kaluzaekeith-kaluzaekeith-kaluzaiharea-ovoiharea-ovogracydegracydemihaidavidovomihaidavidovokupxckupxcwill.crickwill.crickandreiracasan-ovoandreiracasan-ovokim-wysocki-ovokim-wysocki-ovostumacovostumacovooep-accounts-botoep-accounts-botfiloseovofiloseovotombolineptombolinepnick.longnick.longmorris27skymorris27skylaurawadylaurawadydaniel-billing-foundationsdaniel-billing-foundationscallumdenbycallumdenbyabilash999abilash999tigranargittigranargitsrinivas.badasrinivas.badastevedaykaluzastevedaykaluzakelemensanyikelemensanyiwarren-ovowarren-ovocatalin.andreicatalin.andreibilaal-kaluzabilaal-kaluzajacktreblejacktreblenish1406nish1406hentielouwhentielouwdtheasby-kaluzadtheasby-kaluzaovo.backstage.adminsovo.backstage.adminsdlaird-ovodlaird-ovogarylaikaluzagarylaikaluzarsh-ovorsh-ovogabrielngovogabrielngovorobert-g-jrobert-g-jdarinakulishovodarinakulishovotommaso.brunotommaso.brunodjmelonzdjmelonzr.midykr.midykjamieovojamieovoluke.parsons.kaluzaluke.parsons.kaluzabisongeebisongeeolliebatchelorolliebatchelormikecsmith-ovomikecsmith-ovogordokgordokandymay44andymay44mark-b-ovomark-b-ovobrianbroughtonbrianbroughtonmaricel-ovomaricel-ovotc-kaluzatc-kaluzaiuna4eiuna4efulvio.ovofulvio.ovochris.brookeschris.brookesivan.mihov-ovoivan.mihov-ovoprashant16prashant16aleksandyraleksandyrmishabrumlmishabrumlmarkwood23markwood23lilbyteltdlilbyteltdfraserhamiltonovofraserhamiltonovothomas.finchthomas.finchbenjamin.goldingbenjamin.goldingmosman128mosman128wjbenfoldwjbenfoldovo-markswafferovo-markswafferjcholewajcholewabenaston13benaston13bookings-teambookings-teamvitalii_khudenkovitalii_khudenkoandbrssandbrssezio-intravaia-ovoezio-intravaia-ovostevendiplockstevendiplockgeorgexcollinsgeorgexcollinslaxmi06laxmi06shnistshnistmaieutiquermaieutiquerorion-botorion-botkingfruit85kingfruit85caolan.derrycaolan.derrymanikant16manikant16stefan-dospinescu-ovostefan-dospinescu-ovobare7aovobare7aovojlucktayjlucktaylewisdick-ovolewisdick-ovophil-pinkowskiphil-pinkowskirekaelek-ovorekaelek-ovokaluziankaluzianeugenovoeugenovodyl349dyl349wtaylor-ovowtaylor-ovobizval-botbizval-botdangrebovicdangrebovicmwidurekmwidurekraluzaraluzabrettburman-codebrettburman-coderichard-mounterrichard-mountermiguel-catarinomiguel-catarinojrdavenportjrdavenportoeptariffsoeptariffsmikethorpe-ovomikethorpe-ovodavekaluzadavekaluzatarlingovotarlingovomesh00mesh00jthomasovojthomasovopropspropsadam-mcdevittadam-mcdevittvslepkanvslepkanmelcbuckovmelcbuckovvkovetskyivkovetskyidelaluzadelaluzarafael_kaluzarafael_kaluzararaujo-ovoraraujo-ovozyuriizyuriimarcuskiellymarcuskiellymichaelwheelermichaelwheelerxenjkexenjkesulgee.kimsulgee.kimcifdsocifdsoliam-chambersliam-chambersr0bturnerr0bturnerveselin.stamenovveselin.stamenovadamblance-kaluzaadamblance-kaluzakathryn.allankathryn.allanlewrightlewrightfriendigofriendigoovo-jamesovo-jamesovo-dcovo-dcsamrumley88samrumley88t.vytrykusht.vytrykushmetering-reads-health-botmetering-reads-health-botkuwotukuwotudarren_thomas_ovodarren_thomas_ovolughinolughinojchoskinsjchoskinsovotech-identityovotech-identityvkobyletskyi_ovovkobyletskyi_ovojamesnoble1jamesnoble1david.regula.ovodavid.regula.ovodanmalydanmalyvasil.dininskivasil.dininskiandy-heywood-ovoandy-heywood-ovotom.harrison-ovotom.harrison-ovocristinapetrovcristinapetrovk-fernandezk-fernandezvukovovukovocarolinelywoodcarolinelywoodprtn-ovoprtn-ovom_healdm_healdlaurierwlaurierwcsillabarnacsillabarnamarina-ovomarina-ovojennyunchanjennyunchanpaceteamkaluzapaceteamkaluzatrading-and-dispatchtrading-and-dispatchpkaripkariretail-payg-techretail-payg-techcwkaluzacwkaluzaaccrecovoaccrecovolenardprattovolenardprattovoesra.kayaesra.kayaovo.trading.techovo.trading.techsimonmclean-ovosimonmclean-ovoqe-teamqe-teamjonnyleakaluzajonnyleakaluzaovotech-smart-thermostatovotech-smart-thermostatscott-thomson239scott-thomson239laranjoeduardolaranjoeduardoaga-ovoaga-ovogregshielkaluzagregshielkaluzarise-teamrise-teamnevenablagoevanevenablagoevascdfscdfandrewjtnandrewjtnmbrignallmbrignallronald.nsabiyeraronald.nsabiyerajcdclarkjcdclarkengagement-insightsengagement-insightsaskomaroaskomaroovo_steveovo_stevermcnovormcnovofreddybushboyfreddybushboyovo-aarongibbisonovo-aarongibbisonmadalinadulhacmadalinadulhacvcheban-ovovcheban-ovogordonmartingordonmartinievgen-paliichuk-ovoievgen-paliichuk-ovofahedarshadfahedarshadellafutkowskaellafutkowskachrisfordkaluzachrisfordkaluzashubham-npm-ovoshubham-npm-ovojameswelshkaluzajameswelshkaluzapetro.pavlenkopetro.pavlenkovzahakailovzahakailoharvey-appletonharvey-appletonmwzmwzdominicboston-kaluzadominicboston-kaluzajoepurnell-ovojoepurnell-ovoradhika-bijibillaradhika-bijibillag-tibbsg-tibbsjagreenwood1jagreenwood1vcobzaruvcobzarudwfullertondwfullertonper.linnettper.linnettedpatrick-ovoedpatrick-ovomattgrayovomattgrayovokimnilkimnilbenvaughanjonesbenvaughanjonessamwestsamwestmtardugno-ovomtardugno-ovogjain-npm-ovogjain-npm-ovoalexvicolovoalexvicolovorparkhomchukrparkhomchukweiliangc3weiliangc3mykola.pmykola.povo-joshovo-joshcbousiecbousiedavid.chellapah.ovodavid.chellapah.ovofranciscodiasovofranciscodiasovovmaryvmarya.calderwooda.calderwoodjamesbaumjamesbaumretrojetpacksretrojetpackssamcooper720xsamcooper720xlebaptistelebaptisteiovana.pavloviciiovana.pavlovicitom.shermantom.shermanmyovo-self-serve-service-accountmyovo-self-serve-service-accountadmrplyadmrplyserena-ahahserena-ahahalicia.bowersalicia.bowerskelvedenkelvedenmike.waltersmike.walterskhadra.ismail2khadra.ismail2tashacallowtashacallowalan_smith_ovoalan_smith_ovorohith-kaluzarohith-kaluzaylukomskyi-corgiylukomskyi-corgiachagan_kaluzaachagan_kaluzamike-gregory-kaluzamike-gregory-kaluzathomasgdanethomasgdaneangloxangloxmladjan-perceptivemladjan-perceptiveamolrindheamolrindhesujitkumar.shilsujitkumar.shilnathanmarshovonathanmarshovoandrixbandrixbtudor.harries-kaluzatudor.harries-kaluzabphenriqueskaluzabphenriqueskaluzaanthony_tonevanthony_tonevmichal-at-kantanmichal-at-kantannick-ovoxnick-ovoxasellickasellicknpmpwoonpmpwoostewart-kantanstewart-kantanjamie-ebjamie-ebluis.gashiluis.gashin-jeremic-npmn-jeremic-npmanthonykaluzaanthonykaluzajackbott-ovojackbott-ovoklaudia.marzecklaudia.marzecponchosbponchosboliwia-lakatoszoliwia-lakatoszluke-adams-ovoluke-adams-ovojgokjgokdela_kaluzadela_kaluzamaxandre.zilsmaxandre.zilschris-cooney-ovochris-cooney-ovoadam.vileadam.viledhasovodhasovosamrushtonsamrushtonmaxatkomaxatkomiksgmiksgbindubpbindubpettie.eyreettie.eyreian.whiteian.whitejonnycundalljonnycundallmars-rovermars-roverape-teamape-teamkgray-kaluzakgray-kaluzadaogilviedaogilviekaluza-devexkaluza-devexohs-auroraohs-aurorakaluza-rnrkaluza-rnripa-botipa-botgideoncaspigideoncaspikawbotkawbotdata.discovery.ovodata.discovery.ovoovotech-sgovotech-sgovotech-qsovotech-qstomshawovotomshawovopotsecpotsecrosario-ovorosario-ovozoejmzoejmpeterh-ovopeterh-ovoapjmapjmovoenergyappsovoenergyappshomemoveshomemovesovo-oot-botovo-oot-botcp-ui-toolingcp-ui-toolingovo-bit-techovo-bit-techsir_hisssir_hiss

Keywords

Readme

Overview

Node library to interact with Berglas-managed secrets in Google Cloud Platform.

Usage

Installation

yarn add @ovotech/berglas-node

Use Case

Currently, Berglas only supports the Go runtime on Cloud Functions. With this library, one is able to use Berglas secrets while running NodeJS functions on Cloud Functions.

Interact

The library has two main functions: resolve and substitute.

resolve retrieves and deciphers a single Berglas secret. substitute replaces environment variables values beginning with the Berglas prefix (berglas://) in the process with their resolved values.

Examples

Resolving a single secret

// index.js

import { resolve } from "@ovotech/berglas-node";

let mySecret;

async function funcThatNeedsSecret() {
  if (!mySecret) {
    mySecret = await resolve(PROJECT_ID, "secrets-bucket/mySecret");
  }

  // Use deciphered secret value;
}

funcThatNeedsSecret();

Substituting all environment vars at the start of an application

// index.js

// Before:
// process.env.FOO=berglas://secrets-bucket/foo

import { substitute } from "@ovotech/berglas-node";

async function main() {
  await substitute();

  // Run application, pulling secrets from environvment vars
  // After: process.env.FOO=bar
}

main();

Future

This is a very simplistic library to get basic Berglas functionality working in environvments like NodeJS on Cloud Functions. However, there is always room for improvement. Some ideas so far:

  • Synchronous versions of functions. The benefit here is that then substitute could run immediately upon import and make integration with applications more seamless (and we don't have to wait for top-level await!)
  • Listing, creating secrets

If you have any ideas or feature requests, please open an issue!

License

This library is licensed under the MIT license. Do what you want!