@backstage/plugin-auth-backend 0.9.0-next.1 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +139 -0
- package/dist/index.cjs.js +729 -778
- package/dist/index.cjs.js.map +1 -1
- package/migrations/20210326100300_timestamptz.js +2 -2
- package/package.json +24 -21
- package/dist/index.d.ts +0 -1002
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,144 @@
|
|
|
1
1
|
# @backstage/plugin-auth-backend
|
|
2
2
|
|
|
3
|
+
## 0.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1ed305728b: Bump `node-fetch` to version 2.6.7 and `cross-fetch` to version 3.1.5
|
|
8
|
+
- c77c5c7eb6: Added `backstage.role` to `package.json`
|
|
9
|
+
- a31559d1f5: Bump `passport-oauth2` to version 1.6.1
|
|
10
|
+
- deaf6065db: Adapt to the new `CatalogApi.getLocationByRef`
|
|
11
|
+
- 1433045c08: Removed unused `helmet` dependency.
|
|
12
|
+
- 7aeb491394: Replace use of deprecated `ENTITY_DEFAULT_NAMESPACE` constant with `DEFAULT_NAMESPACE`.
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @backstage/backend-common@0.10.8
|
|
15
|
+
- @backstage/catalog-client@0.7.0
|
|
16
|
+
- @backstage/errors@0.2.1
|
|
17
|
+
- @backstage/plugin-auth-node@0.1.1
|
|
18
|
+
- @backstage/catalog-model@0.10.0
|
|
19
|
+
- @backstage/config@0.1.14
|
|
20
|
+
- @backstage/types@0.1.2
|
|
21
|
+
|
|
22
|
+
## 0.10.0
|
|
23
|
+
|
|
24
|
+
### Minor Changes
|
|
25
|
+
|
|
26
|
+
- 08fcda13ef: The `callbackUrl` option of `OAuthAdapter` is now required.
|
|
27
|
+
- 6bc86fcf2d: The following breaking changes were made, which may imply specifically needing
|
|
28
|
+
to make small adjustments in your custom auth providers.
|
|
29
|
+
|
|
30
|
+
- **BREAKING**: Moved `IdentityClient`, `BackstageSignInResult`,
|
|
31
|
+
`BackstageIdentityResponse`, and `BackstageUserIdentity` to
|
|
32
|
+
`@backstage/plugin-auth-node`.
|
|
33
|
+
- **BREAKING**: Removed deprecated type `BackstageIdentity`, please use
|
|
34
|
+
`BackstageSignInResult` from `@backstage/plugin-auth-node` instead.
|
|
35
|
+
|
|
36
|
+
While moving over, `IdentityClient` was also changed in the following ways:
|
|
37
|
+
|
|
38
|
+
- **BREAKING**: Made `IdentityClient.listPublicKeys` private. It was only used
|
|
39
|
+
in tests, and should not be part of the API surface of that class.
|
|
40
|
+
- **BREAKING**: Removed the static `IdentityClient.getBearerToken`. It is now
|
|
41
|
+
replaced by `getBearerTokenFromAuthorizationHeader` from
|
|
42
|
+
`@backstage/plugin-auth-node`.
|
|
43
|
+
- **BREAKING**: Removed the constructor. Please use the `IdentityClient.create`
|
|
44
|
+
static method instead.
|
|
45
|
+
|
|
46
|
+
Since the `IdentityClient` interface is marked as experimental, this is a
|
|
47
|
+
breaking change without a deprecation period.
|
|
48
|
+
|
|
49
|
+
In your auth providers, you may need to update your imports and usages as
|
|
50
|
+
follows (example code; yours may be slightly different):
|
|
51
|
+
|
|
52
|
+
````diff
|
|
53
|
+
-import { IdentityClient } from '@backstage/plugin-auth-backend';
|
|
54
|
+
+import {
|
|
55
|
+
+ IdentityClient,
|
|
56
|
+
+ getBearerTokenFromAuthorizationHeader
|
|
57
|
+
+} from '@backstage/plugin-auth-node';
|
|
58
|
+
|
|
59
|
+
// ...
|
|
60
|
+
|
|
61
|
+
- const identity = new IdentityClient({
|
|
62
|
+
+ const identity = IdentityClient.create({
|
|
63
|
+
discovery,
|
|
64
|
+
issuer: await discovery.getExternalBaseUrl('auth'),
|
|
65
|
+
});```
|
|
66
|
+
|
|
67
|
+
// ...
|
|
68
|
+
|
|
69
|
+
const token =
|
|
70
|
+
- IdentityClient.getBearerToken(req.headers.authorization) ||
|
|
71
|
+
+ getBearerTokenFromAuthorizationHeader(req.headers.authorization) ||
|
|
72
|
+
req.cookies['token'];
|
|
73
|
+
````
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- 2441d1cf59: chore(deps): bump `knex` from 0.95.6 to 1.0.2
|
|
78
|
+
|
|
79
|
+
This also replaces `sqlite3` with `@vscode/sqlite3` 5.0.7
|
|
80
|
+
|
|
81
|
+
- 3396bc5973: Enabled refresh for the Atlassian provider.
|
|
82
|
+
- 08fcda13ef: Added a new `cookieConfigurer` option to `AuthProviderConfig` that makes it possible to override the default logic for configuring OAuth provider cookies.
|
|
83
|
+
- Updated dependencies
|
|
84
|
+
- @backstage/catalog-client@0.6.0
|
|
85
|
+
- @backstage/backend-common@0.10.7
|
|
86
|
+
- @backstage/plugin-auth-node@0.1.0
|
|
87
|
+
|
|
88
|
+
## 0.10.0-next.0
|
|
89
|
+
|
|
90
|
+
### Minor Changes
|
|
91
|
+
|
|
92
|
+
- 08fcda13ef: The `callbackUrl` option of `OAuthAdapter` is now required.
|
|
93
|
+
|
|
94
|
+
### Patch Changes
|
|
95
|
+
|
|
96
|
+
- 2441d1cf59: chore(deps): bump `knex` from 0.95.6 to 1.0.2
|
|
97
|
+
|
|
98
|
+
This also replaces `sqlite3` with `@vscode/sqlite3` 5.0.7
|
|
99
|
+
|
|
100
|
+
- 3396bc5973: Enabled refresh for the Atlassian provider.
|
|
101
|
+
- 08fcda13ef: Added a new `cookieConfigurer` option to `AuthProviderConfig` that makes it possible to override the default logic for configuring OAuth provider cookies.
|
|
102
|
+
- Updated dependencies
|
|
103
|
+
- @backstage/backend-common@0.10.7-next.0
|
|
104
|
+
|
|
105
|
+
## 0.9.0
|
|
106
|
+
|
|
107
|
+
### Minor Changes
|
|
108
|
+
|
|
109
|
+
- cef64b1561: **BREAKING** Added `tokenManager` as a required property for the auth-backend `createRouter` function. This dependency is used to issue server tokens that are used by the `CatalogIdentityClient` when looking up users and their group membership during authentication.
|
|
110
|
+
|
|
111
|
+
These changes are **required** to `packages/backend/src/plugins/auth.ts`:
|
|
112
|
+
|
|
113
|
+
```diff
|
|
114
|
+
export default async function createPlugin({
|
|
115
|
+
logger,
|
|
116
|
+
database,
|
|
117
|
+
config,
|
|
118
|
+
discovery,
|
|
119
|
+
+ tokenManager,
|
|
120
|
+
}: PluginEnvironment): Promise<Router> {
|
|
121
|
+
return await createRouter({
|
|
122
|
+
logger,
|
|
123
|
+
config,
|
|
124
|
+
database,
|
|
125
|
+
discovery,
|
|
126
|
+
+ tokenManager,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**BREAKING** The `CatalogIdentityClient` constructor now expects a `TokenManager` instead of a `TokenIssuer`. The `TokenManager` interface is used to generate a server token when [resolving a user's identity and membership through the catalog](https://backstage.io/docs/auth/identity-resolver). Using server tokens for these requests allows the auth-backend to bypass authorization checks when permissions are enabled for Backstage. This change will break apps that rely on the user tokens that were previously used by the client. Refer to the ["Backend-to-backend Authentication" tutorial](https://backstage.io/docs/tutorials/backend-to-backend-auth) for more information on server token usage.
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- 9d75a939b6: Fixed a bug where providers that tracked the granted scopes through a cookie would not take failed authentication attempts into account.
|
|
136
|
+
- 28a5f9d0b1: chore(deps): bump `passport` from 0.4.1 to 0.5.2
|
|
137
|
+
- 5d09bdd1de: Added custom `callbackUrl` support for multiple providers. `v0.8.0` introduced this change for `github`, and now we're adding the same capability to the following providers: `atlassian, auth0, bitbucket, gitlab, google, microsoft, oauth2, oidc, okta, onelogin`.
|
|
138
|
+
- 648606b3ac: Added support for storing static GitHub access tokens in cookies and using them to refresh the Backstage session.
|
|
139
|
+
- Updated dependencies
|
|
140
|
+
- @backstage/backend-common@0.10.6
|
|
141
|
+
|
|
3
142
|
## 0.9.0-next.1
|
|
4
143
|
|
|
5
144
|
### Patch Changes
|