blob: 3874071586a1485e97d12fa86d344842d8750372 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
description: >
Provides user management functionality.
As communication to this service is done through authenticated
& authorized session, there won't be any validation for both.
methods:
- name: CreateUser
description: >
Creates a new user. If the user already exists, then it will throw
an error.
parameters:
- name: UserName
type: string
description: >
User name which has to be created.
- name: GroupNames
type: array[string]
description: >
List of groups to which the user has to be added.
- name: Privilege
type: string
description: >
Privilege of the user to be added.
- name: Enabled
type: boolean
description: >
User enabled / disabled.
errors:
- xyz.openbmc_project.Common.Error.InternalFailure
- xyz.openbmc_project.Common.Error.InsufficientPermission
- xyz.openbmc_project.Common.Error.InvalidArgument
- xyz.openbmc_project.User.Common.Error.UserNameExists
- xyz.openbmc_project.User.Common.Error.UserNameGroupFail
- xyz.openbmc_project.User.Common.Error.UserNamePrivFail
- xyz.openbmc_project.User.Common.Error.NoResource
- name: RenameUser
description: >
Rename's existing user to new one. All other properties of the
user will remain same.
parameters:
- name: UserName
type: string
description: >
User name which has to be updated.
- name: NewUserName
type: string
description: >
New User name to which user has to be updated.
errors:
- xyz.openbmc_project.Common.Error.InternalFailure
- xyz.openbmc_project.Common.Error.InsufficientPermission
- xyz.openbmc_project.Common.Error.InvalidArgument
- xyz.openbmc_project.User.Common.Error.UserNameDoesNotExist
- xyz.openbmc_project.User.Common.Error.UserNameExists
- xyz.openbmc_project.User.Common.Error.UserNameGroupFail
- xyz.openbmc_project.User.Common.Error.UserNamePrivFail
- xyz.openbmc_project.User.Common.Error.NoResource
- name: GetUserInfo
description: >
Get user properites.
If its local user, method returns
-user privilege
-user groups
-user enabled state
-user locked state
-remote user flag
If its ldap user, method returns
-user privilege
-remote user flag
parameters:
- name: UserName
type: string
description: >
User name whose properties have to be returned.
returns:
- name: UserInfo
type: dict[string,variant[string,array[string],boolean]]
description: >
Dictionary of user properties.
List of key name and data type of properties below.
UserPrivilege -> privilege of the user(string)
UserGroups -> list of groups user belongs to(array[string])
UserEnabled -> user enabled state(boolean)
UserLockedForFailedAttempt -> user locked state(boolean)
RemoteUser -> remote or local user(boolean)
For detailed documentation of user properties refer
Attributes.interface.yaml
examples:
1.UserInfo["RemoteUser"] returns true for ldap user
and false for local user.
2.UserInfo["UserGroups"] gets list of groups of user.
errors:
- xyz.openbmc_project.Common.Error.InternalFailure
- xyz.openbmc_project.Common.Error.InsufficientPermission
- xyz.openbmc_project.Common.Error.InvalidArgument
- xyz.openbmc_project.User.Common.Error.UserNameDoesNotExist
properties:
- name: AllPrivileges
type: array[string]
description: >
Lists all available user privileges in the system.
- name: AllGroups
type: array[string]
description: >
Lists all available groups in the system.
signals:
- name: UserRenamed
description: >
Signal indicating user's name is updated.
properties:
- name: UserName
type: string
description: Name of the user which got renamed.
- name: NewUserName
type: string
description: New name of the user.
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|