Comments (10)
Awesome! Glad everything is working for you now. Really appreciate your patience as we worked to sort this out.
from backstage.
After adding backend.add(import('@backstage/plugin-auth-backend-module-github-provider'));
in packages/backend/src/index.ts
, it's not giving above error but now getting below:
from backstage.
I am able to solve above error after adding below lines in my app-config.yaml
, But these things are not documented well in backstage docs, because I am setting up new backstage from scratch and I should not need to add this line explicitly
backend.add(import('@backstage/plugin-auth-backend-module-github-provider'));
app-config.yaml
auth:
# see https://backstage.io/docs/auth/ to learn about auth providers
environment: development
providers:
github:
development:
clientId: ${AUTH_GITHUB_CLIENT_ID}
clientSecret: ${AUTH_GITHUB_CLIENT_SECRET}
#below lines are extra in new backend system
signIn:
resolvers:
- resolver: usernameMatchingUserEntityName
from backstage.
Hi @prasoon-pxc, sorry you've had issues and the docs haven't been to helpful. We are actively working on that: #24195
Any new instances of Backstage will use the new backend system by default as of the 1.24.0
release from a few months ago. This means that you do need to add backend.add(import('@backstage/plugin-auth-backend-module-github-provider'));
to your backend index.ts
file and also add the signIn.resolvers
details in your config.
from backstage.
No problem, But I am wondering if that is the case with Github-org data doc as well because I am also getting problem on automating ingesting github users to backstage, I am looking more into it and will check if there is some document issue there as well :-)
from backstage.
Yes, that page needs to be updated as well. The migration guide here might help you in the mean time: https://backstage.io/docs/backend-system/building-backends/migrating#the-catalog-plugin:~:text=GithubMultiOrgEntityProvider%20and%20GithubOrgEntityProvider
from backstage.
@awanlin , I tried to add changes what is mentioned in above doc, but it's still not working.
Added github-org package:
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-github-org
packages/backend/src/index.ts
backend.add(import('@backstage/plugin-catalog-backend-module-github/alpha'));
backend.add(import('@backstage/plugin-catalog-backend-module-github-org'));
Apart from the above steps, I have used this doc to install required things.
My catalog.ts
file looks like this:
packages/backend/src/plugins/catalog.ts
import { CatalogBuilder } from '@backstage/plugin-catalog-backend';
import { ScaffolderEntitiesProcessor } from '@backstage/plugin-catalog-backend-module-scaffolder-entity-model';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
import { GitHubOrgEntityProvider } from '@backstage/plugin-catalog-backend-module-github';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
const builder = await CatalogBuilder.create(env);
//Added GITHUB ORG
builder.addEntityProvider(
GitHubOrgEntityProvider.fromConfig(env.config, {
id: 'production',
orgUrl: 'https://github.com/my-org',
logger: env.logger,
schedule: env.scheduler.createScheduledTaskRunner({
frequency: { minutes: 60 },
timeout: { minutes: 15 },
}),
}),
);
builder.addProcessor(new ScaffolderEntitiesProcessor());
const { processingEngine, router } = await builder.build();
await processingEngine.start();
return router;
}
Also, added github integration using Github-App
app-config.yaml
integrations:
github:
- host: github.com
apps:
- $include: my-githubapp.yaml
from backstage.
==Tried updated doc to configure it, did below steps:
I have setup Github-integration with github app using this doc also provide required permissions for Github-app to ingest users and teams
After that added below package:
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-github-org
added below line in packages/backend/src/index-tx
backend.add(import('@backstage/plugin-catalog-backend-module-github-org'));
app-config.yaml
integrations:
github:
- host: github.com
apps:
- $include: my-big-org.yaml
from backstage.
One of the items missing in my PR to updated the docs which you might be missing too is that you need to make sure to schedule it:
catalog:
providers:
githubOrg:
id: production
githubUrl: https://github.com
orgs: ['Org1', 'Org2']
schedule:
frequency: PT1H
timeout: PT50M
I've updated my PR to have this as well
from backstage.
@awanlin , thanks for update, indeed that was missing. Now, working as expected.
from backstage.
Related Issues (20)
- Techdocs generation problem with permissions enabled
- 🐛 Bug Report: oidc auth provider
- 🐛 Bug Report: Getting error with yarn workspace backend build HOT 3
- 🐛 Bug Report: Getting an error when creating a new project HOT 2
- 🚀 Feature: Describe how to add permissions framework with the new backend system HOT 5
- 🚀 Feature: Datadog without public URLs
- 🐛 Bug Report: Always get error from API when using proxy from backstage HOT 1
- 🐛 Bug Report: published @backstage/plugin-catalog-backend-module-gitlab v0.3.16 doesn't contain the GitlabOrgEntityProvider fix HOT 3
- 🚀 Feature: Allow Configuration options for catalog-backend-module-msgraph to be modified dynamically HOT 4
- 🚀 Feature: how to modify Catalog Entity's name length restriction. HOT 1
- 🐛 Bug Report: Search bar on techdocs is not working HOT 2
- 🚀 Feature: Hide "View Techdocs" button in component details
- 🐛 Bug Report: Adding Notifications Plugin to Backstage leads to TypeError
- 🚀 Feature: Documentation Request: Update "Input Examples" in 'Software Templates' section showing how to use placeholders HOT 2
- 💬 RFC: Catalog plugin: `spec.type` attribute on all entity kinds
- 🚀 Feature: Retrieve loading state from StorageApi HOT 2
- 🚀 Feature: Add signals support for UserSettingsStorage
- 🐛 Bug Report: Filtering of entites using the filter provided in the CatalogIndexPage HOT 1
- 🐛 Bug Report: oauth2Proxy auth provider can't find its configured sign-in resolvers HOT 1
- 🐛 Bug Report: by using static token, I can call any APIs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backstage.