From 2e440d4723dd2f6a5553c12eb53512fa2aa00656 Mon Sep 17 00:00:00 2001 From: Aramis Date: Thu, 25 Jan 2024 23:42:14 -0500 Subject: [PATCH 01/13] docs: add a central glossary Signed-off-by: Aramis --- docs/auth/glossary.md | 30 -- docs/local-dev/cli-build-system.md | 13 +- docs/local-dev/cli-overview.md | 20 +- docs/overview/glossary.md | 26 -- docs/permissions/concepts.md | 14 +- docs/permissions/custom-rules.md | 2 +- .../02-adding-a-basic-permission-check.md | 4 +- .../03-adding-a-resource-permission-check.md | 2 +- docs/references/glossary.md | 310 ++++++++++++++++++ microsite/docusaurus.config.js | 8 + microsite/sidebars.json | 9 +- 11 files changed, 341 insertions(+), 97 deletions(-) delete mode 100644 docs/auth/glossary.md delete mode 100644 docs/overview/glossary.md create mode 100644 docs/references/glossary.md diff --git a/docs/auth/glossary.md b/docs/auth/glossary.md deleted file mode 100644 index ad7ae78d19..0000000000 --- a/docs/auth/glossary.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -id: glossary -title: Glossary -description: All Glossaries related to auth ---- - -- **Popup** - A separate browser window opened on top of the previous one. -- **OAuth** - More specifically OAuth 2.0, a standard protocol for - authorization. See [oauth.net/2/](https://oauth.net/2/). -- **OpenID Connect** - A layer on top of OAuth which standardises - authentication. See - [en.wikipedia.org/wiki/OpenID_Connect](https://en.wikipedia.org/wiki/OpenID_Connect). -- **JWT** - JSON Web Token, a popular JSON based token format that is commonly - encrypted and/or signed, see - [en.wikipedia.org/wiki/JSON_Web_Token](https://en.wikipedia.org/wiki/JSON_Web_Token) -- **Scope** - A string that describes a certain type of access that can be - granted to a user using OAuth. -- **Access token** - A token that gives access to perform actions on behalf of a - user. It will commonly have a short expiry time, and be limited to a set of - scopes. Part of the OAuth protocol. -- **ID token** - A JWT used to prove a user's identity, containing for example - the user's email. Part of OpenID Connect. -- **Offline access** - OAuth flow that results in both a refresh and access - token, where the refresh token has a long expiration or never expires, and can - be used to request more access tokens in the future. This lets the user go - "offline" with respect to the token issuer, but still be able to request more - tokens at a later time without further direct interaction for the user. -- **Code grant** - OAuth flow where the client receives an authorization code - that is passed to the backend to be exchanged for an access token and possibly - refresh token. diff --git a/docs/local-dev/cli-build-system.md b/docs/local-dev/cli-build-system.md index 51c328c871..a95db95f85 100644 --- a/docs/local-dev/cli-build-system.md +++ b/docs/local-dev/cli-build-system.md @@ -258,7 +258,7 @@ When building CommonJS or ESM output, the build commands will always use `src/index.ts` as the entrypoint. All non-relative modules imports are considered external, meaning the Rollup build will only compile the source code of the package itself. All import statements of external dependencies, even within the same -monorepo, will stay intact. +[monorepo](../references/glossary.md#monorepo), will stay intact. The build of the type definitions works quite differently. The entrypoint of the type definition build is the relative location of the package within the @@ -307,11 +307,12 @@ support for them instead. ### Frontend Production -The frontend production bundling creates your typical web content bundle, all -contained within a single folder, ready for static serving. It is used when building -packages with the `'frontend'` role, and unlike the development bundling there is no way to -build a production bundle of an individual plugin. The output of the bundling -process is written to the `dist` folder in the package. +The frontend production bundling creates your typical web content +[bundle](../references/glossary.md#bundle), all contained within a single +folder, ready for static serving. It is used when building packages with the +`'frontend'` role, and unlike the development bundling there is no way to +build a production [bundle](../references/glossary.md#bundle) of an individual plugin. +The output of the bundling process is written to the `dist` folder in the package. Just like the development bundling, the production bundling is based on [Webpack](https://webpack.js.org/). It uses the diff --git a/docs/local-dev/cli-overview.md b/docs/local-dev/cli-overview.md index 74c09d2865..4ab8bb21ac 100644 --- a/docs/local-dev/cli-overview.md +++ b/docs/local-dev/cli-overview.md @@ -7,11 +7,12 @@ description: Overview of the Backstage CLI ## Introduction A goal of Backstage is to provide a delightful developer experience in and -around the project. Creating new apps and plugins should be simple, iteration +around the project. Creating new [apps](../references/glossary.md#app) and +[plugins](../references/glossary.md#plugin) should be simple, iteration speed should be fast, and the overhead of maintaining custom tooling should be minimal. As a part of accomplishing this goal, Backstage provides its own build system and tooling, delivered primarily through the -[`@backstage/cli`](https://www.npmjs.com/package/@backstage/cli) package. When +[`@backstage/cli`](https://www.npmjs.com/package/@backstage/cli) [package](../references/glossary.md#package). When creating an app using [`@backstage/create-app`](https://www.npmjs.com/package/@backstage/create-app), you receive a project that's already prepared with a typical setup and package @@ -36,18 +37,3 @@ The Backstage CLI intentionally does not provide many hooks for overriding or customizing the build process. This is to allow for evolution of the CLI without having to take a wide API surface into account. This allows us to iterate and improve the tooling, as well as to more easily keep the system up to date. - -## Glossary - -- **Package** - A package in the Node.js ecosystem, often published to a package - registry such as [NPM](https://www.npmjs.com/). -- **Monorepo** - A project layout that consists of multiple packages within a - single project, where packages are able to have local dependencies on each - other. Often enabled through tooling such as [lerna](https://lerna.js.org/) - and [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) -- **Local Package** - One of the packages within a monorepo. These package may - or may not also be published to a package registry. -- **Bundle** - A collection of the deployment artifacts. The output of the - bundling process, which brings a collection of packages into a single - collection of deployment artifacts. -- **Package Role** - The declared role of a package, see [package roles](./cli-build-system.md#package-roles). diff --git a/docs/overview/glossary.md b/docs/overview/glossary.md deleted file mode 100644 index ab7d224f4d..0000000000 --- a/docs/overview/glossary.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -id: glossary -title: Backstage Glossary -# prettier-ignore -description: List of terms, abbreviations, and phrases used in Backstage, together with their explanations. ---- - -The Backstage Glossary lists terms, abbreviations, and phrases used in -Backstage, together with their explanations. We encourage you to use the -terminology below for clarity and consistency when discussing Backstage. - -See also [Authentication Glossary](../auth/glossary.md), a separate glossary of terms and phrases -specifically related to the authentication and identity section of Backstage. - -### Backstage User Profiles - -There are three main user profiles for Backstage: the integrator, the -contributor, and the end user (typically a software engineer). - -| Term | Explanation | -| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Integrator | The **integrator** hosts the Backstage app and configures which plugins are available to use in the app. | -| Contributor | The **contributor** adds functionality to the app by writing plugins. | -| End user | The **end user** uses the app's functionality and interacts with its plugins. This profile covers the various roles that help deliver software. The typical end user is a **software engineer**, but users might also consider themselves _designers_, _data scientists_, _product owners_, _engineering managers_, _technical writers_, and so on. | -| Software engineer | The **software engineer** is an **end user** who uses the app's functionality and interacts with its plugins in the course of writing and documenting code. This user is more likely to embed documentation in the code files they produce, and create rough drafts of conceptual pages in collaboration with a **technical writer** or _technical editor_. | -| Technical writer | The **technical writer** is an **end user** who uses the app's functionality and interacts with its plugins in the course of writing and editing documentation. This user is more likely to produce and customize templates and produce conceptual pages to supplement documentation embedded in code files. | diff --git a/docs/permissions/concepts.md b/docs/permissions/concepts.md index e7d65b3583..c3c32601df 100644 --- a/docs/permissions/concepts.md +++ b/docs/permissions/concepts.md @@ -4,22 +4,16 @@ title: Concepts description: A list of important permission framework concepts --- -### Permission - -Any action that a user performs within Backstage may be represented as a permission. More complex actions, like executing a software template, may require authorization for multiple permissions throughout the flow. Permissions are identified by a unique name and optionally include a set of attributes that describe the corresponding action. Plugins are responsible for defining and exposing the permissions they enforce. - -### Policy - -User permissions are authorized by a central, user-defined permission policy. At a high level, a policy is a function that receives a Backstage user and permission, and returns a decision to allow or deny. Policies are expressed as code, which decouples the framework from any particular authorization model, like role-based access control (RBAC) or attribute-based access control (ABAC). - ### Policy decision versus enforcement Two important responsibilities of any authorization system are to decide if a user can do something, and to enforce that decision. In the Backstage permission framework, policies are responsible for decisions and plugins (typically backends) are responsible for enforcing them. ### Resources and rules -In many cases, a permission represents a user's interaction with another object. This object likely has information that policy authors can use to define more granular access. The permission framework introduces two abstractions to account for this: resources and rules. Resources represent the objects that users interact with. Rules are predicate-based controls that tap into a resource's data. For example, the catalog plugin defines a resource for catalog entities and a rule to check if an entity has a given annotation. +In many cases, a permission represents a user's interaction with another object. This object likely has information that policy authors can use to define more granular access. The permission framework introduces two abstractions to account for this: [resources](../references/glossary.md#permission-resource) and [rules](../references/glossary.md#permission-rule). For example, the catalog plugin defines a resource for catalog entities and a rule to check if an entity has a given annotation. ### Conditional decisions -Rules need additional data before they can be used in a decision. For example, the catalog plugin's "has annotation" rule needs to know what annotation to look for on a given entity. Once a rule is bound to relevant information it forms a condition. Conditions are then used to return a conditional decision from a policy. Conditional decisions tell the permission framework to delegate evaluation to the plugin that owns the corresponding resource. Permission requests that result in a conditional decision are allowed if all of the provided conditions evaluate to be true. This conditional behavior avoids coupling between policies and resource schemas, and allows plugins to evaluate complex rules in an efficient way. For example, a plugin may convert a conditional decision to a database query instead of loading and filtering objects in memory. +See [Conditional decisions](../references/glossary.md#conditional-decisions). + +A good example would be the catalog plugin's "has annotation" rule needs to know what annotation to look for on a given entity. The permission framework would respond to a request by the catalog plugin in this case with a condition decision. The catalog plugin would then need to correctly filter for entities matching the "has annotations" condition. This conditional behavior avoids coupling between policies and resource schemas, and allows plugins to evaluate complex rules in an efficient way. For example, a plugin may convert a conditional decision to a database query instead of loading and filtering objects in memory. diff --git a/docs/permissions/custom-rules.md b/docs/permissions/custom-rules.md index c0f4e3e156..4b38c8986d 100644 --- a/docs/permissions/custom-rules.md +++ b/docs/permissions/custom-rules.md @@ -4,7 +4,7 @@ title: Defining custom permission rules description: How to define custom permission rules for existing resources --- -For some use cases, you may want to define custom [rules](./concepts.md#resources-and-rules) in addition to the ones provided by a plugin. In the [previous section](./writing-a-policy.md) we used the `isEntityOwner` rule to control access for catalog entities. Let's extend this policy with a custom rule that checks what [system](https://backstage.io/docs/features/software-catalog/system-model#system) an entity is part of. +For some use cases, you may want to define custom [rules](../references/glossary.md#permission-rules) in addition to the ones provided by a plugin. In the [previous section](./writing-a-policy.md) we used the `isEntityOwner` rule to control access for catalog entities. Let's extend this policy with a custom rule that checks what [system](https://backstage.io/docs/features/software-catalog/system-model#system) an entity is part of. ## Define a custom rule diff --git a/docs/permissions/plugin-authors/02-adding-a-basic-permission-check.md b/docs/permissions/plugin-authors/02-adding-a-basic-permission-check.md index 23bc4e84f1..223d55d3d8 100644 --- a/docs/permissions/plugin-authors/02-adding-a-basic-permission-check.md +++ b/docs/permissions/plugin-authors/02-adding-a-basic-permission-check.md @@ -4,9 +4,9 @@ title: 2. Adding a basic permission check description: Explains how to add a basic permission check to a Backstage plugin --- -If the outcome of a permission check doesn't need to change for different [resources](../concepts.md#resources-and-rules), you can use a _basic permission check_. For this kind of check, we simply need to define a [permission](../concepts.md#resources-and-rules), and call `authorize` with it. +If the outcome of a permission check doesn't need to change for different [resources](../../references/glossary#permission-resource), you can use a _basic permission check_. For this kind of check, we simply need to define a [permission](../../references/glossary.md#permission), and call `authorize` with it. -For this tutorial, we'll use a basic permission check to authorize the `create` endpoint in our todo-backend. This will allow Backstage integrators to control whether each of their users is authorized to create todos by adjusting their [permission policy](../concepts.md#policy). +For this tutorial, we'll use a basic permission check to authorize the `create` endpoint in our todo-backend. This will allow Backstage integrators to control whether each of their users is authorized to create todos by adjusting their [permission policy](../../references/glossary.md#policy). We'll start by creating a new permission, and then we'll use the permission api to call `authorize` with it during todo creation. diff --git a/docs/permissions/plugin-authors/03-adding-a-resource-permission-check.md b/docs/permissions/plugin-authors/03-adding-a-resource-permission-check.md index a4d51b64d0..3feecc7342 100644 --- a/docs/permissions/plugin-authors/03-adding-a-resource-permission-check.md +++ b/docs/permissions/plugin-authors/03-adding-a-resource-permission-check.md @@ -4,7 +4,7 @@ title: 3. Adding a resource permission check description: Explains how to add a resource permission check to a Backstage plugin --- -When performing updates (or other operations) on specific [resources](../concepts.md#resources-and-rules), the permissions framework allows for the decision to be based on characteristics of the resource itself. This means that it's possible to write policies that (for example) allow the operation for users that own a resource, and deny the operation otherwise. +When performing updates (or other operations) on specific [resources](../../references/glossary.md#permission-resource), the permissions framework allows for the decision to be based on characteristics of the resource itself. This means that it's possible to write policies that (for example) allow the operation for users that own a resource, and deny the operation otherwise. ## Creating the update permission diff --git a/docs/references/glossary.md b/docs/references/glossary.md new file mode 100644 index 0000000000..b82b2da064 --- /dev/null +++ b/docs/references/glossary.md @@ -0,0 +1,310 @@ +--- +id: glossary +title: Glossary +# prettier-ignore +description: List of terms, abbreviations, and phrases used in Backstage, together with their explanations. +--- + +## Access token + +A [token](#token) that gives access to perform actions on behalf of a user. It will commonly have a short expiry time, and be limited to a set of [scopes](#scope). Part of the [OAuth](#oauth) protocol. + +https://oauth.net/2/access-tokens/ + +## Administrator + +Someone responsible for installing and maintaining a Backstage [app](#app) for an organization. A [user role](#user-role). + +## API + +In the Backstage [Catalog](#catalog), an API is an [entity](#entity) representing a boundary between two [components](#component). + +https://backstage.io/docs/features/software-catalog/system-model + +## App + +An installed instance of Backstage. An app can be local, intended for a single development group or individual developer, or organizational, for use by an entire enterprise. + +## Authorization Code + +A type of [OAuth flow](#oauth) used by confidential and public clients to get an [access token](#access-token). + +https://oauth.net/2/grant-types/authorization-code/ + +## Backstage + +A platform for creating and deploying [developer portals](#developer-portal), originally created at Spotify. + +Backstage is an incubation-stage open source project of the [Cloud Native Computing Foundation](#cloud-native-computing-foundation). + +## Bundle + +A collection of [deployment artifacts](#deployment-artifacts). + +Can also be: The output of the bundling process, which brings a collection of [packages](#package) into a single collection of [deployment artifacts](#deployment-artifacts). + +## Catalog + +An organization's portfolio of software products managed in Backstage. + +## Cloud Native Computing + +A set of technologies that "empower organizations to build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds. Containers, service meshes, microservices, immutable infrastructure, and declarative APIs exemplify this approach." ([CNCF Cloud Native Definition v1.0](https://github.com/cncf/toc/blob/main/DEFINITION.md)). + +## Cloud Native Computing Foundation + +A foundation dedicated to the promotion and advancement of [Cloud Native Computing](#Cloud-Native-Computing). The mission of the Cloud Native Computing Foundation (CNCF) is "to make cloud native computing ubiquitous" ([CNCF Charter](https://github.com/cncf/foundation/blob/main/charter.md)). + +CNCF is part of the [Linux Foundation](https://www.linuxfoundation.org/). + +## CNCF + +Cloud Native Computing Foundation. + +## Code Grant + +[OAuth](#oauth) flow where the client receives an [authorization code](#code) that is passed to the backend to be exchanged for an [access token](#access-token) and possibly a [refresh token](#refresh-token). + +## Collators + +Collators transform streams of [documents](#documents) into searchable texts. They're usually responsible for the data transformation and definition and collection process for specific [documents](#documents). Part of [Backstage Search](#search). + +## Component + +A software product that is managed in the Backstage [Software Catalog](#software-catalog). A component can be a service, website, library, data pipeline, or any other piece of software managed as a single project. + +https://backstage.io/docs/features/software-catalog/system-model + +## Condition + +Conditions are used to return a conditional decision from a policy. They contain information about a given entity and restrictions on what types of users can view that entity. + +## Conditional decisions + +[Rules](#permission-rules) need additional data before they can be used in a decision. Once a [rule](#permission-rule) is bound to relevant information it forms a [condition](#condition). Conditional decisions tell the [permission framework](#permission) to delegate evaluation to the [plugin](#plugin) that owns the corresponding [resource](#permission-resource). Permission requests that result in a conditional decision are allowed if all of the provided conditions evaluate to be true. + +## Contributor + +A volunteer who helps to improve an OSS product such as Backstage. This volunteer effort includes coding, testing, technical writing, user support, and other work. A [user role](#user-role). + +## Decorators + +A transform stream. Decorators allow you to add additional information to documents outside of the [collator](#collators). They sit between the [collators](#collators) and the [indexers](#indexer) and can add extra fields to documents as they're being collated and indexed. + +Possible use cases for a decorator could be to bias search results or otherwise improve the search experience in your Backstage instance. Decorators can also be used to remove [metadata](#metadata), filter out, or even add extra documents at index-time. Part of [Backstage Search](#search). + +## Deployment Artifacts + +An executable or package file with all of the necessary information required to deploy the application at runtime. Deployment artifacts can be hosted on [package registries](#package-registry). + +## Developer + +Someone who writes code and develops software. + +A [user role](#user-role) defined as someone who uses a Backstage [app](#app). Might or might not actually be a software developer. + +## Developer Portal + +A centralized system comprising a user interface and database used to facilitate and document all the software projects within an organization. Backstage is both a developer portal and (by virtue of being based on plugins) a platform for creating developer portals. + +## Documents + +An abstract concept representing something that can be found by searching for it. A document can represent a software entity, a TechDocs page, etc. Documents are made up of metadata fields, at a minimum -- a title, text, and location (as in a URL). Part of [Backstage Search](#search). + +## Domain + +In the Backstage Catalog, a domain is an area that relates systems or entities to a business unit. + +https://backstage.io/docs/features/software-catalog/system-model + +## Entity + +What is cataloged in the Backstage Software Catalog. An entity is identified by a unique combination of [kind](#Kind), [namespace](#Namespace), and name. + +## Evaluator + +Someone who assesses whether Backstage is a suitable solution for their organization. The only [user role](#user-role) with a pre-deployment [use case](#use-case). + +## ID Token + +A [JWT](#jwt) used to prove a user's identity, containing for example the user's email. Part of [OpenID Connect](#openid-connect). + +## Index + +An index is a collection of [documents](#documents) of a given type. Part of [Backstage Search](#search). + +## Indexer + +A write stream of [documents](#documents). Part of [Backstage Search](#search). + +## Integrator + +Someone who develops one or more plugins that enable Backstage to interoperate with another software system. A [user role](#user-role). + +## JWT + +JSON Web Token. + +A popular JSON based token format that is commonly encrypted and/or signed, see [en.wikipedia.org/wiki/JSON_Web_Token](https://en.wikipedia.org/wiki/JSON_Web_Token) + +## Kind + +Classification of an [entity](#Entity) in the Backstage Software Catalog, for example _service_, _database_, and _team_. + +## Kubernetes Plugin + +A plugin enabling configuration of Backstage on a Kubernetes cluster. Kubernetes plugin has been promoted to a Backstage core feature. + +## Local Package + +One of the [packages](#package) within a [monorepo](#monorepo). These package may or may not also be published to a [package registry](#package-registry). + +## Monorepo + +A single repository for a collection of related software projects, such as all projects belonging to an organization. + +Can also mean: A project layout that consists of multiple [packages](#package) within a single project, where packages are able to have local dependencies on each other. Often enabled through tooling such as [lerna](https://lerna.js.org/) and [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) + +## Namespace + +In the Backstage Software Catalog, an optional attribute that can be used to organize [entities](#entity). + +## Objective + +A high level goal of a [user role](#User-Role) interacting with Backstage. Some goals of the _administrator_ user role, for example, are to maintain an instance ("app") of Backstage; to add and update functionality via plugins; and to troubleshoot issues. + +## OAuth + +Refers to: OAuth 2.0, a standard protocol for authorization. See [oauth.net/2/](https://oauth.net/2/). + +## Offline Access + +[OAuth](#oauth) flow that results in both a refresh token and [access token](#access-token), where the refresh token has a long expiration or never expires, and can be used to request more access tokens in the future. This lets the user go "offline" with respect to the token issuer, but still be able to request more tokens at a later time without further direct interaction for the user. + +## OpenID Connect + +A layer on top of [OAuth](#oauth) which standardises authentication. See [en.wikipedia.org/wiki/OpenID_Connect](https://en.wikipedia.org/wiki/OpenID_Connect). + +## OSS + +Open source software. + +## Package + +A package in the Node.js ecosystem, often published to a [package registry](#package-registry). + +## Package Registry + +A service that hosts packages. The most prominent example is [NPM](https://www.npmjs.com/). + +## Package Role + +The declared role of a package, see [package roles](../local-dev/cli-build-system.md#package-roles). + +## Permission + +A core Backstage plugin and framework that allows restriction of actions to specific users. + +Any action that a user performs within Backstage may be represented as a permission. More complex actions, like executing a [software template](#software-templates), may require [authorization](#authorization) for multiple permissions throughout the flow. Permissions are identified by a unique name and optionally include a set of attributes that describe the corresponding action. [Plugins](#plugin) are responsible for defining and exposing the permissions they enforce as well as enforcing restrictions from the permission framework. + +https://backstage.io/docs/permissions/overview + +## Permission Resource + +Not to be confused with [Software Catalog resources](#resource). Permission resources represent the objects that users interact with and that can be permissioned. + +## Permission Rule + +Rules are predicate-based controls that tap into a [resource](#permission-resource)'s data. + +## Persona + +Alternative term for a [User Role](#user-role). + +## Plugin + +A module in Backstage that adds a feature. All functionality in Backstage, even the core features, are implemented as plugins. + +## Policy + +User [permissions](#permission) are authorized by a central, user-defined [permission](#permission) policy. At a high level, a policy is a function that receives a Backstage user and [permission](#permission), and returns a decision to allow or deny. Policies are expressed as code, which decouples the framework from any particular [authorization](#authorization) model, like role-based access control (RBAC) or attribute-based access control (ABAC). + +## Policy decision + +Two important responsibilities of any authorization system are to decide if a user can do something, and to enforce that decision. In the Backstage permission framework, policies are responsible for decisions and plugins (typically backends) are responsible for enforcing them. + +## Popup + +A separate browser window opened on top of the previous one. + +## Procedure + +A set of actions that accomplish a goal, usually as part of a [use case](#Use-Case). A procedure can be high-level, containing other procedures, or can be as simple as a single [task](#Task). + +## Query Translators + +An abstraction layer between a search engine and the [Backstage Search](#search) backend. Allows for translation into queries against your search engine. Part of [Backstage Search](#search). + +## Refresh Token + +A string that an [OAuth](#oauth) client can use to get a new access token. + +https://oauth.net/2/refresh-tokens/ + +## Resource + +In the Backstage Catalog, an [entity](#entity) that represents a piece of physical or virtual infrastructure, for example a database, required by a component. + +https://backstage.io/docs/features/software-catalog/system-model + +## Role + +See [User Role](#User-Role). + +## Scope + +A string that describes a certain type of access that can be granted to a user using OAuth. + +## Search + +A Backstage plugin that provides a framework for searching a Backstage [app](#app), including the [Software Catalog](#Software-Catalog) and [TechDocs](#TechDocs). A core feature of Backstage. + +## Search Engines + +Existing search technology that [Backstage Search](#search) can take advantage of through its modular design. Lunr is the default search in [Backstage Search](#search). Part of [Backstage Search](#search). + +## Software Catalog + +A Backstage plugin that provides a framework to keep track of ownership and metadata for any number and type of software [components](#component). A core feature of Backstage. + +## Software Templates + +A Backstage plugin with which to create [components](#component) in Backstage. A core feature of Backstage. + +Can also refer to: A "skeleton" software project created and managed in the Backstage Software Templates tool. + +## System + +In the Backspace Catalog, a system is a collection of [entities](#entity) that cooperate to perform a function. A system generally provides one or a few public APIs and consists of a handful of components, resources and private APIs. + +https://backstage.io/docs/features/software-catalog/system-model + +## Task + +A low-level step-by-step [Procedure](#Procedure). + +## TechDocs + +A documentation solution that manages and generates a technical documentation from Markdown files stored with software component code. A core feature of Backstage. + +## Token + +A string containing information. + +## Use Case + +A purpose for which a [user role](#User-Role) interacts with Backstage. Related to [Objective](#objective): An objective is _what_ the user wants to do; a use case is _how_ the user does it. + +## User Role + +A class of Backspace user for purposes of analyzing [use cases](#use-case). One of: evaluator; administrator; developer; integrator; and contributor. diff --git a/microsite/docusaurus.config.js b/microsite/docusaurus.config.js index df2833b3e2..88fed74ac2 100644 --- a/microsite/docusaurus.config.js +++ b/microsite/docusaurus.config.js @@ -144,6 +144,14 @@ module.exports = { from: '/docs/features/software-templates/testing-scaffolder-alpha', to: '/docs/features/software-templates/migrating-to-rjsf-v5', }, + { + from: '/docs/auth/glossary', + to: '/docs/references/glossary' + }, + { + from: '/docs/overview/glossary', + to: '/docs/references/glossary' + } ], }, ], diff --git a/microsite/sidebars.json b/microsite/sidebars.json index e32e027807..1c151159db 100644 --- a/microsite/sidebars.json +++ b/microsite/sidebars.json @@ -37,7 +37,6 @@ "overview/versioning-policy", "overview/threat-model", "overview/support", - "overview/glossary", "overview/logos" ], "Getting Started": [ @@ -318,8 +317,7 @@ "auth/add-auth-provider", "auth/service-to-service-auth", "auth/autologout", - "auth/troubleshooting", - "auth/glossary" + "auth/troubleshooting" ], "Permissions": [ "permissions/overview", @@ -479,6 +477,9 @@ "architecture-decisions/adrs-adr013" ], "FAQ": ["faq/index", "faq/product", "faq/technical"], - "Accessibility": ["accessibility/index"] + "Accessibility": ["accessibility/index"], + "References": [ + "references/glossary" + ] } } From a560bfd7a3f7900c9f6534aa33a7b68c0f76f5ca Mon Sep 17 00:00:00 2001 From: Aramis Date: Fri, 26 Jan 2024 10:39:36 -0500 Subject: [PATCH 02/13] fix missing extension Signed-off-by: Aramis --- .../plugin-authors/02-adding-a-basic-permission-check.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/permissions/plugin-authors/02-adding-a-basic-permission-check.md b/docs/permissions/plugin-authors/02-adding-a-basic-permission-check.md index 223d55d3d8..0ef50670ef 100644 --- a/docs/permissions/plugin-authors/02-adding-a-basic-permission-check.md +++ b/docs/permissions/plugin-authors/02-adding-a-basic-permission-check.md @@ -4,7 +4,7 @@ title: 2. Adding a basic permission check description: Explains how to add a basic permission check to a Backstage plugin --- -If the outcome of a permission check doesn't need to change for different [resources](../../references/glossary#permission-resource), you can use a _basic permission check_. For this kind of check, we simply need to define a [permission](../../references/glossary.md#permission), and call `authorize` with it. +If the outcome of a permission check doesn't need to change for different [resources](../../references/glossary.md#permission-resource), you can use a _basic permission check_. For this kind of check, we simply need to define a [permission](../../references/glossary.md#permission), and call `authorize` with it. For this tutorial, we'll use a basic permission check to authorize the `create` endpoint in our todo-backend. This will allow Backstage integrators to control whether each of their users is authorized to create todos by adjusting their [permission policy](../../references/glossary.md#policy). From ecab5c032c5f0d2b3e4223065cca19bf4796e71a Mon Sep 17 00:00:00 2001 From: Aramis Date: Fri, 26 Jan 2024 10:40:45 -0500 Subject: [PATCH 03/13] update mkdocs file Signed-off-by: Aramis --- mkdocs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 8c9f84ba81..2a17613672 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -18,7 +18,6 @@ nav: - Release & Versioning Policy: 'overview/versioning-policy.md' - Backstage Threat Model: 'overview/threat-model.md' - Support and community: 'overview/support.md' - - Glossary: 'overview/glossary.md' - Logo assets: 'overview/logos.md' - Getting Started: - Getting Started: 'getting-started/index.md' @@ -171,7 +170,6 @@ nav: - Contributing New Providers: 'auth/add-auth-provider.md' - Service to Service Auth: 'auth/service-to-service-auth.md' - Troubleshooting Auth: 'auth/troubleshooting.md' - - Glossary: 'auth/glossary.md' - Deployment: - Deploying Backstage: 'deployment/index.md' - Scaling: 'deployment/scaling.md' @@ -218,3 +216,5 @@ nav: - Overview: 'faq/index.md' - Product FAQ: 'faq/product.md' - Technical FAQ: 'faq/technical.md' + - References: + - Glossary: 'references/glossary.md' From fe069efbe693cdc092d5d5b1729f7fe3b5c83796 Mon Sep 17 00:00:00 2001 From: Aramis Date: Fri, 26 Jan 2024 11:49:19 -0500 Subject: [PATCH 04/13] fix prettier Signed-off-by: Aramis --- microsite/docusaurus.config.js | 6 +++--- microsite/sidebars.json | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/microsite/docusaurus.config.js b/microsite/docusaurus.config.js index 88fed74ac2..a49fca85c7 100644 --- a/microsite/docusaurus.config.js +++ b/microsite/docusaurus.config.js @@ -146,12 +146,12 @@ module.exports = { }, { from: '/docs/auth/glossary', - to: '/docs/references/glossary' + to: '/docs/references/glossary', }, { from: '/docs/overview/glossary', - to: '/docs/references/glossary' - } + to: '/docs/references/glossary', + }, ], }, ], diff --git a/microsite/sidebars.json b/microsite/sidebars.json index 1c151159db..9bbc42dbfc 100644 --- a/microsite/sidebars.json +++ b/microsite/sidebars.json @@ -478,8 +478,6 @@ ], "FAQ": ["faq/index", "faq/product", "faq/technical"], "Accessibility": ["accessibility/index"], - "References": [ - "references/glossary" - ] + "References": ["references/glossary"] } } From fd563915ebc5c5831f7884b27fe46e3d5b9e3046 Mon Sep 17 00:00:00 2001 From: Aramis Sennyey <34432188+sennyeya@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:34:41 -0500 Subject: [PATCH 05/13] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Signed-off-by: Aramis Sennyey <34432188+sennyeya@users.noreply.github.com> --- docs/permissions/concepts.md | 2 +- docs/references/glossary.md | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/permissions/concepts.md b/docs/permissions/concepts.md index c3c32601df..556d752c52 100644 --- a/docs/permissions/concepts.md +++ b/docs/permissions/concepts.md @@ -16,4 +16,4 @@ In many cases, a permission represents a user's interaction with another object. See [Conditional decisions](../references/glossary.md#conditional-decisions). -A good example would be the catalog plugin's "has annotation" rule needs to know what annotation to look for on a given entity. The permission framework would respond to a request by the catalog plugin in this case with a condition decision. The catalog plugin would then need to correctly filter for entities matching the "has annotations" condition. This conditional behavior avoids coupling between policies and resource schemas, and allows plugins to evaluate complex rules in an efficient way. For example, a plugin may convert a conditional decision to a database query instead of loading and filtering objects in memory. +A good example would be the catalog plugin's "has annotation" rule which needs to know what annotation to look for on a given entity. The permission framework would respond to a request by the catalog plugin in this case with a condition decision. The catalog plugin would then need to correctly filter for entities matching the "has annotations" condition. This conditional behavior avoids coupling between policies and resource schemas, and allows plugins to evaluate complex rules in an efficient way. For example, a plugin may convert a conditional decision to a database query instead of loading and filtering objects in memory. diff --git a/docs/references/glossary.md b/docs/references/glossary.md index b82b2da064..abbb8ce5ef 100644 --- a/docs/references/glossary.md +++ b/docs/references/glossary.md @@ -183,7 +183,7 @@ Refers to: OAuth 2.0, a standard protocol for authorization. See [oauth.net/2/]( ## OpenID Connect -A layer on top of [OAuth](#oauth) which standardises authentication. See [en.wikipedia.org/wiki/OpenID_Connect](https://en.wikipedia.org/wiki/OpenID_Connect). +A layer on top of [OAuth](#oauth) which standardises authentication. See [the Wikipedia article](https://en.wikipedia.org/wiki/OpenID_Connect) for more details. ## OSS @@ -195,7 +195,7 @@ A package in the Node.js ecosystem, often published to a [package registry](#pac ## Package Registry -A service that hosts packages. The most prominent example is [NPM](https://www.npmjs.com/). +A service that hosts [packages](#package). The most prominent example is [NPM](https://www.npmjs.com/). ## Package Role @@ -247,7 +247,7 @@ An abstraction layer between a search engine and the [Backstage Search](#search) ## Refresh Token -A string that an [OAuth](#oauth) client can use to get a new access token. +A special token that an [OAuth](#oauth) client can use to get a new [access token](#access-token) when the latter expires. https://oauth.net/2/refresh-tokens/ @@ -263,7 +263,7 @@ See [User Role](#User-Role). ## Scope -A string that describes a certain type of access that can be granted to a user using OAuth. +A string that describes a certain type of access that can be granted to a user using OAuth, usually in conjunction with [access tokens](#access-token). ## Search @@ -307,4 +307,4 @@ A purpose for which a [user role](#User-Role) interacts with Backstage. Related ## User Role -A class of Backspace user for purposes of analyzing [use cases](#use-case). One of: evaluator; administrator; developer; integrator; and contributor. +A class of Backstage user for purposes of analyzing [use cases](#use-case). One of: evaluator; administrator; developer; integrator; and contributor. From 312257e1a1bfa85298878db72b98dd25cfb9cc4e Mon Sep 17 00:00:00 2001 From: Aramis Date: Mon, 29 Jan 2024 14:49:31 -0500 Subject: [PATCH 06/13] add better headers for differentiating similar terms and add more definitions Signed-off-by: Aramis --- docs/local-dev/cli-build-system.md | 2 +- docs/references/glossary.md | 62 +++++++++++++++++++----------- 2 files changed, 41 insertions(+), 23 deletions(-) diff --git a/docs/local-dev/cli-build-system.md b/docs/local-dev/cli-build-system.md index a95db95f85..ddcfa44cf5 100644 --- a/docs/local-dev/cli-build-system.md +++ b/docs/local-dev/cli-build-system.md @@ -311,7 +311,7 @@ The frontend production bundling creates your typical web content [bundle](../references/glossary.md#bundle), all contained within a single folder, ready for static serving. It is used when building packages with the `'frontend'` role, and unlike the development bundling there is no way to -build a production [bundle](../references/glossary.md#bundle) of an individual plugin. +build a production bundle of an individual plugin. The output of the bundling process is written to the `dist` folder in the package. Just like the development bundling, the production bundling is based on diff --git a/docs/references/glossary.md b/docs/references/glossary.md index abbb8ce5ef..751b56608d 100644 --- a/docs/references/glossary.md +++ b/docs/references/glossary.md @@ -15,7 +15,7 @@ https://oauth.net/2/access-tokens/ Someone responsible for installing and maintaining a Backstage [app](#app) for an organization. A [user role](#user-role). -## API +## API (catalog plugin) In the Backstage [Catalog](#catalog), an API is an [entity](#entity) representing a boundary between two [components](#component). @@ -37,6 +37,12 @@ A platform for creating and deploying [developer portals](#developer-portal), or Backstage is an incubation-stage open source project of the [Cloud Native Computing Foundation](#cloud-native-computing-foundation). +Can also refer to: [Backstage framework](#backstage-framework). + +## Backstage framework + +The actual framework that Backstage [plugins](#plugin) sit on. This spans both the frontend and the backend, and includes core functionality such as declarative integration, config reading, database management, and many more. + ## Bundle A collection of [deployment artifacts](#deployment-artifacts). @@ -47,6 +53,8 @@ Can also be: The output of the bundling process, which brings a collection of [p An organization's portfolio of software products managed in Backstage. +Can also be: The core Backstage plugin that handle ingestion and display of your organizations software products. + ## Cloud Native Computing A set of technologies that "empower organizations to build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds. Containers, service meshes, microservices, immutable infrastructure, and declarative APIs exemplify this approach." ([CNCF Cloud Native Definition v1.0](https://github.com/cncf/toc/blob/main/DEFINITION.md)). @@ -65,17 +73,17 @@ Cloud Native Computing Foundation. [OAuth](#oauth) flow where the client receives an [authorization code](#code) that is passed to the backend to be exchanged for an [access token](#access-token) and possibly a [refresh token](#refresh-token). -## Collators +## Collators (search plugin) Collators transform streams of [documents](#documents) into searchable texts. They're usually responsible for the data transformation and definition and collection process for specific [documents](#documents). Part of [Backstage Search](#search). -## Component +## Component (catalog plugin) A software product that is managed in the Backstage [Software Catalog](#software-catalog). A component can be a service, website, library, data pipeline, or any other piece of software managed as a single project. https://backstage.io/docs/features/software-catalog/system-model -## Condition +## Condition (permission plugin) Conditions are used to return a conditional decision from a policy. They contain information about a given entity and restrictions on what types of users can view that entity. @@ -87,7 +95,13 @@ Conditions are used to return a conditional decision from a policy. They contain A volunteer who helps to improve an OSS product such as Backstage. This volunteer effort includes coding, testing, technical writing, user support, and other work. A [user role](#user-role). -## Decorators +## Declarative integration + +A new paradigm for Backstage frontend plugins, allowing definition in config files instead of hosting complete React pages. + +https://backstage.io/docs/frontend-system + +## Decorators (search plugin) A transform stream. Decorators allow you to add additional information to documents outside of the [collator](#collators). They sit between the [collators](#collators) and the [indexers](#indexer) and can add extra fields to documents as they're being collated and indexed. @@ -107,7 +121,7 @@ A [user role](#user-role) defined as someone who uses a Backstage [app](#app). M A centralized system comprising a user interface and database used to facilitate and document all the software projects within an organization. Backstage is both a developer portal and (by virtue of being based on plugins) a platform for creating developer portals. -## Documents +## Documents (search plugin) An abstract concept representing something that can be found by searching for it. A document can represent a software entity, a TechDocs page, etc. Documents are made up of metadata fields, at a minimum -- a title, text, and location (as in a URL). Part of [Backstage Search](#search). @@ -129,11 +143,11 @@ Someone who assesses whether Backstage is a suitable solution for their organiza A [JWT](#jwt) used to prove a user's identity, containing for example the user's email. Part of [OpenID Connect](#openid-connect). -## Index +## Index (search plugin) An index is a collection of [documents](#documents) of a given type. Part of [Backstage Search](#search). -## Indexer +## Indexer (search plugin) A write stream of [documents](#documents). Part of [Backstage Search](#search). @@ -209,21 +223,13 @@ Any action that a user performs within Backstage may be represented as a permiss https://backstage.io/docs/permissions/overview -## Permission Resource - -Not to be confused with [Software Catalog resources](#resource). Permission resources represent the objects that users interact with and that can be permissioned. - -## Permission Rule - -Rules are predicate-based controls that tap into a [resource](#permission-resource)'s data. - ## Persona Alternative term for a [User Role](#user-role). ## Plugin -A module in Backstage that adds a feature. All functionality in Backstage, even the core features, are implemented as plugins. +A module in Backstage that adds a feature. All functionality outside of [the Backstage framework](#backstage-framework), even the core features, are implemented as plugins. ## Policy @@ -231,7 +237,7 @@ User [permissions](#permission) are authorized by a central, user-defined [permi ## Policy decision -Two important responsibilities of any authorization system are to decide if a user can do something, and to enforce that decision. In the Backstage permission framework, policies are responsible for decisions and plugins (typically backends) are responsible for enforcing them. +Two important responsibilities of any authorization system are to decide if a user can do something, and to enforce that decision. In the Backstage permission framework, [policies](#policy) are responsible for decisions and [plugins](#plugin) (typically backends) are responsible for enforcing them. ## Popup @@ -251,16 +257,28 @@ A special token that an [OAuth](#oauth) client can use to get a new [access toke https://oauth.net/2/refresh-tokens/ -## Resource +## Resource (catalog plugin) In the Backstage Catalog, an [entity](#entity) that represents a piece of physical or virtual infrastructure, for example a database, required by a component. https://backstage.io/docs/features/software-catalog/system-model +## Resource (permission plugin) + +Not to be confused with [Software Catalog resources](#resource-catalog-plugin). Permission resources represent the objects that users interact with and that can be permissioned. + +## Rule + +Rules are predicate-based controls that tap into a [resource](#resource-permission-plugin)'s data. + ## Role See [User Role](#User-Role). +## Scaffolder + +Known as [Software Templates](#software-templates). + ## Scope A string that describes a certain type of access that can be granted to a user using OAuth, usually in conjunction with [access tokens](#access-token). @@ -269,7 +287,7 @@ A string that describes a certain type of access that can be granted to a user u A Backstage plugin that provides a framework for searching a Backstage [app](#app), including the [Software Catalog](#Software-Catalog) and [TechDocs](#TechDocs). A core feature of Backstage. -## Search Engines +## Search Engine Existing search technology that [Backstage Search](#search) can take advantage of through its modular design. Lunr is the default search in [Backstage Search](#search). Part of [Backstage Search](#search). @@ -279,7 +297,7 @@ A Backstage plugin that provides a framework to keep track of ownership and meta ## Software Templates -A Backstage plugin with which to create [components](#component) in Backstage. A core feature of Backstage. +A Backstage plugin with which to create [components](#component) in Backstage. A core feature of Backstage. Also known as the scaffolder. Can also refer to: A "skeleton" software project created and managed in the Backstage Software Templates tool. @@ -289,7 +307,7 @@ In the Backspace Catalog, a system is a collection of [entities](#entity) that c https://backstage.io/docs/features/software-catalog/system-model -## Task +## Task (use cases) A low-level step-by-step [Procedure](#Procedure). From e221a0b285500e5c1ce269aefdf7376f7a3ddb63 Mon Sep 17 00:00:00 2001 From: Aramis Date: Mon, 29 Jan 2024 14:51:56 -0500 Subject: [PATCH 07/13] add more header clarifications Signed-off-by: Aramis --- docs/references/glossary.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/references/glossary.md b/docs/references/glossary.md index 751b56608d..c5d991292a 100644 --- a/docs/references/glossary.md +++ b/docs/references/glossary.md @@ -223,7 +223,7 @@ Any action that a user performs within Backstage may be represented as a permiss https://backstage.io/docs/permissions/overview -## Persona +## Persona (use cases) Alternative term for a [User Role](#user-role). @@ -231,11 +231,11 @@ Alternative term for a [User Role](#user-role). A module in Backstage that adds a feature. All functionality outside of [the Backstage framework](#backstage-framework), even the core features, are implemented as plugins. -## Policy +## Policy (permission plugin) User [permissions](#permission) are authorized by a central, user-defined [permission](#permission) policy. At a high level, a policy is a function that receives a Backstage user and [permission](#permission), and returns a decision to allow or deny. Policies are expressed as code, which decouples the framework from any particular [authorization](#authorization) model, like role-based access control (RBAC) or attribute-based access control (ABAC). -## Policy decision +## Policy decision (permission plugin) Two important responsibilities of any authorization system are to decide if a user can do something, and to enforce that decision. In the Backstage permission framework, [policies](#policy) are responsible for decisions and [plugins](#plugin) (typically backends) are responsible for enforcing them. @@ -243,11 +243,11 @@ Two important responsibilities of any authorization system are to decide if a us A separate browser window opened on top of the previous one. -## Procedure +## Procedure (use cases) A set of actions that accomplish a goal, usually as part of a [use case](#Use-Case). A procedure can be high-level, containing other procedures, or can be as simple as a single [task](#Task). -## Query Translators +## Query Translators (search plugin) An abstraction layer between a search engine and the [Backstage Search](#search) backend. Allows for translation into queries against your search engine. Part of [Backstage Search](#search). @@ -267,7 +267,7 @@ https://backstage.io/docs/features/software-catalog/system-model Not to be confused with [Software Catalog resources](#resource-catalog-plugin). Permission resources represent the objects that users interact with and that can be permissioned. -## Rule +## Rule (permission plugin) Rules are predicate-based controls that tap into a [resource](#resource-permission-plugin)'s data. From 4944f29f2cc61dbd29019cd5693c051301f8497f Mon Sep 17 00:00:00 2001 From: Aramis Date: Tue, 30 Jan 2024 22:28:02 -0500 Subject: [PATCH 08/13] update documentation and add a simple guide. Signed-off-by: Aramis --- docs/permissions/concepts.md | 4 +- docs/permissions/custom-rules.md | 2 +- .../02-adding-a-basic-permission-check.md | 4 +- .../03-adding-a-resource-permission-check.md | 2 +- docs/references/glossary.md | 118 ++++++++---------- docs/references/writing-a-glossary-entry.md | 83 ++++++++++++ 6 files changed, 141 insertions(+), 72 deletions(-) create mode 100644 docs/references/writing-a-glossary-entry.md diff --git a/docs/permissions/concepts.md b/docs/permissions/concepts.md index 556d752c52..8e348373cf 100644 --- a/docs/permissions/concepts.md +++ b/docs/permissions/concepts.md @@ -10,10 +10,10 @@ Two important responsibilities of any authorization system are to decide if a us ### Resources and rules -In many cases, a permission represents a user's interaction with another object. This object likely has information that policy authors can use to define more granular access. The permission framework introduces two abstractions to account for this: [resources](../references/glossary.md#permission-resource) and [rules](../references/glossary.md#permission-rule). For example, the catalog plugin defines a resource for catalog entities and a rule to check if an entity has a given annotation. +In many cases, a permission represents a user's interaction with another object. This object likely has information that policy authors can use to define more granular access. The permission framework introduces two abstractions to account for this: [resources](../references/glossary.md#resource-permission-plugin) and [rules](../references/glossary.md#rule-permission-plugin). For example, the catalog plugin defines a resource for catalog entities and a rule to check if an entity has a given annotation. ### Conditional decisions -See [Conditional decisions](../references/glossary.md#conditional-decisions). +[Rules](../references/glossary.md#rule-permission-plugin) need additional data before they can be used in a decision. Once a [rule](../references/glossary.md#rule-permission-plugin) is bound to relevant information it forms a [condition](../references/glossary.md#condition-permission-plugin). Conditional decisions tell the [permission framework](#permission) to delegate evaluation to the [plugin](#plugin) that owns the corresponding [resource](#resource-permission-plugin). Permission requests that result in a conditional decision are allowed if all of the provided conditions evaluate to be true. A good example would be the catalog plugin's "has annotation" rule which needs to know what annotation to look for on a given entity. The permission framework would respond to a request by the catalog plugin in this case with a condition decision. The catalog plugin would then need to correctly filter for entities matching the "has annotations" condition. This conditional behavior avoids coupling between policies and resource schemas, and allows plugins to evaluate complex rules in an efficient way. For example, a plugin may convert a conditional decision to a database query instead of loading and filtering objects in memory. diff --git a/docs/permissions/custom-rules.md b/docs/permissions/custom-rules.md index 4b38c8986d..9063ed7257 100644 --- a/docs/permissions/custom-rules.md +++ b/docs/permissions/custom-rules.md @@ -4,7 +4,7 @@ title: Defining custom permission rules description: How to define custom permission rules for existing resources --- -For some use cases, you may want to define custom [rules](../references/glossary.md#permission-rules) in addition to the ones provided by a plugin. In the [previous section](./writing-a-policy.md) we used the `isEntityOwner` rule to control access for catalog entities. Let's extend this policy with a custom rule that checks what [system](https://backstage.io/docs/features/software-catalog/system-model#system) an entity is part of. +For some use cases, you may want to define custom [rules](../references/glossary.md#rule-permission-plugin) in addition to the ones provided by a plugin. In the [previous section](./writing-a-policy.md) we used the `isEntityOwner` rule to control access for catalog entities. Let's extend this policy with a custom rule that checks what [system](https://backstage.io/docs/features/software-catalog/system-model#system) an entity is part of. ## Define a custom rule diff --git a/docs/permissions/plugin-authors/02-adding-a-basic-permission-check.md b/docs/permissions/plugin-authors/02-adding-a-basic-permission-check.md index 0ef50670ef..f3380bdb6f 100644 --- a/docs/permissions/plugin-authors/02-adding-a-basic-permission-check.md +++ b/docs/permissions/plugin-authors/02-adding-a-basic-permission-check.md @@ -4,9 +4,9 @@ title: 2. Adding a basic permission check description: Explains how to add a basic permission check to a Backstage plugin --- -If the outcome of a permission check doesn't need to change for different [resources](../../references/glossary.md#permission-resource), you can use a _basic permission check_. For this kind of check, we simply need to define a [permission](../../references/glossary.md#permission), and call `authorize` with it. +If the outcome of a permission check doesn't need to change for different [resources](../../references/glossary.md#resource-permission-plugin), you can use a _basic permission check_. For this kind of check, we simply need to define a permission, and call `authorize` with it. -For this tutorial, we'll use a basic permission check to authorize the `create` endpoint in our todo-backend. This will allow Backstage integrators to control whether each of their users is authorized to create todos by adjusting their [permission policy](../../references/glossary.md#policy). +For this tutorial, we'll use a basic permission check to authorize the `create` endpoint in our todo-backend. This will allow Backstage integrators to control whether each of their users is authorized to create todos by adjusting their [permission policy](../../references/glossary.md#policy-permission-plugin). We'll start by creating a new permission, and then we'll use the permission api to call `authorize` with it during todo creation. diff --git a/docs/permissions/plugin-authors/03-adding-a-resource-permission-check.md b/docs/permissions/plugin-authors/03-adding-a-resource-permission-check.md index 3feecc7342..76c1a85e24 100644 --- a/docs/permissions/plugin-authors/03-adding-a-resource-permission-check.md +++ b/docs/permissions/plugin-authors/03-adding-a-resource-permission-check.md @@ -4,7 +4,7 @@ title: 3. Adding a resource permission check description: Explains how to add a resource permission check to a Backstage plugin --- -When performing updates (or other operations) on specific [resources](../../references/glossary.md#permission-resource), the permissions framework allows for the decision to be based on characteristics of the resource itself. This means that it's possible to write policies that (for example) allow the operation for users that own a resource, and deny the operation otherwise. +When performing updates (or other operations) on specific [resources](../../references/glossary.md#resource-permission-plugin), the permissions framework allows for the decision to be based on characteristics of the resource itself. This means that it's possible to write policies that (for example) allow the operation for users that own a resource, and deny the operation otherwise. ## Creating the update permission diff --git a/docs/references/glossary.md b/docs/references/glossary.md index c5d991292a..165c000fc8 100644 --- a/docs/references/glossary.md +++ b/docs/references/glossary.md @@ -5,11 +5,9 @@ title: Glossary description: List of terms, abbreviations, and phrases used in Backstage, together with their explanations. --- -## Access token +## Access Token -A [token](#token) that gives access to perform actions on behalf of a user. It will commonly have a short expiry time, and be limited to a set of [scopes](#scope). Part of the [OAuth](#oauth) protocol. - -https://oauth.net/2/access-tokens/ +A [token](#token) that gives access to perform actions on behalf of a user. It will commonly have a short expiry time, and be limited to a set of [scopes](#scope). Part of the [OAuth](#oauth) protocol, see [their docs](https://oauth.net/2/access-tokens/) for more information. ## Administrator @@ -17,9 +15,7 @@ Someone responsible for installing and maintaining a Backstage [app](#app) for a ## API (catalog plugin) -In the Backstage [Catalog](#catalog), an API is an [entity](#entity) representing a boundary between two [components](#component). - -https://backstage.io/docs/features/software-catalog/system-model +An [entity](#entity) representing a schema that two [components](#component) use to communicate. See [the catalog docs](https://backstage.io/docs/features/software-catalog/system-model) for more information. ## App @@ -27,33 +23,29 @@ An installed instance of Backstage. An app can be local, intended for a single d ## Authorization Code -A type of [OAuth flow](#oauth) used by confidential and public clients to get an [access token](#access-token). - -https://oauth.net/2/grant-types/authorization-code/ +A type of [OAuth flow](#oauth) used by confidential and public clients to get an [access token](#access-token). See [the OAuth docs](https://oauth.net/2/grant-types/authorization-code/) for more details. ## Backstage -A platform for creating and deploying [developer portals](#developer-portal), originally created at Spotify. +1. A platform for creating and deploying [developer portals](#developer-portal), originally created at Spotify. Backstage is an incubation-stage open source project of the [Cloud Native Computing Foundation](#cloud-native-computing-foundation). -Backstage is an incubation-stage open source project of the [Cloud Native Computing Foundation](#cloud-native-computing-foundation). +2. [The Backstage Framework](#backstage-framework). -Can also refer to: [Backstage framework](#backstage-framework). - -## Backstage framework +## Backstage Framework The actual framework that Backstage [plugins](#plugin) sit on. This spans both the frontend and the backend, and includes core functionality such as declarative integration, config reading, database management, and many more. ## Bundle -A collection of [deployment artifacts](#deployment-artifacts). +1. A collection of [deployment artifacts](#deployment-artifacts). -Can also be: The output of the bundling process, which brings a collection of [packages](#package) into a single collection of [deployment artifacts](#deployment-artifacts). +2. The output of the bundling process, which brings a collection of [packages](#package) into a single collection of [deployment artifacts](#deployment-artifacts). ## Catalog -An organization's portfolio of software products managed in Backstage. +1. The core Backstage plugin that handle ingestion and display of your organizations software products. -Can also be: The core Backstage plugin that handle ingestion and display of your organizations software products. +2. An organization's portfolio of software products managed in Backstage. ## Cloud Native Computing @@ -73,39 +65,37 @@ Cloud Native Computing Foundation. [OAuth](#oauth) flow where the client receives an [authorization code](#code) that is passed to the backend to be exchanged for an [access token](#access-token) and possibly a [refresh token](#refresh-token). -## Collators (search plugin) +## Collator (search plugin) -Collators transform streams of [documents](#documents) into searchable texts. They're usually responsible for the data transformation and definition and collection process for specific [documents](#documents). Part of [Backstage Search](#search). +A transformer that takes streams of [documents](#documents) and outputs searchable texts. They're usually responsible for the data transformation and definition and collection process for specific [documents](#documents). ## Component (catalog plugin) -A software product that is managed in the Backstage [Software Catalog](#software-catalog). A component can be a service, website, library, data pipeline, or any other piece of software managed as a single project. - -https://backstage.io/docs/features/software-catalog/system-model +A software product that is managed in the Backstage [Software Catalog](#software-catalog). A component can be a service, website, library, data pipeline, or any other piece of software managed as a single project. See [the catalog docs](https://backstage.io/docs/features/software-catalog/system-model) for more information. ## Condition (permission plugin) Conditions are used to return a conditional decision from a policy. They contain information about a given entity and restrictions on what types of users can view that entity. -## Conditional decisions +A mapping from a given entity to criteria a user must fulfill to perform an action on that entity. Examples include `isOwner`, `hasRole`, etc. -[Rules](#permission-rules) need additional data before they can be used in a decision. Once a [rule](#permission-rule) is bound to relevant information it forms a [condition](#condition). Conditional decisions tell the [permission framework](#permission) to delegate evaluation to the [plugin](#plugin) that owns the corresponding [resource](#permission-resource). Permission requests that result in a conditional decision are allowed if all of the provided conditions evaluate to be true. +## Conditional Decision (permission plugin) + +A type of [decision](#policy-decision-permission-plugin) that allows for per-user evaluation of [conditions](#condition-permission-plugin) against a [resource](#resource-permission-plugin). See [Conditional Decisions](../permissions/concepts.md#conditional-decisions) ## Contributor A volunteer who helps to improve an OSS product such as Backstage. This volunteer effort includes coding, testing, technical writing, user support, and other work. A [user role](#user-role). -## Declarative integration +## Declarative Integration -A new paradigm for Backstage frontend plugins, allowing definition in config files instead of hosting complete React pages. +A new paradigm for Backstage frontend plugins, allowing definition in config files instead of hosting complete React pages. See [the Frontend System](https://backstage.io/docs/frontend-system). -https://backstage.io/docs/frontend-system +## Decorator (search plugin) -## Decorators (search plugin) +A transform stream. Decorators allow you to add additional information to documents outside of the [collator](#collator-search-plugin). They sit between the collators and the [indexers](#indexer-search-plugin) and can add extra fields to documents as they're being collated and indexed. -A transform stream. Decorators allow you to add additional information to documents outside of the [collator](#collators). They sit between the [collators](#collators) and the [indexers](#indexer) and can add extra fields to documents as they're being collated and indexed. - -Possible use cases for a decorator could be to bias search results or otherwise improve the search experience in your Backstage instance. Decorators can also be used to remove [metadata](#metadata), filter out, or even add extra documents at index-time. Part of [Backstage Search](#search). +Possible use cases for a decorator could be to bias search results or otherwise improve the search experience in your Backstage instance. Decorators can also be used to remove [metadata](#metadata), filter out, or even add extra documents at index-time. ## Deployment Artifacts @@ -121,19 +111,17 @@ A [user role](#user-role) defined as someone who uses a Backstage [app](#app). M A centralized system comprising a user interface and database used to facilitate and document all the software projects within an organization. Backstage is both a developer portal and (by virtue of being based on plugins) a platform for creating developer portals. -## Documents (search plugin) +## Document (search plugin) -An abstract concept representing something that can be found by searching for it. A document can represent a software entity, a TechDocs page, etc. Documents are made up of metadata fields, at a minimum -- a title, text, and location (as in a URL). Part of [Backstage Search](#search). +An abstract concept representing something that can be found by searching for it. A document can represent a software entity, a TechDocs page, etc. Documents are made up of metadata fields, at a minimum -- a title, text, and location (as in a URL). ## Domain -In the Backstage Catalog, a domain is an area that relates systems or entities to a business unit. - -https://backstage.io/docs/features/software-catalog/system-model +An area that relates systems or entities to a business unit. See [the catalog docs](https://backstage.io/docs/features/software-catalog/system-model) for more information. ## Entity -What is cataloged in the Backstage Software Catalog. An entity is identified by a unique combination of [kind](#Kind), [namespace](#Namespace), and name. +What is cataloged in the Backstage Software Catalog. An entity is identified by a unique combination of [kind](#Kind), [namespace](#Namespace), and name. See [the catalog docs](https://backstage.io/docs/features/software-catalog/system-model) for more information. ## Evaluator @@ -145,11 +133,11 @@ A [JWT](#jwt) used to prove a user's identity, containing for example the user's ## Index (search plugin) -An index is a collection of [documents](#documents) of a given type. Part of [Backstage Search](#search). +An index is a collection of [documents](#documents) of a given type. ## Indexer (search plugin) -A write stream of [documents](#documents). Part of [Backstage Search](#search). +A write stream of [documents](#documents). ## Integrator @@ -159,15 +147,19 @@ Someone who develops one or more plugins that enable Backstage to interoperate w JSON Web Token. -A popular JSON based token format that is commonly encrypted and/or signed, see [en.wikipedia.org/wiki/JSON_Web_Token](https://en.wikipedia.org/wiki/JSON_Web_Token) +A popular JSON based token format that is commonly encrypted and/or signed, see [the Wikipedia article](https://en.wikipedia.org/wiki/JSON_Web_Token) for more details. ## Kind Classification of an [entity](#Entity) in the Backstage Software Catalog, for example _service_, _database_, and _team_. -## Kubernetes Plugin +## Kubernetes (CNCF Project) -A plugin enabling configuration of Backstage on a Kubernetes cluster. Kubernetes plugin has been promoted to a Backstage core feature. +An open-source system for automating deployment, scaling, and management of containerized applications. + +## Kubernetes (Backstage plugin) + +A core Backstage plugin enabling a service owner-focused view of Kubernetes resources. ## Local Package @@ -175,13 +167,13 @@ One of the [packages](#package) within a [monorepo](#monorepo). These package ma ## Monorepo -A single repository for a collection of related software projects, such as all projects belonging to an organization. +1. A single repository for a collection of related software projects, such as all projects belonging to an organization. -Can also mean: A project layout that consists of multiple [packages](#package) within a single project, where packages are able to have local dependencies on each other. Often enabled through tooling such as [lerna](https://lerna.js.org/) and [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) +2. A project layout that consists of multiple [packages](#package) within a single project, where packages are able to have local dependencies on each other. Often enabled through tooling such as [lerna](https://lerna.js.org/) and [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) -## Namespace +## Namespace (catalog plugin) -In the Backstage Software Catalog, an optional attribute that can be used to organize [entities](#entity). +An optional attribute that can be used to organize [entities](#entity). ## Objective @@ -217,12 +209,10 @@ The declared role of a package, see [package roles](../local-dev/cli-build-syste ## Permission -A core Backstage plugin and framework that allows restriction of actions to specific users. +A core Backstage plugin and framework that allows restriction of actions to specific users. See [their docs](https://backstage.io/docs/permissions/overview) for more information. Any action that a user performs within Backstage may be represented as a permission. More complex actions, like executing a [software template](#software-templates), may require [authorization](#authorization) for multiple permissions throughout the flow. Permissions are identified by a unique name and optionally include a set of attributes that describe the corresponding action. [Plugins](#plugin) are responsible for defining and exposing the permissions they enforce as well as enforcing restrictions from the permission framework. -https://backstage.io/docs/permissions/overview - ## Persona (use cases) Alternative term for a [User Role](#user-role). @@ -235,9 +225,9 @@ A module in Backstage that adds a feature. All functionality outside of [the Bac User [permissions](#permission) are authorized by a central, user-defined [permission](#permission) policy. At a high level, a policy is a function that receives a Backstage user and [permission](#permission), and returns a decision to allow or deny. Policies are expressed as code, which decouples the framework from any particular [authorization](#authorization) model, like role-based access control (RBAC) or attribute-based access control (ABAC). -## Policy decision (permission plugin) +## Policy Decision (permission plugin) -Two important responsibilities of any authorization system are to decide if a user can do something, and to enforce that decision. In the Backstage permission framework, [policies](#policy) are responsible for decisions and [plugins](#plugin) (typically backends) are responsible for enforcing them. +A specific response to a user's request to perform an action on a list of [resources](#resource-permission-plugin). Can be either `Approve`, `Deny` or [`Conditional`](#conditional-decision-permission-plugin). ## Popup @@ -249,9 +239,9 @@ A set of actions that accomplish a goal, usually as part of a [use case](#Use-Ca ## Query Translators (search plugin) -An abstraction layer between a search engine and the [Backstage Search](#search) backend. Allows for translation into queries against your search engine. Part of [Backstage Search](#search). +An abstraction layer between a search engine and the [Backstage Search](#search) backend. Allows for translation into queries against your search engine. -## Refresh Token +## Refresh token A special token that an [OAuth](#oauth) client can use to get a new [access token](#access-token) when the latter expires. @@ -259,9 +249,7 @@ https://oauth.net/2/refresh-tokens/ ## Resource (catalog plugin) -In the Backstage Catalog, an [entity](#entity) that represents a piece of physical or virtual infrastructure, for example a database, required by a component. - -https://backstage.io/docs/features/software-catalog/system-model +An [entity](#entity) that represents a piece of physical or virtual infrastructure, for example a database, required by a component. See [the catalog docs](https://backstage.io/docs/features/software-catalog/system-model) for more information. ## Resource (permission plugin) @@ -287,9 +275,9 @@ A string that describes a certain type of access that can be granted to a user u A Backstage plugin that provides a framework for searching a Backstage [app](#app), including the [Software Catalog](#Software-Catalog) and [TechDocs](#TechDocs). A core feature of Backstage. -## Search Engine +## Search Engine (Backstage search) -Existing search technology that [Backstage Search](#search) can take advantage of through its modular design. Lunr is the default search in [Backstage Search](#search). Part of [Backstage Search](#search). +Existing search technology that [Backstage Search](#search) can take advantage of through its modular design. Lunr is the default search in Backstage Search. ## Software Catalog @@ -297,15 +285,13 @@ A Backstage plugin that provides a framework to keep track of ownership and meta ## Software Templates -A Backstage plugin with which to create [components](#component) in Backstage. A core feature of Backstage. Also known as the scaffolder. +1. A Backstage plugin with which to create [components](#component) in Backstage. A core feature of Backstage. Also known as the scaffolder. -Can also refer to: A "skeleton" software project created and managed in the Backstage Software Templates tool. +2. A "skeleton" software project created and managed in the Backstage Software Templates tool. -## System +## System (catalog plugin) -In the Backspace Catalog, a system is a collection of [entities](#entity) that cooperate to perform a function. A system generally provides one or a few public APIs and consists of a handful of components, resources and private APIs. - -https://backstage.io/docs/features/software-catalog/system-model +A system is a collection of [entities](#entity) that cooperate to perform a function. A system generally provides one or a few public APIs and consists of a handful of components, resources and private APIs. See [the catalog docs](https://backstage.io/docs/features/software-catalog/system-model) for more information. ## Task (use cases) diff --git a/docs/references/writing-a-glossary-entry.md b/docs/references/writing-a-glossary-entry.md new file mode 100644 index 0000000000..ecc9f22bd1 --- /dev/null +++ b/docs/references/writing-a-glossary-entry.md @@ -0,0 +1,83 @@ + + +## Entry format + +A glossary entry should consist of two required things and two optional things, + +1. a header, +2. a sentence defining what the thing is, and +3. an optional additional sentence or two giving more context into what the thing is and possible pointers on where to find more information, and possibly +4. links out to additional information. + +### The header + +The header (and first sentence) are the way users will discover your entry. The header has two parts, + +1. The actual term, this should be as minimal as possible. You can fit more information into the body of the entry. +2. A disambiguator, this allows users to understand when certain entries are context specific or may have different meanings in different contexts. + +### The term + +Think of this as a dictionary. Single words are the base units and most definitions refer to a single word. Acronyms are acceptable. An adjective and a noun are also useful, `conditional decision`, `backstage framework`, etc. After 3 or _maybe_ 4 words, you should be trying to simplify and place more content in your entry instead. + +In the title, your term should be in Title Case. It should also be in the singular. + +### The disambiguator + +The goal of a disambiguator is to differentiate terms that may have context specific meanings. This can have two interpretations, either + +1. There are multiple terms and we need to create clear boundaries between their contexts, or +2. There are single terms that have meanings that are specific to a single context. + +A good example for the first would be resources. Both the catalog plugin and permission plugin have the idea of resources, but they do not refer to the same thing. + +A good example for the second would be `Query translators`. In our case, this refers to _search_ query translators, but it may refer to database query translators or the latter. By disambiguating early, we avoid confusion. + +Beyond the above advice, there are no strong rules for when or when not to use a disambiguator. It is up to the entry writer and the reviewer. + +Your disambiguator should be short, but need not be a single word -- examples include "use cases", "search plugin", "catalog plugin". When used the disambiguator should have the following form, `({disambiguator})` (a parenthesis enclosed term) and will sit to the right of the title. Your disambiguator should use lower case. + +### Putting it together + +Your title should look like `{word} ({disambiguator})`. Entries are not nested besides the disambiguator and should sit at `##`. + +## The first sentence + +Your first sentence should include the what for your word. Your goal should be to answer the question, "What is x?". Do _not_ use the word in your first sentence. If you are using other words in the glossary in your definition, you should reference them following [the Referencing section](#referencing). + +If you have a term that could mean multiple things in the same context or the context is difficult to add boundaries for, you should separate each meaning into a separate section of the entry using an ordered list. For example, + +```md +## Bundle + +1. A deployment artifact. +2. A collection of packages. +``` + +## Additional sentences + +You may not be able to fully define what you want in a single sentence. Use more sentences to flush out the meaning; however, if you start to get into the weeds, you should reconsider rehousing that information into a plugin specific "concepts" section. It's okay for words to be duplicated across both if the concepts section adds meaningful technical or architectural discussion. + +## Linking out to additional resources + +If the term you're defining has a better or more in depth source for that information, link to it. This can include plugin specific concept documents, external documentation, or core framework documentation. + +You should format these links as `See [link1 title](link1.url) for more details`. Additional links beyond the first one should be appended with `and` or `or` as necessary. + +## Putting it all together + +```md +## Component (catalog plugin) + +A software product that is managed in the Backstage [Software Catalog](#software-catalog). A component can be a service, website, library, data pipeline, or any other piece of software managed as a single project. See [the catalog docs](https://backstage.io/docs/features/software-catalog/system-model) for more information. +``` + +## Referencing + +### In the glossary + +You should reference often. Words are defined recursively, especially in tech and un-nesting some terms requires additional glossary items. It's okay if your terms require multiple other terms to build on. Your goal with referencing is to provide small reusable words that you can trust users know the definition of. + +### In the text + +You should reference (and create a new entry if it doesn't exist) whenever you see a new word that a reasonable reader may not know. If you've already added a reference in your current passage -- in the glossary this will be your entry -- don't add a new reference. References should point initially to the glossary and if there is additional information (like a concepts page), the glossary should have a link to that page. From f0192acb7092ab85f57264a795de2df18ea17ff9 Mon Sep 17 00:00:00 2001 From: Aramis Date: Tue, 30 Jan 2024 22:29:46 -0500 Subject: [PATCH 09/13] fix: condition definition Signed-off-by: Aramis --- docs/references/glossary.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/references/glossary.md b/docs/references/glossary.md index 165c000fc8..773e7bfb50 100644 --- a/docs/references/glossary.md +++ b/docs/references/glossary.md @@ -75,8 +75,6 @@ A software product that is managed in the Backstage [Software Catalog](#software ## Condition (permission plugin) -Conditions are used to return a conditional decision from a policy. They contain information about a given entity and restrictions on what types of users can view that entity. - A mapping from a given entity to criteria a user must fulfill to perform an action on that entity. Examples include `isOwner`, `hasRole`, etc. ## Conditional Decision (permission plugin) From ddfeada98095ee2fd1de4f4fa844f31c85f036bd Mon Sep 17 00:00:00 2001 From: Aramis Date: Tue, 30 Jan 2024 22:43:23 -0500 Subject: [PATCH 10/13] remove lengthy definitions Signed-off-by: Aramis --- docs/permissions/concepts.md | 8 ++++++++ docs/references/glossary.md | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/permissions/concepts.md b/docs/permissions/concepts.md index 8e348373cf..7c8b9e9f69 100644 --- a/docs/permissions/concepts.md +++ b/docs/permissions/concepts.md @@ -4,6 +4,14 @@ title: Concepts description: A list of important permission framework concepts --- +### Permission + +Any action that a user performs within Backstage may be represented as a permission. More complex actions, like executing a [software template](../references/glossary.md#software-templates), may require [authorization](../references/glossary.md#authorization) for multiple permissions throughout the flow. Permissions are identified by a unique name and optionally include a set of attributes that describe the corresponding action. [Plugins](../references/glossary.md#plugin) are responsible for defining and exposing the permissions they enforce as well as enforcing restrictions from the permission framework. + +### Policy + +User [permissions](../references/glossary.md#permission-permission-plugin) are authorized by a central, user-defined permission policy. At a high level, a policy is a function that receives a Backstage user and permission, and returns a decision to allow or deny. Policies are expressed as code, which decouples the framework from any particular [authorization](../references/glossary.md#authorization) model, like role-based access control (RBAC) or attribute-based access control (ABAC). + ### Policy decision versus enforcement Two important responsibilities of any authorization system are to decide if a user can do something, and to enforce that decision. In the Backstage permission framework, policies are responsible for decisions and plugins (typically backends) are responsible for enforcing them. diff --git a/docs/references/glossary.md b/docs/references/glossary.md index 773e7bfb50..45c2bbcd35 100644 --- a/docs/references/glossary.md +++ b/docs/references/glossary.md @@ -91,9 +91,7 @@ A new paradigm for Backstage frontend plugins, allowing definition in config fil ## Decorator (search plugin) -A transform stream. Decorators allow you to add additional information to documents outside of the [collator](#collator-search-plugin). They sit between the collators and the [indexers](#indexer-search-plugin) and can add extra fields to documents as they're being collated and indexed. - -Possible use cases for a decorator could be to bias search results or otherwise improve the search experience in your Backstage instance. Decorators can also be used to remove [metadata](#metadata), filter out, or even add extra documents at index-time. +A transform stream that allows you to add additional information to [documents](#document-search-plugin). ## Deployment Artifacts @@ -205,11 +203,13 @@ A service that hosts [packages](#package). The most prominent example is [NPM](h The declared role of a package, see [package roles](../local-dev/cli-build-system.md#package-roles). -## Permission +## Permission (core Backstage plugin) A core Backstage plugin and framework that allows restriction of actions to specific users. See [their docs](https://backstage.io/docs/permissions/overview) for more information. -Any action that a user performs within Backstage may be represented as a permission. More complex actions, like executing a [software template](#software-templates), may require [authorization](#authorization) for multiple permissions throughout the flow. Permissions are identified by a unique name and optionally include a set of attributes that describe the corresponding action. [Plugins](#plugin) are responsible for defining and exposing the permissions they enforce as well as enforcing restrictions from the permission framework. +## Permission (permission plugin) + +A restriction on any action that a user can perform against a specific [resource](#resource-permission-plugin) or set of resources. See [the permission framework docs](../permissions/concepts.md#permission) for more details. ## Persona (use cases) @@ -221,7 +221,7 @@ A module in Backstage that adds a feature. All functionality outside of [the Bac ## Policy (permission plugin) -User [permissions](#permission) are authorized by a central, user-defined [permission](#permission) policy. At a high level, a policy is a function that receives a Backstage user and [permission](#permission), and returns a decision to allow or deny. Policies are expressed as code, which decouples the framework from any particular [authorization](#authorization) model, like role-based access control (RBAC) or attribute-based access control (ABAC). +A construct that takes in a Backstage user and a [permission](#permission-permission-plugin) and returns a [policy decision](#policy-decision-permission-plugin). ## Policy Decision (permission plugin) From a5f3d839ecff924a764bfeaa579973dec3329465 Mon Sep 17 00:00:00 2001 From: Aramis Date: Tue, 30 Jan 2024 22:43:30 -0500 Subject: [PATCH 11/13] fix links issue Signed-off-by: Aramis --- docs/references/writing-a-glossary-entry.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/references/writing-a-glossary-entry.md b/docs/references/writing-a-glossary-entry.md index ecc9f22bd1..90a13e9675 100644 --- a/docs/references/writing-a-glossary-entry.md +++ b/docs/references/writing-a-glossary-entry.md @@ -62,7 +62,13 @@ You may not be able to fully define what you want in a single sentence. Use more If the term you're defining has a better or more in depth source for that information, link to it. This can include plugin specific concept documents, external documentation, or core framework documentation. -You should format these links as `See [link1 title](link1.url) for more details`. Additional links beyond the first one should be appended with `and` or `or` as necessary. +You should format these links as + +```md +See [the glossary](./glossary.md) for more details. +``` + +. Additional links beyond the first one should be appended with `and` or `or` as necessary. ## Putting it all together From cd548c7c76ac7f9b3ae7f13a13cc20ae9962ad81 Mon Sep 17 00:00:00 2001 From: Aramis Sennyey <34432188+sennyeya@users.noreply.github.com> Date: Wed, 31 Jan 2024 12:31:50 -0500 Subject: [PATCH 12/13] Apply suggestions from code review Co-authored-by: Dave Welsch <116022979+dwelsch-esi@users.noreply.github.com> Signed-off-by: Aramis Sennyey <34432188+sennyeya@users.noreply.github.com> --- docs/references/glossary.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/references/glossary.md b/docs/references/glossary.md index 45c2bbcd35..9d525d2430 100644 --- a/docs/references/glossary.md +++ b/docs/references/glossary.md @@ -99,9 +99,9 @@ An executable or package file with all of the necessary information required to ## Developer -Someone who writes code and develops software. +1. Someone who writes code and develops software. -A [user role](#user-role) defined as someone who uses a Backstage [app](#app). Might or might not actually be a software developer. +2. A [user role](#user-role) defined as someone who uses a Backstage [app](#app). Might or might not actually be a software developer. ## Developer Portal @@ -251,11 +251,11 @@ An [entity](#entity) that represents a piece of physical or virtual infrastructu ## Resource (permission plugin) -Not to be confused with [Software Catalog resources](#resource-catalog-plugin). Permission resources represent the objects that users interact with and that can be permissioned. +A representation of an object that a user interacts with and that can be permissioned. Not to be confused with [Software Catalog resources](#resource-catalog-plugin). ## Rule (permission plugin) -Rules are predicate-based controls that tap into a [resource](#resource-permission-plugin)'s data. +A predicate-based control that taps into a [resource](#resource-permission-plugin)'s data. ## Role From b408b6e28dbee90afe6a0b76d078dff0f3b39747 Mon Sep 17 00:00:00 2001 From: Aramis Date: Wed, 31 Jan 2024 12:32:24 -0500 Subject: [PATCH 13/13] differentiate software templates and software template Signed-off-by: Aramis --- docs/references/glossary.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/references/glossary.md b/docs/references/glossary.md index 9d525d2430..8266dd02f7 100644 --- a/docs/references/glossary.md +++ b/docs/references/glossary.md @@ -251,7 +251,7 @@ An [entity](#entity) that represents a piece of physical or virtual infrastructu ## Resource (permission plugin) -A representation of an object that a user interacts with and that can be permissioned. Not to be confused with [Software Catalog resources](#resource-catalog-plugin). +A representation of an object that a user interacts with and that can be permissioned. Not to be confused with [Software Catalog resources](#resource-catalog-plugin). ## Rule (permission plugin) @@ -283,9 +283,11 @@ A Backstage plugin that provides a framework to keep track of ownership and meta ## Software Templates -1. A Backstage plugin with which to create [components](#component) in Backstage. A core feature of Backstage. Also known as the scaffolder. +A Backstage plugin with which to create [components](#component) in Backstage. A core feature of Backstage. Also known as the scaffolder. -2. A "skeleton" software project created and managed in the Backstage Software Templates tool. +## Software Template + +A "skeleton" software project created and managed in the Backstage Software Templates tool. ## System (catalog plugin)