|
29 | 29 | - [Deployment](#deployment)
|
30 | 30 | - [OpenSearch Configuration](#opensearch-configuration)
|
31 | 31 | - [Disable automatic index creation](#disable-automatic-index-creation-1)
|
32 |
| - - [Create collection index](#create-collection-index) |
33 | 32 | - [OpenSearch fine-grained access control](#opensearch-fine-grained-access-control)
|
34 | 33 | - [Option 1 - API method](#option-1---api-method)
|
35 | 34 | - [Option 2 - Dashboard method](#option-2---dashboard-method)
|
36 | 35 | - [Populating and accessing credentials](#populating-and-accessing-credentials)
|
37 |
| - - [Proxying Stac-server through CloudFront](#proxying-stac-server-through-cloudfront) |
| 36 | + - [Create collection index](#create-collection-index) |
| 37 | + - [Proxying stac-server through CloudFront](#proxying-stac-server-through-cloudfront) |
38 | 38 | - [Locking down transaction endpoints](#locking-down-transaction-endpoints)
|
39 | 39 | - [AWS WAF Rule Conflicts](#aws-waf-rule-conflicts)
|
40 | 40 | - [API Gateway Logging](#api-gateway-logging)
|
@@ -524,15 +524,8 @@ There are some settings that should be reviewed and updated as needeed in the se
|
524 | 524 | | ITEMS_INDICIES_NUM_OF_SHARDS | Configure the number of shards for the indices that contain Items. | none |
|
525 | 525 | | ITEMS_INDICIES_NUM_OF_REPLICAS | Configure the number of replicas for the indices that contain Items. | none |
|
526 | 526 |
|
527 |
| -The preferred mechanism for populating the OpenSearch credentials to stac-server is to |
528 |
| -create a secret in AWS Secret Manager that contains the username and password. |
529 |
| -The recommended name for this Secret corresponds |
530 |
| -to the stac-server deployment as `{stage}/{service}/opensearch`, e.g., |
531 |
| -`dev/my-stac-server/opensearch`. |
532 |
| - |
533 |
| -The Secret type should be "Other type of secret" and |
534 |
| -have two keys, `username` and `password`, with the appropriate |
535 |
| -values, e.g., `stac_server` and whatever you set as the password when creating that user. |
| 527 | +Additionally, the credential for OpenSearch must be configured, as decribed in the |
| 528 | +section [Populating and accessing credentials](#populating-and-accessing-credentials). |
536 | 529 |
|
537 | 530 | After reviewing the settings, build and deploy:
|
538 | 531 |
|
@@ -573,44 +566,21 @@ It is recommended to disable the automatic index creation. This prevents the sit
|
573 | 566 | a group of Items are bulk indexed before the Collection in which they are contained has
|
574 | 567 | been created, and an OpenSearch index is created without the appropriate mappings.
|
575 | 568 |
|
576 |
| -This can either be done by calling the `/_cluster/settings` endpoint directly with the |
577 |
| -body: |
| 569 | +This can either be done by calling the `/_cluster/settings` endpoint directly: |
578 | 570 |
|
579 |
| -```json |
580 |
| - { |
581 |
| - "persistent": { |
582 |
| - "action.auto_create_index": "false" |
583 |
| - } |
584 |
| - } |
| 571 | +```shell |
| 572 | +curl -X "PUT" "${HOST}/_cluster/settings" \ |
| 573 | + -H 'Content-Type: application/json; charset=utf-8' \ |
| 574 | + -u "admin:${OPENSEARCH_MASTER_USER_PASSWORD}" \ |
| 575 | + -d '{"persistent": {"action.auto_create_index": "false"}}' |
585 | 576 | ```
|
586 | 577 |
|
587 | 578 | or setting that configuration via the OpenSearch Dashboard.
|
588 | 579 |
|
589 |
| -#### Create collection index |
590 |
| - |
591 |
| -The `collection` index must be created, which stores the metadata about each Collection. |
592 |
| -Invoke the `stac-server-<stage>-ingest` Lambda function with a payload of: |
593 |
| - |
594 |
| -```json |
595 |
| -{ |
596 |
| - "create_indices": true |
597 |
| -} |
598 |
| -``` |
599 |
| - |
600 |
| -This can be done with the [AWS CLI Version 2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html). |
601 |
| - |
602 |
| -```shell |
603 |
| -aws lambda invoke \ |
604 |
| - --function-name stac-server-dev-ingest \ |
605 |
| - --cli-binary-format raw-in-base64-out \ |
606 |
| - --payload '{ "create_indices": true }' \ |
607 |
| - /dev/stdout |
608 |
| -``` |
609 |
| - |
610 | 580 | #### OpenSearch fine-grained access control
|
611 | 581 |
|
612 |
| -As of version 2.0.0, stac-server only supports fine-grained access control to |
613 |
| -OpenSearch, and no longer supports "AWS Connection" mode. |
| 582 | +stac-server supports either fine-grained access control or AWS IAM authentication to |
| 583 | +OpenSearch. This section describes how to configure fine-grained access control. |
614 | 584 |
|
615 | 585 | **Warning**: Unfortunately, fine-grained access control cannot be enabled on an
|
616 | 586 | existing OpenSearch
|
@@ -760,9 +730,30 @@ OPENSEARCH_PASSWORD: xxxxxxxxxxx
|
760 | 730 | Setting these as environment variables can also be useful when running stac-server
|
761 | 731 | locally.
|
762 | 732 |
|
763 |
| -Stac-server is now ready to ingest data! |
| 733 | +stac-server is now ready to ingest data! |
| 734 | + |
| 735 | +#### Create collection index |
| 736 | + |
| 737 | +The `collection` index must be created, which stores the metadata about each Collection. |
| 738 | +Invoke the `stac-server-<stage>-ingest` Lambda function with a payload of: |
| 739 | + |
| 740 | +```json |
| 741 | +{ |
| 742 | + "create_indices": true |
| 743 | +} |
| 744 | +``` |
| 745 | + |
| 746 | +This can be done with the [AWS CLI Version 2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html). |
| 747 | + |
| 748 | +```shell |
| 749 | +aws lambda invoke \ |
| 750 | + --function-name stac-server-dev-ingest \ |
| 751 | + --cli-binary-format raw-in-base64-out \ |
| 752 | + --payload '{ "create_indices": true }' \ |
| 753 | + /dev/stdout |
| 754 | +``` |
764 | 755 |
|
765 |
| -### Proxying Stac-server through CloudFront |
| 756 | +### Proxying stac-server through CloudFront |
766 | 757 |
|
767 | 758 | The API Gateway URL associated with the deployed stac-server instance may not be the URL that you ultimately wish to expose to your API users. AWS CloudFront can be used to proxy to a more human readable URL. In order to accomplish this:
|
768 | 759 |
|
|
0 commit comments