Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@janus-idp/backstage-plugin-aap-backend-dynamic
Advanced tools
The Ansible Automation Platform (AAP) Backstage provider plugin synchronizes the accessible templates including job templates and workflow job templates from AAP into the [Backstage](https://backstage.io/) catalog.
The Ansible Automation Platform (AAP) Backstage provider plugin synchronizes the accessible templates including job templates and workflow job templates from AAP into the Backstage catalog.
The AAP Backstage provider plugin allows the configuration of one or multiple providers using the app-config.yaml
configuration file of Backstage.
Run the following command to install the AAP Backstage provider plugin:
yarn workspace backend add @janus-idp/backstage-plugin-aap-backend
Use aap
marker to configure the app-config.yaml
file of Backstage as follows:
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 }
Configure the scheduler using one of the following options:
Method 1: If the scheduler is configured inside the app-config.yaml
using the schedule config key mentioned previously, add the following code to 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,
scheduler: env.scheduler,
}),
);
/* highlight-add-end */
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return router;
}
NOTE
If you have made any changes to the schedule in the app-config.yaml
file, then restart to apply the changes.
Method 2: Add a schedule directly inside the packages/backend/src/plugins/catalog.ts
file as follows:
/* 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: 30 },
timeout: { minutes: 3 },
}),
}),
);
/* highlight-add-end */
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return router;
}
NOTE
If both the schedule
(hard-coded schedule) and scheduler
(app-config.yaml
schedule) option are provided in the packages/backend/src/plugins/catalog.ts
, the scheduler
option takes precedence. However, if the schedule inside the app-config.yaml
file is not configured, then the schedule
option is used.
Run the following command to install the AAP Backstage provider plugin:
yarn workspace backend add @janus-idp/backstage-plugin-aap-backend
Use aap
marker to configure the app-config.yaml
file of Backstage . The default schedule is a frequency of 30 minutes and a timeout of 3 minutes, please configure the schedule in the app-config.yaml
as per your requirement.
catalog:
providers:
aap:
dev:
baseUrl: <URL>
authorization: 'Bearer ${AAP_AUTH_TOKEN}'
owner: <owner>
system: <system>
schedule: # optional (defaults to the configurations below if not provided); same options as in TaskScheduleDefinition
# supports cron, ISO duration, "human duration" as used in code
frequency: { minutes: 30 }
# supports ISO duration, "human duration" as used in code
timeout: { minutes: 3 }
Add the following code to the packages/backend/src/index.ts
file:
const backend = createBackend();
/* highlight-add-next-line */
backend.add(import('@janus-idp/backstage-plugin-aap-backend/alpha'));
backend.start();
When you start your Backstage application, you can see the following log lines:
[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
Once the AAP Backstage provider plugin is configured successfully, it synchronizes the templates including job templates and workflow job templates from AAP and displays them on the Backstage Catalog page as Resources.
Open your Backstage application and Go to the Catalog page.
Select Resource from the Kind drop-down and job template or workflow job template from the Type drop-down on the left side of the page.
A list of all the available templates from AAP appears on the page.
Select a template from the list.
The OVERVIEW tab appears containing different cards, such as:
About: Provides detailed information about the template.
Relations: Displays the visual representation of the template and associated aspects.
Links: Contains links to the AAP dashboard and the details page of the template.
Has subcomponents: Displays a list of associated subcomponents.
FAQs
The Ansible Automation Platform (AAP) Backstage provider plugin synchronizes the accessible templates including job templates and workflow job templates from AAP into the [Backstage](https://backstage.io/) catalog.
The npm package @janus-idp/backstage-plugin-aap-backend-dynamic receives a total of 3 weekly downloads. As such, @janus-idp/backstage-plugin-aap-backend-dynamic popularity was classified as not popular.
We found that @janus-idp/backstage-plugin-aap-backend-dynamic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.