merged master

Signed-off-by: Hao Luo <howlowck@gmail.com>
This commit is contained in:
Hao Luo
2022-10-04 00:45:20 -05:00
614 changed files with 18761 additions and 5696 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-user-settings': patch
---
Handle errors that may occur when the user logs out
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': patch
---
Making the description of the GitLab repoUrl owner field more clearer by focusing it refers to the GitLab namespace.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-org': patch
---
consistently show parent and child relations in group profile card
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-catalog-react': minor
'@backstage/plugin-catalog': patch
---
Implemented the visual parts of `EntityKindPicker` so that it can be shown alongside the other filters on the left side of your catalog pages.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-react': patch
---
Added two new `EntityRefLinks` props, the first being `getTitle` that allows for customization of the title used for each link. The second one is `fetchEntities`, which triggers a fetching of all entities so that the full entity definition is available in the `getTitle` callback.
+12
View File
@@ -0,0 +1,12 @@
---
'@backstage/create-app': patch
---
Newly created Backstage repositories now use the stable version 6 of
`react-router`, just like the main repo does. Please let us know if you find any
issues with this.
Migrating to the stable version of `react-router` is optional for the time
being. But if you want to do the same for your existing repository, please
follow [this
guide](https://backstage.io/docs/tutorials/react-router-stable-migration).
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-user-settings': patch
---
Prevent `.set()` to execute a request to the StorageClient if the user is `guest`
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-app-api': patch
---
Fixed a bug where gathered index routes would fail to bind routable extensions. This would typically show up when placing a routable extension in the entity page overview tab.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Tweak the Jest Caching loader to only operate when in `watch` mode
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/create-app': patch
---
Update versions of packages used in the create-app template, to match those in the main repo
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-test-utils': patch
---
Fixed handling of root scoped services in `startTestBackend`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': patch
---
Support custom layouts in dry run editor
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend': minor
---
Added a new property called `additionalTemplateGlobals` which allows you to add global functions to the scaffolder nunjucks templates.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Deep-import LightAsync component to improve module-import speed
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-app-api': patch
---
Added possibility to configure index plugin of the HTTP router service.
+37
View File
@@ -0,0 +1,37 @@
---
'@backstage/plugin-catalog': minor
---
Added new column `Label` to `CatalogTable.columns`, this new column allows you make use of labels from metadata.
For example: category and visibility are type of labels associated with API entity illustrated below.
YAML code snippet for API entity
```yaml
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: sample-api
description: API for sample
links:
- url: http://localhost:8080/swagger-ui.html
title: Swagger UI
tags:
- http
labels:
category: legacy
visibility: protected
```
Consumers can customise columns to include label column and show in api-docs list
```typescript
const columns = [
CatalogTable.columns.createNameColumn({ defaultKind: 'API' }),
CatalogTable.columns.createLabelColumn('category', { title: 'Category' }),
CatalogTable.columns.createLabelColumn('visibility', {
title: 'Visibility',
defaultValue: 'public',
}),
];
```
+14
View File
@@ -0,0 +1,14 @@
---
'@techdocs/cli': patch
'@backstage/plugin-techdocs-node': patch
---
fixing techdocs-cli Docker client creation
Docker client does not need to be created when --no-docker
option is provided.
If you had DOCKER_CERT_PATH environment variable defined
the Docker client was looking for certificates
and breaking techdocs-cli generate command even with --no-docker
option.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-auth-backend': minor
---
Google OAuth refresh tokens will now be revoked on logout by calling Google's API
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-plugin-api': patch
---
Allow interfaces to be used for inferred option types.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-defaults': patch
---
Added root logger service to the set of default services.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-user-settings': patch
---
Update installation instructions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-tech-insights': patch
---
making available the search for the last FACTS executed
+11
View File
@@ -0,0 +1,11 @@
---
'@backstage/plugin-bitbucket-cloud-common': minor
---
Update Bitbucket Cloud models to latest OAS version.
The latest specification contained some BREAKING CHANGES
due to removed fields.
All of these fields are not used at other plugins, though.
Therefore, this change has no impact on other modules here.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search-backend': minor
---
Be less restrictive with unknown keys on query endpoint
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-vault-backend': patch
---
VaultBuilder.tsx renamed to VaultBuilder in order for module to be correctly loaded.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-github-issues': patch
---
Updated the `luxon` dependency to 3.x
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': minor
---
Add support for link to TechDocs and other links defined in template entity specification metadata on TemplateCard
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/test-utils': patch
'@backstage/plugin-cicd-statistics': patch
---
Align on the version of `@material-ui/icons` used, to `^4.9.1` like other packages in the main repo
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-github-issues': patch
'@backstage/plugin-github-pull-requests-board': patch
---
Properly filter on relations instead of the spec, when finding by owner
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-client': patch
---
Renamed argument in `validateEntity` from `location` to `locationRef`
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-common': patch
---
Fixed an issue where `getClient()` for a `pluginId` would return different clients and not share them
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': patch
---
Fixed a bug where entities provided without a location key would always replace existing entities, rather than updating them.
+80 -1
View File
@@ -175,5 +175,84 @@
"@backstage/plugin-vault-backend": "0.2.2",
"@backstage/plugin-xcmetrics": "0.2.29"
},
"changesets": []
"changesets": [
"blue-lions-greet",
"brave-peaches-brush",
"breezy-pots-worry",
"bright-rules-shout",
"calm-moose-fetch",
"calm-pianos-burn",
"clean-camels-sneeze",
"clever-ties-burn",
"cuddly-bikes-tease",
"curly-rats-itch",
"curvy-kiwis-fold",
"curvy-lemons-change",
"dry-shirts-attack",
"dull-rocks-warn",
"eleven-apples-accept",
"fair-tools-melt",
"fifty-berries-learn",
"grumpy-pans-knock",
"hot-geese-vanish",
"itchy-schools-run",
"kind-penguins-report",
"large-dingos-juggle",
"lazy-beds-pull",
"lazy-fireants-check",
"little-roses-rule",
"loud-dots-sit",
"lovely-peaches-fold",
"lucky-cows-boil",
"mean-spiders-design",
"mighty-lions-march",
"odd-pandas-suffer",
"odd-singers-taste",
"old-cobras-suffer",
"old-needles-brake",
"perfect-moose-drum",
"plenty-kids-fetch",
"plenty-laws-end",
"poor-clouds-ring",
"pretty-buttons-develop",
"quiet-dancers-jog",
"quiet-hats-kick",
"quiet-ligers-draw",
"rare-hotels-cough",
"red-dots-sleep",
"red-pants-rush",
"renovate-5da63a4",
"renovate-a02d90b",
"rich-carrots-reflect",
"rude-bulldogs-sleep",
"search-bobcats-love",
"search-cars-hide",
"search-clouds-begin",
"search-cycles-sniff",
"search-dull-planes-prove",
"search-rats-grin",
"selfish-turkeys-exist",
"shaggy-books-smell",
"silent-bees-repeat",
"silly-rules-join",
"sixty-items-nail",
"slow-mirrors-eat",
"smooth-tables-pull",
"soft-falcons-love",
"stupid-dragons-complain",
"sweet-insects-camp",
"swift-phones-cheat",
"tall-baboons-deliver",
"tender-drinks-drive",
"tender-parrots-peel",
"thick-kings-destroy",
"tiny-mails-bathe",
"tough-hairs-sparkle",
"twelve-melons-notice",
"warm-days-watch",
"wild-weeks-live",
"wise-ligers-scream",
"yellow-lemons-march",
"young-bugs-remember"
]
}
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-auth-backend': patch
---
Auth0 provider now supports optional `connection` and `connectionScope` parameters to configure social identity providers.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-gcalendar': patch
---
Fixed loader showing when user not signed in
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-jenkins-backend': patch
---
Fixed a bug where `extraRequestHeaders` configuration was ignored.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-app-backend': patch
---
Added alpha plugin implementation for the new backend system. Available at `@backstage/plugin-app-backend/alpha`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-plugin-api': patch
---
Added documentation for `createBackendModule`, with guidelines for choosing a module ID.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Switching off duplicated timestamp in case of logging via task logger in a custom action
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend': minor
---
Add `allowAutoMerge` option for `publish:github` action
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-api-docs': patch
---
Updated dependency `@asyncapi/react-component` to `1.0.0-next.43`.
+28
View File
@@ -0,0 +1,28 @@
---
'@backstage/plugin-search-react': minor
---
The search query state now has an optional `pageLimit` property that determines how many results will be requested per page, it defaults to 25.
Examples:
_Basic_
```jsx
<SearchResults query={{ pageLimit: 30 }}>
{results => {
// Item rendering logic is omitted
}}
</SearchResults>
```
_With context_
```jsx
<SearchContextProvider initialState={{ pageLimit: 30 }}>
<SearchResults>
{results => {
// Item rendering logic is omitted
}}
</SearchResults>
</SearchContextProvider>
```
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search-common': minor
---
There is a new property called `pageLimit` on the `SearchQuery` interface that specifies how many results should be returned per page.
+23
View File
@@ -0,0 +1,23 @@
---
'@backstage/plugin-search-react': minor
---
The `<SearchResultList />` component now accepts an optional property `disableRenderingWithNoResults` to disable rendering when no results are returned.
Possibility to provide a custom no results component if needed through the `noResultsComponent` property.
Examples:
_Rendering a custom no results component_
```jsx
<SearchResultList
query={query}
noResultsComponent={<ListItemText primary="No results were found" />}
/>
```
_Disable rendering when there are no results_
```jsx
<SearchResultList query={query} disableRenderingWithNoResults />
```
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/plugin-search-backend-node': patch
'@backstage/plugin-search-backend-module-pg': patch
'@backstage/plugin-search-backend-module-elasticsearch': patch
---
The search engine has been updated to take advantage of the `pageLimit` property on search queries. If none is provided, the search engine will continue to use its default value of 25 results per page.
+30
View File
@@ -0,0 +1,30 @@
---
'@backstage/plugin-search-react': minor
---
The `<SearchResultGroup />` component now accepts an optional property `disableRenderingWithNoResults` to disable rendering when no results are returned.
Possibility to provide a custom no results component if needed through the `noResultsComponent` property.
Examples:
_Rendering a custom no results component_
```jsx
<SearchResultGroup
query={query}
icon={<DocsIcon />}
title="Documentation"
noResultsComponent={<ListItemText primary="No results were found" />}
/>
```
_Disable rendering when there are no results_
```jsx
<SearchResultGroup
query={query}
icon={<DocsIcon />}
title="Documentation"
disableRenderingWithNoResults
/>
```
+14
View File
@@ -0,0 +1,14 @@
---
'@backstage/plugin-search-backend': minor
---
The query received by search engines now contains a property called `pageLimit`, it specifies how many results to return per page when sending a query request to the search backend.
Example:
_Returns up to 30 results per page_
```
GET /query?pageLimit=30
```
The search backend validates the page limit and this value must not exceed 100, but it doesn't set a default value for the page limit parameter, it leaves it up to each search engine to set this, so Lunr, Postgres and Elastic Search set 25 results per page as a default value.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-scaffolder': minor
---
EntityPickers now support flags to control when to include default namespace
in result
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-kubernetes-backend': patch
---
kubernetes service locator now take request context parameters
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/create-app': patch
---
Initializes a git repository when creating an app using @packages/create-app
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-kubernetes': patch
---
Fix infinite call bug in `useCustomResources` hook
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-auth-backend': patch
---
Fix GitLab provider setup so that it supports GitLab installations with a path in the URL.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Switch to upfront resolution of `swc-loader` in Webpack config.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-test-utils': patch
---
Increased test database max connection pool size to reduce the risk of resource exhaustion.
+12
View File
@@ -0,0 +1,12 @@
---
'@backstage/cli': patch
---
Removed `tsx` and `jsx` as supported extensions in backend packages. For most
repos, this will not have any effect. But if you inadvertently had added some
`tsx`/`jsx` files to your backend package, you may now start to see `code: 'MODULE_NOT_FOUND'` errors when launching the backend locally. The reason for
this is that the offending files get ignored during transpilation. Hence, the
importing file can no longer find anything to import.
The fix is to rename any `.tsx` files in your backend packages to `.ts` instead,
or `.jsx` to `.js`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-user-settings-backend': patch
---
Fix wrong import statement in `README.md`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/create-app': patch
---
Added `*.session.sql` Visual Studio Code database functionality files to `.gitignore` in the default template. This is optional but potentially helpful if your developers use Visual Studio Code; you can add a line with that exact value to your own root `.gitignore` if you want the same.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': patch
---
Make sure to stitch entities correctly after deletion, to ensure that their relations are updated.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': patch
---
Add support for `allowedOrganizations` and `allowedOwners` to the `AzureRepoPicker`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-tech-insights-backend': patch
---
Modify router endpoint to handle singular and collections of request parameters similarly.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
Added support for copy entity URL in entity page context menu
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-scaffolder-backend': patch
---
Ignore .git directories in Template Editor, increase upload limit for dry-runs to 10MB.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-cost-insights': patch
---
Fixed bug in `CostOverviewBreakdownChart` component where some datasets caused the cost overview breakdown chart to tear.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-app-api': patch
---
Properly export `rootLoggerFactory`.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-catalog-backend-module-github': patch
'@backstage/plugin-scaffolder-backend': patch
---
Updated the `moduleId` of the experimental module export.
+1 -1
View File
@@ -9,7 +9,7 @@ search:
- plugins/search/**/*
- plugins/search-*/**/*
- packages/search-*/**/*
docs-like-code:
techdocs:
- plugins/techdocs/**/*
- plugins/techdocs-*/**/*
- packages/techdocs-*/**/*
+3 -3
View File
@@ -33,7 +33,7 @@ jobs:
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.5
uses: backstage/actions/yarn-install@v0.5.6
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
@@ -63,7 +63,7 @@ jobs:
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.5
uses: backstage/actions/yarn-install@v0.5.6
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
@@ -178,7 +178,7 @@ jobs:
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.5
uses: backstage/actions/yarn-install@v0.5.6
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
+1 -1
View File
@@ -8,7 +8,7 @@ jobs:
cron:
runs-on: ubuntu-latest
steps:
- uses: backstage/actions/cron@v0.5.5
- uses: backstage/actions/cron@v0.5.6
with:
app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }}
private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }}
+4 -2
View File
@@ -26,7 +26,7 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.5
uses: backstage/actions/yarn-install@v0.5.6
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
@@ -55,7 +55,9 @@ jobs:
# not flagged as the latest release, which means that people will not get this
# version of the package unless requested explicitly
- name: publish nightly release
run: yarn workspaces foreach -v --no-private npm publish --tag nightly
run: |
yarn config set -H 'npmAuthToken' "${{secrets.NPM_TOKEN}}"
yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish --tag nightly
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+5 -4
View File
@@ -67,7 +67,7 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.5
uses: backstage/actions/yarn-install@v0.5.6
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
@@ -145,7 +145,7 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.5
uses: backstage/actions/yarn-install@v0.5.6
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
@@ -162,10 +162,11 @@ jobs:
# Publishes current version of packages that are not already present in the registry
- name: publish
run: |
yarn config set -H 'npmAuthToken' "${{secrets.NPM_TOKEN}}"
if [ -f ".changeset/pre.json" ]; then
yarn workspaces foreach -v --exclude=root --no-private npm publish --tag next
yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish --tag next
else
yarn workspaces foreach -v --exclude=root --no-private npm publish
yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+1 -1
View File
@@ -10,4 +10,4 @@ jobs:
if: github.repository == 'backstage/backstage'
steps:
- name: Issue sync
uses: backstage/actions/issue-sync@v0.5.5
uses: backstage/actions/issue-sync@v0.5.6
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
const prNumber = artifact.name.slice('pr_number-'.length)
console.log(`::set-output name=pr-number::${prNumber}`);
- uses: backstage/actions/re-review@v0.5.5
- uses: backstage/actions/re-review@v0.5.6
with:
app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }}
private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }}
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
if: github.repository == 'backstage/backstage' && ( github.event.pull_request || github.event.issue.pull_request )
steps:
- name: PR sync
uses: backstage/actions/pr-sync@v0.5.5
uses: backstage/actions/pr-sync@v0.5.6
with:
github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }}
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.5
uses: backstage/actions/yarn-install@v0.5.6
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
+5 -1
View File
@@ -53,6 +53,10 @@ jobs:
github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
# TODO(Rugvip): Remove the create-app dispatch once we've been on the release version for a while
script: |
const releaseVersion = require('./backstage/package.json').version;
if(releaseVersion.includes('next')) {
return;
}
console.log('Dispatching upgrade helper sync');
await github.rest.actions.createWorkflowDispatch({
owner: 'backstage',
@@ -61,6 +65,6 @@ jobs:
ref: 'master',
inputs: {
version: require('./backstage/packages/create-app/package.json').version,
releaseVersion: require('./backstage/package.json').version
releaseVersion
},
});
@@ -22,7 +22,7 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.5
uses: backstage/actions/yarn-install@v0.5.6
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
+6 -1
View File
@@ -41,13 +41,18 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Configure Git
run: |
git config --global user.email noreply@backstage.io
git config --global user.name 'GitHub e2e user'
- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.5
uses: backstage/actions/yarn-install@v0.5.6
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
+1 -1
View File
@@ -39,7 +39,7 @@ jobs:
run: yarn build
- name: Install mkdocs & techdocs-core
run: python -m pip install mkdocs-techdocs-core
run: python -m pip install mkdocs-techdocs-core==1.1.7 mkdocs==1.4.0
- name: techdocs-cli e2e test
working-directory: packages/techdocs-cli
+5
View File
@@ -39,6 +39,11 @@ jobs:
- uses: actions/checkout@v3
- name: Configure Git
run: |
git config --global user.email noreply@backstage.io
git config --global user.name 'GitHub e2e user'
- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.5
uses: backstage/actions/yarn-install@v0.5.6
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.5
uses: backstage/actions/yarn-install@v0.5.6
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
- name: storybook yarn install
+3
View File
@@ -149,3 +149,6 @@ cypress/cypress/*
# Possible leftover from build:api-reports
tsconfig.tmp.json
# vscode database functionality support files
*.session.sql
+8 -9
View File
@@ -91,7 +91,7 @@ _You can do this by using the [Adopter form](https://form.typeform.com/to/zcOaKi
| [HBO Max](https://hbomax.com) | [@mdb](https://github.com/mdb), [@nesta219](https://github.com/nesta219), [@nmische](https://github.com/nmische), [@hbomark](https://github.com/hbomark) | Developer portal hosting service catalog and API documentation, as well as cloud infrastructure details, operational visibility tools, and a custom plugin for browsing notable platform change events, such as deployments and configuration updates. |
| [RCHLO](https://www.riachuelo.com.br) & [MIDWAY](https://www.midway.com.br) | [@marcosborges](https://github.com/marcosborges), [@defaultbr](https://github.com/defaultbr) | Self-Service Platform |
| [HP Inc](https://www.hp.com) | [Damon Kaswell](https://github.com/dekoding) | DevEx engagement hub (dev portal: docs, standards, Q&A) and extensive assets catalog (APIs, services, code, data, etc.) for the pan-HP internal developer community. |
| [VMware](https://www.vmware.com) | [@mpriamo](https://github.com/mpriamo), [@krisapplegate](https://github.com/krisapplegate) | Part of [Tanzu Application Platform](https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/index.html) offering; internal developer portal |
| [VMware](https://www.vmware.com) | [Waldir Montoya](https://github.com/waldirmontoya25), [Kris Applegate](https://github.com/krisapplegate), [Jamie Klassen](https://github.com/jamieklassen) | Part of [Tanzu Application Platform](https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/index.html) offering; internal developer portal |
| [Ualá](https://www.uala.com.ar/) | [Santiago Bernal](https://github.com/sabernal) | Initial work being done to centralize documentation for all our microservices and APIs, as well as scaffolding new services and tracking code quality |
| [IKEA IT AB](https://www.ingka.com) | [@bjornramberg](https://github.com/bjornramberg), [@supriyachitale](https://github.com/supriyachitale) | Supporting engineers at scale with self serve access and connecting the dots of our engineering platform and services, enabling product teams to move faster and go further, and unleashing innovation, reuse and co-creation across the organisation. |
| [Invitae](https://www.invitae.com/en) | [@ryan-hanchett](https://github.com/ryan-hanchett), [@gmandler42](https://github.com/gmandler42) | Centralized Developer Experience portal, putting all of our tooling behind a single pane of glass and creating a living service catalog. |
@@ -171,7 +171,7 @@ _You can do this by using the [Adopter form](https://form.typeform.com/to/zcOaKi
| [AEB](https://www.aeb.com/) | [David Fankhänel](mailto:dfl@aeb.com) | Central developer platform for creating new apps via templates, getting an overview via software catalog, etc |
| [SALTO Systems](https://saltosystems.com) | [Ian Cowley](mailto:i.cowley@saltosystems.com) | Currently using Backstage as an internal documentation portal. |
| [Lummo](https://lummo.com) | [Anjul Sahu](mailto:anjul@lummo.com) | We are building the internal developer portal using Backstage and bringing up all integrations and service information at one place. |
| [Frontside](https://frontside.com/backstage) | [Taras Mankovski](mailto:taras@frontside.com) | An active community member and contributor, Frontside offers both custom development as well as enterprise support services to help teams get the most out of Backstage for the long-run. |
| [Frontside](https://frontside.com/backstage) | [Taras Mankovski](mailto:taras@frontside.com) | An active community member and contributor, Frontside offers both custom development as well as enterprise support services to help teams get the most out of Backstage for the long-run. |
| [Stepstone](https://www.stepstone.com/en/) | [Neil Kennedy](mailto:neil.kennedy@stepstone.com) | StepStone is using Backstage to solve problems around ownership and visibility of our applications. We have thousands of repos, multiple legacy systems and a growing platform that is hard to maintain. Backstage is forming the centre of our push to embrace the chaos. |
| [idwall](https://idwall.co) | [Rodrigo Catão Araujo](mailto:rodrigo@idwall.co) | Developer Portal for internal engineers to access service catalog, documentation, observability, infrastructure and internal tooling. |
| [Jaguar Land Rover](https://www.jaguarlandrover.com) | [Josh Walker](mailto:jwalke18@jaguarlandrover.com) | Users can request a Gitlab user, which creates a commit with the Terraform code. |
@@ -202,16 +202,15 @@ _You can do this by using the [Adopter form](https://form.typeform.com/to/zcOaKi
| [Skillz](https://skillz.com/) | [Peiman Jafari](https://github.com/peimanja) | Internal developers portal for technical documentations, components ownership and relationship, software templates and integrations with internal tools |
| [Telus](https://www.telus.com/en/) | [Leo Li](mailto:leo.li@telus.com), [Laurent Robichaud](mailto:laurent.robichaud@telus.com), [Seb Barre](https://github.com/sbarre) | Simplifying the developer experience through centralized team member portals. Our current focus includes the adoption of Tech Docs, Software Catalog, Software Templates, the plethora of plugins, and contributing features back to Backstage. 🤖 |
| [Fidelity Investments](https://fidelity.com) | [Ankita Upadhyay](mailto:ankita.upadhyay@fmr.com) | Getting started with the adoption for Monorepo projects |
| [Verisk](https://verisk.com) | [Callen Barton](mailto:#xw_architecture@verisk.com), [Kevin Johnson](mailto:#xw_architecture@verisk.com) | Developer portal to quickly create and deploy microservices. |
| [Verisk](https://verisk.com) | [Callen Barton](mailto:#xw_architecture@verisk.com), [Kevin Johnson](mailto:#xw_architecture@verisk.com) | Developer portal to quickly create and deploy microservices. |
| [iodigital](https://iodigital.com) | [Jan-Willem Mulder](mailto:jan-willem.mulder@iodigital.com) | Internal developer portal for discovery of applications, projects and teams. Using several plugins like the Software Catalog and Tech Insights for promoting best practices and supporting our SDLC toolchain |
| [Fanatics](https://www.fanaticsinc.com/) | [Rory Scott](mailto:rscott@fanatics.com) | Internal Portal consolidating documentation, making it easier to manage applications, internal developer community platform, and self-service cloud infrastructure + pipelines. |
| [Appfolio](https://appfolio.com) | [Andy Vaughn](mailto:andy.vaughn@appfolio.com) | Internal software catalog, tech radar, documentation portal to disambiguate software and domain ownership, foster exploration of available developer platform services and tools, improve communication, democratize documentation and knowledge sharing, and coordinate the software lifecycle; all in service of a best-in-class developer experience. |
| [isaac](https://isaac.com.br/) | [Leonardo Borges](mailto:leonardo.borges@isaac.com.br), [Ordilei Souza](mailto:ordilei.souza@isaac.com.br) | We're using Backstage as our Internal Developer Portal and main microservices catalog for mapping ownership, health and metrics for each one. |
| [Paraná Banco](https://site.paranabanco.com.br/) | [Joao Antunes](mailto:joaopma@pbtech.net.br) | Internal software catalog, documentation and ownership, improve communication, democratize documentation and knowledge sharing, and coordinate the software lifecycle; all in service of a best-in-class developer experience. |
| [Stone](https://stone.com.br/) | [Levy Fialho](mailto:lfialho@stone.com.br) | We're using Backstage as our Credit Team Developer Portal and microservices catalog for mapping ownership. We are also using mkdocs for microservices documentation. |
| [Paraná Banco](https://site.paranabanco.com.br/) | [Joao Antunes](mailto:joaopma@pbtech.net.br) | Internal software catalog, documentation and ownership, improve communication, democratize documentation and knowledge sharing, and coordinate the software lifecycle; all in service of a best-in-class developer experience. |
| [Stone](https://stone.com.br/) | [Levy Fialho](mailto:lfialho@stone.com.br) | We're using Backstage as our Credit Team Developer Portal and microservices catalog for mapping ownership. We are also using mkdocs for microservices documentation. |
| [REI](https://www.rei.com/) | [Jen Evans](mailto:jenevan@rei.com) | Developer portal focused on an enterprise-wide app catalog to track ownership and surface APIs. |
| [next](https://next.me) | [Devan Jeronimo Nack](mailto:devan.j.nack@next.me), [Everson Crusara](mailto:everson.crusara@next.me), [Thiago Carneiro da Silva](mailto:thiagoc.silva@next.me) | We are building our Internal Developer Portal using Backstage to improve developer's experience by centralizing our services catalog and identifing microservices' ownership. Also we are going to improve Technical Documentation and speed up development using software templates to help squads in creation and deployment of new microservices. |
| [Vipps](https://vipps.no) | [Martin Ehrnst](https://github.com/ehrnst) | Vipps use backstage for our service catalog, documentation, and developer portal. Using templates we are able to simplify the developer experience when deploying new services to our platform. |
| [Ferrovial](https://ferrovial.com) | [Jose Luis Rosado](mailto:jlrosado@ferrovial.com) | Backstage is helping us to improve and acelerate dev experience helping teams to quickly find technical documentation, infrastructure templates, pipelines, software components and quickstarters that have been developed by our squads in a inner source friendly environment.
|
| [Vipps](https://vipps.no) | [Martin Ehrnst](https://github.com/ehrnst) | Vipps use backstage for our service catalog, documentation, and developer portal. Using templates we are able to simplify the developer experience when deploying new services to our platform. |
| [Ferrovial](https://ferrovial.com) | [Jose Luis Rosado](mailto:jlrosado@ferrovial.com) | Backstage is helping us to improve and acelerate dev experience helping teams to quickly find technical documentation, infrastructure templates, pipelines, software components and quickstarters that have been developed by our squads in a inner source friendly environment. |
| [Inter&Co](https://bancointer.com.br) | [Arnaud Lanna](https://github.com/arnaudlanna), [Adriano Silva](https://github.com/adrianovss), [Bruno Grossi](https://github.com/begrossi) | We're using Backstage as our internal Developer Portal to catalog and collect repositories and microservices pieces of information like ownership, deployment time, and documentation. |
+5
View File
@@ -138,6 +138,11 @@ techdocs:
dynatrace:
baseUrl: https://your.dynatrace.instance.com
# Score-cards sample configuration.
scorecards:
jsonDataUrl: https://raw.githubusercontent.com/Oriflame/backstage-plugins/main/plugins/score-card/sample-data/
wikiLinkTemplate: https://link-to-wiki/{id}
sentry:
organization: my-company
@@ -0,0 +1,47 @@
# Enabling SSL for Local Testing
If you need to use an `https:` URL for local testing (i.e. if an OAuth provider requires a "secure" callback URL), you can use a self-signed certificate by following these steps.
## Backend
1. Generate a self-signed certificate and key for localhost and configure your system to trust it. The application [`mkcert`](https://github.com/FiloSottile/mkcert) is a helpful tool to accomplish this.
1. Update `backend.baseUrl` in app-config.local.yaml to use an `https:` address.
1. Add the certificate and key to `backend.https.certificate.cert` and `backend.https.certificate.cert`, respectively.
```yaml
backend:
baseUrl: https://localhost:7007
https:
certificate:
# You may copy the contents of the file...
cert: |
-----BEGIN CERTIFICATE-----
MIIDCTCCAfGgAwIBAgIUZ9VhZckcy690L
...
-----END CERTIFICATE-----
# ... or use a path
key:
$file: ./certs/localhost-key.pem
```
1. Start the backend with `NODE_EXTRA_CA_CERTS=/absolute/path/to/cert.pem yarn start-backend`
## Frontend
1. As with the backend instructions above, a trusted certificate and key are needed.
1. Update `app.baseUrl` and `backend.cors.origin` in app-config.local.yaml to use an `https:` address.
1. Add the certificate and key to `app.https.certificate.cert` and `app.https.certificate.cert`, respectively.
```yaml
app:
baseUrl: https://localhost:3000
https:
certificate:
cert:
$file: ./certs/localhost.pem
key:
$file: ./certs/localhost-key.pem
backend:
cors:
origin: https://localhost:3000
```
1. and start the app with `yarn start`.
Depending on what plugins are in use, you may need to override additional URLs to use `https` for those endpoints to work.
@@ -0,0 +1,30 @@
# Upgrade Backstage App
## Overview
The script upgrades the version of Backstage created via the create-app plugin. It lets you resolve conflicts iteratively with your own merge [tool](https://www.git-scm.com/docs/git-mergetool).
## Requirements
You will need to have the following tools in your shell environment:
- git
- curl
- jq
## Usage
Here's how to use the script:
1. download the script
2. copy it in the root of your app
3. bootstrap a git repository (you may already have done so):
```bash
git init
git add .
git commit -m "initial commit"
```
4. run `sh upgrade-backstage-app.sh [optional-backstage-version]`
5. resolve any conflicts iteratively
@@ -0,0 +1,15 @@
#!/bin/sh
CURRENT_VERSION="v$(cat backstage.json | jq -r '.version')"
TARGET_VERSION=${1:-"$(curl -s https://api.github.com/repos/backstage/backstage/releases/latest | jq -r '.tag_name')"}
CREATE_APP_CURRENT_VERSION=$(curl -s https://raw.githubusercontent.com/backstage/backstage/$CURRENT_VERSION/packages/create-app/package.json | jq -r '.version')
CREATE_APP_TARGET_VERSION=$(curl -s https://raw.githubusercontent.com/backstage/backstage/$TARGET_VERSION/packages/create-app/package.json | jq -r '.version')
if [ "$CURRENT_VERSION" == "$TARGET_VERSION" ]; then
echo "Already up to date"
else
echo "Attempting upgrade from Backstage $CURRENT_VERSION (create-app $CREATE_APP_CURRENT_VERSION) to $TARGET_VERSION ($CREATE_APP_TARGET_VERSION)"
rm -rf .upgrade && mkdir .upgrade
curl -s https://raw.githubusercontent.com/backstage/upgrade-helper-diff/master/diffs/$CREATE_APP_CURRENT_VERSION..$CREATE_APP_TARGET_VERSION.diff > .upgrade/upgrade.diff
git apply -3 .upgrade/upgrade.diff
git mergetool
fi
@@ -0,0 +1,83 @@
/*
* Copyright 2021 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/// <reference types="cypress" />
import 'os';
describe('score-card', () => {
describe('Score board', () => {
it('displays the score board based on sample data', () => {
cy.loginAsGuest();
cy.visit('/score-board');
cy.screenshot({ capture: 'viewport' });
cy.contains('System scores overview').should('be.visible');
cy.checkForErrors();
cy.get('span:contains("1-2 of 2")').should('be.visible'); // beware, there is also a hidden <P/> element
cy.contains('audio-playback').should('be.visible');
cy.contains('team-c').should('be.visible');
cy.contains('non-valid-system').should('be.visible');
cy.contains('Name').should('be.visible');
cy.contains('Date').should('be.visible');
cy.contains('Code').should('be.visible');
cy.contains('Documentation').should('be.visible');
cy.contains('Operations').should('be.visible');
cy.contains('Quality').should('be.visible');
cy.contains('Security').should('be.visible');
cy.contains('Total').should('be.visible');
cy.contains('50 %').should('be.visible');
cy.contains('75 %').should('be.visible');
cy.log('navigating to score card detail for audio-playback');
cy.get('a[data-id="audio-playback"]').should('be.visible').click();
cy.screenshot({ capture: 'viewport' });
cy.url().should(
'include',
'/catalog/default/System/audio-playback/score',
);
cy.contains('Scoring').should('be.visible');
cy.contains('Total score: 57 %').should('be.visible');
cy.contains('Code').should('be.visible');
cy.contains('90 %').should('be.visible');
cy.contains('Documentation').should('be.visible');
cy.contains('75 %').should('be.visible');
cy.contains('Operations').should('be.visible');
cy.contains('50 %').should('be.visible');
cy.contains('Quality').should('be.visible');
cy.contains('25 %').should('be.visible');
cy.contains('Security');
cy.contains('10 %').should('be.visible');
cy.checkForErrors();
cy.log(
'Clicking on button [>] that is first child of the element (td) with value=Code',
);
cy.get('[value="Code"] > button:first-child').click();
cy.checkForErrors();
cy.screenshot({ capture: 'viewport' });
cy.log('Clicking on link for Code');
cy.contains('hints: Gitflow: 100%').should('be.visible');
cy.get('a[data-id="2157"]')
.should('be.visible')
.should(
'have.attr',
'href',
'https://TBD/XXX/_wiki/wikis/XXX.wiki/2157',
);
});
});
});
+5
View File
@@ -118,3 +118,8 @@ Cypress.Commands.add('waitSectionTwoPage', () => {
Cypress.Commands.add('waitHomePage', () => {
cy.wait(['@entityMetadata', '@syncEntity', '@techdocsMetadata', '@homeHTML']);
});
Cypress.Commands.add('checkForErrors', () => {
// when an error occurs there is a <div> with an "alert" role attribute. This can change ofc => we shall add also some positive ("when error occurs") test
cy.get('div[role="alert"]').should('not.exist');
});
+5
View File
@@ -77,5 +77,10 @@ declare namespace Cypress {
* @example cy.isNotInViewport
*/
isNotInViewport(element: string): Chainable<Element>;
/**
* Check if we have not caused error by our last action
* @example cy.checkForErrors
*/
checkForErrors(): Chainable<Element>;
}
}
+6 -6
View File
@@ -1415,22 +1415,22 @@ __metadata:
linkType: hard
"typescript@npm:^4.1.3":
version: 4.8.2
resolution: "typescript@npm:4.8.2"
version: 4.8.4
resolution: "typescript@npm:4.8.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 7f5b81d0d558c9067f952c7af52ab7f19c2e70a916817929e4a5b256c93990bf3178eccb1ac8a850bc75df35f6781b6f4cb3370ce20d8b1ded92ed462348f628
checksum: 3e4f061658e0c8f36c820802fa809e0fd812b85687a9a2f5430bc3d0368e37d1c9605c3ce9b39df9a05af2ece67b1d844f9f6ea8ff42819f13bcb80f85629af0
languageName: node
linkType: hard
"typescript@patch:typescript@^4.1.3#~builtin<compat/typescript>":
version: 4.8.2
resolution: "typescript@patch:typescript@npm%3A4.8.2#~builtin<compat/typescript>::version=4.8.2&hash=a1c5e5"
version: 4.8.4
resolution: "typescript@patch:typescript@npm%3A4.8.4#~builtin<compat/typescript>::version=4.8.4&hash=a1c5e5"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 5cb0f02f414f5405f4b0e7ee1fd7fa9177b6a8783c9017b6cad85f56ce4c4f93e0e6f2ce37e863cb597d44227cd009474c9fbd85bf7a50004e5557426cb58079
checksum: 563a0ef47abae6df27a9a3ab38f75fc681f633ccf1a3502b1108e252e187787893de689220f4544aaf95a371a4eb3141e4a337deb9895de5ac3c1ca76430e5f0
languageName: node
linkType: hard
+8
View File
@@ -35,6 +35,8 @@ auth:
clientSecret: ${AUTH_AUTH0_CLIENT_SECRET}
domain: ${AUTH_AUTH0_DOMAIN_ID}
audience: ${AUTH_AUTH0_AUDIENCE}
connection: ${AUTH_AUTH0_CONNECTION}
connectionScope: ${AUTH_AUTH0_CONNECTION_SCOPE}
```
The Auth0 provider is a structure with three configuration keys:
@@ -44,6 +46,12 @@ The Auth0 provider is a structure with three configuration keys:
page
- `domain`: The Application domain, found on the Auth0 Application page
## Optional Configuration
- `audience`: The intended recipients of the token
- `connection`: Social identity provider name. To check the available social connections, please visit [Auth0 Social Connections](https://marketplace.auth0.com/features/social-connections).
- `connectionScope`: Additional scopes in the interactive token request. It should always be used in combination with the `connection` parameter
## Adding the provider to the Backstage frontend
To add the provider to the frontend, add the `auth0AuthApi` reference and
+164
View File
@@ -0,0 +1,164 @@
---
id: service-to-service-auth
title: Service to Service Auth
# prettier-ignore
description: This section describes how to use service to service authentication, both internally within Backstage plugins and towards external services.
---
This article describes the steps needed to introduce _backend-to-backend auth_.
This allows plugin backends to determine whether a given request originates from
a legitimate Backstage plugin (or other external caller), by requiring a special
type of service-to-service token which is signed with a shared secret.
When enabling this protection on your Backstage backend plugins, for example the
catalog, other callers in the ecosystem such as the search indexer and
scaffolder would need to present a valid token to the catalog to be able to
request its contents.
## Setup
In a newly created Backstage app, the backend is setup up to not require any
auth at all. This means that generated service-to-service tokens are empty, and
that incoming requests are not validated. If you want to enable
service-to-service auth, the first step is to switch out the following line in
your backend setup at `packages/backend/src/index.ts`:
```diff
- const tokenManager = ServerTokenManager.noop();
+ const tokenManager = ServerTokenManager.fromConfig(config, { logger: root });
```
By switching from the no-op `ServiceTokenManager` to one created from config,
you enable service-to-service auth for any plugin that implements it. The local
development setup will generally not be impacted by this, as temporary keys are
generated under the hood. But for the production setup, this means you must now
provide a shared secret that enables your backend plugins to communicate with
each other.
Backstage service-to-service tokens are currently always signed with a single
secret key. It needs to be shared across all backend plugins and services that
ones wishes to communicate across. The key can be any base64 encoded secret.
The following command can be used to generate such a key in a terminal:
```bash
node -p 'require("crypto").randomBytes(24).toString("base64")'
```
Then place it in the backend configuration, either as a direct value or
injected as an env variable.
```yaml
# commonly in your app-config.production.yaml
backend:
auth:
keys:
- secret: <the string returned by the above crypto command>
# - secret: ${BACKEND_SECRET} - if you want to use an env variable instead
```
**NOTE**: For ease of development, we auto-generate a key for you if you haven't
configured a secret in dev mode. You _must set your own secret_ in order for
backend-to-backend auth to work in production; the `ServiceTokenManager` will
throw an exception in production if it has no keys to work with, which will lead
to the backend failing to start up.
## Usage in Backend Plugins
There are a few steps if you want to make use of the service-to-service auth in
your own backend plugin. First you need to add the `TokenManager` dependency to
the `createRouter` options. Typically as `tokenManager: TokenManager`. Along
with this you'll need to ask users to start providing this new dependency in
their backend setup code.
Once the `TokenManager` is available, you use the `.getToken()` method to generate
a new token for any outgoing requests towards other Backstage backend plugins.
This method should be called for every request that you make; do not store the
token for later use. The `TokenManager` implementations should already cache
tokens as needed. The returned token should then be added as a `Bearer` token
for the upstream request, for example:
```ts
const { token } = await this.tokenManager.getToken();
const response = await fetch(pluginBackendApiUrl, {
method: 'GET',
headers: {
...headers,
Authorization: `Bearer ${token}`,
},
});
```
To authenticate an incoming request you use the `.authenticate(token)` method.
At the time of writing this method doesn't return anything, it will simply
throw if the token is invalid.
```ts
await tokenManager.authenticate(token); // throws if token is invalid
```
## Usage in External Callers
If you have enabled server-to-server auth, you may be interested in generating
tokens in code that is external to Backstage itself. External callers may even
be written in other languages than Node.js. This section explains how to generate
a valid token yourself.
The token must be a JWT with a `HS256` signature, using the raw base64 decoded
value of the configured key as the secret. It must also have the following payload:
- `sub`: "backstage-server" (only this value supported currently)
- `exp`: one hour from the time it was generated, in epoch seconds
## Granular Access Control
We plan to build out the service-to-service auth to be much more powerful in the
future, but before that is done there are a few tricks you can use with the
current system to harden your deployments. This section assumes that you have
already split your backend plugins into more than one backend deployment, in
order to scale or isolate them.
The backend auth configuration has support for providing multiple keys, for
example:
```yaml
backend:
auth:
keys:
- secret: my-secret-key-1
- secret: my-secret-key-2
- secret: my-secret-key-3
```
The first key will be used for signing requests, while all of the keys will be
used for validation. This means that you can set up an asymmetric configuration
where some backend deployments do not have access to each other.
For example, consider the case where we have split up the catalog, scaffolder,
and search plugin into three separate backend deployments. We can use the
following configurations to allow both the scaffolder and search plugin to speak
to the
catalog, but not the other way around, and to not allow any communication between
the scaffolder and search plugins.
```yaml
# catalog config
backend:
auth:
keys:
- secret: my-secret-key-catalog
- secret: my-secret-key-scaffolder
- secret: my-secret-key-search
# scaffolder config
backend:
auth:
keys:
- secret: my-secret-key-scaffolder
# search config
backend:
auth:
keys:
- secret: my-secret-key-search
```
+15 -9
View File
@@ -101,14 +101,14 @@ array. Users will see this value in the Software Catalog Kubernetes plugin.
This determines how the Kubernetes client authenticates with the Kubernetes
cluster. Valid values are:
| Value | Description |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `serviceAccount` | This will use a Kubernetes [service account](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) to access the Kubernetes API. When this is used the `serviceAccountToken` field should also be set. |
| `google` | This will use a user's Google auth token from the [Google auth plugin](https://backstage.io/docs/auth/) to access the Kubernetes API. |
| `aws` | This will use AWS credentials to access resources in EKS clusters |
| `googleServiceAccount` | This will use the Google Cloud service account credentials to access resources in clusters |
| `azure` | This will use [Azure Identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview) to access resources in clusters |
| `oidc` | This will use [Oidc Tokens](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#openid-connect-tokens) to authenticate to the Kubernetes API. When this is used the `oidcTokenProvider` field should also be set. |
| Value | Description |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `serviceAccount` | This will use a Kubernetes [service account](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) to access the Kubernetes API. When this is used the `serviceAccountToken` field should also be set. |
| `google` | This will use a user's Google auth token from the [Google auth plugin](https://backstage.io/docs/auth/) to access the Kubernetes API. |
| `aws` | This will use AWS credentials to access resources in EKS clusters |
| `googleServiceAccount` | This will use the Google Cloud service account credentials to access resources in clusters |
| `azure` | This will use [Azure Identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview) to access resources in clusters |
| `oidc` | This will use [Oidc Tokens](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#openid-connect-tokens) to authenticate to the Kubernetes API. When this is used the `oidcTokenProvider` field should also be set. Please note the cluster must support OIDC, at the time of writing AKS clusters do not support OIDC. |
Check the [Kubernetes Authentication][4] section for additional explanation.
@@ -159,7 +159,12 @@ auth:
audience: ${AUTH_OKTA_AUDIENCE}
```
The following values are supported out-of-the-box by the frontend: `google`, `microsoft`, `okta`, `onelogin`.
The following values are supported out-of-the-box by the frontend: `google`, `microsoft`,
`okta`, `onelogin`.
Take note that `oidcTokenProvider` is just the issuer for the token, you can use any
of these with an OIDC enabled cluster, like using `microsoft` as the issuer for a EKS
cluster.
##### `clusters.\*.dashboardUrl` (optional)
@@ -413,6 +418,7 @@ rules:
- ingresses
- statefulsets
- limitranges
- daemonsets
verbs:
- get
- list
+1 -1
View File
@@ -101,7 +101,7 @@ Similarly to Lunr above, ElasticSearch can be set up like this:
```typescript
// app/backend/src/plugins/search.ts
const searchEngine = await ElasticSearchSearchEngine.initialize({
const searchEngine = await ElasticSearchSearchEngine.fromConfig({
logger: env.logger,
config: env.config,
});
@@ -156,16 +156,17 @@ export default async function createPlugin(
Here is a list of Open Source custom actions that you can add to your Backstage
scaffolder backend:
| Name | Package | Owner |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| Yeoman | [plugin-scaffolder-backend-module-yeoman](https://www.npmjs.com/package/@backstage/plugin-scaffolder-backend-module-yeoman) | [Backstage](https://backstage.io) |
| Cookiecutter | [plugin-scaffolder-backend-module-cookiecutter](https://www.npmjs.com/package/@backstage/plugin-scaffolder-backend-module-cookiecutter) | [Backstage](https://backstage.io) |
| Rails | [plugin-scaffolder-backend-module-rails](https://www.npmjs.com/package/@backstage/plugin-scaffolder-backend-module-rails) | [Backstage](https://backstage.io) |
| HTTP requests | [scaffolder-backend-module-http-request](https://www.npmjs.com/package/@roadiehq/scaffolder-backend-module-http-request) | [Roadie](https://roadie.io) |
| Utility actions | [scaffolder-backend-module-utils](https://www.npmjs.com/package/@roadiehq/scaffolder-backend-module-utils) | [Roadie](https://roadie.io) |
| AWS cli actions | [scaffolder-backend-module-aws](https://www.npmjs.com/package/@roadiehq/scaffolder-backend-module-aws) | [Roadie](https://roadie.io) |
| Scaffolder .NET Actions | [plugin-scaffolder-dotnet-backend](https://www.npmjs.com/package/@plusultra/plugin-scaffolder-dotnet-backend) | [Alef Carlos](https://github.com/alefcarlos) |
| Scaffolder Git Actions | [plugin-scaffolder-git-actions](https://www.npmjs.com/package/@mdude2314/backstage-plugin-scaffolder-git-actions) | [Drew Hill](https://github.com/arhill05) |
| Azure Pipeline Actions | [scaffolder-backend-module-azure-pipelines](https://www.npmjs.com/package/@parfuemerie-douglas/scaffolder-backend-module-azure-pipelines) | [Parfümerie Douglas](https://github.com/Parfuemerie-Douglas) |
| Name | Package | Owner |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| Yeoman | [plugin-scaffolder-backend-module-yeoman](https://www.npmjs.com/package/@backstage/plugin-scaffolder-backend-module-yeoman) | [Backstage](https://backstage.io) |
| Cookiecutter | [plugin-scaffolder-backend-module-cookiecutter](https://www.npmjs.com/package/@backstage/plugin-scaffolder-backend-module-cookiecutter) | [Backstage](https://backstage.io) |
| Rails | [plugin-scaffolder-backend-module-rails](https://www.npmjs.com/package/@backstage/plugin-scaffolder-backend-module-rails) | [Backstage](https://backstage.io) |
| HTTP requests | [scaffolder-backend-module-http-request](https://www.npmjs.com/package/@roadiehq/scaffolder-backend-module-http-request) | [Roadie](https://roadie.io) |
| Utility actions | [scaffolder-backend-module-utils](https://www.npmjs.com/package/@roadiehq/scaffolder-backend-module-utils) | [Roadie](https://roadie.io) |
| AWS cli actions | [scaffolder-backend-module-aws](https://www.npmjs.com/package/@roadiehq/scaffolder-backend-module-aws) | [Roadie](https://roadie.io) |
| Scaffolder .NET Actions | [plugin-scaffolder-dotnet-backend](https://www.npmjs.com/package/@plusultra/plugin-scaffolder-dotnet-backend) | [Alef Carlos](https://github.com/alefcarlos) |
| Scaffolder Git Actions | [plugin-scaffolder-git-actions](https://www.npmjs.com/package/@mdude2314/backstage-plugin-scaffolder-git-actions) | [Drew Hill](https://github.com/arhill05) |
| Azure Pipeline Actions | [scaffolder-backend-module-azure-pipelines](https://www.npmjs.com/package/@parfuemerie-douglas/scaffolder-backend-module-azure-pipelines) | [Parfümerie Douglas](https://github.com/Parfuemerie-Douglas) |
| Azure Repository Actions | [scaffolder-backend-module-azure-repositories](https://www.npmjs.com/package/@parfuemerie-douglas/scaffolder-backend-module-azure-repositories) | [Parfümerie Douglas](https://github.com/Parfuemerie-Douglas) |
Have fun! 🚀
@@ -0,0 +1,89 @@
---
id: writing-custom-step-layouts
title: Writing custom step layouts
description: How to override the default step form layout
---
Every form in each step rendered in the frontend uses the default form layout from [react-json-schema-form](https://react-jsonschema-form.readthedocs.io/). It is possible to override this behaviour by supplying a `ui:ObjectFieldTemplate` property for a particular step:
```yaml
parameters:
- title: Fill in some steps
ui:ObjectFieldTemplate: TwoColumn
```
This is the same [field](https://react-jsonschema-form.readthedocs.io/en/latest/advanced-customization/custom-templates/#objectfieldtemplate) used by [react-json-schema-form](https://react-jsonschema-form.readthedocs.io/) but we need to add a couple of steps to ensure that the string value of `TwoColumn` above is resolved to a react component.
## Registering a React component as a custom step layout
The [createScaffolderLayout](https://backstage.io/docs/reference/plugin-scaffolder.createscaffolderlayout) function is used to mark a component as a custom step layout:
```ts
import React from 'react';
import {
createScaffolderLayout,
LayoutTemplate,
scaffolderPlugin,
} from '@backstage/plugin-scaffolder';
import { Grid } from '@material-ui/core';
const TwoColumn: LayoutTemplate = ({ properties, description, title }) => {
const mid = Math.ceil(properties.length / 2);
return (
<>
<h1>{title}</h1>
<h2>In two column layout!!</h2>
<Grid container justifyContent="flex-end">
{properties.slice(0, mid).map(prop => (
<Grid item xs={6} key={prop.content.key}>
{prop.content}
</Grid>
))}
{properties.slice(mid).map(prop => (
<Grid item xs={6} key={prop.content.key}>
{prop.content}
</Grid>
))}
</Grid>
{description}
</>
);
};
export const TwoColumnLayout = scaffolderPlugin.provide(
createScaffolderLayout({
name: 'TwoColumn',
component: TwoColumn,
}),
);
```
After you have registered your component as a custom layout then you need to provide the `layouts` to the `ScaffolderPage`:
```tsx
import { MyCustomFieldExtension } from './scaffolder/MyCustomExtension';
import { TwoColumnLayout } from './components/scaffolder/customScaffolderLayouts';
const routes = (
<FlatRoutes>
...
<Route path="/create" element={<ScaffolderPage />}>
<ScaffolderLayouts>
<TwoColumnLayout />
</ScaffolderLayouts>
</Route>
...
</FlatRoutes>
);
```
## Using the custom step layout
Any component that has been passed to the `ScaffolderPage` as children of the `ScaffolderLayouts` component can be used as a `ui:ObjectFieldTemplate` in your template file:
```yaml
parameters:
- title: Fill in some steps
ui:ObjectFieldTemplate: TwoColumn
```
@@ -258,6 +258,10 @@ use `ui:widget: password` or set some properties of `ui:backstage`:
show: false # won't print any info about 'hidden' property on Review Step
```
### Custom step layouts
If you find that the default layout of the form used in a particular step does not meet your needs then you can supply your own [custom step layout](./writing-custom-step-layouts.md).
### Remove sections or fields based on feature flags
Based on feature flags you can hide sections or even only fields of your
+6
View File
@@ -96,6 +96,10 @@ catalog:
topic:
include: ['backstage-include'] # optional array of strings
exclude: ['experiments'] # optional array of strings
enterpriseProviderId:
host: ghe.example.net
organization: 'backstage' # string
catalogPath: '/catalog-info.yaml' # string
```
This provider supports multiple organizations via unique provider IDs.
@@ -125,6 +129,8 @@ This provider supports multiple organizations via unique provider IDs.
- **organization**:
Name of your organization account/workspace.
If you want to add multiple organizations, you need to add one provider config each.
- **host** _(optional)_:
The hostname of your GitHub Enterprise instance. It must match a host defined in [integrations.github](locations.md).
## GitHub API Rate Limits
+1
View File
@@ -6,6 +6,7 @@ description: Support and Community Details and Links
- [Discord chatroom](https://discord.gg/MUpMjP2) - Get support or discuss the
project.
- [Stack Overflow](https://stackoverflow.com/questions/tagged/backstage) - Browse or ask questions on Stack Overflow.
- [Good First Issues](https://github.com/backstage/backstage/contribute) - Start
here if you want to contribute.
- [RFCs](https://github.com/backstage/backstage/labels/rfc) - Help shape the

Some files were not shown because too many files have changed in this diff Show More