diff --git a/.changeset/rename-for-the-win.md b/.changeset/rename-for-the-win.md new file mode 100644 index 0000000000..8b3dc6df58 --- /dev/null +++ b/.changeset/rename-for-the-win.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-permission-node': patch +--- + +Update the service-to-service auth docs URL in error message. +`` diff --git a/app-config.yaml b/app-config.yaml index 22f3f4c9c5..385c9c2e0e 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -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: diff --git a/docs/auth/service-to-service-auth.md b/docs/auth/service-to-service-auth.md index 8d10fd7cc6..77baae72df 100644 --- a/docs/auth/service-to-service-auth.md +++ b/docs/auth/service-to-service-auth.md @@ -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. diff --git a/docs/permissions/getting-started.md b/docs/permissions/getting-started.md index e71601b703..ea52453db2 100644 --- a/docs/permissions/getting-started.md +++ b/docs/permissions/getting-started.md @@ -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 diff --git a/packages/backend-common/src/tokens/ServerTokenManager.ts b/packages/backend-common/src/tokens/ServerTokenManager.ts index a603e37635..cec6ff068f 100644 --- a/packages/backend-common/src/tokens/ServerTokenManager.ts +++ b/packages/backend-common/src/tokens/ServerTokenManager.ts @@ -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); } diff --git a/packages/create-app/templates/default-app/app-config.yaml.hbs b/packages/create-app/templates/default-app/app-config.yaml.hbs index 3b5de8baa3..3d216ec894 100644 --- a/packages/create-app/templates/default-app/app-config.yaml.hbs +++ b/packages/create-app/templates/default-app/app-config.yaml.hbs @@ -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: diff --git a/plugins/permission-node/src/ServerPermissionClient.test.ts b/plugins/permission-node/src/ServerPermissionClient.test.ts index 75177af328..eb8abefc95 100644 --- a/plugins/permission-node/src/ServerPermissionClient.test.ts +++ b/plugins/permission-node/src/ServerPermissionClient.test.ts @@ -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', ); }); diff --git a/plugins/permission-node/src/ServerPermissionClient.ts b/plugins/permission-node/src/ServerPermissionClient.ts index 664e5a8309..6275fb835e 100644 --- a/plugins/permission-node/src/ServerPermissionClient.ts +++ b/plugins/permission-node/src/ServerPermissionClient.ts @@ -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', ); }