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

@seatgeek/backstage-plugin-catalog-backend-module-okta

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@seatgeek/backstage-plugin-catalog-backend-module-okta

This plugin offers the ability to ingest users and groups from the [Okta API](https://developer.okta.com/docs/reference/core-okta-api/) into the Backstage catalog.

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
40
increased by8.11%
Maintainers
0
Weekly downloads
 
Created
Source

@seatgeek/backstage-plugin-catalog-backend-module-okta

This plugin offers the ability to ingest users and groups from the Okta API into the Backstage catalog.

npm latest version

Installation

Install the @seatgeek/backstage-plugin-catalog-backend-module-okta package in your backend package:

# From your Backstage root directory
yarn add --cwd packages/backend @seatgeek/backstage-plugin-catalog-backend-module-okta

Then add the following config to your app-config.yml:

catalog:
  providers:
    okta:
      myOrganizationOkta:
        apiToken: ${OKTA_TOKEN}
        url: https://my-organization.okta.com

Then import OktaOrgDiscoveryEntityProvider into your Backstage application's packages/backend/src/plugins/catalog.ts and add it to the CatalogBuilder.

import { OktaOrgDiscoveryEntityProvider } from '@seatgeek/backstage-plugin-catalog-backend-module-okta';

// ...

export default async function createPlugin(
  env: PluginEnvironment,
): Promise<Router> {
  const builder = await CatalogBuilder.create(env);
  builder.addEntityProvider(
    ...OktaOrgDiscoveryEntityProvider.fromConfig(env.config, {
      logger: env.logger,
      schedule: env.scheduler.createScheduledTaskRunner({
        frequency: { days: 1 },
        timeout: { minutes: 5 },
      }),
      // query params passed to the okta api groups request
      listGroupsRequest: {
        filter: 'type Eq "TEAM"',
      },
      // transforms the okta api user object into a UserEntity
      userTransformer: oktaUser => ({
        apiVersion: 'backstage.io/v1alpha1',
        kind: 'User',
        metadata: {
          name: oktaUser.profile!.email!.split('@')[0],
        },
        spec: {
          profile: {
            displayName: oktaUser.profile!.displayName!,
          },
          memberOf: [],
        },
      }),
      // transforms the group api user object into a GroupEntity
      groupTransformer: oktaGroup => ({
        apiVersion: 'backstage.io/v1alpha1',
        kind: 'Group',
        metadata: {
          name: oktaGroup.profile!.name!.toLowerCase(),
          description: oktaGroup.profile?.description || '',
        },
        spec: {
          type: 'team',
          children: [],
          profile: {
            displayName: oktaGroup.profile!.name!,
          },
        },
      }),
    }),
  );
  // ...
}

FAQs

Package last updated on 24 Aug 2024

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