Skip to content

Commit 75036b9

Browse files
authored
Merge pull request #9308 from shirady/iam-do-not-allow-obc-accounts-create-users
IAM | Block OBC Accounts From IAM API
2 parents b5155d8 + eb6e8e3 commit 75036b9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/endpoint/iam/iam_rest.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ function authenticate_request(req) {
223223
async function authorize_request(req) {
224224
await req.account_sdk.load_requesting_account(req);
225225
req.account_sdk.authorize_request_account(req);
226+
// we want to block OBC accounts from IAM API related to user management
227+
// bucket_claim_owner is a property that we have only in OBC account in containerized deployments
228+
if (req.account_sdk.requesting_account.bucket_claim_owner) {
229+
dbg.error('OBC accounts are not allowed to perform IAM API actions');
230+
throw new IamError(IamError.AccessDeniedException);
231+
}
226232
}
227233

228234
function parse_op_name(req, action) {

0 commit comments

Comments
 (0)