IAM Set Up
In this tutorial, you will want to create and manage users in the default organization.
Objectifs:
- Create user on CNO Organization
- Assign role to a new or existing user
Prerequisite:
- Connect to cno command line to use command in this tutorial
- Make sure to connect before create user
Use case:
We are going to create and manage user named "james" in the default "organization"
-
Create user named james
The supported flags are:cnoctl adm create user [--flag]firstname: specify the firstname of the user | [OPTIONAL]lastname: specify the lastname of the user | [OPTIONAL]username: define the username of the user | [REQUIRED]email: define the email address of the user | [REQUIRED]department: specify the department of the user | [OPTIONAL]
cnoctl adm create user --firstname james --lastname james --email james@gmail.com --username james --department devops -
Assing admin-role to user james
The supported flags are:cnoctl adm set-role --usermane [username] --role [role]username: specify the username of the user | [REQUIRED]role: specify the role to assign the user | [REQUIRED]
cnoctl adm set-role --username james --role super-admin -
Delete admin-role to user james
The supported flags are:cnoctl adm delete-role --username [username] --role [role]username: specify the username of the user | [REQUIRED]role: specify the role to delete from user | [REQUIRED]
conctl adm delete-role --username james --role super-admin -
Get user james
To get all users make:
cnoctl adm get users [username]cnoctl adm get users jamesTo get all users make:
cnoctl adm get users -
Update user
Now update only the firstname of user “james” to “mody”
The supported flags are:cnoctl adm update user [--flag]firstname: specify the firstname of the user | [OPTIONAL]lastname: specify the lastname of the user | [OPTIONAL]username: define the username of the user | [REQUIRED]email: define the email address of the user | [OPTIONAL]department: specify the department of the user | [OPTIONAL]
Update only the firstaneme of “james” to “mody”
cnoctl adm update user --firstname mody --username james -
Delete user james in the organization
cnoctl adm delete user [username]username: specify the username of user deleted | [REQUIRED]
cnoctl adm delete user james