Compare commits
No commits in common. "99d9abb28f7f91450857099c190f15328a74d499" and "237872a5a339f8432e7ee9fcc6734f1ce3dab920" have entirely different histories.
99d9abb28f
...
237872a5a3
|
@ -44,8 +44,8 @@ export function validateCredentials(
|
||||||
return errors.RequestTimeTooSkewed;
|
return errors.RequestTimeTooSkewed;
|
||||||
}
|
}
|
||||||
if (service !== 's3' && service !== 'iam' && service !== 'ring' &&
|
if (service !== 's3' && service !== 'iam' && service !== 'ring' &&
|
||||||
service !== 'sts' && service !== 'scality') {
|
service !== 'sts') {
|
||||||
log.warn('service in credentials is not one of s3/iam/ring/sts/scality', {
|
log.warn('service in credentials is not one of s3/iam/ring/sts', {
|
||||||
service,
|
service,
|
||||||
});
|
});
|
||||||
return errors.InvalidArgument;
|
return errors.InvalidArgument;
|
||||||
|
|
|
@ -11,7 +11,6 @@ import {
|
||||||
actionMapIAM,
|
actionMapIAM,
|
||||||
actionMapSSO,
|
actionMapSSO,
|
||||||
actionMapSTS,
|
actionMapSTS,
|
||||||
actionMapScality,
|
|
||||||
actionMapMetadata,
|
actionMapMetadata,
|
||||||
} from './utils/actionMaps';
|
} from './utils/actionMaps';
|
||||||
|
|
||||||
|
@ -37,8 +36,6 @@ function _findAction(service: string, method: string) {
|
||||||
return actionMapSTS[method];
|
return actionMapSTS[method];
|
||||||
case 'metadata':
|
case 'metadata':
|
||||||
return actionMapMetadata[method];
|
return actionMapMetadata[method];
|
||||||
case 'scality':
|
|
||||||
return actionMapScality[method];
|
|
||||||
default:
|
default:
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
@ -52,9 +49,6 @@ function _buildArn(
|
||||||
) {
|
) {
|
||||||
// arn:partition:service:region:account-id:resourcetype/resource
|
// arn:partition:service:region:account-id:resourcetype/resource
|
||||||
switch (service) {
|
switch (service) {
|
||||||
case 'scality': {
|
|
||||||
return `arn:aws:iam::${requesterInfo!.accountid}:/${generalResource}/`;
|
|
||||||
}
|
|
||||||
case 's3': {
|
case 's3': {
|
||||||
// arn:aws:s3:::bucket/object
|
// arn:aws:s3:::bucket/object
|
||||||
// General resource is bucketName
|
// General resource is bucketName
|
||||||
|
|
|
@ -199,14 +199,6 @@ const actionMapIAM = {
|
||||||
listUserTags: 'iam:ListUserTags',
|
listUserTags: 'iam:ListUserTags',
|
||||||
};
|
};
|
||||||
|
|
||||||
const actionMapScality = {
|
|
||||||
updateAccountAttributes: 'scality:UpdateAccountAttributes',
|
|
||||||
UpdateAccountQuota: 'scality:UpdateAccountQuota',
|
|
||||||
DeleteAccountQuota: 'scality:DeleteAccountQuota',
|
|
||||||
DeleteAccount: 'scality:DeleteAccount',
|
|
||||||
GenerateAccountAccessKey: 'scality:GenerateAccountAccessKey',
|
|
||||||
};
|
|
||||||
|
|
||||||
const actionMapSSO = {
|
const actionMapSSO = {
|
||||||
SsoAuthorize: 'sso:Authorize',
|
SsoAuthorize: 'sso:Authorize',
|
||||||
};
|
};
|
||||||
|
@ -229,5 +221,4 @@ export {
|
||||||
actionMapSSO,
|
actionMapSSO,
|
||||||
actionMapSTS,
|
actionMapSTS,
|
||||||
actionMapMetadata,
|
actionMapMetadata,
|
||||||
actionMapScality,
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue