Update docs

This commit is contained in:
Johan Haals
2021-01-15 16:13:19 +01:00
parent 50b933d9ac
commit 48f3a5dcae
2 changed files with 15 additions and 9 deletions
+12 -8
View File
@@ -1,8 +1,8 @@
# Using GitHub Apps for Backend Authentication
Backstage can be configured to use GitHub Apps for backend authentication. This
comes with advantages such as higher rate limits and that Backstage can act as an
application instead of a user or bot account.
comes with advantages such as higher rate limits and that Backstage can act as
an application instead of a user or bot account.
It also provides a much clearer and better authorization model as a opposed to
the OAuth apps and their respective scopes.
@@ -10,8 +10,8 @@ the OAuth apps and their respective scopes.
## Caveats
- It's not possible to have multiple Backstage GitHub Apps installed in the same
GitHub organization, to be handled by Backstage. We currently don't check through
all the registered GitHub Apps to see which ones are installed for a
GitHub organization, to be handled by Backstage. We currently don't check
through all the registered GitHub Apps to see which ones are installed for a
particular repository. We only respect global Organization installs right now.
- App permissions is not managed by Backstage. They're created with some simple
default permissions which you are free to change as you need, but you will
@@ -64,10 +64,14 @@ privateKey: |
### Including in Integrations Config
Once the credentials are stored in a yaml file generated by
`create-github-app` or manually by following the
[GitHub Enterprise](#gitHub-enterprise) instructions, they can be included in the
`app-config.yaml` under the `integrations` section.
Once the credentials are stored in a yaml file generated by `create-github-app`
or manually by following the [GitHub Enterprise](#gitHub-enterprise)
instructions, they can be included in the `app-config.yaml` under the
`integrations` section.
Please note that the credentials file is highly sensitive and should NOT be
checked into any kind of version control. Instead use your preferred secure
method of distributing secrets.
```yaml
integrations:
@@ -60,7 +60,9 @@ const HEADERS = {
Accept: 'application/vnd.github.machine-man-preview+json',
};
// GithubAppManager issues tokens for a speicifc GitHub App
/**
* GithubAppManager issues and caches tokens for a specific GitHub App.
*/
class GithubAppManager {
private readonly appClient: Octokit;
private readonly baseAuthConfig: { appId: number; privateKey: string };