@Override public List<Grant> apply(OwnerIdPair ownerIds) { List<Grant> grants = PrivateOnlyGrantBuilder.INSTANCE.apply(ownerIds); Grantee grantee = new Grantee(); grantee.setGroup(new Group(ObjectStorageProperties.S3_GROUP.EC2_BUNDLE_READ.toString())); Grant grant = new Grant(); grant.setPermission(ObjectStorageProperties.Permission.READ.toString()); grant.setGrantee(grantee); grants.add(grant); return grants; }
@Override public List<Grant> apply(OwnerIdPair ownerIds) { List<Grant> publicReadWrite = PublicReadGrantBuilder.INSTANCE.apply(ownerIds); Grantee allUsers = new Grantee(); allUsers.setGroup(new Group(ObjectStorageProperties.S3_GROUP.ALL_USERS_GROUP.toString())); Grant allUsersGrant = new Grant(); allUsersGrant.setPermission(ObjectStorageProperties.Permission.WRITE.toString()); allUsersGrant.setGrantee(allUsers); publicReadWrite.add(allUsersGrant); return publicReadWrite; }
@Override public List<Grant> apply(OwnerIdPair ownerIds) { List<Grant> awsExecRead = PrivateOnlyGrantBuilder.INSTANCE.apply(ownerIds); Grantee execReadGroup = new Grantee(); execReadGroup.setGroup(new Group(ObjectStorageProperties.S3_GROUP.AWS_EXEC_READ.toString())); Grant execReadGrant = new Grant(); execReadGrant.setPermission(ObjectStorageProperties.Permission.READ.toString()); execReadGrant.setGrantee(execReadGroup); awsExecRead.add(execReadGrant); return awsExecRead; }
@Override public List<Grant> apply(OwnerIdPair ownerIds) { List<Grant> authenticatedRead = PrivateOnlyGrantBuilder.INSTANCE.apply(ownerIds); Grantee authenticatedUsers = new Grantee(); authenticatedUsers.setGroup( new Group(ObjectStorageProperties.S3_GROUP.AUTHENTICATED_USERS_GROUP.toString())); Grant authUsersGrant = new Grant(); authUsersGrant.setPermission(ObjectStorageProperties.Permission.READ.toString()); authUsersGrant.setGrantee(authenticatedUsers); authenticatedRead.add(authUsersGrant); return authenticatedRead; }
@Override public List<Grant> apply(OwnerIdPair ownerIds) { List<Grant> logDeliveryWrite = PrivateOnlyGrantBuilder.INSTANCE.apply(ownerIds); Grantee logGroup = new Grantee(); logGroup.setGroup(new Group(ObjectStorageProperties.S3_GROUP.LOGGING_GROUP.toString())); Grant loggingWriteGrant = new Grant(); loggingWriteGrant.setPermission(ObjectStorageProperties.Permission.WRITE.toString()); loggingWriteGrant.setGrantee(logGroup); Grant loggingReadAcpGrant = new Grant(); loggingReadAcpGrant.setPermission(ObjectStorageProperties.Permission.READ_ACP.toString()); loggingReadAcpGrant.setGrantee(logGroup); logDeliveryWrite.add(loggingWriteGrant); logDeliveryWrite.add(loggingReadAcpGrant); return logDeliveryWrite; }