blob: ee55438283aea960bc8658a09e61278635c1122c [file] [log] [blame]
Richard Marian Thomaiyar05375b12018-05-24 10:33:27 +05301description: >
Patrick Williamsa1347412022-12-06 10:56:22 -06002 Provides user management functionality. As communication to this service is
3 done through authenticated & authorized session, there won't be any
4 validation for both.
Richard Marian Thomaiyar05375b12018-05-24 10:33:27 +05305
6methods:
7 - name: CreateUser
8 description: >
Patrick Williamsa1347412022-12-06 10:56:22 -06009 Creates a new user. If the user already exists, then it will throw an
10 error.
Richard Marian Thomaiyar05375b12018-05-24 10:33:27 +053011 parameters:
Patrick Williams8da396c2022-03-14 14:21:02 -050012 - name: UserName
13 type: string
14 description: >
15 User name which has to be created.
16 - name: GroupNames
17 type: array[string]
18 description: >
19 List of groups to which the user has to be added.
20 - name: Privilege
21 type: string
22 description: >
23 Privilege of the user to be added.
24 - name: Enabled
25 type: boolean
26 description: >
27 User enabled / disabled.
Richard Marian Thomaiyar05375b12018-05-24 10:33:27 +053028 errors:
Patrick Williams8da396c2022-03-14 14:21:02 -050029 - xyz.openbmc_project.Common.Error.InternalFailure
30 - xyz.openbmc_project.Common.Error.InsufficientPermission
31 - xyz.openbmc_project.Common.Error.InvalidArgument
32 - xyz.openbmc_project.User.Common.Error.UserNameExists
33 - xyz.openbmc_project.User.Common.Error.UserNameGroupFail
34 - xyz.openbmc_project.User.Common.Error.UserNamePrivFail
35 - xyz.openbmc_project.User.Common.Error.NoResource
Richard Marian Thomaiyar05375b12018-05-24 10:33:27 +053036
37 - name: RenameUser
38 description: >
Patrick Williamsa1347412022-12-06 10:56:22 -060039 Rename's existing user to new one. All other properties of the user
40 will remain same.
Richard Marian Thomaiyar05375b12018-05-24 10:33:27 +053041 parameters:
Patrick Williams8da396c2022-03-14 14:21:02 -050042 - name: UserName
43 type: string
44 description: >
45 User name which has to be updated.
46 - name: NewUserName
47 type: string
48 description: >
49 New User name to which user has to be updated.
Richard Marian Thomaiyar05375b12018-05-24 10:33:27 +053050 errors:
Patrick Williams8da396c2022-03-14 14:21:02 -050051 - xyz.openbmc_project.Common.Error.InternalFailure
52 - xyz.openbmc_project.Common.Error.InsufficientPermission
53 - xyz.openbmc_project.Common.Error.InvalidArgument
54 - xyz.openbmc_project.User.Common.Error.UserNameDoesNotExist
55 - xyz.openbmc_project.User.Common.Error.UserNameExists
56 - xyz.openbmc_project.User.Common.Error.UserNameGroupFail
57 - xyz.openbmc_project.User.Common.Error.UserNamePrivFail
58 - xyz.openbmc_project.User.Common.Error.NoResource
Richard Marian Thomaiyar05375b12018-05-24 10:33:27 +053059
raviteja-bac5b6562019-03-01 01:33:42 -060060 - name: GetUserInfo
61 description: >
Manojkiran Eda921791c2024-06-17 14:21:02 +053062 Get user properties. If its local user, method returns
raviteja-bac5b6562019-03-01 01:33:42 -060063 -user privilege
64 -user groups
65 -user enabled state
66 -user locked state
Joseph Reynoldse375cad2020-04-10 17:22:06 -050067 -user password expired state
raviteja-bac5b6562019-03-01 01:33:42 -060068 -remote user flag
69 If its ldap user, method returns
70 -user privilege
71 -remote user flag
72 parameters:
Patrick Williams8da396c2022-03-14 14:21:02 -050073 - name: UserName
74 type: string
75 description: >
76 User name whose properties have to be returned.
raviteja-bac5b6562019-03-01 01:33:42 -060077 returns:
Patrick Williams8da396c2022-03-14 14:21:02 -050078 - name: UserInfo
79 type: dict[string,variant[string,array[string],boolean]]
80 description: >
Patrick Williamsa1347412022-12-06 10:56:22 -060081 Dictionary of user properties. List of key name and data type of
82 properties below. UserPrivilege -> privilege of the user(string)
Patrick Williams8da396c2022-03-14 14:21:02 -050083 UserGroups -> list of groups user belongs to(array[string])
84 UserEnabled -> user enabled state(boolean)
85 UserLockedForFailedAttempt -> user locked state(boolean)
86 UserPasswordExpired -> user password expired(boolean)
87 RemoteUser -> remote or local user(boolean)
Ravi Teja8a248c72024-11-20 04:44:59 -060088 TOTPSecretKeyRequired -> TOTP secret key required(boolean)
raviteja-bac5b6562019-03-01 01:33:42 -060089
Patrick Williams8da396c2022-03-14 14:21:02 -050090 For detailed documentation of user properties refer
Patrick Williamsa1347412022-12-06 10:56:22 -060091 Attributes.interface.yaml examples:
Patrick Williams8da396c2022-03-14 14:21:02 -050092 1.UserInfo["RemoteUser"] returns true for ldap user
93 and false for local user.
94 2.UserInfo["UserGroups"] gets list of groups of user.
raviteja-bac5b6562019-03-01 01:33:42 -060095 errors:
Patrick Williams8da396c2022-03-14 14:21:02 -050096 - xyz.openbmc_project.Common.Error.InternalFailure
97 - xyz.openbmc_project.Common.Error.InsufficientPermission
98 - xyz.openbmc_project.Common.Error.InvalidArgument
99 - xyz.openbmc_project.User.Common.Error.UserNameDoesNotExist
raviteja-bac5b6562019-03-01 01:33:42 -0600100
Nan Zhou1a891d32022-10-24 23:51:41 +0000101 - name: CreateGroup
102 description: >
Patrick Williamsa1347412022-12-06 10:56:22 -0600103 Creates a new groups. If the group already exists, or the group name
104 is not allowed to be created, it throws an error.
Nan Zhou1a891d32022-10-24 23:51:41 +0000105 parameters:
106 - name: GroupName
107 type: string
108 description: >
109 The group to be added to the system.
110 errors:
111 - xyz.openbmc_project.Common.Error.InternalFailure
112 - xyz.openbmc_project.Common.Error.InvalidArgument
113 - xyz.openbmc_project.User.Common.Error.GroupNameExists
114
115 - name: DeleteGroup
116 description: >
Patrick Williamsa1347412022-12-06 10:56:22 -0600117 Deletes an existing groups. If the group doesn't exists, or the group
118 name is not allowed to be deleted, it throws an error.
Nan Zhou1a891d32022-10-24 23:51:41 +0000119 parameters:
120 - name: GroupName
121 type: string
122 description: >
123 The group to be deleted from the system.
124 errors:
125 - xyz.openbmc_project.Common.Error.InternalFailure
126 - xyz.openbmc_project.Common.Error.InvalidArgument
127 - xyz.openbmc_project.User.Common.Error.GroupNameDoesNotExist
128
Richard Marian Thomaiyar05375b12018-05-24 10:33:27 +0530129properties:
130 - name: AllPrivileges
131 type: array[string]
Richard Marian Thomaiyar7aa705a2019-08-31 10:51:25 +0530132 flags:
133 - const
Richard Marian Thomaiyar05375b12018-05-24 10:33:27 +0530134 description: >
135 Lists all available user privileges in the system.
136
137 - name: AllGroups
138 type: array[string]
Richard Marian Thomaiyar7aa705a2019-08-31 10:51:25 +0530139 flags:
140 - const
Richard Marian Thomaiyar05375b12018-05-24 10:33:27 +0530141 description: >
142 Lists all available groups in the system.
143
144signals:
145 - name: UserRenamed
146 description: >
Patrick Williams8da396c2022-03-14 14:21:02 -0500147 Signal indicating user's name is updated.
Richard Marian Thomaiyar05375b12018-05-24 10:33:27 +0530148 properties:
Patrick Williams8da396c2022-03-14 14:21:02 -0500149 - name: UserName
150 type: string
151 description: Name of the user which got renamed.
152 - name: NewUserName
153 type: string
154 description: New name of the user.