Skip to content

Commit

Permalink
change cldsrv for more inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Jul 11, 2024
1 parent e72afd6 commit 7e87b8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ const api = {

const requestContexts = prepareRequestContexts(apiMethod, request,
sourceBucket, sourceObject, sourceVersionId);
log.info('requestContexts', { requestContexts });
// Extract all the _apiMethods and store them in an array
const apiMethods = requestContexts ? requestContexts.map(context => context._apiMethod) : [];
// Attach the names to the current request
Expand All @@ -165,6 +166,7 @@ const api = {
// TODO add support for returnTagCount in the bucket policy
// checks
isImplicitDeny[authResults[0].action] = authResults[0].isImplicit;
log.info('isImplicitDeny', { authResults });
// second item checks s3:GetObject(Version)Tagging action
if (!authResults[1].isAllowed) {
log.trace('get tagging authorization denial ' +
Expand All @@ -173,6 +175,7 @@ const api = {
}
} else {
for (let i = 0; i < authResults.length; i++) {
log.info('authResults', { authResults });
isImplicitDeny[authResults[i].action] = true;
if (!authResults[i].isAllowed && !authResults[i].isImplicit) {
// Any explicit deny rejects the current API call
Expand Down

0 comments on commit 7e87b8d

Please sign in to comment.