Commit Graph

25509 Commits

Author SHA1 Message Date
Rohit Yadav 7385441807 Updating pom.xml version numbers for release 4.5.2
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-19 14:42:54 +05:30
Rajani Karuturi 1a106ec16f Merge pull request #697 from milamberspace/update-4.5-20150814
Update L10N resource files on 4.5 branch with 4.5 translation strings from Transifex (20150814)

* pr/697:
  Update L10N resource files on 4.5 branch with 4.5 translation strings from Transifex (20150814)

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-08-19 14:08:37 +05:30
Remi Bergsma b655104b77 CLOUDSTACK-8709 No out of band migrate alert for non-routers
(cherry picked from commit daa30c4722)
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-08-18 11:06:19 +02:00
Milamber 35d522653f Update L10N resource files on 4.5 branch with 4.5 translation strings from Transifex (20150814) 2015-08-14 10:40:21 +01:00
Milamber 606afe341d Improve debug message when the scheduler prepare to snapshot (volume 'id' and add volume name)
Signed-off-by: Milamber <milamber@apache.org>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #676
2015-08-14 14:12:11 +05:30
Milamber 9866e9707c Add missing localization for some labels in Web UI - on the zone configuration wizard for the "Next" button - on templates, Shared, extratable and Dynamically Scalable - Improve some French translations ("Téléverser" for "Upload") - update French messages properties from transifex (4.5 branch)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #687
2015-08-14 14:11:11 +05:30
Rohit Yadav cc63611cc2 tools: fix build_asf.sh release script to remove -SNAPSHOT from bunch of files
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 13:54:06 +05:30
Kishan Kavala f54d266c8b BUG-ID:CLOUDSTACK-7472: kvmclock fix for LXC is not required after fixing CLOUDSTACK-8177
This closes #557

(cherry picked from commit 3a19a8916e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
2015-08-14 13:20:56 +05:30
Rohit Yadav 7055b2280f CLOUDSTACK-8696: Port Rajani's regions fix to 451to452 sql upgrade path
Upgrade paths from 4.5.1 exists to both 4.5.2, and 4.6.0. Since 4.5.2 and 4.6.0
are not release, and the bug affects 4.5 branch; this patch aims to port that
fix from master to both 4.5/master branches.

Ported from commit b6a7804

(cherry picked from commit a8af6f3658ded6e1c3538082fb4abeb7f30c420d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 13:16:37 +05:30
Rohit Yadav 5f06ef77d8 CLOUDSTACK-8701: Add unit test for SAML2AuthManagerImpl
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 11:55:14 +05:30
Rohit Yadav b30977911d CLOUDSTACK-8701: Add listandswitchsamlaccount API test and add boundary checks
- Adds unit test for ListAndSwitchSAMLAccountCmd
- Checks and logs in user only if they are enabled
- If saml user switches to a locked account, send appropriate error message

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 11:55:14 +05:30
Rohit Yadav 3c9d1fdf5d engine: fix accountState setter name
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 11:55:14 +05:30
Rohit Yadav 0fcd9cad1e utils: add HttpUtils test
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 11:55:14 +05:30
Rohit Yadav 1e3e674514 CLOUDSTACK-8701: Add administrative contact block as per SAML IDP expectations
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 11:55:14 +05:30
Rohit Yadav 1065661cd5 CLOUDSTACK-8701: Allow SAML users to switch accounts
SAML authorized accounts might be across various domains, this allows for
switching of accounts only in case of SAML authenticated user accounts across
other accounts with the same SAML uid/username.

Moves the previous switch account logic to its own ui-custom module

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 11:55:14 +05:30
Rohit Yadav cb7dd7b27d CLOUDSTACK-8702: Add/refactor sessionkey checking code to HttpUtils
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 11:55:14 +05:30
Rohit Yadav cb2aca7516 CLOUDSTACK-8613, CLOUDSTACK-6301: Dump KVM domain XML with secure flag
When dumping XML use appropriate flags:

1, VIR_DOMAIN_XML_SECURE (dump security sensitive information too)
8, VIR_DOMAIN_XML_MIGRATABLE (dump XML suitable for migration)

Source:
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainXMLFlags

This fixes CVE 2015-3252: VNC password lost during VM migration across KVM
hosts. The issue is also seen when a VM is rebooted.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 10:50:55 +05:30
John Burwell 3a48171bd8 CLOUDSTACK-8566: Strips the username and password credentials from host details
... map returned by the following API calls by filtering these fields from the
details attribute in the HostResponse class:

  * listHosts
  * addHost
  * cancelHostMaintenance
  * listHosts
  * prepareHostForMaintenance
  * reconnectHost
  * updateHost

This fix addresses CVE 2015-3251.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 10:49:28 +05:30
Rohit Yadav 17366f2b18 CLOUDSTACK-8301: Enable configuring local storage use for system VMs at zone level
Backported from #263 for 4.5 branch, original bugfix by @koushik-das et al

More information on:
https://issues.apache.org/jira/browse/CLOUDSTACK-8301
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Enable+configuring+local+storage+use+for+system+VMs+at+zone+level

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

This closes #661
2015-08-08 22:41:52 +05:30
Boris Schrijver 58c6a8d1a3 CLOUDSTACK-8703: Fixed issue when listing directory on S3, it would only return objectSummaries when the anwser from the S3 System was truncated.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #651
2015-08-04 17:42:21 +05:30
Rohit Yadav 2ed9539c29 travis: don't force M2_HOME, let Travis use the bundled maven3
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #652
2015-08-04 01:13:37 +05:30
Milamber f3c423fb78 Update L10N resource files on 4.5 branch with 4.5 translation strings from Transifex (20150730) 2015-07-30 11:10:18 +01:00
Boris Schrijver 8dc8e9b8f3 CLOUDSTACK-8649: Fixed unnecessary double url decoding in registerSSHKeyPair.
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #615

(cherry picked from commit 2e79c628e0)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/server/ManagementServerImpl.java
2015-07-24 14:59:30 +05:30
Daan Hoogland fd459b89ff CLOUDSTACK-7539: no return in synchronised block 2015-07-17 13:06:23 +02:00
Hiroki Ohashi 9cb4a913d3 CLOUDSTACK-7539: [S3] Parallel deployment makes reference count of a cache in nfs secondary staging store negative(-1) 2015-07-17 13:05:21 +02:00
Boris Schrijver 56522fda67 CLOUDSTACK-8642: SSO Method not allowed bug fix. Due to CLOUDSTACK-8505 and commit 1c81b241e7
Signed-off-by: Daan Hoogland <daan@onecht.net>

This closes #598

(cherry picked from commit b1e5906923)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-16 21:44:58 +05:30
Rohit Yadav c7a6623cac CLOUDSTACK-8457: SAML UI Dialog fixes to use local $form
This uses local selector to access the DOM elements, the previous commit
would find a global element which is not in the context and fail changing the
element in the opened dialog.

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

This closes #583

(cherry picked from commit 47d2d07eb9)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-15 18:37:27 +05:30
Rohit Yadav 7d11c7bc70 CLOUDSTACK-8457: SAML UI enhancements
Add option to authorize SAML SSO for user when adding user. Appends a domain to
user/account name if global setting is enabled, useful in case of multiple IDP
server. By default the setting is set to false (keep as it is).

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

This closes #575
2015-07-14 10:20:00 +05:30
Rohit Yadav 12edad3e20 CLOUDSTACK-8622: Reinstate working sessions in browser
- Login is based on sessionkey HttpOnly Cookie
- ApiServlet does login verification using sessionKey from both the request cookies
  and the API parameters. In both cases, if either or both are passed they should
  match the sessionKey stored in the current session of the HttpRequest
- UI: it no longer needs to read or set sessionkey cookie
- UI: it no longer needs to return g_sessionKey value in the API requests, though
  to support a sso mechanism g_sessionKey is still passed in the API is not null
- Secure jsessionid cookie is set to be HttpOnly and Secure
- SAML login should also set HttpOnly cookie before redirecting to UI
- SAML: listIdps & getSPMetadata APIs are readonly now, won't log out a logged in user

Performed tests (login, saml login if applicable, page refreshes, opening
multiple tabs, logout) with following combinations:
- SAML disabled, normal auth as admin, domain-admin and user
- SAML enabled, normal auth as admin, domain-admin and user; and saml sso as
  admin, domain-admin and user

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

This closes #574
This closes #308
2015-07-10 17:27:34 +05:30
Ilya Musayev a2ddf2773e CLOUDSTACK-8624: Added the support for mysql db port and lowered the requiremnts for available disk capacity to 2.1GB VS original 5GB as it was too excessive. 2015-07-10 06:59:56 +05:30
Rohit Yadav 4de4a0f3dd CLOUDSTACK-8621: Allow UI plugins to be shown on navigation bar
Introduces a boolean option in UI plugins setting it to 'true' would display
the UI plugin on the left navigation bar.

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

This closes #563

(cherry picked from commit 7c206c30a5)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-09 15:26:00 +05:30
Koushik Das 7eac6310bc CLOUDSTACK-8603: Random list VM failures at scale (more than 1000 VMs) when VM has resource tags There is no 'removed' field on the resource_tags table. So 'id' based search may return a record or null in case record is deleted. Added a check for null or empty in search resource tags based on 'id'.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #551

(cherry picked from commit 5d9f851deb)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-03 15:28:22 +05:30
Rohit Yadav 2777caddbb appliance: bump systemvm template version to 4.5.2
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-01 12:45:52 +02:00
Rohit Yadav ba750293cc XenserverSnapshotStrategy: check if primary is null before proceeding in backupSnapshot
In backupSnapshot, it checks for snapshot in primary but does not check in advance if
it is null.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-29 18:38:04 +02:00
Rohit Yadav e50547a3ea engine/storage/snapshot: Fix NPE when parent could be null
Fixed potential NPE in SnapshotServiceImpl where parent snapshot is null

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-29 18:33:22 +02:00
Rohit Yadav 20ce346f3a CLOUDSTACK-8457: SAML auth plugin improvements for production usage
* Move config options to SAML plugin
  This moves all configuration options from Config.java to SAML auth manager. This
  allows us to use the config framework.
* Make SAML2UserAuthenticator validate SAML token in httprequest
* Make logout API use ConfigKeys defined in saml auth manager
* Before doing SAML auth, cleanup local states and cookies
* Fix configurations in 4.5.1 to 4.5.2 upgrade path
* Fail if idp has no sso URL defined
* Add a default set of SAML SP cert for testing purposes
  Now to enable and use saml, one needs to do a deploydb-saml after doing a deploydb
* UI remembers login selections, IDP server

- CLOUDSTACK-8458:
    * On UI show dropdown list of discovered IdPs
    * Support SAML Federation, where there may be more than one IdP
        - New datastructure to hold metadata of SP or IdP
        - Recursive processing of IdP metadata
        - Fix login/logout APIs to get new interface and metadata data structure
        - Add org/contact information to metadata
        - Add new API: listIdps that returns list of all discovered IdPs
        - Refactor and cleanup code and tests

- CLOUDSTACK-8459:
    * Add HTTP-POST binding to SP metadata
    * Authn requests must use either HTTP POST/Artifact binding

- CLOUDSTACK-8461:
    * Use unspecified x509 cert as a fallback encryption/signing key
      In case a IDP's metadata does not clearly say if their certificates need to be
      used as signing or encryption and we don't find that, fallback to use the
      unspecified key itself.

- CLOUDSTACK-8462:
    * SAML Auth plugin should not do authorization
      This removes logic to create user if they don't exist. This strictly now
      assumes that users have been already created/imported/authorized by admins.
      As per SAML v2.0 spec section 4.1.2, the SP provider should create authn requests using
      either HTTP POST or HTTP Artifact binding to transfer the message through a
      user agent (browser in our case). The use of HTTP Redirect was one of the reasons
      why this plugin failed to work for some IdP servers that enforce this.
    * Add new User Source
      By reusing the source field, we can find if a user has been SAML enabled or not.
      The limitation is that, once say a user is imported by LDAP and then SAML
      enabled - they won't be able to use LDAP for authentication
    * UI should allow users to pass in domain they want to log into, though it is
      optional and needed only when a user has accounts across domains with same
      username and authorized IDP server
    * SAML users need to be authorized before they can authenticate
        - New column entity to track saml entity id for a user
        - Reusing source column to check if user is saml enabled or not
        - Add new source types, saml2 and saml2disabled
        - New table saml_token to solve the issue of multiple users across domains and
          to enforce security by tracking authn token and checking the samlresponse for
          the tokens
        - Implement API: authorizeSamlSso to enable/disable saml authentication for a
          user
        - Stubs to implement saml token flushing/expiry

- CLOUDSTACK-8463:
    * Use username attribute specified in global setting
      Use username attribute defined by admin from a global setting
      In case of encrypted assertion/attributes:
      - Decrypt them
      - Check signature if provided to check authenticity of message using IdP's
        public key and SP's private key
      - Loop through attributes to find the username

- CLOUDSTACK-8538:
    * Add new global config for SAML request sig algorithm

- CLOUDSTACK-8539:
    * Add metadata refresh timer task and token expiring
        - Fix domain path and save it to saml_tokens
        - Expire hour old saml tokens
        - Refresh metadata based on timer task
        - Fix unit tests

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

This closes #489
2015-06-29 12:25:02 +02:00
Daan Hoogland a8959bca55 4.4.4 to 4.5.2 upgrade
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #528
2015-06-26 00:02:35 +02:00
Daan Hoogland eb904cd8fd findbugs: repeated condition seems c&p error the tested states sugest that EXPUNGED should be the last one
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #491

(cherry picked from commit bb613baa2b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-19 15:27:17 +03:00
Abhinandan Prateek 04c7cf4e15 CLOUDSTACK-8570:Exception in calculating reserved capacity for dynamic service offering 2015-06-19 09:24:56 +05:30
Jayapal 259b2639f5 Fixed issue in adding vm SG rules on vm reboot for xenserver 6.5
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #479

(cherry picked from commit 59e6596fef)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-18 13:33:01 +03:00
Daan Hoogland 85e2d9611f CLOUDSTACK-8545 alert when out of band migration is detected and not
acted upon
2015-06-18 08:04:50 +02:00
Daan Hoogland 88fb8431f2 CLOUDSTACK-8545 make reboot on out of band migration configurable 2015-06-17 22:31:44 +02:00
Daan Hoogland 4d096ea0e1 CLOUDSTACK-8537 test for the sake of testing the fix seems so trivial but no testing is available for it at all. when bugs arise test extension should be the start point here.
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #357
2015-06-17 22:20:13 +02:00
Daan Hoogland 6e3c6e8299 CLOUDSTACK-8537 refactor registerSSHKeyPair() for legibility and testability reasons
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-17 22:19:53 +02:00
Daan Hoogland 570d162692 CLOUDSTACK-8537 add check for unique public key and account on ssh keypair registration
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-17 22:19:23 +02:00
Wido den Hollander ad1fbc1b79 CLOUDSTACK-8560: Stat the resulting image after copying from template and return the size
This way we update the DB with the actual size of the disk after deployment from template

(cherry picked from commit 4b4c52ea77)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
2015-06-15 21:53:20 +03:00
Wido den Hollander 9ff3fe371e CLOUDSTACK-8559: IP Source spoofing should not be allowed
We did not verify if the packets leaving an Instance had the correct
source address.

Any IP packet not matching the Instance IP(s) will be dropped

(cherry picked from commit 3e3c11ffca)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-15 21:51:01 +03:00
Kishan Kavala 979956a4ef CLOUDSTACK-5409: Include projectid during ACL check while listing S2S Vpn gateways
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #374
2015-06-12 14:54:16 +03:00
jeff 64d72db0fc Allow EC2 to be run from Maven properly
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #389
2015-06-12 14:49:09 +03:00
Daan Hoogland 5fb86ae316 CID 1302976 Scanner in try-with-resource
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #352

(cherry picked from commit 3d4d152753)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-04 00:10:18 +02:00