@ubiquious/backstage-plugin-audit-node
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

@ubiquious/backstage-plugin-audit-node

This library brings a middleware to audit every incoming request to Backstage.

Installation

// packages/backend/src/index.ts

import { auditMiddlware } from '@ubiquious/backstage-plugin-audit-node';
import { rootHttpRouterServiceFactory } from '@backstage/backend-app-api';

//

backend.add(
  rootHttpRouterServiceFactory({
    configure(context) {
      context.app.use(auditMiddlware(context.config, context.logger));
      context.applyDefaults();
    },
  }),
);

In the configuration, provider the URL of the audit backend. By default, it passes by localhost that is much secure.

# app-config.yaml

audit:
  url: 'http://localhost:7007/api/audit/receive' # Mandatory
  pluginName: 'audit' # Optional, default to "audit"
  bypassPaths: ['/my-sensitive-route'] # Optionnal, default to []
  bypassMethods: ['GET'] # Optionnal, default to []

Readme

Keywords

none

Package Sidebar

Install

npm i @ubiquious/backstage-plugin-audit-node

Weekly Downloads

17

Version

0.1.2

License

Apache-2.0

Unpacked Size

8.31 kB

Total Files

5

Last publish

Collaborators

  • imoverlord
  • tchoupinax