Table of Contents

[HOWTO] Create users for Object Storage Gateway

Documentation
Name: [HOWTO] Create users for Object Storage Gateway
Description: How to create a user for the ceph object storage gateway
Modification date :24/10/2018
Owner:dodger
Notify changes to:Owner
Tags: ceph, object storage
Scalate to:The_fucking_bofh

Variables used in this documentation

Name Description Sample
${THEUSERNAME} The username to be created
export THEUSERNAME="newuser"

Instructions

Remember that you must copy the values provided by radosgw-admin as that will be the user+pass hash'es to connect to the gw.



You can create it connected to the admin node:

sudo radosgw-admin user create --uid="${THEUSERNAME}" --display-name="${THEUSERNAME} user"


Limiting buckets:

sudo radosgw-admin user modify --uid=${THEUSERNAME} --max-buckets=1



Check:

sudo radosgw-admin user info --uid=${THEUSERNAME}



Hard to understand? use Rundeck :-)

Sample:

19:09:21	bvmlm-osgw-001.ciberterminal.net:
19:09:21	    {
19:09:21	        "user_id": "rundeckuser",
19:09:21	        "display_name": "rundeckuser_user",
19:09:21	        "email": "",
19:09:21	        "suspended": 0,
19:09:21	        "max_buckets": 5,
19:09:21	        "subusers": [],
19:09:21	        "keys": [
19:09:21	            {
19:09:21	                "user": "rundeckuser",
19:09:21	                "access_key": "****",
19:09:21	                "secret_key": "****"
19:09:21	            }
19:09:21	        ],
19:09:21	        "swift_keys": [],
19:09:21	        "caps": [],
19:09:21	        "op_mask": "read, write, delete",
19:09:21	        "default_placement": "",
19:09:21	        "default_storage_class": "",
19:09:21	        "placement_tags": [],
19:09:21	        "bucket_quota": {
19:09:21	            "enabled": false,
19:09:21	            "check_on_raw": false,
19:09:21	            "max_size": -1,
19:09:21	            "max_size_kb": 0,
19:09:21	            "max_objects": -1
19:09:21	        },
19:09:21	        "user_quota": {
19:09:21	            "enabled": false,
19:09:21	            "check_on_raw": false,
19:09:21	            "max_size": -1,
19:09:21	            "max_size_kb": 0,
19:09:21	            "max_objects": -1
19:09:21	        },
19:09:21	        "temp_url_keys": [],
19:09:21	        "type": "rgw",
19:09:21	        "mfa_ids": []
19:09:21	    }