Commit Graph

1896 Commits

Author SHA1 Message Date
Abhinandan Prateek 42c8cbf6b1 CLOUDSTACK-8592: changing default email templates to reflect the fact that exhausted quota may not result in a locked account 2015-11-05 10:24:42 +05:30
Abhinandan Prateek fb94a67cca quota: to maintain idempotency the alter table statement is moved to
java upgrade code. In case the column already exists the code will
ignore the error.
2015-08-12 15:52:57 +05:30
Rohit Yadav 74c34d797a quota;e2etesting
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-07 10:58:36 +05:30
Abhinandan Prateek 731d9b80d6 quota: +send last month statement at the start of the month 2015-08-05 14:29:19 +05:30
Rohit Yadav eafefb0368 quota: fix database
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-03 16:17:55 +05:30
Abhinandan Prateek bd1d12d830 quota: added min_balance and quota enforce for each account 2015-08-03 09:42:39 +05:30
Abhinandan Prateek 9deed58fad quota: added quota_account 2015-07-31 17:39:14 +05:30
Rohit Yadav 124d1da209 quota: fix stuff
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-31 15:05:10 +05:30
Abhinandan Prateek 1590b66700 quota: adding book keeping columns in accounts table 2015-07-31 12:27:10 +05:30
Rohit Yadav 60125d3a4e quota: add quota monthly statement email template
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-29 12:04:23 +05:30
Rohit Yadav 7b562b0696 quota: add new template for sending unlocked email account 2015-07-29 11:26:59 +05:30
Rohit Yadav 0e0df49d3e quota: remove include column from tariff, fix list tariff api to accept start date
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-24 14:34:39 +05:30
Rohit Yadav f5be8aaf8f quota: email template backend and apis
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-23 15:23:35 +05:30
Abhinandan Prateek 15b9a894eb quota: restructuring 2015-07-23 14:38:42 +05:30
Rohit Yadav ae26d67cb0 quota: fix schema, set all quota tariff values to 0; effective date as cloud.com product launch date
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-22 15:12:04 +05:30
Abhinandan Prateek 22dccd1be6 quota: make tariff plans updatable and schedulable 2015-07-22 12:28:13 +05:30
Rohit Yadav 6f1736404e quota: fix quota statement api, db schema and implement UI tab for statement generation
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-20 17:21:01 +05:30
Abhinandan Prateek 9955171268 CLOUDSTACK-8592: increase precision 2015-07-17 10:36:46 +05:30
Rohit Yadav d28365b882 quota: refactor and fix code around quota tariff
quota mapping is now called quota tariff
fixed db usage

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-15 17:21:51 +05:30
Abhinandan Prateek 13b04557fa CLOUDSTACK-8592: put a limit on number of usage records read for processing 2015-07-15 11:21:34 +05:30
Rohit Yadav 25cbdcc4f3 setup/db: fix schema issues, put quota stuff in cloud_usage db
Add missing column to cloud_usage

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-14 13:14:47 +05:30
Rohit Yadav 46931f92bc setup/db: fix schema issues, put quota stuff in cloud_usage db
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-14 13:02:47 +05:30
Abhinandan Prateek ae0eb6e334 CLOUDSTACK-8592: first cut implementation of quota statement 2015-07-14 12:18:25 +05:30
Abhinandan Prateek 7dd68a1493 CLOUDSTACK-8592: Schema updates 2015-07-14 12:13:05 +05:30
Rohit Yadav b08f228a28 setup/db: fix saml sql files, and create quota tables only if that don't exist
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-14 12:04:00 +05:30
Abhinandan Prateek b5e016288a CLOUDSTACK-8592: keep track of quota job runs - adding schema and daos 2015-07-14 11:35:52 +05:30
Abhinandan Prateek a558afae57 CLOUDSTACK-8592: Adding new APIs and implementing the API stubs 2015-07-14 11:35:52 +05:30
Abhinandan Prateek 6c4dea7bb8 CLOUDSTACK-8592: creating respective VO objects 2015-07-14 11:35:52 +05:30
Abhinandan Prateek 2c37ddb48b CLOUDSTACK-8592: adding quota usaage and balance tables 2015-07-14 11:35:52 +05:30
Rohit Yadav 389b041994 schema-451to452: Re-add SAML SQL changes reverted in 5ea1a89
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-14 11:35:51 +05:30
Abhinandan Prateek 38f26e9b9b updating sql scripts 2015-07-14 11:35:51 +05:30
Abhinandan Prateek 605239df72 quota: initial commit 2015-07-14 11:35:51 +05:30
Rohit Yadav 8bb0a70a56 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

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-29 13:49:39 +02:00
Daan Hoogland e1f650f4f7 4.4.4 to 4.5.2 upgrade
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #528
2015-06-29 13:38:04 +02:00
Rohit Yadav 11a6073ada schema: fix foreign key checks for 3.0.7 to 4.1.0 upgrade path
Without this upgrades from 3.0.7 version fails.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-29 13:36:22 +02:00
Remi Bergsma cb43f25446 disable foreign key checks when altering them
Upgrades from 4.4 where not working properly due to errors like this:
ERROR 1833 (HY000): Cannot change column 'id': used in a foreign key constraint 'fk_global_load_balancing_rules_region_id' of table 'cloud.global_load_balancing_rules'

The disabling of the checks is for the current session only, so it's safe.

In the 4.4 branch, this file used to be at:
client/target/utilities/scripts/db/db/schema-442to450.sql

It's now moved. We need to edit it in 4.4 and 4.5 to have it effective.

This closes #164

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 8f4abbc7bd)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-14 14:53:12 +05:30
Rajani Karuturi 5da733072e CLOUDSTACK-5236 : ability to identify where the user is from (ex. LDAP)
Added a source column to the user table.

Source now has only two values UNKNOWN,LDAP with UNKNOWN being the
default and is an enum is com.cloud.User.

When the source is UNKNOWN, the old method of authenticating against all
the available authenticators is used. If a source is available, only
that particular authenticator will be used.

added overloaded methods in AccountService to createUserAccount and
createUser with source specified.
2015-03-16 12:35:37 +05:30
Rohit Yadav cfd4573335 engine: Add Upgrade path from 4.5.0 to 4.5.1
Encrypts:
- Remote access vpn preshared key
- StoragePool's user info
- Keystore's key

This closes #112

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-12 12:13:28 +05:30
Abhinandan Prateek 79cdcf8d7d CLOUDSTACK-8265: added foreign key constriant on guest os id 2015-03-03 01:45:48 -05:00
Abhinandan Prateek bbaf7d2d95 CLOUDSTACK-8265: added os mappings for Ubuntu 14.04 2015-02-24 07:27:23 -05:00
Rohit Yadav b9e0e914c4 db: use explicit USE statements to avoid SQL failures
create-schema-premium.sql may fail with certain MySQL/MariaDB version which
require explicit database use.

(cherry picked from commit 09e26c826f)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-23 02:02:02 +05:30
Abhinandan Prateek c44890f844 CLOUDSTACK-8178: fixed the mapping to match that on xen 6.5 2015-01-23 11:20:54 -05:00
Rohit Yadav 30598e958b setup/db: Fix database blunders
- Make schema-442to450.sql same as on master branch
- Make schema-430to440.sql same as on 4.4 branch

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:24:20 +05:30
abhi 960d91e0d5 CLOUDSTACK-8165: updating guest os id for xen template to corresponding 64 bit as default template is 64 bit 2015-01-19 15:44:14 +05:30
Erik Weber 7885a6c4ef Add absolute schema references to support MySQL 5.6 better
(cherry picked from commit 396936ea5e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-14 20:32:40 +05:30
Wei Zhou 1e8476d38a CLOUDSTACK-8140: CS fails to start after secstorage/consoleproxy.service.offering is set to uuid
(cherry picked from commit 84c44b6314)
2015-01-06 10:26:04 +01:00
Daan Hoogland 67a7f74be0 CLOUDSTACK-7184 fieldname typo 2014-12-18 14:37:23 +01:00
Daan Hoogland 8b6e251b5d CLOUDSTACK-7184 config value for xen heartbeat timeout 2014-12-18 12:26:14 +01:00
Rohit Yadav 6321a29e43 CLOUDSTACK-8070: Upgrade router.ram.size using encryption util
Upgrade fails if value is set using plain text encoding, the value needs to
be encrypted (if a key was provided during db was setup).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-13 00:17:09 +05:30
Rohit Yadav a11ddf3077 CLOUDSTACK-6212: auto_increment for some other resource tables
This fix alters table columns which are primary keys but don't have them
auto_increment such as region, domain_router, user_vm etc.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-06 06:26:31 +05:30