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

refactor: OpenSearch resource-based permissions for amp-amg-opensearch blueprint #978

Conversation

alex-rawman
Copy link
Contributor

@alex-rawman alex-rawman commented Sep 21, 2022

What does this PR do?

This PR moves OpenSearch access management to OpenSearch resource-based policy, instead of fine grained index/collection/field rbac in the search engine.

Motivation

The rationale is: the fine-grained access requires an out-of-the-tree terraform provider or bulky and fragile scripts to provision users and roles in OpenSearch engine. Most of the cases need to provide secure access to:
a) Logs ingestors. Running in EKS they can utilize IRSA to access AWS services. This blueprint does that.
b) Logs readers. Apps owners, Platform teams, and other personas. They can use VPN or internal load balancers to access OpenSearch located inside of a VPC. Resource-based policy should allow "es:ESHttpGet" access to "arn:aws:es:$region:$acc_id:domain/$index/"
c) Domain admins. "es:
" access to "arn:aws:es:$region:$acc_id:domain/$index" (not /* postfix is absent)

This has been tested with OpenSearch 1.1, 1.2, 1.3.

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Yes, I have added a new example under examples to support my PR
  • Yes, I have created another PR for add-ons under add-ons repo (if applicable)
  • Yes, I have updated the docs for this feature
  • Yes, I ran pre-commit run -a with this PR

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

…hub.com:alex-rawman/terraform-aws-eks-blueprints into ref/amp_amg_opensrch_resource_based_permissions
Copy link
Contributor

@askulkarni2 askulkarni2 left a comment

Choose a reason for hiding this comment

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

@alex-rawman thanks for the PR. Please address the following:

  1. open a new issue for this as we do not want to close [Blueprint] - Multi-cluster monitoring, logging using AMP, AMG, Opensearch #823 with this.
  2. Move providers to main.tf for the blueprint.
  3. Fix the CI checks (we added a new one recently)

@alex-rawman alex-rawman changed the title ref (amp-amg-opensearch) OpenSearch resource-based permissions refactor: (amp-amg-opensearch) OpenSearch resource-based permissions Sep 26, 2022
@alex-rawman alex-rawman changed the title refactor: (amp-amg-opensearch) OpenSearch resource-based permissions refactor: OpenSearch resource-based permissions for amp-amg-opensearch blueprint Sep 26, 2022
… into ref/amp_amg_opensrch_resource_based_permissions
…hub.com:alex-rawman/terraform-aws-eks-blueprints into ref/amp_amg_opensrch_resource_based_permissions
@alex-rawman
Copy link
Contributor Author

alex-rawman commented Sep 26, 2022

New issue created
Resolves #993

@alex-rawman
Copy link
Contributor Author

@askulkarni2 @normalfaults new issue has been created. Providers have been moved to main.tf. CI checks are ok by that point. Please approve to ublock the rest of the checks

@askulkarni2 askulkarni2 temporarily deployed to EKS Blueprints Test September 30, 2022 21:09 Inactive
allamand pushed a commit to allamand/terraform-aws-eks-blueprints that referenced this pull request Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Blueprint] - Multi-cluster monitoring, logging using AMP, AMG, Opensearch
2 participants