Skip to content

Commit 268dffa

Browse files
committed
fix: use open access policy for FGAC-enabled domains
A scoped Principal (account root) blocks basic auth requests to the Security API, preventing FGAC role mapping. Use open access policy with Principal: * and let FGAC handle all authorization. Also map roles to security_manager for PPL permissions. Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
1 parent 260444b commit 268dffa

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

aws/cli-installer/src/aws.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,14 @@ async function createManagedDomain(cfg) {
193193
} catch (err) {
194194
if (err.name !== 'ResourceNotFoundException') throw err;
195195

196+
// Open access policy — FGAC (fine-grained access control) handles authorization.
197+
// A scoped Principal (e.g. account root) blocks basic auth requests, which
198+
// prevents the Security API from working for FGAC role mapping.
196199
const accessPolicy = JSON.stringify({
197200
Version: '2012-10-17',
198201
Statement: [{
199202
Effect: 'Allow',
200-
Principal: { AWS: `arn:aws:iam::${cfg.accountId}:root` },
203+
Principal: { AWS: '*' },
201204
Action: 'es:*',
202205
Resource: `arn:aws:es:${cfg.region}:${cfg.accountId}:domain/${cfg.osDomainName}/*`,
203206
}],

0 commit comments

Comments
 (0)