Commit Graph

8197 Commits

Author SHA1 Message Date
Prachi Damle 2e5b529157 CLOUDSTACK-6560: IAM - Admin user is denied permission to create Egress rule for a user's network
Changes:
- CS 4.3 handled Network entity in two ways:
a) Specified "UseNetwork" access and did a strict check w.r.t who can use this network. Regular users and Domain Admin went through the strict check. Root admin got access always.
b) Specified "null" access and that meant admins can access this network for the calling API that passes null access.

- Fixing CS 4.4 IAM to handle this behavior:
a) "UseNetwork" is mapped to "UseEntry" and IAM check will be done only for domain admin and regular users when this access is specified. Root Admin is grated access.
b) If "null" access is specified, root and domain admin both are granted access. Regular users still go through IAM.
2014-05-01 16:07:52 -07:00
Prachi Damle e89c628843 CLOUDSTACK-6558 IAM - Admin user is able to deploy VM in a regular user's Security Group.
Changes:
- Even for SecurityGroup, go through IAM to do permission checks for all type of accounts
2014-05-01 16:07:50 -07:00
Min Chen 6435b261de CLOUDSTACK-6556: Deploy VM failing with error "does
not have permission to access resource Ntwk".
2014-05-01 15:07:36 -07:00
Min Chen f0edfc7ac5 CLOUDSTACK-6535: IAM:MS:API createVMSnapshot doesn't preserve access
rights.
2014-05-01 12:13:59 -07:00
Min Chen 4415aee1e9 CLOUDSTACK-6556: [Automation] Deploy VM failing with error "does not
have permission to access resource Ntwk".
2014-05-01 11:33:41 -07:00
Prachi Damle e14c2ec724 CLOUDSTACK-6517: IAM - Admin is allowed to create PortFowarding rule for a regular user, when admin does not have " UseEntry" permission for IpAddress.
Changes:
- IAM was applying ordering on accessTypes. Thus if an account had Operate, he got USe access as well. So even if IAM schema did not have 'UseEntry" permission for IpAddress, some other 'OperateEntry' permission on IpAddress was letting this operation go through.
- Fixed IAM to NOT do ordering of access types anymore. IAm will perform strict accessType check only.
- This fix is needed so that admin does not get permission to USE resources from other account just becase he has OPERATE access on those resources due to some other APIs.

- However due to this fix, we break backwards compatibilty with CS 4.3.
- CS 4.3 allowed root admin to do the createPF operation for a user by passing in networkId of the user.
- Same was the case for domain admins within their domains
- Why this worked was due to CS 4.3 simply returning true for root admin/domain admin

- So to maintain backwards compatibilty, we are adding the logic to return "true" for root admin and domain admin just like CS 4.3.
- Exception is: For Network, AffinityGroup and Templates, we still call IAM even for root admin/domain admin, since thats what CS 4.3 did. Just for these 3 resource_types, it used to perform access checks even for root admin/domain admin.
2014-04-30 11:58:21 -07:00
Min Chen 412793f9b4 CLOUDSTACK-6513: remove commented code. 2014-04-30 10:03:06 -07:00
Min Chen 3af2f6d141 CLOUDSTACK-6513: templateFilter=shared should not show self-owned
template.
2014-04-29 19:02:57 -07:00
Min Chen 7309146f9f CLOUDSTACK-6513: Optimize code by removing deprecated utility to
QueryManagerImpl as private method just used for listTemplates and
listAffinityGroups to avoid misuse by new list APIs.
2014-04-29 18:33:10 -07:00
Min Chen 0767060b1f CLOUDSTACK-6532:Affinity Groups - As admin user, not able to list all
affinity groups available for regular users by passing account and
domainId paramater. This is to revert IAM way of implementing
listAffinityGroupsCmd, will bring it back when we have implemented real
impersonation.
2014-04-29 18:08:00 -07:00
Rajani Karuturi 08ec6ebdda Fixed CLOUDSTACK-6509 Cannot import multiple LDAP/AD users into a cloudstack account
Conflicts:
	api/src/com/cloud/user/AccountService.java
	plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LdapCreateAccountCmd.java
	plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LdapImportUsersCmd.java

Signed-off-by: Koushik Das <koushik@apache.org>
2014-04-29 14:38:32 +05:30
Nitin Mehta 3e7ea4e8d9 CLOUDSTACK-6530: Populate the first class entities in the context to be available for publishing more information for the event bus, checking the displayable property etc. 2014-04-28 18:16:13 -07:00
Daan Hoogland 69add34ad0 CLOUDSTACK-6485: private gateway network should not be associated with vpc
Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-04-28 14:55:06 +02:00
Sanjay Tripathi 6f7f9996f2 CLOUDSTACK-6480: Creating Service Offering with Implict Dedication planner
fails with message:  "Please specify the pciDevice and vgpuType correctly".
2014-04-28 11:24:41 +05:30
Min Chen a4cb8d1146 CLOUDSTACK-6513: IAM - Templates - When templates are listed with
templatefilter="shared" is used , we see public templates also being
included in the list. This commit reverts listTemplates behavior to 4.3
old logic without using consistent interpretation of list parameters
adopted in new IAM model.
2014-04-25 17:25:16 -07:00
Amogh Vasekar 7694bee83f In 4.3, SSL was turned off by default.
However, for SSVM, the value from configuration server overrides the default in Config.java. Work around is to change in global properties.

Local testing, checking a fresh install has the above property false by default.

Signed-off-by: Nitin Mehta<nitin.mehta@citrix.com>
(cherry picked from commit 05802004e2)
2014-04-25 14:50:37 -07:00
Min Chen 092b4be8d9 CLOUDSTACK-6512:IAM - Not able to list shared networks in the Vm
deployment flow. This commit is to revert
ec5ee761d9 to still use old logic for
listNetworks to keep old behavior instead of new IAM model.
2014-04-25 14:35:38 -07:00
Mike Tutkowski 6dfa742eb8 CLOUDSTACK-6170 Updated logic to more accurately calculate how much space is currently allocated for a managed storage pool 2014-04-25 12:30:38 -06:00
Min Chen 5728ed33e9 CLOUDSTACK-6501:IAM - DomainAdmin - When listVirtualMachines is used
with listall=true and account and domainId , Vms owned by the account
account is not listed.
2014-04-24 18:14:25 -07:00
Nitin Mehta b8a1cbe81a CLOUDSTACK-6499:
Made changes so that uploading custom certificate works for ssvm.
    1. Reboot ssvm only when private key is passed meaning the server cert is passed. This is because while uploading the server cert is the last to be uploaded. And we want to propagate the entire chain once uploading is done.
    2. Change the SecStorageSetupCommand sent to ssvm so that it also carries the root cert apart from having the chain and the server cert and key.
    3. Change ssvm agent code to be able to configure root cert to the java key store.
    4. Change ssvm configure ssl script to insert the chain certs correctly.
    5. Fix order of chain certificates for apache webserver in SSVM
    6. Remove double encoding and decoding for uploadCustomCertificate API from UI and server code respectively, so that API call without UI works fine
    7. Java 1.7 - disable using SNI since copyTemplate doesnt work for SSL.
2014-04-24 17:20:41 -07:00
Alena Prokharchyk 98d9b8fc3f CLOUDSTACK-6436: listResourceDetails - don't return entries set with display=false, by default 2014-04-24 14:32:10 -07:00
Prachi Damle bc3a8378d0 CLOUDSTACK-6458: IAM - When a domain is deleted , the group created for this domian is not removed.
Changes:
- When domain is deleted or is removed during account cleanup, send message to IAM to remove the domain group
2014-04-24 11:39:26 -07:00
Min Chen b6617843d2 CLOUDSTACK-6468:IAM - Templates - Admin user is not allowed to edit
template and set isExtractable() paramater.
2014-04-21 17:53:04 -07:00
Sheng Yang 3578c7137f CLOUDSTACK-6047: Make aggregation command timeout configurable
In case some environments has different performance or we found some commands
would took too long to execute, one global configuration item is introduced to
specify "time out in seconds per one command in aggregation commands".

By default it's 3 seconds. If admin feel it's too long, it can be adjust to as
low as 1 seconds, which runs still well in my machine.
2014-04-18 23:27:12 -07:00
Min Chen 7821da66cc Fix findBugs bug. 2014-04-18 17:35:01 -07:00
Min Chen c3a4a01781 Fix listAccountsCmd logic to be consistent with new interpretation of
listAll, isRecursive and domainId parameters.
2014-04-18 16:58:03 -07:00
Alena Prokharchyk 4a518908a3 Fixed NPE in listResourceDetalis logic 2014-04-18 16:31:52 -07:00
Amogh Vasekar 3419c812ae CLOUDSTACK-6437:
Add ability to distinguish between user defined and system defined guest OS and mappings
Add default mappings for XenServer

Local testing with
1. Add new guest OS by API
2. Add new guest OS mapping by API
2014-04-18 11:33:42 -07:00
Min Chen bd6a95e864 Fix IAM list api implementation based on agreed interpretation for
listAll, isRecursive, domainId and account.
2014-04-17 15:46:29 -07:00
Min Chen 563efad9ae CLOUDSTACK-6429:distinguish the case where caller can see everything and
the case where caller cannot see anything. Also change behavior to
default isRecursive to false if not specified.
2014-04-17 10:50:52 -07:00
Sheng Yang dcb0db6084 CLOUDSTACK-6434: Make RvR advert_int configurable
In some network environment, 1*3 seconds by default make RvR setup too
sensitive. A configurable parameter would be better for fitting different
network environments.
2014-04-16 20:15:56 -07:00
Sheng Yang 94a146a43e CLOUDSTACK-6432: Blocking DHCP server to service DNS outside network
This would cover only DHCP only network since in basic and shared network, the
private IP used by VR and network may expose to outside.
2014-04-16 19:12:59 -07:00
Sheng Yang d27c797abc CLOUDSTACK-6433: Don't return success if only one of RvR successfully created
Conflicts:
	server/src/com/cloud/network/element/VirtualRouterElement.java
2014-04-16 18:00:35 -07:00
Prachi Damle 48c9b46328 CLOUDSTACK-6349: IAM - No error message presented to the user , when invalid password is provided.
- AccountManager now works using accountId instead of accountType in following methods too:
- isResourceDomainAdmin()
- isAdmin()
2014-04-16 11:26:57 -07:00
Anthony Xu 32b8c071b6 change xapitimeout to 600 second,
looks like we need to change some XAPI calls to Async before shorten the timeout
2014-04-16 11:04:49 -07:00
Saksham Srivastava 406c289d15 CLOUDSTACK-6151: Local data disk with tag goes to the wrong local storage pool
Signed-off-by: Koushik Das <koushik@apache.org>
2014-04-16 16:20:04 +05:30
Prachi Damle 2cf4db5359 CLOUDSTACK-6349: IAM - No error message presented to the user , when invalid password is provided.
- AccountManager now works using accountId instead of accountType
2014-04-15 17:26:26 -07:00
Min Chen a636ee4dab CLOUDSTACK-5960: Remove another check preventing Domain admin and
normal user from registering template in S3.
2014-04-14 14:41:50 -07:00
Antonio Fornie fd3a0d739e Fix: ParamGenericValidationWorker shouldn't be case sensitive
Signed-off-by: Alena Prokharchyk <alena.prokharchyk@citrix.com>
2014-04-14 10:05:41 -07:00
Kishan Kavala 6094e00797 CLOUDSTACK-6376: Return empty list when network tier has no ACL list associated. 2014-04-10 15:29:01 +05:30
Kishan Kavala 635b69676a CLOUDSTACK-6374: Remove entries from lb vm map when lb rule apply fails 2014-04-10 15:28:55 +05:30
Sanjay Tripathi 5e9b25bad0 CLOUDSTACK-6373: listHost API response is not listing all the details of vgpuType. 2014-04-10 13:55:25 +05:30
Sanjay Tripathi 127196e95d CLOUDSTACK-6366: add vgpuTypes details in vgpu_types table. 2014-04-09 18:22:06 +05:30
Harikrishna Patnala 68c80e28c0 CLOUDSTACK-6253: Optimizing VR alerts getting algorithm In addition to this a new configuration parameter is added router.alerts.check.interval defaulted to 30minutes to check for alerts in Virtual Router 2014-04-09 18:11:24 +05:30
Jayapal a9accd331a CLOUDSTACK-6364 Added ip address validation
Also updated to assign vm primary ip to lb rule when vmid is passed virtualmachineid
and vm id ip details in vmidipmap
2014-04-09 17:42:16 +05:30
Frank.Zhang 68cf2ba0ef BUG-ID: CS-19152
[upgrade] Baremetal 4.2.0 -> 4.3. After upgrade, destroy baremetal instance fail

BUG-ID: CS-19150
[upgrade] Baremetal 4.2.0 -> 4.3. After upgrade, unable to start baremetal instance

BUG-ID: CS-19149
[upgrade] Baremetal 4.2.0 -> 4.3. After upgrade, baremetal host remain in Disconnected state. But instance associated with baremetal host is running.

BUG-ID: CS-19151
[upgrade] Baremetal 4.2.0 -> 4.3. After upgrade, unable to reboot baremetal instance

BUG-ID: CS-19156
[upgrade] Baremetal 4.2.0 -> 4.3. After upgrade, unable to stop baremetal instance

reviewed-by: edison
(cherry picked from commit 3787579d29)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>

Conflicts:

	plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalDiscoverer.java
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java
	server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
2014-04-08 15:31:24 -07:00
Sanjay Tripathi 156fb7ebd3 CLOUDSTACK-6357: Not able to select GPU card in case of GPU-passthrough. 2014-04-08 22:08:17 +05:30
Jayapal bea7305bb0 CLOUDSTACK-6353 Fixed listing vm ip details for lb rule 2014-04-08 12:54:07 +05:30
Min Chen 3661e67fd1 CLOUDSTACK-6350: IAM - Listing of VM using uuid when owner account of
this Vm is deleted results is VM not being returned.But list VM with
listAll=true is able to return this VM.
2014-04-07 22:23:21 -07:00
Jayapal 83c13ce1b9 CLOUDSTACK-6327 updated uuid to id mapping 2014-04-07 16:30:11 +05:30