Skip to content

Commit

Permalink
rgw_lc: support for AWSv4 authentication
Browse files Browse the repository at this point in the history
adding support for AWSv4 authentication for Put Object LC, also adding
types to all of the LC ops in the process

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
  • Loading branch information
theanalyst committed Aug 1, 2017
1 parent 9b3fe6f commit cc51f32
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rgw/rgw_common.h
Expand Up @@ -484,6 +484,9 @@ enum RGWOpType {
RGW_OP_PUT_OBJ_TAGGING,
RGW_OP_GET_OBJ_TAGGING,
RGW_OP_DELETE_OBJ_TAGGING,
RGW_OP_PUT_LC,
RGW_OP_GET_LC,
RGW_OP_DELETE_LC,
/* rgw specific */
RGW_OP_ADMIN_SET_METADATA,
RGW_OP_GET_OBJ_LAYOUT,
Expand Down
3 changes: 3 additions & 0 deletions src/rgw/rgw_op.h
Expand Up @@ -1390,6 +1390,7 @@ class RGWGetLC : public RGWOp {

void send_response() override = 0;
const string name() override { return "get_lifecycle"; }
RGWOpType get_type() override { return RGW_OP_GET_LC; }
uint32_t op_mask() override { return RGW_OP_TYPE_READ; }
};

Expand Down Expand Up @@ -1425,6 +1426,7 @@ class RGWPutLC : public RGWOp {
virtual int get_params() = 0;
void send_response() override = 0;
const string name() override { return "put_lifecycle"; }
RGWOpType get_type() override { return RGW_OP_PUT_LC; }
uint32_t op_mask() override { return RGW_OP_TYPE_WRITE; }
};

Expand All @@ -1448,6 +1450,7 @@ class RGWDeleteLC : public RGWOp {

void send_response() override = 0;
const string name() override { return "delete_lifecycle"; }
RGWOpType get_type() override { return RGW_OP_DELETE_LC; }
uint32_t op_mask() override { return RGW_OP_TYPE_WRITE; }
};

Expand Down
1 change: 1 addition & 0 deletions src/rgw/rgw_rest_s3.cc
Expand Up @@ -3847,6 +3847,7 @@ AWSGeneralAbstractor::get_auth_data_v4(const req_state* const s,
case RGW_OP_SET_BUCKET_WEBSITE:
case RGW_OP_PUT_BUCKET_POLICY:
case RGW_OP_PUT_OBJ_TAGGING:
case RGW_OP_PUT_LC:
break;
default:
dout(10) << "ERROR: AWS4 completion for this operation NOT IMPLEMENTED" << dendl;
Expand Down

0 comments on commit cc51f32

Please sign in to comment.