Merge pull request #16616 from backstage/docs/remove-backend-to-backend-references
Docs: remove backend-to-backend references
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-permission-node': patch
|
||||
---
|
||||
|
||||
Update the service-to-service auth docs URL in error message.
|
||||
``
|
||||
+1
-1
@@ -22,7 +22,7 @@ app:
|
||||
|
||||
backend:
|
||||
# Used for enabling authentication, secret is shared by all backend plugins
|
||||
# See https://backstage.io/docs/tutorials/backend-to-backend-auth for
|
||||
# See https://backstage.io/docs/auth/service-to-service-auth for
|
||||
# information on the format
|
||||
# auth:
|
||||
# keys:
|
||||
|
||||
@@ -5,7 +5,7 @@ title: Service to Service Auth
|
||||
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 article describes the steps needed to introduce _service-to-service auth_ (formerly _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.
|
||||
@@ -58,7 +58,7 @@ backend:
|
||||
|
||||
**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
|
||||
service-to-service 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.
|
||||
|
||||
|
||||
@@ -20,11 +20,11 @@ The permissions framework depends on a few other Backstage systems, which must b
|
||||
|
||||
The permissions framework itself is new to Backstage and still evolving quickly. To ensure your version of Backstage has all the latest permission-related functionality, it’s important to upgrade to the latest version. The [Backstage upgrade helper](https://backstage.github.io/upgrade-helper/) is a great tool to help ensure that you’ve made all the necessary changes during the upgrade!
|
||||
|
||||
### Enable backend-to-backend authentication
|
||||
### Enable service-to-service authentication
|
||||
|
||||
Backend-to-backend authentication allows Backstage backend code to verify that a given request originates from elsewhere in the Backstage backend. This is useful for tasks like collation of catalog entities in the search index. This type of request shouldn’t be permissioned, so it’s important to configure this feature before trying to use the permissions framework.
|
||||
Service-to-service authentication allows Backstage backend code to verify that a given request originates from elsewhere in the Backstage backend. This is useful for tasks like collation of catalog entities in the search index. This type of request shouldn’t be permissioned, so it’s important to configure this feature before trying to use the permissions framework.
|
||||
|
||||
To set up backend-to-backend authentication, follow the [backend-to-backend authentication docs](../tutorials/backend-to-backend-auth.md).
|
||||
To set up service-to-service authentication, follow the [service-to-service authentication docs](../auth/service-to-service-auth.md).
|
||||
|
||||
### Supply an identity resolver to populate group membership on sign in
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ export interface ServerTokenManagerOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and validates tokens for use during backend-to-backend
|
||||
* Creates and validates tokens for use during service-to-service
|
||||
* authentication.
|
||||
*
|
||||
* @public
|
||||
@@ -90,7 +90,7 @@ export class ServerTokenManager implements TokenManager {
|
||||
|
||||
// For development, if a secret has not been configured, we auto generate a secret instead of throwing.
|
||||
options.logger.warn(
|
||||
'Generated a secret for backend-to-backend authentication: DEVELOPMENT USE ONLY.',
|
||||
'Generated a secret for service-to-service authentication: DEVELOPMENT USE ONLY.',
|
||||
);
|
||||
return new ServerTokenManager([], options);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ organization:
|
||||
|
||||
backend:
|
||||
# Used for enabling authentication, secret is shared by all backend plugins
|
||||
# See https://backstage.io/docs/tutorials/backend-to-backend-auth for
|
||||
# See https://backstage.io/docs/auth/service-to-service-auth for
|
||||
# information on the format
|
||||
# auth:
|
||||
# keys:
|
||||
|
||||
@@ -70,7 +70,7 @@ describe('ServerPermissionClient', () => {
|
||||
tokenManager: ServerTokenManager.noop(),
|
||||
}),
|
||||
).toThrow(
|
||||
'Backend-to-backend authentication must be configured before enabling permissions. Read more here https://backstage.io/docs/tutorials/backend-to-backend-auth',
|
||||
'Service-to-service authentication must be configured before enabling permissions. Read more here https://backstage.io/docs/auth/service-to-service-auth',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
/**
|
||||
* A thin wrapper around
|
||||
* {@link @backstage/plugin-permission-common#PermissionClient} that allows all
|
||||
* backend-to-backend requests.
|
||||
* service-to-service requests.
|
||||
* @public
|
||||
*/
|
||||
export class ServerPermissionClient implements PermissionEvaluator {
|
||||
@@ -58,7 +58,7 @@ export class ServerPermissionClient implements PermissionEvaluator {
|
||||
(tokenManager as any).isInsecureServerTokenManager
|
||||
) {
|
||||
throw new Error(
|
||||
'Backend-to-backend authentication must be configured before enabling permissions. Read more here https://backstage.io/docs/tutorials/backend-to-backend-auth',
|
||||
'Service-to-service authentication must be configured before enabling permissions. Read more here https://backstage.io/docs/auth/service-to-service-auth',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user