1269 Commits

Author SHA1 Message Date
Daan Hoogland
1ab3b96594 coverity 1315775: proper getting of networkLabel 2015-08-12 01:10:31 +02:00
Mike Tutkowski
8b0266d12e Merge branch 'pr/547'
* pr/547:
  CLOUDSTACK-8601. VMFS storage added as local storage can be re-added as shared storage. Fail addition of a VMFS shared storage pool in case it has already been added as local storage in CS.

Signed-off-by: Mike Tutkowski <mike.tutkowski@solidfire.com>
2015-08-10 19:00:53 -06:00
Daan Hoogland
d32d6a24a4 Merge pull request #649 from
* pr/649:
  CLOUDSTACK-8656: checkstyle no longer used import removed
  CLOUDSTACK-8656: messages on SQL exception in DbUtils!
  CLOUDSTACK-8656: replace empty catch block on close by try-with-resource
  CLOUDSTACK-8656: 30x legacy upgrade code exception messages
  CLOUDSTACK-8656: removed redundant implements
  CLOUDSTACK-8656: silent close failure of clustering socket log as info
  CLOUDSTACK-8656: try with resource te eliminate empty catch clauses
  CLOUDSTACK-8656: log messages on exception in legacy sql upgrade code
  CLOUDSTACK-8656: removed unused input stream   there was code to close a stream that was never created
  CLOUDSTACK-8656: info on error closing peering channels
  CLOUDSTACK-8656: messages on errors closing streams for local templates
  CLOUDSTACK-8656: handle template properties loading

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-08-03 22:25:21 +02:00
Daan Hoogland
118e954d01 Merge pull request #603 from
* pr/603:
  coverity: try-with-resource and restructure in upgrade datacenter
  extra try-w-r
  coverity issues in old upgrade code

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-08-03 22:01:12 +02:00
Daan Hoogland
8151f7f2ed Merge pull request #604 from
* pr/604:
  coverity 1116563: resource count leak for accounts
  coverity 1116562: resource count resource leak
  coverity 1116612: update network cidrs firewall rules and acls
  coverity 1116610: upgrade cluster overprovisioning details
  coverity 1212194: reuse of prepared statements in try-block   and of course have them autoclosed
  coverity 1225199: vmware dc upgrade
  coverity 1288575: replace all close with try-with-resource  not strictly necessary in all but one case. done consequently.

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-08-03 21:56:11 +02:00
Daan Hoogland
f221b9a423 CLOUDSTACK-8656: 30x legacy upgrade code exception messages 2015-08-03 19:35:41 +02:00
Daan Hoogland
8e3b99d0d6 CLOUDSTACK-8656: removed redundant implements 2015-08-03 11:54:35 +02:00
Daan Hoogland
04e9083c31 CLOUDSTACK-8656: log messages on exception in legacy sql upgrade code 2015-08-02 15:12:49 +02:00
Daan Hoogland
53535d60cc coverity: try-with-resource and restructure in upgrade datacenter 2015-08-02 14:30:14 +02:00
Daan Hoogland
2b9f5b27bb extra try-w-r 2015-08-02 14:30:10 +02:00
Daan Hoogland
119f6b0bd8 coverity issues in old upgrade code 2015-08-02 14:30:07 +02:00
Daan Hoogland
4e65845789 CLOUDSTACK-8656: removed unused input stream
there was code to close a stream that was never created
2015-08-02 12:58:56 +02:00
Mike Tutkowski
406c2c00b2 Correcting an issue that was introduced with b84093f691ae0b09d2c525d50f2e2d200c709b2c 2015-07-30 18:24:58 -06:00
Daan Hoogland
e2b6237464 CLOUDSTACK-8656: debug messages on interupted exceptions 2015-07-30 16:03:10 +02:00
Daan Hoogland
85e002b230 CLOUDSTACK-8656: filling empty catch block with info messages
using regexp "catch\s*\(\s*(Exception|Throwable)\s*\w*\)\s*\{\s*\}"
2015-07-30 15:51:52 +02:00
Koushik Das
3be278ed5e CLOUDSTACK-8651: [Browser Based Upload Template] Partially uploaded templates doesn't get cleaned up after the SSVM handling it is destroyed
Fixed template sync code to include templates in 'NotUploaded' and 'UploadInProgress' states along with 'Active'.
2015-07-29 13:40:43 +05:30
Daan Hoogland
9d84d99330 coverity 1116563: resource count leak for accounts 2015-07-28 17:26:29 +02:00
Daan Hoogland
168199360d coverity 1116562: resource count resource leak 2015-07-28 17:23:44 +02:00
Daan Hoogland
49cb56bbca coverity 1116612: update network cidrs firewall rules and acls 2015-07-28 17:12:28 +02:00
Daan Hoogland
0290f3ed6a coverity 1116610: upgrade cluster overprovisioning details 2015-07-28 16:40:59 +02:00
Daan Hoogland
ae5fe7b5fb coverity 1212194: reuse of prepared statements in try-block
and of course have them autoclosed
2015-07-20 15:05:57 +02:00
Daan Hoogland
367e2ab71e coverity 1225199: vmware dc upgrade 2015-07-20 14:44:25 +02:00
Daan Hoogland
2f0813aa3e coverity 1288575: replace all close with try-with-resource
not strictly necessary in all but one case. done consequently.
2015-07-19 14:47:05 +02:00
Daan Hoogland
4f1eb8d6dd coverity 1116711: findLostHost trivial try-with-resource inserted
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-07-17 13:22:42 +02:00
Daan Hoogland
e92e800930 coverity 1116696: iprange adding code cleaned
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-07-17 13:22:42 +02:00
Daan Hoogland
3c125c0dc1 coverity 1311708: sql exception caught instead of generic (runtime)
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-07-14 13:41:09 +02:00
Daan Hoogland
9681fefaef coverity in upgrade code 1164030: memory upgrade for ssvm 1164031: image store details encryption
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-07-14 11:53:22 +02:00
Koushik Das
9ec2a6c29c CLOUDSTACK-8623: CPVM fails to start after MS is restarted during its initial start-up process
If SSVM cannot be started then the existing entry is removed and a new SSVM gets created. Made similar changes for CPVM as well.
Also cleaned up some log messages in SSVM and CPVM manager code.
2015-07-14 10:55:19 +05:30
Daan Hoogland
2c7e19faff coverity 1116544: a lot of the same (probably other coverity ids covered as well)
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-07-09 21:30:24 +02:00
Daan Hoogland
f8691b2c69 coverity 1116511 and 1116513: try-with-resource on old upgrade script three issues seen by coverity as two. only one occurence of leakage
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-07-09 21:30:24 +02:00
Daan Hoogland
3bedeeaacc coverity 1116509: heavy entanglement of prepared statements and result sets hope I got the logic right. this is for very old versions, might be worth phasing out unless someone still uses it.
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-07-09 21:30:23 +02:00
Daan Hoogland
79709cd490 coverity 1116507: one off old upgrade code trivial fix however
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-07-09 21:30:23 +02:00
Daan Hoogland
803d6ed7df coverity 1296982: standard prepared statement and result set leakage
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-07-09 21:30:23 +02:00
Koushik Das
f138192c94 CLOUDSTACK-8606: DB performance impacted due to VM sync.
VM sync. generates a lot of queries on vm_instance table with 'instance_name' as filter. Since the field is not
indexed, these kind of queries will impact DB performance. Added an index for instance_name field.

This closes #553
2015-07-03 10:06:48 +05:30
Likitha Shetty
13a98dd196 CLOUDSTACK-8601. VMFS storage added as local storage can be re-added as shared storage.
Fail addition of a VMFS shared storage pool in case it has already been added as local storage in CS.
2015-07-01 10:47:36 +05:30
Rohit Yadav
3ff92e883e database: fix upgrade paths from 4.5.2 to 4.6.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-29 12:58:47 +02:00
Rohit Yadav
107595a6a5 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

This closes #489

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

Conflicts:
	client/WEB-INF/classes/resources/messages_hu.properties
	plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixCheckHealthCommandWrapper.java
	plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmd.java
	ui/scripts/ui-custom/login.js
2015-06-29 12:31:51 +02:00
Daan Hoogland
582687fb3f 4.4.4 to 4.5.2 upgrade
Conflicts:
	engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java

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

This closes #529
2015-06-26 00:07:44 +02:00
Rafael da Fonseca
53e42fb45e Fix findbugs SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING warning in Upgrade410to420.java
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #505
2015-06-22 10:55:29 +02:00
Rafael da Fonseca
58eac0b49d Fix 2 more findbugs DM_BOXED_PRIMITIVE_FOR_PARSING in Upgrade218to22.java
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #500
2015-06-22 10:49:35 +02:00
Rafael da Fonseca
f038a740a5 Fix 2 findbugs occurences of DM_BOXED_PRIMITIVE_FOR_PARSING in Upgrade218to22.java
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #499
2015-06-22 10:48:49 +02:00
Rafael da Fonseca
b84093f691 Fix findbugs SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING warning in PrimaryDataStoreDaoImpl.java
Remove trailing spaces that checkstyle complained about

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #474
2015-06-17 22:46:58 +02:00
Rafael da Fonseca
1407033cc2 Fix findbugs SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING warning in UserVmDaoImpl.java detail field was vulnerable
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #473
2015-06-17 22:38:19 +02:00
Daan Hoogland
9f02531212 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 20:47:57 +02:00
Rafael da Fonseca
ce506000cd Re-run travis
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #453
2015-06-17 12:14:31 +02:00
Rafael da Fonseca
4a333e452a Fix findbugs RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE in AgentManagerImpl.java Assert isn't used in prod runtime
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-17 12:14:31 +02:00
Rafael da Fonseca
acab743aa1 Re-run travis
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #452
2015-06-17 12:13:46 +02:00
Rafael da Fonseca
380ac0cf24 Fix findbugs RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE in ServiceOfferingVO.java Assert isn't used in prod runtime
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-17 12:13:46 +02:00
Rafael da Fonseca
5a3e57e6b2 Re-run travis
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #450
2015-06-17 12:12:41 +02:00
Rafael da Fonseca
b3d49d9135 Fix findbugs RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE in DataCenterVO.java Assert isn't used in prod runtime
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-17 12:12:41 +02:00