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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reaatech/secret-rotation-provider-gcp

v0.1.0

Published

GCP Secret Manager provider for Secret Rotation Kit

Downloads

147

Readme

@reaatech/secret-rotation-provider-gcp

npm version License: MIT CI

Status: Pre-1.0 — APIs may change in minor versions. Pin to a specific version in production.

GCP Secret Manager adapter for Secret Rotation Kit. Implements the SecretProvider interface using the @google-cloud/secret-manager SDK.

Installation

npm install @reaatech/secret-rotation-provider-gcp @google-cloud/secret-manager
# or
pnpm add @reaatech/secret-rotation-provider-gcp @google-cloud/secret-manager

@google-cloud/secret-manager is an optional peer dependency, loaded lazily at runtime. Install it alongside this package; if it's missing the adapter throws a clear error telling you to install it.

Feature Overview

  • Full SecretProvider implementation — CRUD, versioning, rotation sessions, and health checks
  • Label-based rotation tracking — uses rotation-status and pending-version labels (GCP has no native stage labels)
  • Custom endpoints — support for emulators and private API endpoints
  • Automatic version tracking — new writes create new versions automatically

Quick Start

import { GCPProvider } from '@reaatech/secret-rotation-provider-gcp';
import { RotationManager } from '@reaatech/secret-rotation-core';

const provider = new GCPProvider({ projectId: 'my-gcp-project' });
const manager = new RotationManager({ providerInstance: provider });
await manager.rotate('my-secret');

API Reference

GCPProvider

Constructor

new GCPProvider(config: GCPProviderConfig)

GCPProviderConfig

| Property | Type | Required | Description | |----------|------|----------|-------------| | type | "gcp" | Yes | Discriminator | | projectId | string | Yes | GCP project ID | | endpoint | string | No | Custom endpoint for emulators or private APIs |

SecretProvider Methods

| Method | Description | |--------|-------------| | createSecret(name, value) | Create a new secret with replication set to automatic | | getSecret(name, version?) | Get secret value. Defaults to latest version. | | storeSecretValue(name, value, options?) | Add a new version. { stage: "pending" } sets rotation-status: pending label. | | deleteSecret(name, options?) | Delete a secret | | listVersions(name) | List all versions with labels | | getVersion(name, versionId) | Get a specific version's value | | deleteVersion(name, versionId) | Destroy a specific version | | supportsRotation() | Returns true | | beginRotation(name) | Creates a session. Marks the latest version as pending via label. | | completeRotation(session) | Promotes pending version by removing the rotation-status label | | cancelRotation(session) | Removes rotation labels from pending version | | health() | Lightweight health check using listVersions with page size 1 | | capabilities() | Returns supportsRotation: true, supportsVersioning: true, supportsLabels: true |

Rotation Flow

beginRotation()           → marks latest version with rotation-status label
storeSecretValue(pending) → creates new version with pending label
completeRotation()        → removes rotation-status, promotes pending version
cancelRotation()          → cleans up rotation labels

Usage Patterns

Explicit Provider Instance

import { GCPProvider } from '@reaatech/secret-rotation-provider-gcp';
import { RotationManager } from '@reaatech/secret-rotation-core';

const provider = new GCPProvider({ projectId: 'my-gcp-project' });
const manager = new RotationManager({ providerInstance: provider });

Dynamic Provider Selection

import '@reaatech/secret-rotation-provider-gcp'; // registers 'gcp' type
import { createProvider } from '@reaatech/secret-rotation-types';

const provider = createProvider({ type: 'gcp', projectId: 'my-gcp-project' });

Related Packages

License

MIT