Skip to content

Commit

Permalink
Update workspace.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanyl authored Oct 9, 2023
1 parent 5d30669 commit 7efa4f9
Showing 1 changed file with 94 additions and 2 deletions.
96 changes: 94 additions & 2 deletions docs/plugins/workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In an OpenSearch cluster, when viewed from the perspective of OpenSearch Dashboa
into two primary types:

1. OSD Metadata: This category includes critical OSD metadata, which is stored in a metadata store. Examples of OSD
metadata encompass visualizations, dashboards, index patterns, UI settings, and similar elements.
metadata includes visualizations, dashboards, index patterns, UI settings, etc.
2. Other OpenSearch Indices: In addition to OSD metadata, an OpenSearch cluster may contain various other OpenSearch
indices for storing data unrelated to OSD.

Expand Down Expand Up @@ -71,9 +71,101 @@ customized with specific features tailored to its purpose.

Example #2 is a system-reserved workspace, automatically generated by the workspace plugin for the user. The reserved flag is set to true.
This workspace includes the `@management` category, which includes all features within that category. The `@` symbol indicates that it is a
category, and it serves as a means to organize and visually present related features.
category. The `management` is the category id which the plugins specified when register applications.

## Associate saved objects with workspaces
Saved objects, such as dashboards, visualizations, and index patterns, form the backbone of data visualization and analysis in OpenSearch Dashboards.
However, as the volume of saved objects grows, keeping them organized becomes increasingly challenging. Grouping saved objects into distinct workspaces,
each serving a specific purpose or team. This association not only simplifies the process of finding and accessing relevant saved objects but also
enhances security and access control (Please ref to this [DOC](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4633) for more details
about access control).

A new attribute, `workspaces`, is being added to saved objects which type is an array of string. A saved object can be associated with one
or multiple workspaces. The saved objects(dashboards, visualizations, etc) will only be displayed in the associated workspaces.

The follow example shows the dashboard object is associated with workspace which id is `M5NqCu`
```typescript
{
type: "dashboard",
id: "da123f20-6680-11ee-93fa-df944ec23359",
workspaces: ["M5NqCu"]
}
```

Saved object can also associated with multiple workspaces, this is useful in scenarios where a saved object is relevant
to multiple teams, projects, or use cases.

Consider the following example, where a visualization is associated with multiple workspaces:
```typescript
{
type: "visualization",
id: "da123f20-6680-11ee-93fa-df944ec23359",
workspaces: ["M5NqCu", "<TeamA-workspace-id>", "<Analytics-workspace-id>"]
}
```
By allowing saved objects to be linked with multiple workspaces, this enables users to share and collaborate on resources
across various workspaces(teams).

## Copy saved objects among workspaces
While associating saved objects with multiple workspaces links a single object instance to multiple places, copying saved
objects takes a different approach. When copying objects, it creates hard copies of the objects in the target workspace,
regardless of their original workspaces.

For example, if copy this object to `<target-workspace>`
```typescript
{
type: "visualization",
id: "da123f20-6680-11ee-93fa-df944ec23359",
workspaces: ["M5NqCu", "<TeamA-workspace-id>", "<Analytics-workspace-id>"]
}
```
Then a new object will be created with new `id` and associated with `<target-workspace>`
```typescript
{
type: "visualization",
id: "<new-object-id>",
workspaces: ["<target-workspace>"]
}
```
### Handling Dependencies
A significant aspect of copying saved objects is the handling of dependencies. Many saved objects, particularly
visual objects like dashboards and visualizations, often have a hierarchical structure with dependencies.
For example, a dashboard may depend on multiple visualizations, and each visualization may rely on specific
index pattern objects.

The copying process is not limited to the saved object itself. Instead, it copies the entire dependency hierarchy
associated with the saved object. For example:
1. If the visualization depends on specific index pattern objects, these index pattern objects will also be duplicated
in `<target-workspace>`.
2. If the dashboard depends on multiple visualizations, those visualizations and their associated index patterns will
be copied as well.

This ensures that the copied saved object in <target-workspace> retains its functionality and context, with all necessary
dependencies in place.

## Reserved workspaces
Reserved workspaces are created automatically by workspace plugin, they have pre-defined configurations, including features
and permissions tailored to their intended purposes. Currently, workspace plugin creates three distinct reserved workspace:

1. Global Workspace
- **Purpose**: The Global Workspace serves as a centralized environment for managing resources and configurations that apply
globally across OpenSearch Dashboards.
- **Features**: It includes features that are accessible to all users, regardless of their specific teams or projects.
- **Permissions**: All users have `read` and `write` permission to public workspace and its associated saved objects.
2. Personal Workspace
- **Purpose**: The Personal Workspace is designed to provide individual users with a dedicated space for their personal work.
However, it's important to note that a **Personal Workspace will only be created if user/role information can be retrieved**.
- **Features**: Users have the flexibility to configure their Personal Workspace according to their preferences and requirements.
- **Permissions**: Access to the Personal Workspace is limited to the user who owns it, ensuring data privacy and personalization.
3. Management Workspace
- **Purpose**: The Management Workspace is dedicated to administrative tasks and configurations within OpenSearch Dashboards.
- **Features**: It encompasses features and tools necessary for system administrators to manage OSD advanced settings, data sources
, and other administrative functions such as security configuration, etc.
- **Permissions**: Initially, access to the Management Workspace is set to public during initialization, administrators have the
responsibility and privilege to restrict access and define permissions within the Management Workspace.






0 comments on commit 7efa4f9

Please sign in to comment.