Skip to content

Commit

Permalink
Address comments from Miki
Browse files Browse the repository at this point in the history
Signed-off-by: Kristen Tian <tyarong@amazon.com>
  • Loading branch information
kristenTian committed Oct 4, 2022
1 parent aae7cbc commit 5e5a9af
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions src/plugins/data_source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ An OpenSearch Dashboards plugin
This plugin introduces support for multiple data sources into OpenSearch Dashboards and provides related functions to connect to OpenSearch data sources.

## Configuration
Update the following configuration in the opensearch_dashboards.yml file to apply changes. Refer [here](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/data_source/config.ts) for supported configurations.
Update the following configuration in the `opensearch_dashboards.yml` file to apply changes. Refer to the schema [here](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/data_source/config.ts) for supported configurations.

1. The dataSource plugin is by default disabled, to enable it:
1. The dataSource plugin is disabled by default; to enable it:
`data_source.enabled: true`

2. The audit trail is by default enabled for logging the access to data source, to disable it:
2. The audit trail is enabled by default for logging the access to data source; to disable it:
`data_source.audit.enabled: false`

- Current auditor configuration:
Expand All @@ -20,19 +20,19 @@ data_source.audit.appender.layout.kind: 'pattern'
data_source.audit.appender.path: '/tmp/opensearch-dashboards-data-source-audit.log'
```

3. The encryption related config are default to:
3. The default encryption-related configuration parameters are:
```
data_source.encryption.wrappingKeyName: 'changeme'
data_source.encryption.wrappingKeyNamespace: 'changeme'
data_source.encryption.wrappingKey: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
```
Note that if any of the encryption keyring config value changed (wrappingKeyName/wrappingKeyNamespace/wrappingKey), all current encrypted credientails cannot be decrypted; Therefore, credentials of previously created data sources must be updated to continue use.
Note that if any of the encryption keyring configuration values change (wrappingKeyName/wrappingKeyNamespace/wrappingKey), none of the previously-encrypted credentials can be decrypted; therefore, credentials of previously created data sources must be updated to continue use.

**What is the best practice for generate secure wrapping key?**
**What are the best practices for generating a secure wrapping key?**
WrappingKey is an array of 32 random numbers. Read [more](https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator) about best practices for generating a secure wrapping key.

## Public
The public plugin is been used to control the enablement/disablement of the multidata source related feature in other plugin's public side. e.g. data_source_management, index_pattern_management
The public plugin is used to enable and disable the features related to multi data source available in other plugins. e.g. data_source_management, index_pattern_management

- Add as a required dependency for whole plugin on/off switch
- Add as opitional dependency for partial flow changes control
Expand All @@ -48,7 +48,7 @@ Currently supported client config is:

Data source service uses LRU cache to cache the root client to improve client pool usage.
#### Example usage:
In the RequestHandler, get data source client as such:
In the RequestHandler, get an instance of the client using:
```ts
client: OpenSearchClient = await context.dataSource.opensearch.getClient(dataSourceId);

Expand All @@ -60,7 +60,7 @@ apiCaller: LegacyAPICaller = context.dataSource.opensearch.legacy.getClient(data
The data source saved object client wrapper overrides the write related action for data source object in order to perform validation and encryption actions of the authentication information inside data source.

### Cryptography Client
The research issue regarding the solution selection: [#1756](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1756)
The research for choosing a suitable stack can be found in: [#1756](https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1756)
#### Example usage:
```ts
//Encrypt
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/data_source_management/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# DataSourceManagement Plugin

An OpenSearch Dashboards plugin for managing creation, update, list actions for data sources.
An OpenSearch Dashboards plugin for managing the creation, updating, and listing actions for data sources.

## Creation
Required inputs:

- Title: title of the data source, no duplicted titles are allowed.
- Title: the title of the data source which is unique throughout the instance.
- Endpoint URL: the connection endpoint of the data source.
- Authentication: authentication information for the data source, currently two types of authentication are supported:
- No auth: no authentication information needed.
- Basic auth: username & password.
- Authentication: authentication information for the data source; must be one the two types of authentication currently supported:
- No Authentication: no authentication required, and
- Username & Password: authenticating using a username and password combination.

## Update
Endpoint URL is immutable. If need to modify endpoint, create a new data source connection to work around.
Endpoint URL is immutable; If you need to change an endpoint URL, a new data source connection needs to be created.

---

Expand Down

0 comments on commit 5e5a9af

Please sign in to comment.