|
| 1 | +Managing Accounts, Users and Domains |
| 2 | +==================================== |
| 3 | + |
| 4 | +Accounts, Users, and Domains |
| 5 | +--------------------------------- |
| 6 | + |
| 7 | +Accounts |
| 8 | +'''''''' |
| 9 | + |
| 10 | +An account typically represents a customer of the service provider or a |
| 11 | +department in a large organization. Multiple users can exist in an |
| 12 | +account. |
| 13 | + |
| 14 | +Domains |
| 15 | +''''''' |
| 16 | + |
| 17 | +Accounts are grouped by domains. Domains usually contain multiple |
| 18 | +accounts that have some logical relationship to each other and a set of |
| 19 | +delegated administrators with some authority over the domain and its |
| 20 | +subdomains. For example, a service provider with several resellers could |
| 21 | +create a domain for each reseller. |
| 22 | + |
| 23 | +For each account created, the Cloud installation creates three different |
| 24 | +types of user accounts: root administrator, domain administrator, and |
| 25 | +user. |
| 26 | + |
| 27 | +Users |
| 28 | +''''' |
| 29 | + |
| 30 | +Users are like aliases in the account. Users in the same account are not |
| 31 | +isolated from each other, but they are isolated from users in other |
| 32 | +accounts. Most installations need not surface the notion of users; they |
| 33 | +just have one user per account. The same user cannot belong to multiple |
| 34 | +accounts. |
| 35 | + |
| 36 | +Username is unique in a domain across accounts in that domain. The same |
| 37 | +username can exist in other domains, including sub-domains. Domain name |
| 38 | +can repeat only if the full pathname from root is unique. For example, |
| 39 | +you can create root/d1, as well as root/foo/d1, and root/sales/d1. |
| 40 | + |
| 41 | +Administrators are accounts with special privileges in the system. There |
| 42 | +may be multiple administrators in the system. Administrators can create |
| 43 | +or delete other administrators, and change the password for any user in |
| 44 | +the system. |
| 45 | + |
| 46 | +Domain Administrators |
| 47 | +''''''''''''''''''''' |
| 48 | + |
| 49 | +Domain administrators can perform administrative operations for users |
| 50 | +who belong to that domain. Domain administrators do not have visibility |
| 51 | +into physical servers or other domains. |
| 52 | + |
| 53 | +Root Administrator |
| 54 | +'''''''''''''''''' |
| 55 | + |
| 56 | +Root administrators have complete access to the system, including |
| 57 | +managing templates, service offerings, customer care administrators, and |
| 58 | +domains |
| 59 | + |
| 60 | +Resource Ownership |
| 61 | +'''''''''''''''''' |
| 62 | + |
| 63 | +Resources belong to the account, not individual users in that account. |
| 64 | +For example, billing, resource limits, and so on are maintained by the |
| 65 | +account, not the users. A user can operate on any resource in the |
| 66 | +account provided the user has privileges for that operation. The |
| 67 | +privileges are determined by the role. A root administrator can change |
| 68 | +the ownership of any virtual machine from one account to any other |
| 69 | +account by using the assignVirtualMachine API. A domain or sub-domain |
| 70 | +administrator can do the same for VMs within the domain from one account |
| 71 | +to any other account in the domain or any of its sub-domains. |
| 72 | + |
| 73 | +Dedicating Resources to Accounts and Domains |
| 74 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 75 | + |
| 76 | +The root administrator can dedicate resources to a specific domain or |
| 77 | +account that needs private infrastructure for additional security or |
| 78 | +performance guarantees. A zone, pod, cluster, or host can be reserved by |
| 79 | +the root administrator for a specific domain or account. Only users in |
| 80 | +that domain or its subdomain may use the infrastructure. For example, |
| 81 | +only users in a given domain can create guests in a zone dedicated to |
| 82 | +that domain. |
| 83 | + |
| 84 | +There are several types of dedication available: |
| 85 | + |
| 86 | +- |
| 87 | + |
| 88 | + Explicit dedication. A zone, pod, cluster, or host is dedicated to an |
| 89 | + account or domain by the root administrator during initial deployment |
| 90 | + and configuration. |
| 91 | + |
| 92 | +- |
| 93 | + |
| 94 | + Strict implicit dedication. A host will not be shared across multiple |
| 95 | + accounts. For example, strict implicit dedication is useful for |
| 96 | + deployment of certain types of applications, such as desktops, where |
| 97 | + no host can be shared between different accounts without violating |
| 98 | + the desktop software's terms of license. |
| 99 | + |
| 100 | +- |
| 101 | + |
| 102 | + Preferred implicit dedication. The VM will be deployed in dedicated |
| 103 | + infrastructure if possible. Otherwise, the VM can be deployed in |
| 104 | + shared infrastructure. |
| 105 | + |
| 106 | +How to Dedicate a Zone, Cluster, Pod, or Host to an Account or Domain |
| 107 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 108 | + |
| 109 | +For explicit dedication: When deploying a new zone, pod, cluster, or |
| 110 | +host, the root administrator can click the Dedicated checkbox, then |
| 111 | +choose a domain or account to own the resource. |
| 112 | + |
| 113 | +To explicitly dedicate an existing zone, pod, cluster, or host: log in |
| 114 | +as the root admin, find the resource in the UI, and click the Dedicate |
| 115 | +button. |dedicate-resource-button.png: button to dedicate a zone, pod, |
| 116 | +cluster, or host| |
| 117 | + |
| 118 | +For implicit dedication: The administrator creates a compute service |
| 119 | +offering and in the Deployment Planner field, chooses |
| 120 | +ImplicitDedicationPlanner. Then in Planner Mode, the administrator |
| 121 | +specifies either Strict or Preferred, depending on whether it is |
| 122 | +permissible to allow some use of shared resources when dedicated |
| 123 | +resources are not available. Whenever a user creates a VM based on this |
| 124 | +service offering, it is allocated on one of the dedicated hosts. |
| 125 | + |
| 126 | +How to Use Dedicated Hosts |
| 127 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 128 | + |
| 129 | +To use an explicitly dedicated host, use the explicit-dedicated type of |
| 130 | +affinity group (see `Section 10.7.1, “Affinity |
| 131 | +Groups” <#affinity-groups>`__). For example, when creating a new VM, an |
| 132 | +end user can choose to place it on dedicated infrastructure. This |
| 133 | +operation will succeed only if some infrastructure has already been |
| 134 | +assigned as dedicated to the user's account or domain. |
| 135 | + |
| 136 | +Behavior of Dedicated Hosts, Clusters, Pods, and Zones |
| 137 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 138 | + |
| 139 | +The administrator can live migrate VMs away from dedicated hosts if |
| 140 | +desired, whether the destination is a host reserved for a different |
| 141 | +account/domain or a host that is shared (not dedicated to any particular |
| 142 | +account or domain). CloudStack will generate an alert, but the operation |
| 143 | +is allowed. |
| 144 | + |
| 145 | +Dedicated hosts can be used in conjunction with host tags. If both a |
| 146 | +host tag and dedication are requested, the VM will be placed only on a |
| 147 | +host that meets both requirements. If there is no dedicated resource |
| 148 | +available to that user that also has the host tag requested by the user, |
| 149 | +then the VM will not deploy. |
| 150 | + |
| 151 | +If you delete an account or domain, any hosts, clusters, pods, and zones |
| 152 | +that were dedicated to it are freed up. They will now be available to be |
| 153 | +shared by any account or domain, or the administrator may choose to |
| 154 | +re-dedicate them to a different account or domain. |
| 155 | + |
| 156 | +System VMs and virtual routers affect the behavior of host dedication. |
| 157 | +System VMs and virtual routers are owned by the CloudStack system |
| 158 | +account, and they can be deployed on any host. They do not adhere to |
| 159 | +explicit dedication. The presence of system vms and virtual routers on a |
| 160 | +host makes it unsuitable for strict implicit dedication. The host can |
| 161 | +not be used for strict implicit dedication, because the host already has |
| 162 | +VMs of a specific account (the default system account). However, a host |
| 163 | +with system VMs or virtual routers can be used for preferred implicit |
| 164 | +dedication. |
| 165 | + |
| 166 | +Using an LDAP Server for User Authentication |
| 167 | +------------------------------------------------- |
| 168 | + |
| 169 | +You can use an external LDAP server such as Microsoft Active Directory |
| 170 | +or ApacheDS to authenticate CloudStack end-users. Just map CloudStack |
| 171 | +accounts to the corresponding LDAP accounts using a query filter. The |
| 172 | +query filter is written using the query syntax of the particular LDAP |
| 173 | +server, and can include special wildcard characters provided by |
| 174 | +CloudStack for matching common values such as the user’s email address |
| 175 | +and name. CloudStack will search the external LDAP directory tree |
| 176 | +starting at a specified base directory and return the distinguished name |
| 177 | +(DN) and password of the matching user. This information along with the |
| 178 | +given password is used to authenticate the user.. |
| 179 | + |
| 180 | +To set up LDAP authentication in CloudStack, call the CloudStack API |
| 181 | +command ldapConfig and provide the following: |
| 182 | + |
| 183 | +- |
| 184 | + |
| 185 | + Hostname or IP address and listening port of the LDAP server |
| 186 | + |
| 187 | +- |
| 188 | + |
| 189 | + Base directory and query filter |
| 190 | + |
| 191 | +- |
| 192 | + |
| 193 | + Search user DN credentials, which give CloudStack permission to |
| 194 | + search on the LDAP server |
| 195 | + |
| 196 | +- |
| 197 | + |
| 198 | + SSL keystore and password, if SSL is used |
| 199 | + |
| 200 | +Example LDAP Configuration Commands |
| 201 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 202 | + |
| 203 | +To understand the examples in this section, you need to know the basic |
| 204 | +concepts behind calling the CloudStack API, which are explained in the |
| 205 | +Developer’s Guide. |
| 206 | + |
| 207 | +The following shows an example invocation of ldapConfig with an ApacheDS |
| 208 | +LDAP server |
| 209 | + |
| 210 | +.. code:: bash |
| 211 | +
|
| 212 | + http://127.0.0.1:8080/client/api?command=ldapConfig&hostname=127.0.0.1&searchbase=ou%3Dtesting%2Co%3Dproject&queryfilter=%28%26%28uid%3D%25u%29%29&binddn=cn%3DJohn+Singh%2Cou%3Dtesting%2Co%project&bindpass=secret&port=10389&ssl=true&truststore=C%3A%2Fcompany%2Finfo%2Ftrusted.ks&truststorepass=secret&response=json&apiKey=YourAPIKey&signature=YourSignatureHash |
| 213 | +
|
| 214 | +The command must be URL-encoded. Here is the same example without the |
| 215 | +URL encoding: |
| 216 | + |
| 217 | +.. code:: bash |
| 218 | +
|
| 219 | + http://127.0.0.1:8080/client/api?command=ldapConfig |
| 220 | + &hostname=127.0.0.1 |
| 221 | + &searchbase=ou=testing,o=project |
| 222 | + &queryfilter=(&(%uid=%u)) |
| 223 | + &binddn=cn=John+Singh,ou=testing,o=project |
| 224 | + &bindpass=secret |
| 225 | + &port=10389 |
| 226 | + &ssl=true |
| 227 | + &truststore=C:/company/info/trusted.ks |
| 228 | + &truststorepass=secret |
| 229 | + &response=json |
| 230 | + &apiKey=YourAPIKey&signature=YourSignatureHash |
| 231 | +
|
| 232 | +The following shows a similar command for Active Directory. Here, the |
| 233 | +search base is the testing group within a company, and the users are |
| 234 | +matched up based on email address. |
| 235 | + |
| 236 | +.. code:: bash |
| 237 | +
|
| 238 | + http://10.147.29.101:8080/client/api?command=ldapConfig&hostname=10.147.28.250&searchbase=OU%3Dtesting%2CDC%3Dcompany&queryfilter=%28%26%28mail%3D%25e%29%29 &binddn=CN%3DAdministrator%2COU%3Dtesting%2CDC%3Dcompany&bindpass=1111_aaaa&port=389&response=json&apiKey=YourAPIKey&signature=YourSignatureHash |
| 239 | +
|
| 240 | +The next few sections explain some of the concepts you will need to know |
| 241 | +when filling out the ldapConfig parameters. |
| 242 | + |
| 243 | +Search Base |
| 244 | +~~~~~~~~~~~~~~~~~~ |
| 245 | + |
| 246 | +An LDAP query is relative to a given node of the LDAP directory tree, |
| 247 | +called the search base. The search base is the distinguished name (DN) |
| 248 | +of a level of the directory tree below which all users can be found. The |
| 249 | +users can be in the immediate base directory or in some subdirectory. |
| 250 | +The search base may be equivalent to the organization, group, or domain |
| 251 | +name. The syntax for writing a DN varies depending on which LDAP server |
| 252 | +you are using. A full discussion of distinguished names is outside the |
| 253 | +scope of our documentation. The following table shows some examples of |
| 254 | +search bases to find users in the testing department.. |
| 255 | + |
| 256 | +LDAP Server |
| 257 | + |
| 258 | +Example Search Base DN |
| 259 | + |
| 260 | +ApacheDS |
| 261 | + |
| 262 | +ou=testing,o=project |
| 263 | + |
| 264 | +Active Directory |
| 265 | + |
| 266 | +OU=testing, DC=company |
| 267 | + |
| 268 | +Query Filter |
| 269 | +~~~~~~~~~~~~~~~~~~~ |
| 270 | + |
| 271 | +The query filter is used to find a mapped user in the external LDAP |
| 272 | +server. The query filter should uniquely map the CloudStack user to LDAP |
| 273 | +user for a meaningful authentication. For more information about query |
| 274 | +filter syntax, consult the documentation for your LDAP server. |
| 275 | + |
| 276 | +The CloudStack query filter wildcards are: |
| 277 | + |
| 278 | +Query Filter Wildcard |
| 279 | + |
| 280 | +Description |
| 281 | + |
| 282 | +%u |
| 283 | + |
| 284 | +User name |
| 285 | + |
| 286 | +%e |
| 287 | + |
| 288 | +Email address |
| 289 | + |
| 290 | +%n |
| 291 | + |
| 292 | +First and last name |
| 293 | + |
| 294 | +The following examples assume you are using Active Directory, and refer |
| 295 | +to user attributes from the Active Directory schema. |
| 296 | + |
| 297 | +If the CloudStack user name is the same as the LDAP user ID: |
| 298 | + |
| 299 | +.. code:: bash |
| 300 | +
|
| 301 | + (uid=%u) |
| 302 | +
|
| 303 | +If the CloudStack user name is the LDAP display name: |
| 304 | + |
| 305 | +.. code:: bash |
| 306 | +
|
| 307 | + (displayName=%u) |
| 308 | +
|
| 309 | +To find a user by email address: |
| 310 | + |
| 311 | +.. code:: bash |
| 312 | +
|
| 313 | + (mail=%e) |
| 314 | +
|
| 315 | +Search User Bind DN |
| 316 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 317 | + |
| 318 | +The bind DN is the user on the external LDAP server permitted to search |
| 319 | +the LDAP directory within the defined search base. When the DN is |
| 320 | +returned, the DN and passed password are used to authenticate the |
| 321 | +CloudStack user with an LDAP bind. A full discussion of bind DNs is |
| 322 | +outside the scope of our documentation. The following table shows some |
| 323 | +examples of bind DNs. |
| 324 | + |
| 325 | +LDAP Server |
| 326 | + |
| 327 | +Example Bind DN |
| 328 | + |
| 329 | +ApacheDS |
| 330 | + |
| 331 | +cn=Administrator,dc=testing,ou=project,ou=org |
| 332 | + |
| 333 | +Active Directory |
| 334 | + |
| 335 | +CN=Administrator, OU=testing, DC=company, DC=com |
| 336 | + |
| 337 | +SSL Keystore Path and Password |
| 338 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 339 | + |
| 340 | +If the LDAP server requires SSL, you need to enable it in the ldapConfig |
| 341 | +command by setting the parameters ssl, truststore, and truststorepass. |
| 342 | +Before enabling SSL for ldapConfig, you need to get the certificate |
| 343 | +which the LDAP server is using and add it to a trusted keystore. You |
| 344 | +will need to know the path to the keystore and the password. |
0 commit comments