Exemple #1
0
 @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;
 }
Exemple #2
0
 @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;
 }
Exemple #3
0
 @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;
 }
Exemple #4
0
 @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;
 }
Exemple #5
0
    @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;
    }