Richard Marian Thomaiyar | 05375b1 | 2018-05-24 10:33:27 +0530 | [diff] [blame] | 1 | description: > |
| 2 | Provides user management functionality. |
| 3 | As communication to this service is done through authenticated |
| 4 | & authorized session, there won't be any validation for both. |
| 5 | |
| 6 | methods: |
| 7 | - name: CreateUser |
| 8 | description: > |
| 9 | Creates a new user. If the user already exists, then it will throw |
| 10 | an error. |
| 11 | parameters: |
| 12 | - 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. |
| 28 | errors: |
| 29 | - 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 |
| 36 | |
| 37 | - name: RenameUser |
| 38 | description: > |
| 39 | Rename's existing user to new one. All other properties of the |
| 40 | user will remain same. |
| 41 | parameters: |
| 42 | - 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. |
| 50 | errors: |
| 51 | - 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 |
| 59 | |
raviteja-b | ac5b656 | 2019-03-01 01:33:42 -0600 | [diff] [blame] | 60 | - name: GetUserInfo |
| 61 | description: > |
| 62 | Get user properites. |
| 63 | If its local user, method returns |
| 64 | -user privilege |
| 65 | -user groups |
| 66 | -user enabled state |
| 67 | -user locked state |
| 68 | -remote user flag |
| 69 | If its ldap user, method returns |
| 70 | -user privilege |
| 71 | -remote user flag |
| 72 | parameters: |
| 73 | - name: UserName |
| 74 | type: string |
| 75 | description: > |
| 76 | User name whose properties have to be returned. |
| 77 | returns: |
| 78 | - name: UserInfo |
| 79 | type: dict[string,variant[string,array[string],boolean]] |
| 80 | description: > |
| 81 | Dictionary of user properties. |
| 82 | List of key name and data type of properties below. |
| 83 | UserPrivilege -> privilege of the user(string) |
| 84 | UserGroups -> list of groups user belongs to(array[string]) |
| 85 | UserEnabled -> user enabled state(boolean) |
| 86 | UserLockedForFailedAttempt -> user locked state(boolean) |
| 87 | RemoteUser -> remote or local user(boolean) |
| 88 | |
| 89 | For detailed documentation of user properties refer |
| 90 | Attributes.interface.yaml |
| 91 | examples: |
| 92 | 1.UserInfo["RemoteUser"] returns true for ldap user |
| 93 | and false for local user. |
| 94 | 2.UserInfo["UserGroups"] gets list of groups of user. |
| 95 | errors: |
| 96 | - 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 |
| 100 | |
Richard Marian Thomaiyar | 05375b1 | 2018-05-24 10:33:27 +0530 | [diff] [blame] | 101 | properties: |
| 102 | - name: AllPrivileges |
| 103 | type: array[string] |
Richard Marian Thomaiyar | 7aa705a | 2019-08-31 10:51:25 +0530 | [diff] [blame] | 104 | flags: |
| 105 | - const |
Richard Marian Thomaiyar | 05375b1 | 2018-05-24 10:33:27 +0530 | [diff] [blame] | 106 | description: > |
| 107 | Lists all available user privileges in the system. |
| 108 | |
| 109 | - name: AllGroups |
| 110 | type: array[string] |
Richard Marian Thomaiyar | 7aa705a | 2019-08-31 10:51:25 +0530 | [diff] [blame] | 111 | flags: |
| 112 | - const |
Richard Marian Thomaiyar | 05375b1 | 2018-05-24 10:33:27 +0530 | [diff] [blame] | 113 | description: > |
| 114 | Lists all available groups in the system. |
| 115 | |
| 116 | signals: |
| 117 | - name: UserRenamed |
| 118 | description: > |
| 119 | Signal indicating user's name is updated. |
| 120 | properties: |
| 121 | - name: UserName |
| 122 | type: string |
| 123 | description: Name of the user which got renamed. |
| 124 | - name: NewUserName |
| 125 | type: string |
| 126 | description: New name of the user. |