New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@janus-idp/backstage-plugin-aap-backend

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@janus-idp/backstage-plugin-aap-backend

The AAP Backstage provider plugin synchronizes the AAP content into the [Backstage](https://backstage.io/) catalog.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
increased by12.99%
Maintainers
1
Weekly downloads
 
Created
Source

AAP Backstage provider

The AAP Backstage provider plugin synchronizes the AAP content into the Backstage catalog.

For administrators

Installation

Run the following command to install the AAP Backstage provider plugin:

yarn workspace backend add @janus-idp/backstage-plugin-aap-backend

Configuration

AAP Backstage provider allows configuration of one or multiple providers using the app-config.yaml configuration file of Backstage.

Procedure

  1. Use a aap marker to start configuring the app-config.yaml file of Backstage:

    catalog:
      providers:
        aap:
          dev:
            baseUrl: <URL>
            authorization: 'Bearer ${AAP_AUTH_TOKEN}'
            owner: <owner>
            system: <system>
            schedule: # optional; same options as in TaskScheduleDefinition
              # supports cron, ISO duration, "human duration" as used in code
              frequency: { minutes: 1 }
              # supports ISO duration, "human duration" as used in code
              timeout: { minutes: 1 }
    
  2. Add the following code to packages/backend/src/plugins/catalog.ts file if has configured the scheduler inside the app-config.yaml:

    /* highlight-add-next-line */
    import { AapResourceEntityProvider } from '@janus-idp/backstage-plugin-aap-backend';
    
    export default async function createPlugin(
      env: PluginEnvironment,
    ): Promise<Router> {
      const builder = await CatalogBuilder.create(env);
    
      /* ... other processors and/or providers ... */
      /* highlight-add-start */
      builder.addEntityProvider(
        AapResourceEntityProvider.fromConfig(env.config, {
          logger: env.logger,
          scheduler: env.scheduler,
        }),
      );
      /* highlight-add-end */
    
      const { processingEngine, router } = await builder.build();
      await processingEngine.start();
      return router;
    }
    

if have not configured then add a schedule directly inside the packages/backend/src/plugins/catalog.ts file:

/* highlight-add-next-line */
import { AapResourceEntityProvider } from '@janus-idp/backstage-plugin-aap-backend';

export default async function createPlugin(
  env: PluginEnvironment,
): Promise<Router> {
  const builder = await CatalogBuilder.create(env);

  /* ... other processors and/or providers ... */
  /* highlight-add-start */
  builder.addEntityProvider(
    AapResourceEntityProvider.fromConfig(env.config, {
      logger: env.logger,
      schedule: env.scheduler.createScheduledTaskRunner({
        frequency: { minutes: 1 },
        timeout: { minutes: 1 },
      }),
    }),
  );
  /* highlight-add-end */

  const { processingEngine, router } = await builder.build();
  await processingEngine.start();
  return router;
}

Troubleshooting

When you start your Backstage application, you can see some log lines as follows:

[1] 2023-02-13T15:26:09.356Z catalog info Discovered ResourceEntity API type=plugin target=AapResourceEntityProvider:dev
[1] 2023-02-13T15:26:09.423Z catalog info Discovered ResourceEntity Red Hat Event (DEV, v1.2.0) type=plugin target=AapResourceEntityProvider:dev
[1] 2023-02-13T15:26:09.620Z catalog info Discovered ResourceEntity Red Hat Event (TEST, v1.1.0) type=plugin target=AapResourceEntityProvider:dev
[1] 2023-02-13T15:26:09.819Z catalog info Discovered ResourceEntity Red Hat Event (PROD, v1.1.0) type=plugin target=AapResourceEntityProvider:dev
[1] 2023-02-13T15:26:09.819Z catalog info Applying the mutation with 3 entities type=plugin target=AapResourceEntityProvider:dev

Keywords

FAQs

Package last updated on 14 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc