Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation for managed identity support in repository-azure plugin #7068

Merged
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
You will most likely not need to specify any parameters except for `bucket` and `base_path`. For allowed request parameters, see [Register or update snapshot repository API](https://opensearch.org/docs/latest/api-reference/snapshots/create-repository/).


### Registering an Azure storage account
### Registering an Azure storage account using Helm
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

Use the following steps to register a snapshot repository backed by an Azure storage account for an OpenSearch cluster deployed using Helm.

Expand Down Expand Up @@ -296,6 +296,55 @@
}
```

### General set up to use Microsoft Azure Blob Storage

Check failure on line 299 in _tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.HeadingCapitalization] 'General set up to use Microsoft Azure Blob Storage' is a heading and should be in sentence case. Raw Output: {"message": "[OpenSearch.HeadingCapitalization] 'General set up to use Microsoft Azure Blob Storage' is a heading and should be in sentence case.", "location": {"path": "_tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore.md", "range": {"start": {"line": 299, "column": 5}}}, "severity": "ERROR"}
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

To utilize Microsoft Azure Blob Storage as a snapshot repository, follow the steps below:

Check warning on line 301 in _tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.DirectionAboveBelow] Use 'following steps' instead of 'steps below' for versions or orientation within a document. Use 'above' and 'below' only for physical space or screen descriptions. Raw Output: {"message": "[OpenSearch.DirectionAboveBelow] Use 'following steps' instead of 'steps below' for versions or orientation within a document. Use 'above' and 'below' only for physical space or screen descriptions.", "location": {"path": "_tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore.md", "range": {"start": {"line": 301, "column": 78}}}, "severity": "WARNING"}
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
1. Install the `repository-azure` plugin on all nodes with the following command:

```bash
./bin/opensearch-plugin install repository-azure
```

1. Once the repository-azure plugin is installed, define your Azure Blob Storage settings before initializing the node. Start by defining your Azure Storage account name using the following secure setting:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

```bash
./bin/opensearch-keystore add azure.client.default.account
```

1. choose one of the following options to set up your authentication credentials for Azure Blob Storage:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

#### Using Azure storage account key
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

Use the following setting to specify your Azure Storage account key:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

```bash
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
./bin/opensearch-keystore add azure.client.default.key
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```


#### Shared access signature (SAS)

Check failure on line 324 in _tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.HeadingAcronyms] '(SAS)': Don't define acronyms in headings. Raw Output: {"message": "[OpenSearch.HeadingAcronyms] '(SAS)': Don't define acronyms in headings.", "location": {"path": "_tuning-your-cluster/availability-and-recovery/snapshots/snapshot-restore.md", "range": {"start": {"line": 324, "column": 33}}}, "severity": "ERROR"}
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

Use the following setting when accessing Azure with a shared access signature:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

```bash
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
./bin/opensearch-keystore add azure.client.default.sas_token
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```


#### Azure token credential
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

Starting from OpenSearch 2.15.0, you have the option to configure a token credential authentication flow in `opensearch.yml`. This method is distinct from connection string authentication, which necessitates a SAS or an account key.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

If you opt for token credential authentication, you will need to choose a token credential type. Although Azure offers multiple token credential types, as of OpenSearch version 2.15.0, only managed identity is supported.
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

To use managed identity, add your token credential type to `opensearch.yml` using either `managed` or `managed_identity` values. This indicates that managed identity is being used to perform token credential authentication:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved

```yml
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
azure.client.default.token_credential_type: "managed_identity"
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Naarcha-AWS for fixing the syntax, and i have resolved the requested change as well. Cheers Chengwu


Remember the following information when using Azure token credentials:
Naarcha-AWS marked this conversation as resolved.
Show resolved Hide resolved
- Token credential support is disabled in `opensearch.yml` by default.
- Token credentials will take precedent over Azure Storage account key or SAS when multiple options are configured.

## Take snapshots

You specify two pieces of information when you create a snapshot:
Expand Down
Loading