Adding UUID tag while creating certificates via ACM

0

While creating a private certificate via ACM, i have added tag as key: UUID value: "xxxxx"

While adding a condition in IAMRolesAnywhere trust policy i added below: "Condition": { "StringEquals": { "aws:ResourceTag/UUID": "xxxxx" } }

If i do that, while generating temporary credentials, i get error: 2023/04/11 08:48:11 AccessDeniedException: Unable to assume role for arn:aws:iam::977695881:role/testIAMRolesAnywhere.

If i remove condition, it works fine.

Is there anything wrong with the condition?

1개 답변
0

That condition is testing the tags of the role, since that is the resource specified in the policy and the resource the policy is attached to.

Instead of testing the tag of a certificate, test the attributes that are extracted from the cert. See: Trust policy.

I would put it in the Subject Name Alternative, DirName, CommonName. But you will need to use the CLI to generate this as the console does not have this option. See: issue-certificate.

profile pictureAWS
전문가
kentrad
답변함 일 년 전
  • Ok, thanks. In certificates, subject CN is the domain name we provide while ACM creates the certificate. My use case needs to add UUID in the certificates to differentiate between 2 devices. Where should UUID be added?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인