Overview
This topic provides details on how to create and modify S3 bucket users in qshell and in OSMI. It provides details about each command along with their available paramters.
Qshell Commands
List Existing User Information:
In []: q.dss.manage.listUsers()
Add S3 User:
In[]: q.dss.manage.addUser(‘s3testuser’, ‘s3testpasswd’)
Out[]:
{'bucket_list': [],
'custom': {},
'default_policy_id': None,
'default_small_files_policy_and_threshold': None,
'id': 5,
'name': 's3testuser',
'secret': '(not_shown)',
'seq': 0,
'status': 'ACTIVE',
'version': 0}
Add S3 Bucket Namespace:
In[]: q.dss.manage.addNameSpace(nameSpaceName='testbucket', kind='S3', ownerName='s3testuser')
Change User Pssword:
In []: q.dss.manage.changeUser(‘s3testuser’, credentials=‘NEWPASSWORD’)
Change User Satus:
In []: q.dss.manage.changeUser('s3testuser', status='INACTIVE')
Delete a User:
In []: q.dss.manage.deleteUser('s3testuser')
Qshell Usage Information
In []: q.dss.manage.addUser(?
Definition: q.dss.manage.addUser(self, userName, credentials, status='ACTIVE', defaultSettings=None, nodeIP='127.0.0.1', port=23510)
Documentation: Add a user.
Parameters:
- userName: string The username of the user.
- credentials: string The secret keyword of the user.
- status: string The user status, one of: ACTIVE, INACTIVE.
- nodeIP: string The IP of the Storage Daemon to contact.
- defaultSettings: dict A series of (key, value) pairs describing the default settings to be stored in the environment. By default, it is None, indicating no default settings are set on the environment. If the defaultSettings dictionary is specified, some fields are required to be set, while other are optional and have a default value if not set. Currently supported fields: 'policyID' (required, type guid), 'smallFilesPolicyIDAndThreshold' (optional, type (int, guid) ).
- port: int The port of the Storage Daemon to contact.
In []: q.dss.manage.addNameSpace(?
Definition: q.dss.manage.addNameSpace(self, nameSpaceName, policyID=None, storageDaemonID=None, verificationInterval=31536000, verificationTarget=None, syncstoreId=None, nodeIP='127.0.0.1', port=23510, kind='NATIVE', ownerName=None, smallFilesPolicy=None)
Documentation: Add a Name Space
Parameters:
- nameSpaceName: string The name of the namespace.
- kind: string NATIVE or S3.
- ownerName: string The name of the user to own the bucket, required for S3.
- policyID: guid The ID of the Policy for the namespace, None for the default policy of the user or of the environment
- storageDaemonID: int The ID of the storage daemon that is to manage repair jobs for the objects of the namespace.
- verificationInterval: int The verification interval for the objects of the namespace, in seconds. Default is 365 days.
- verificationTarget: int The verification target for the objects of the namespace, in seconds relative to now. Default is verificationInterval.
- syncstoreId: string optionally provide a syncstore id of the syncstore that is to contain the metadata for this namespace, if none is provided a sensible choice is made by the system
- nodeIP: string The IP of the node to communicate with. This does not have to be the IP of the Storage Daemon
- port: int The port on nodeIP to communicate with
- smallFilesPolicy: (guid,int) (policyID, threshold) option For files below (or equal) to threshold use the smallFilesPolicy
Returns: guid Name Space ID
In []: q.dss.manage.changeUser(?
Definition: q.dss.manage.changeUser(self, userName, credentials=None, status=None, defaultSettings=None, nodeIP='127.0.0.1', port=23510)
Documentation: Change a user.
Parameters:
- userName: string The username of the user.
- credentials: string The new secret of the user, None for no change.
- status: string The new status of the user, one of: ACTIVE, INACTIVE, None for no change.
- defaultSettings: dict A series of (key, value) pairs describing the default settings to be stored in the environment. By default, it is None, indicating the default settings will not be changed. Setting it to '' will remove the default settings. If the defaultSettings dictionary is specified, some fields are required to be set, while other are optional and have a default value if not set. Currently supported fields: 'policyID' (required, type guid), 'smallFilesPolicyIDAndThreshold' (optional, type (int, guid) ).
- nodeIP: string The IP of the Storage Daemon to contact.
- port: int The port of the Storage Daemon to contact.
OSMI Menu Tasks
Some users and permissions are also able to modified using the OSMI menu. Example menu options are shown below.
Object Store Management Interface
1) Environment
2) Policies and Namespaces
3) Machines and services
4) Users and permissions
5) Events and logging
0) Exit
Please make a selection >> 4
Users and Permissions
1) List users
2) Add user
3) Delete user
4) Show permissions
5) Set permissions
0) Return to Main Menu
Please make a selection >>