Commit Graph

1994 Commits

Author SHA1 Message Date
Rohit Yadav 1cf165f86d ApiResponseHelper: fix NPE when parent of snapshot is null 2015-02-05 17:10:56 +05:30
Kishan Kavala 7a397cd4ef For volumes created from template, do not log offering ID in VOLUME.CREATE in usage_event. Moved offering type to DiskOffering interface
(cherry picked from commit 9eb8d538dd)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 16:37:59 +05:30
Likitha Shetty 8f4aa23ae0 CLOUDSTACK-8127. VM name not displayed after attaching data disk to a VM.
If user hasn't supplied a display name for a VM, default it to VM name in listVolume response.
This behaviour is identical to listVirtualMachine response.

(cherry picked from commit ff7997a2b1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 13:01:33 +05:30
Nitin Mehta a6f9411b1e CLOUDSTACK-7771: Throw exception while restoring vm if the template is already deleted. Also fix the usage event being generated from the right template id and fix the log message which sometime showed incorrect template id.
CLOUDSTACK-4201: listServiceOfferings API needs to be able to take virtualmachineid of SystemVM and return service offerings available for the vm to change service offering

(cherry picked from commit ee0f0a1cff)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 12:05:25 +05:30
Saksham Srivastava 6715c6ccfa CLOUDSTACK-7941: CloudStack should log IP address of actual client even if a ReverseProxy is there
(cherry picked from commit f0a4a639de)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:32:09 +05:30
Sanjay Tripathi b77cbea0f3 CLOUDSTACK-7964: listAccounts API is not listing correct value of resource limits.
(cherry picked from commit d475b62838)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:29:34 +05:30
Sanjay Tripathi 8676ff26e0 CLOUDSTACK-8066: There is not way to know the size of the snapshot created.
(cherry picked from commit 9153b8bede)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 17:25:41 +05:30
Pierre-Yves Ritschard 5ea7414746 move ConstantTimeComparator to utils
(cherry picked from commit b2393c31ed)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-14 20:25:32 +05:30
Pierre-Yves Ritschard 162c5af6f8 Use constant-time comparison functions when checking signatures
This limits the likeliness of timing attacks against the API.
See http://codahale.com/a-lesson-in-timing-attacks/ for the
full rationale.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/user/AccountManagerImpl.java

(cherry picked from commit 9b4e39e837)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-14 20:25:21 +05:30
Rohit Yadav 921ad057de CLOUDSTACK-8155: Remove unwanted whitespaces from json response
This removes extra whitespaces from the JSON serialized response.
After the fix, tested to work with:
- Present UI
- CloudMonkey
- Old buggy json parsers

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-14 02:40:00 +05:30
Min Chen 3506789b0b CLOUDSTACK-8093:Not able to list shared templates by passing id. 2014-12-18 10:27:20 -08:00
Min Chen 344d98e0bd CLOUDSTACK-7981: added back resource tag related columns to user_vm_view to support resource tag related search. 2014-12-03 09:48:07 -08:00
Rohit Yadav d28b716d8a CLOUDSTACK-7989: Ignore Auth API calls in unauthenticated HTTP handlers
If an auth API call (such as login, logout) is called on unauthenticated port
such as the 8096 integration server port, we need to ignore such API calls
as calling auth APIs on 8096 is un-necessary and is undefined.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 21a6bef53b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-11-28 15:46:17 +05:30
Min Chen bf8dd828f5 CLOUDSTACK-7981: listVirtualMachine is too slow in case of duplicate
resource tags due to joining user_vm_details to user_vm_view.
2014-11-26 17:40:06 -08:00
Min Chen 66e0f049db CLOUDSTACK-7954:ListTags API is ignoring the resourceID and displaying
all the tags of all resources.
2014-11-20 09:48:07 -08:00
Damodar f1361796bf CLOUDSTACK-7886: cloudstackoperations like deployvm,deleteNW are failing if CS fail to contact rabbit mq server. This is happening in case of Async API calls.
Signed-off-by: Koushik Das <koushik@apache.org>
2014-11-12 10:24:56 +05:30
Koushik Das e25de54b4c CLOUDSTACK-7421
Unnecessary exception in MS logs while removing default NIC from VM. Following changes are made:
1. Changed the exception from CloudRuntimeException to InvalidParameterValueExecption.
2. Moved out validation logic to UserVMManagerImpl from VirtualMachineManagerImpl.
3. Handling InvalidParameterValueException from async API calls so that they are not logged as ERROR in MS logs.
2014-11-08 13:50:15 +05:30
Min Chen 055901acda CLOUDSTACK-7797: listSupportedNetworkServices API takes more than 1 second to
complete, slow compared to previous 4.3 release.
2014-10-27 17:00:42 -07:00
Nitin Mehta 42f628c61c CLOUDSTACK-7532: Template status is not shown in UI/API response for non-default account users. Show it if the owner of the template is the caller 2014-10-15 13:53:39 -07:00
Rohit Yadav 6e04f93785 CID-1192822: ids is a List<Long>, the cast to List<?> is removed
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 92858afd55)
2014-10-12 23:58:17 -04:00
Hugo Trippaers cf4ff03c90 CID-1191682 Fix missing break statement 2014-09-19 08:28:42 +02:00
Koushik Das 4e07dd1dc4 CLOUDSTACK-7581: Empty 'ID' parameters allowed in API calls
Fix is to fail API calls with empty 'id' parameter value upfront rather than going ahead and failing with NPE later on
2014-09-18 17:10:25 +05:30
Rohit Yadav bfa36c0280 CID-1233090, CID-1233089: Synchronize on session object in ApiServer
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-18 11:26:20 +02:00
Rohit Yadav 190bd38026 server: remove unused imports that failed build in last run
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-17 16:53:32 +02:00
Rohit Yadav 369b5b439b CID-1192812: Remove dead code from DataCenterJoinDaoImpl
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-17 16:29:03 +02:00
Rohit Yadav bfd8af0751 CID-1192811: Remove dead local store from VolumeJoinDaoImpl
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-17 16:27:41 +02:00
Nitin Mehta 0a4ab3251a CLOUDSTACK-7513: listServiceOfferings API when called with VM's id also returns offerings to which it cant be upgraded. Adding the logic that when vmid is passed it looks for compatible offerngs using the storage type (local/shares), storage tags and also compute (cpu,speed, memory) in case the vm is running.
Also changed the scaleVm API to upgrade only when the destination offering has storage tags as a subset of current offering tags.
2014-09-15 11:02:34 -07:00
Devdeep Singh 283666b038 Password is logged in api server logs while creating a storage pool and while
adding an image store of type SMB. Cleaning the message before logging.
2014-09-12 14:31:17 +05:30
Frank Zhang 7a555b398f CLOUDSTACK-7523
java.lang.NullPointerException when listing accounts
2014-09-10 14:43:41 -07:00
Nitin Mehta f9d7a12a57 CLOUDSTACK-7481: Assertion/exception in listVolumes call from UI with assert enabled
searchForVolumesInternal() indicated some inconsistency in the use of entity().isDisplayVolume() property – used twice as “display” and “displayVolume” in search criteria. And then exception/assert happens while setting the property.
Correcting the issue.
2014-09-05 11:35:11 -07:00
Edison Su ce82ab605d listhost api needs to return host_details table 2014-09-04 17:57:24 -07:00
Rohit Yadav 33a249e77a CLOUDSTACK-7455: Fix possible case for NPE
NPE can happen if Spring fails to inject api authenticator, so better check
and set list of commands if the authenticator is not null or returning null cmds

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-31 14:42:18 +02:00
Rohit Yadav 47ccce85a1 api: add method to pass on api authenticators to cmd classes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:24 +02:00
Rohit Yadav 37d696db80 ApiServer: Fix imports order, use org.apache.cloudstack.api.ApiServerService
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:23 +02:00
Rohit Yadav 591a686d77 server: fix server package after auth plugin refactor
- Have opensaml dependency to get version from root pom
- add com.cloud.api.auth.APIAuthenticationManagerImpl to spring ctx manager
- Fix getCommands() in APIAuthenticationManagerImpl
- Fix imports in resources, test and src classes

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:23 +02:00
Rohit Yadav 68e094ebaf saml: move refactor files from server to api module
- Move interfaces and classes from server to api module
- This can be then used for pluggable api authenticators

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:22 +02:00
Rohit Yadav a364054db6 Minor fixes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:21 +02:00
Rohit Yadav 2464e02bf4 SAML2LoginAPIAuthenticatorCmd: Set all necessary cookies and redirect to UI
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:21 +02:00
Rohit Yadav 2694ad7bd9 ApiServlet: Fix NPE while inserting to auditTrail
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:21 +02:00
Rohit Yadav a1dc9e8189 SAML2LoginAPIAuthenticatorCmd: Implement SAML SSO using HTTP Redirect binding
- Creates SAMLRequest and uses HTTP redirect binding (uses GET/302)
- Redirects to IdP for auth
- On successful auth, check for assertion
- Tries to get attributes based on standard LDAP attribute names
- Next, gets user using EntityManager, if not found creates one with NameID as UUID
- Finally tries to log in and redirect

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:21 +02:00
Rohit Yadav 9c7204d386 DefaultLoginAPIAuthenticatorCmd: move createLoginResponse to ApiServer
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:21 +02:00
Rohit Yadav 1a3813a342 ApiServer: change loginUser method signature to return ResponseObject
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:20 +02:00
Rohit Yadav b82207e081 SAML: WIP redirections work now
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:20 +02:00
Rohit Yadav df95a762f4 SAML2: add saml sso and slo apicmds skeleton, add classes to AuthManager
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-28 19:45:20 +02:00
Rohit Yadav d71c19f91c ApiXmlDocWriter: add more search name spaces to find APIs
Whenever a new API command is added to CloudStack, if developers are not using
the recommended namespace of org.apache.cloudstack.api.* they should add their
custom namespace/package here. ApiXmlDocWriter uses ReflectUtils to find APIs
within these packages (which must be also available in cloud-client).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-25 18:16:28 +02:00
Santhosh Edukulla 19ffc93e2e Fixed few coverity reported issues:Aug22 2014 2014-08-21 17:09:27 +05:30
Wei Zhou b035a444c6 CLOUDSTACK-7308: add tags to all security group rules
(cherry picked from commit ae1b87ca23)
2014-08-18 16:17:28 +02:00
seif 59ea2e2960 Added the listHostTags API command 2014-08-17 20:38:46 -06:00
Stephen Hoogendijk 6978c18c3a CLOUDSTACK-7308 - Adds tagging support for security group rules 2014-08-15 09:39:53 +02:00
Rohit Yadav 31fbb20648 ApiXmlDocWriter: Don't hardcode around login api or skip it based on key name
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-13 14:05:18 +02:00