954 Commits

Author SHA1 Message Date
Pierre-Yves Ritschard
b2393c31ed move ConstantTimeComparator to utils 2015-01-14 12:14:00 +01:00
Rohit Yadav
b7b3a4fb3c CLOUDSTACK-8037: Require signed AuthnRequest, adds more security
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 6bec69844d196e9b66fffa54f6998d8e45fc27e8)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-14 02:43:48 +05:30
Rohit Yadav
aaf6a34c54 CLOUDSTACK-8035: Generate and store X509Cert and reuse this for SAML
The fix generates X509Certificate if missing from DB and uses that for eternity.
SAML SP metadata remains same since it's using the same X509 certificate and
it remains same after restarts. The certificate is serialized, base64 encoded
and stored in the keystore table under a specific name. For reading, it's
retrieved, base64 decoded and deserialized.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 43587143811b222ca131b0e1237f9e99cd94694d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-12 16:49:49 +05:30
Rohit Yadav
0b94f254e8 CLOUDSTACK-8034: Hash user IDs for SAML authentication
The User table's UUID column is restricted to 40 chars only, since we don't
know how long the nameID/userID of a SAML authenticated user will be - the fix
hashes that user ID and takes a substring of length 40 chars. For hashing,
SHA256 is used which returns a 64 char length string.

- Fix tests, add test cases
- Improve checkSAMLUser method
- Use SHA256 one way hashing to create unique UUID for SAML users

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit b2b496288d164fead2c089fb48319e1988b03ce8)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-12 13:37:51 +05:30
Kishan Kavala
dc17e4ef39 Increased SSL handshake timeout to 30 seconds 2015-01-07 14:27:51 +05:30
Sheng Yang
3c9e14e85a CLOUDSTACK-5241: Remove Rot13 usage 2014-12-03 19:38:47 -08:00
Rohit Yadav
fac7bfc5d5 CLOUDSTACK-8011: Upgrade maven dependencies
Changes;
- Upgrades maven-war plugin to 4.5 (faster war packaging)
- Upgrade spring framework to latest minor release
- Upgrade ehcache, jasypt, httpclient, httpcore and other core dependencies
- Upgrade to latest ipv6 library, fix unit test NetUtilsTest
- httpcore and httpclient are sharing same version variable
- commons-httpclient is different that httpclient, the fix gives it a separate var
- Apidocs failed to generate and get stuck with new reflections version, for now
  we will continue using 0.9.8

Newer dependencies can be listed using:
mvn versions:display-dependency-updates -Dnoredist -Dsimulator -P developer,systemvm

Testing;
- Tested using Maven 3.2.1
- Local noredist build with unit tests succeeds
- CloudStack mgmt server started, basic business layer tests work
- Observed 10-15% build time improvement using new maven-war plugin

Branch: bugfix/4.5-8011 (commits are squashed in favour of a linear history)

Pull request:
https://github.com/apache/cloudstack/pull/50

This closes #50

TravisCI build summary:
https://travis-ci.org/shapeblue/cloudstack/builds/42902172

- Build passes with unit tests
- Apidocs generates successfully
- Most integration tests pass, some fail due to timeout errors, second re-run
  passes some of them

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-04 02:12:51 +05:30
Rohit Yadav
1e0880cbab CLOUDSTACK-7903: Fix build regression from previous fix
The previous fix tried to access StatsCollector from UsageManagerImpl
which is not possible due to dependency cycle.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-01 16:35:23 +05:30
amoghvk
960b7bbf74 CLOUDSTACK-7977
Fix password generator, add guards for minimum length
2014-11-26 15:08:48 -08:00
Rohit Yadav
7ff31f1b22 Merge remote-tracking branch 'origin/inetaddress'
- Tested locally against unit tests
- TravisCI build passed: https://travis-ci.org/apache/cloudstack/builds/41990351
- Manual QA passed for basic auth and saml auth using default IDP settings

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

Conflicts:
	server/src/com/cloud/api/ApiServlet.java
2014-11-25 14:32:09 +05:30
Wido den Hollander
72ba98b1b8 Validate IPv4 address using Apache Commons Validator 2014-11-24 14:43:48 +01:00
Laszlo Hornyak
3577423da9 removed executable flags from java classes
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-11-23 19:49:01 +01:00
Laszlo Hornyak
55c449aa07 Properties loading simplification
- Using the PropertiesUtil methods, the resource handling could be elliminated

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-11-23 19:48:56 +01:00
Laszlo Hornyak
b2023d04ba Simplification on Properties handling
- Added method to create properties and load contents from file

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-11-23 19:48:56 +01:00
Laszlo Hornyak
ca9dd457f9 Stream handling simplification in PropertiesUtil
- use resource block instead of finally block

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-11-23 19:48:55 +01:00
Min Chen
9ac93d3e43 CLOUDSTACK-7678:volumes are getting uploaded successfully with wrong url. 2014-11-21 14:36:36 -08:00
Daan Hoogland
f2ccee7a03 name convention adherence 2014-11-18 16:52:46 +01:00
Daan Hoogland
6bc0defa1d CID-1254832 tyr-with-resource 2014-11-18 15:48:31 +01:00
Hugo Trippaers
e1d4a329c4 Package name should reflect the location on the filesystem or viseversa 2014-11-18 14:12:44 +01:00
Hugo Trippaers
16de4a7176 Fix for potential NPE 2014-11-18 14:12:14 +01:00
Daan Hoogland
638da54fce CID-1254833 refactor condition to include null-case 2014-11-18 12:12:00 +01:00
Santhosh Edukulla
ef6ec7b276 Fixed few coverity issues like invalid boxing unboxing issues, resource leaks, null dereferences 2014-11-13 17:26:24 +05:30
Wido den Hollander
840c2fda85 CLOUDSTACK-7583: Send VmStats to Graphite host when configured
This allows external processing of VmStats information without using
the usage server of CloudStack

Statistics are being send to Graphite using UDP and not TCP.

UDP is used to prevent the management server waiting for TCP timeouts
when the Graphite server is unavailable
2014-11-11 13:04:43 +01:00
Kishan Kavala
990da08451 Add check to ensure VR template version matches digit.digit.digit format. Returns version as 0 otherwise 2014-11-10 15:33:50 +05:30
Rohit Yadav
7716989344 SAMLUtils: SAML user id should fit within the UUID VARCHAR(40) column
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 6df0b9f677984a85cc50fa964c4ead461f0a3063)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-10-31 01:24:56 +05:30
Hugo Trippaers
4ebaf0a583 Bump master version to 4.6.0-SNAPSHOT after branching 4.5.0-SNAPSHOT 2014-10-29 14:54:23 +01:00
Sheng Yang
57c4841403 CLOUDSTACK-7814: Fix default passphrase for keystores
In upgrade case, the db.properties file is not changed, but the following commit
would require passphrase for keystore in it, thus result in error(NPE in fact
due to there is no such properity).

commit 918c320438980f070150f872e3a3ba907572af83
Author: Upendra Moturi <upendra.moturi@sungard.com>
Date: Fri Jun 20 11:41:58 2014 +0530
CLOUDSTACK-6847.Link.java and console proxy files have hardcoded value

This commit fix it by put default value for passphrases, also set correct
passphrase if fail-safe keystore is used.
2014-10-28 16:25:52 -07:00
Daan Hoogland
1de0cb7094 restore barematel work after merge 2014-10-17 10:24:01 +02:00
Daan Hoogland
148efbb73f Merge remote-tracking branch 'origin/4.5' into merge-master
Conflicts:
	engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManagerImpl.java
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalVlanManager.java
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalVlanManagerImpl.java
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
	plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
	server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
	setup/db/db/schema-441to450.sql
	test/integration/component/test_deploy_vgpu_vm.py
	tools/marvin/marvin/config/test_data.py
2014-10-16 12:29:37 +02:00
Damodar
50185b7c3a CLOUDSTACK-7648: There are new VM State Machine changes introduced which were missed to capture the usage events 2014-10-13 14:42:00 +05:30
Anshul Gangwar
e43d5b1c7d CLOUDSTACK-7575: improved performance of cleanString method in StringUtils
(cherry picked from commit 7972f53c8d35b78bd27cbd2c8bb1beb763b69c00)
2014-10-13 00:02:11 -04:00
David Nalley
ac48aa8e0c cleaning up some from a revert 2014-10-12 23:30:04 -04:00
Santhosh Edukulla
31a42d2b7a Fixed few coverity patches
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-10-09 11:45:26 +05:30
Anshul Gangwar
7972f53c8d CLOUDSTACK-7575: improved performance of cleanString method in StringUtils 2014-09-26 14:02:41 +05:30
Hugo Trippaers
6f54d48772 CID-1116298 path can be null, make sure that is properly handled 2014-09-19 11:54:21 +02:00
Frank Zhang
8b89494a35 CLOUDSTACK-6278
Baremetal Advanced Networking support
2014-09-18 16:54:37 -07:00
Hugo Trippaers
d1d8009c68 Fix a stupid bug i introduced 2014-09-18 16:02:26 +02:00
Rohit Yadav
bd1752811c CID-1116250: Lock on s_appContextDelegates before calling get in ComponentContext
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-18 11:52:18 +02:00
Rohit Yadav
ec134cf010 CID-1116231: Use implicit lock, synchronize _key in Link
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-18 11:21:57 +02:00
Hugo Trippaers
577a2f40b3 Merge branch 'bugfix/CID-116538' 2014-09-17 11:40:55 +02:00
Rohit Yadav
88c6072b4d CID-1237196: Fix potential NPE in SAMLUtils
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-16 17:10:11 +02:00
Hugo Trippaers
de26a7228e Fix resource leaks on exception paths
Make it clear that the server socket isn't a leaked resource
2014-09-16 16:43:32 +02:00
Rohit Yadav
d46e45991d SAMLUtils: put name id policy on authnrequest
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-12 17:11:06 +02:00
Rohit Yadav
84b0e9e96f utils: add missing string to the url in generate saml signature method
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-12 16:26:13 +02:00
Rohit Yadav
5a0ed8764b SAMLUtils: Fix NPE incase signature is generated with a null privateKey
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-12 15:46:44 +02:00
Rohit Yadav
a66127dfb1 utils: add methods to save and load public and private keys
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-12 15:40:49 +02:00
Anshul Gangwar
d90a2d3962 CLOUDSTACK-7370: Fixed password visible in plain text if password passed is in the end in url 2014-09-12 15:33:24 +05:30
Frank.Zhang
10544e287b CLOUDSTACK-6278
Baremetal Advanced Networking support
2014-09-05 16:28:34 -07:00
Hugo Trippaers
dc3f0cbc63 Improve the handling of the findbug exclude files 2014-09-03 10:41:22 +02:00
Rohit Yadav
550762a0dc SAMLUtils: fix signature, refactor generateRandomX509Certificate
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-30 21:37:55 +02:00