Deep Dive

Using RCP in OpenSearch: Odd Fit or a Glimpse of the Future?

OpenSearch Serverless is the first RCP-enabled AWS service without direct cross-account access. So why does it have RCP support? The answer says a lot about where AWS governance is headed.

Hafsa Hafeez, Senior Cloud Threat Researcher at TrustOnCloud
Senior Cloud Threat Researcher, TrustOnCloud
6 min read
OpenSearch Serverless resource policy types: data access, network, and encryption
tl;dr

AWS recently introduced Resource Control Policies (RCPs) to OpenSearch Serverless. This might seem like an incremental rollout of RCP support. It is not. As of September 1, 2025, Amazon OpenSearch Serverless is the first RCP-enabled AWS service that does not support direct cross-account access.

So why support RCPs? Let's explore OpenSearch Serverless, how RCPs apply today, what to be careful about, and how they might hint at AWS's broader strategy for governance and defense-in-depth.

What is OpenSearch Serverless (with a security hat on)?

Think of OpenSearch Serverless as a library: the control plane is the librarian who decides which shelves exist and which books get added or removed, and the data plane is the reading room where people open books, search pages, and write new ones.

Concretely, the control plane creates and manages collections and indexes and their resource policies and any configuration APIs, while the data plane runs queries, ingests data, and powers Dashboards, granted by OpenSearch's own permissions (i.e., data access policies), aoss:APIAccessAll for API clients, and aoss:DashboardsAccessAll for Dashboards users.

Another fact (important for later) is that OpenSearch Serverless has 3 different resource policies that affect any resources mentioned in them (rather than the usual, directly attached to the resource):

OpenSearch Serverless three resource policy types: data access, network, and encryption
Figure 1: The three resource policy types in OpenSearch Serverless and how they interact with collections and indexes.
  • Data access policy (block all if none): grant granular access on a specific index/collection (read, write, etc.) only if the principal also has the coarse data-plane IAM permissions
  • Network policy (block if not configured): block access from unauthorized sources (internet, VPC endpoint, or AWS services)
  • Encryption policy (required): specify what keys should be used when a collection is created (AWS-owned keys, or specific customer-managed keys)

Why are RCPs weird with OpenSearch Serverless?

What are RCPs usually for?

Resource Control Policies (RCPs) act like an organization-wide safety net for your data. They apply to resources like a meta-resource policy (e.g., bucket policy in S3, queue policy in SQS). However, they restrict access only and do not grant additional rights.

Even if someone accidentally configures overly broad IAM permissions or a too-permissive resource policy, the RCP with the proper syntax ensures that other accounts or organizations from your approved list are blocked.

Explaining RCP is not the main point of this blog. You can read more about it in this excellent Fog Security article.

What is weird about RCP in OpenSearch?

While RCPs provide strong governance guardrails, their current application has some limitations. These don't negate their value but shape how you should design your policies for maximum effectiveness.

Quirk 1
RCPs impact resources, but not only

RCPs impact both control and data planes. A quick mental model is to imagine that the RCP scopes down the resource policies. But it is not the whole story, and AWS documentation (ref) makes it muddy (at least to me).

RCPs affect only resources that are managed by accounts [...]. RCPs apply to the resources that are authorized as part of an operation request. These resources can be found in the "Resource type" column of the Action table in the Service Authorization Reference. If a resource is specified in the "Resource type" column, then the RCPs of the calling principal account are applied.

The ever-expanding IAM Policy evaluation flowchart (ref) corroborates it.

AWS IAM policy evaluation flowchart showing where RCPs are applied
Figure 2: The IAM policy evaluation flowchart and where RCPs are applied in the decision chain.

So, it applies only to actions with a resource mentioned in the "Resource type" column in the Service Authorization Reference, right? Wrong. It applies to all actions.

In OpenSearch Serverless, you can restrict reading or updating account settings on the service, creating VPC endpoints, or any other action.

Example: RCP deny on GetAccountSettingsJSON
{
  "error": "An error occurred (AccessDeniedException) when calling the GetAccountSettings operation: User: <principal-arn> is not authorized to perform: aoss:GetAccountSettings on resource: arn:aws:aoss:<region>:<account-id>:* with an explicit deny in a resource control policy"
}

Note that this is true for other services; for example, you can block the Amazon S3 permission s3:PutAccountPublicAccessBlock using RCPs.

Conclusion: Consider any service supporting RCPs as a resource in itself.
Quirk 2
Bypassing via wildcards in data access policies

RCPs can be used to restrict the creation of data access policies for sensitive collections or indexes (e.g., deny the creation of data access policy if aoss:collection=critical or aoss:index=security). But if someone creates a data access policy with Collection: * and Index: *, the condition will not trigger, significantly bypassing the guardrail in place via RCPs.

Since data access policies are additive, the wildcard effectively grants access to all collections, including the restricted ones. The wildcard behavior in data access policies is also documented here.

Another related quirk is that even if each index is part of a collection, the condition aoss:collection does not apply to data access policies on indexes.

Conclusion: Deny explicitly * patterns to avoid bypass by wildcard, and cover explicitly collections and indexes.
Quirk 3
Gaps in network enforcement with SAML users

Network policies control whether collection endpoints and dashboards are public or private. It is also worth mentioning that network policies have additive behavior (ref), just like data access policies. Therefore, even if you have a more restrictive statement in your RCP, creating a network policy allowing public access to the wildcard collections will effectively grant public reachability to all collections.

RCPs can add network constraints (e.g., aws:SourceIP=<my-organization-ips>) to enforce network perimeters. However, even if an RCP restricts IAM actions by IP, that restriction only applies to IAM principals, not SAML users. Network policies still apply to SAML users.

Conclusion: For SAML identities, rely on network and data access policies, not network-related RCPs.

Final Thoughts: A New AWS Broader Strategy for Governance and Defense-in-Depth?

Thinking of the long term, RCPs have an interesting potential for the future. Let's have a look at how:

1. Safeguards for Potential Cross-Account Access

While OpenSearch Serverless doesn't directly support cross-account access (i.e., using an IAM principal from another AWS account), RCPs enable AWS and its customers to enforce boundaries proactively. As a result, AWS customers won't be caught off guard if or when cross-account capabilities are introduced.

In the past, AWS has also released features for services that could potentially expose data to external entities without any governance controls in place, prompting some customers to rush to mitigate potential issues. Examples include the release of cross-account for S3 access points and support for Lambda function URLs.

With RCPs, AWS enables customers to have more control over how they want their Cloud to behave, even with new features. This approach reflects governance-first thinking; controls are already in place, and risks can be mitigated before they surface.

2. A Fail-Safe Against Zero-Day Exploits

Even the most carefully designed IAM and VPC setups are not immune to unforeseen bugs or vulnerabilities. Should a zero-day exploit bypass IAM enforcement, RCPs act as a fail-closed safeguard, ensuring that unauthorized access attempts are still rejected at the resource layer.

3. Protection Against Cross-Service "Confused Deputy" Attacks

RCPs here help to set-and-forget a control for an issue mentioned in every Security section of the AWS Documentation.

Complex AWS environments often involve dozens of services interacting with one another. In such setups, a misconfiguration or overly broad permission could lead to a confused deputy problem where one service unintentionally acts on behalf of another.

The AWS team mentioned in the Cloud Security Forum that they check the services and features before release for confused deputy attacks, making them highly unlikely. However, researchers have found vulnerabilities in some services in recent years, such as AWS AppSync and Amazon DataZone.

Enforcing RCPs at the organization level gives organizations a safety net against accidental misuse or unforeseen vulnerabilities, even when IAM permissions are too broad (see an RCP ready to be deployed, courtesy of AWS).

In Conclusion

RCPs are not a silver bullet, but they are a long-awaited piece of defense-in-depth. Today, they provide real guardrails; tomorrow, they ensure that security and governance remain ahead as OpenSearch Serverless or other services evolve.

Finally, feel free to contact us if you want access to a detailed and actionable security assessment for over 250+ Cloud Services (see an example for S3), or just for a friendly chat!

Hafsa Hafeez, Senior Cloud Threat Researcher at TrustOnCloud
Senior Cloud Threat Researcher, TrustOnCloud
Hafsa Hafeez is a Senior Cloud Threat Researcher at TrustOnCloud, where she specializes in in-depth research on threat scenarios across multi-cloud environments, including AWS, GCP, and Azure.
Get a detailed security assessment for your cloud services
Walk through actionable controls across 250+ cloud services with a TrustOnCloud researcher.
Blog

Using RCP in OpenSearch: Odd fit or a glimpse of the future?

TL;DR

AWS recently introduced Resource Control Policies (RCPs) to OpenSearch Serverless. This might seem like an incremental rollout of RCP support. It is not. As of September 1, 2025, Amazon OpenSearch Serverless is the first RCP‑enabled AWS service that does not support direct cross-account access.

So why support RCPs? Let’s explore OpenSearch Serverless, how RCPs apply today, what to be careful about, and how they might hint at AWS’s broader strategy for governance and defense-in-depth.

What is OpenSearch Serverless (with a security hat on)?

Think of OpenSearch Serverless as a library: the control plane is the librarian who decides which shelves exist and which books get added or removed, and the data plane is the reading room where people open books, search pages, and write new ones.

Concretely, the control plane creates and manages collections and indexes and their resource policies and any configuration APIs, while the data plane runs queries, ingests data, and powers Dashboards, granted by OpenSearch own permissions (i.e., data access policies), aoss:APIAccessAll for API clients, and aoss:DashboardsAccessAll for Dashboards users.

Another fact (important for later) is that OpenSearch Serverless has 3 different resource policies that affect any resources mentioned in them (rather than the usual, directly attached to the resource):

hafsa1

  • Data access policy (block all if none): grant granular access on a specific index/collection (read, write, etc.) only if the principal also has the coarse data-plane IAM permissions
  • Network policy (block if not configured): block access from unauthorized sources (internet, VPC endpoint, or AWS services)
  • Encryption policy (required): Specify what keys should be used when a collection is created (AWS-owned keys, or specific customer-managed keys)

Why are RCPs weird with OpenSearch Serverless?

What are RCPs usually for?

Resource Control Policies (RCPs) act like an organization-wide safety net for your data. They apply to resources like a meta-resource policy (e.g., bucket policy in S3, queue policy in SQS). However, they restrict access only and do not grant additional rights.

Even if someone accidentally configures overly broad IAM permissions or a too-permissive resource policy, the RCP with the proper syntax ensures that other accounts or organizations from your approved list are blocked.

Explaining RCP is not the main point of this blog. You can read more about it in this excellent Fog Security article.

What is weird about RCP in OpenSearch?

While RCPs provide strong governance guardrails, their current application has some limitations. These don’t negate their value but shape how you should design your policies for maximum effectiveness.

Quirk 1: RCPs impact resources, but not only.

RCPs impact both control and data planes. A quick mental model is to imagine that the RCP scopes down the resource policies. But it is not the whole story, and AWS documentation (ref) makes it muddy (at least to me).

RCPs affect only resources that are managed by accounts […]. RCPs apply to the resources that are authorized as part of an operation request. These resources can be found in the “Resource type” column of the Action table in the Service Authorization Reference. If a resource is specified in the “Resource type” column, then the RCPs of the calling principal account are applied.

The ever-expanding IAM Policy evaluation flowchart (ref) corroborates it.

So, it applies only to actions with a resource mentioned in the “Resource type” column in the Service Authorization Reference, right? Wrong. It applies to all actions.

In OpenSearch Serverless, you can restrict reading or updating account settings on the service, creating VPC endpoints, or any other action.

{
  "error": "An error occurred (AccessDeniedException) when calling the GetAccountSettings operation: User: <principal-arn> is not authorized to perform: aoss:GetAccountSettings on resource: arn:aws:aoss:<region>:<account-id>:* with an explicit deny in a resource control policy"
}

Note that this is true for other services; for example, you can block the Amazon S3 permission s3:PutAccountPublicAccessBlock using RCPs.

Conclusion: Consider any service supporting RCPs as a resource in itself.

Quirk 2: Bypassing via wildcards in data access policies

RCPs can be used to restrict the creation of data access policies for sensitive collections or indexes (e.g., deny the creation of data access policy if aoss:collection=critical or aoss:index=security). But if someone creates a data access policy with Collection: * and Index: *; the condition will not trigger, significantly bypassing the guardrail in place via RCPs.

Since data access policies are additive, the wildcard effectively grants access to all collections, including the restricted ones. The wildcard behavior in data access policies is also documented here.

Another related quirk is that even if each index is part of a collection, the condition aoss:collection does not apply to data access policies on indexes.

Conclusion: Deny explicitly * patterns to avoid bypass by wildcard, and cover explicitly collections and indexes.

Quirk 3: Gaps in Network Enforcement with SAML Users

Network policies control whether collection endpoints and dashboards are public or private. It is also worth mentioning that network policies have additive behavior (ref), just like data access policies. Therefore, even if you have a more restrictive statement in your RCP, creating a network policy allowing public access to the wildcard collections will effectively grant public reachability to all collections.

RCPs can add network constraints (e.g., aws:SourceIP=<my-organization-ips>) to enforce network perimeters. However, even if an RCP restricts IAM actions by IP, that restriction only applies to IAM principals, not SAML users. Network policies still apply to SAML users.

Conclusion: For SAML identities, rely on network and data access policies, not network-related RCPs.

Final Thoughts: A new AWS’s broader strategy for governance and defense-in-depth?

Thinking of the long term, RCPs have an interesting potential for the future. Let’s have a look at how:

1. Safeguards for Potential Cross-Account Access

While OpenSearch Serverless doesn’t directly support cross-account access (i.e., using an IAM principal from another AWS account), RCPs enable AWS and its customers to enforce boundaries proactively. As a result, AWS customers won’t be caught off guard if or when cross-account capabilities are introduced.

In the past, AWS has also released features for services that could potentially expose data to external entities without any governance controls in place, prompting some customers to rush to mitigate potential issues. Examples include the release of cross-account for S3 access points and support for Lambda function URLs.

With RCPs, AWS enables customers to have more control over how they want their Cloud to behave, even with new features. This approach reflects governance-first thinking; controls are already in place, and risks can be mitigated before they surface.

2. A Fail-Safe Against Zero-Day Exploits

Even the most carefully designed IAM and VPC setups are not immune to unforeseen bugs or vulnerabilities. Should a zero-day exploit bypass IAM enforcement, RCPs act as a fail-closed safeguard, ensuring that unauthorized access attempts are still rejected at the resource layer. 

3. Protection Against Cross-Service “Confused Deputy” Attacks

RCPs here help to set-and-forget a control for an issue mentioned in every Security section of the AWS Documentation.

Complex AWS environments often involve dozens of services interacting with one another. In such setups, a misconfiguration or overly broad permission could lead to a confused deputy problem where one service unintentionally acts on behalf of another.

The AWS team mentioned in the Cloud Security Forum that they check the services and features before release for confused deputy attacks, making them highly unlikely. However, researchers have found vulnerabilities in some services in recent years, such as AWS AppSync and Amazon DataZone.

Enforcing RCPs at the organization level gives organizations a safety net against accidental misuse or unforeseen vulnerabilities, even when IAM permissions are too broad (see an RCP ready to be deployed, courtesy of AWS).

In Conclusion

RCPs are not a silver bullet, but they are a long-awaited piece of defense-in-depth. Today, they provide real guardrails; tomorrow, they ensure that security and governance remain ahead as OpenSearch Serverless or other services evolve.

Finally, feel free to contact us if you want access to a detailed and actionable security assessment for over 250+ Cloud Services (see an example for S3), or just for a friendly chat!

Picture of Hafsa Hafeez - Senior Cloud Threat Researcher
Hafsa Hafeez - Senior Cloud Threat Researcher

Hafsa Hafeez is a Senior Cloud Threat Researcher at TrustOnCloud, where she specializes in in-depth research on threat scenarios across multi-cloud environments, including AWS, GCP, and Azure.