Commit Graph

1538 Commits

Author SHA1 Message Date
Rohit Yadav 8f3cd943b1 APPLE-333: Oobm plugin for nested-cloudstack environments
This implements an out-of-band management plugin for nested-cloudstack
environments where the hypervisor host is a VM in a parent CloudStack environment
that is used as a host in the (testing) CloudStack environment. This plugin
allows power operations to translate into start/stop/reboot of the VM (host).

The out-of-band management configuration accepted are:
- Address: The API URL of the parent CloudStack enviroment
- Port: The uuid of the (host) VM in the parent CloudStack environment
- Username: The apikey of the user account who has ownership on the (host) VM
- Password: The secretkey of the user account who has ownership on the (host) VM

Note: change password of the oobm interface is not support by this plugin

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-04-19 16:58:38 +05:30
Abhinandan Prateek 4991d165f3 FR-17: KVM, Xen and VMware support + UI with Marvin test 2017-03-27 09:53:40 +05:30
Rohit Yadav a00cb07ee0 APPLE-328: Metrics View APIs
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-02-16 13:20:30 +05:30
Rohit Yadav 876fc7434d APPLE-165: Host HA management and HA provider for KVM
Host-HA offers investigation, fencing and recovery mechanisms for host that for
any reason are malfunctioning. It uses Activity and Health checks to determine
current host state based on which it may degrade a host or try to recover it. On
failing to recover it, it may try to fence the host.

The core feature is implemented in a hypervisor agnostic way, with two separate
implementations of the driver/provider for Simulator and KVM hypervisors. The
framework also allows for implementation of other hypervisor specific provider
implementation in future.

The Host-HA provider implementation for KVM hypervisor uses the out-of-band
management sub-system to issue IPMI calls to reset (recover) or poweroff (fence)
a host.

The Host-HA provider implementation for Simulator provides a means of testing
and validating the core framework implementation.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-01-18 18:18:53 +05:30
Abhinandan Prateek 6fdd19fa7e CLOUDSTACK-9571: Fence DB if there are consecutive connection errors. 2016-11-21 15:09:50 +05:30
Rohit Yadav a5de2714e9 CLOUDSTACK-9299: Out-of-band Management for CloudStack
Support access to a host’s out-of-band management interface (e.g. IPMI, iLO,
DRAC, etc.) to manage host power operations (on/off etc.) and querying current
power state in CloudStack.

Given the wide range of out-of-band management interfaces such as iLO and iDRA,
the service implementation allows for development of separate drivers as plugins.
This feature comes with a ipmitool based driver that uses the
ipmitool (http://linux.die.net/man/1/ipmitool) to communicate with any
out-of-band management interface that support IPMI 2.0.

This feature allows following common use-cases:
- Restarting stalled/failed hosts
- Powering off under-utilised hosts
- Powering on hosts for provisioning or to increase capacity
- Allowing system administrators to see the current power state of the host

For testing this feature `ipmisim` can be used:
https://pypi.python.org/pypi/ipmisim

FS:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-10 13:16:03 +05:30
Rohit Yadav 6f1e834753 CLOUDSTACK-8562: Make role permissions orderable
- Makes role permissions orderable in UI/backend
- Role permissions evaluated by fixed order
- Rules draggable in UI
- Migration script adds a default order

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-09 10:53:45 +05:30
Rohit Yadav 0856820802 client: remove commands.properties file
We don't need commands.properties file now, remove it

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-04-26 13:11:51 +05:30
Rohit Yadav f30c52a16c CLOUDSTACK-8562: DB-Backed Dynamic Role Based API Access Checker
This feature allows root administrators to define new roles and associate API
permissions to them.

A limited form of role-based access control for the CloudStack management server
API is provided through a properties file, commands.properties, embedded in the
WAR distribution. Therefore, customizing API permissions requires unpacking the
distribution and modifying this file consistently on all servers. The old system
also does not permit the specification of additional roles.

FS:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dynamic+Role+Based+API+Access+Checker+for+CloudStack

DB-Backed Dynamic Role Based API Access Checker for CloudStack brings following
changes, features and use-cases:
- Moves the API access definitions from commands.properties to the mgmt server DB
- Allows defining custom roles (such as a read-only ROOT admin) beyond the
  current set of four (4) roles
- All roles will resolve to one of the four known roles types (Admin, Resource
  Admin, Domain Admin and User) which maintains this association by requiring
  all new defined roles to specify a role type.
- Allows changes to roles and API permissions per role at runtime including additions or
  removal of roles and/or modifications of permissions, without the need
  of restarting management server(s)

Upgrade/installation notes:
- The feature will be enabled by default for new installations, existing
  deployments will continue to use the older static role based api access checker
  with an option to enable this feature
- During fresh installation or upgrade, the upgrade paths will add four default
  roles based on the four default role types
- For ease of migration, at the time of upgrade commands.properties will be used
  to add existing set of permissions to the default roles. cloud.account
  will have a new role_id column which will be populated based on default roles
  as well

Dynamic-roles migration tool: scripts/util/migrate-dynamicroles.py
- Allows admins to migrate to the dynamic role based checker at a future date
- Performs a harder one-way migrate and update
- Migrates rules from existing commands.properties file into db and deprecates it
- Enables an internal hidden switch to enable dynamic role based checker feature

Deprecate commands.properties

- Fixes apidocs and marvin to be independent of commands.properties usage
- Removes bundling of commands.properties in deb/rpm packaging
- Removes file references across codebase

Reviewed-by: John Burwell <john.burwell@shapeblue.com>
QA-by: Boris Stoyanov <boris.stoyanov@shapeblue.com>

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-04-25 14:52:02 +05:30
Rohit Yadav 938f1d2a7d CLOUDSTACK-9020: Metrics views for CloudStack UI
Implements following:
- A metrics table widget that is:
  - vertically and horizontally scrollable with pagination/infinite scrolling
  - sortable columns (client side)
  - groupable/collapsible columns
  - alternate row coloring
  - refresh button to refresh views
  - threshold table cell coloring
  - panel/breadcrumb navigation
  - quick view action column
  - translatable labels
- Sortable column for all CloudStack tables (client side)
- Configurable UI pagesize for list API calls, 'default.ui.page.size'
- Metrics views: Zones, Clusters, Hosts, Instances, Storage pools, Volumes
- Resource filtering/navigation: Zones->Clusters->Hosts->Instances->Volumes, Storage Pool->Volumes

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-20 12:54:06 +01:00
Rohit Yadav a4f552d46d cloudstack: set next version to 4.5.3-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-09-14 09:59:40 +05:30
Milamber a71df257b6 Update L10N resource files on 4.5 branch with 4.5 translation strings from Transifex (20150901)
Fix an issue with the key message.admin.guide.read on pt_BR L10N in web UI at the root cause
2015-09-01 14:01:08 +01:00
Rohit Yadav fad723df1b messages: fix string in pt_BR translation file
The string error caused JS error that failed translation on the UI

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-27 10:44:43 +05:30
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
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 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 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 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
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
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
Milamber 1d8382ab49 Update L10N resource files on 4.5 branch with 4.5 translation strings from Transifex (20150522) 2015-05-22 07:48:55 +01:00
Rohit Yadav 112cecc2d4 ui: add custom error handling page
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #256
2015-05-18 23:11:11 +01:00
Milamber 815f4d087a Update L10N resource files on 4.5 branch (with 4.5 translation strings from Transifex) Add new HU resource file for Hungarian translation 2015-05-09 07:58:11 +02:00
Laszlo Hornyak 7d8151e5c4 added hungarian to the list of localized languages
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-08 17:26:36 +02:00
Rohit Yadav 4ba72a877c Updating pom.xml version numbers for release 4.5.2-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-07 15:33:01 +02:00
Rohit Yadav 0eb4eb2370 Updating pom.xml version numbers for release 4.5.1
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-04 12:17:03 +02:00
Milamber 445bc36ed9 Update L10N resource files on 4.5 branch (with 4.5 translation strings from Transifex) 2015-04-25 23:30:29 +02:00
Milamber a95d4e1d6d Fix some typos. Thanks Atalanttore (from Transifex) 2015-04-25 23:18:10 +02:00
Milamber 6a7a9caf62 Fix some typo
Thanks Atalanttore from Transifex way
2015-04-19 15:18:53 +01:00
Milamber 376b27a430 Update L10N resource files on 4.5 branch (with 4.5 translation strings from Transifex) 2015-04-19 10:09:12 +01:00
Milamber 208a5655be Closed typo issue (from Transifex by Atalanttore)
No blank space between "Duration" and "(in sec)"
2015-04-19 09:00:12 +01:00
vetrivelc fc9a4f66ca CLOUDSTACK-8094: Fixed incorrect label issue.
(cherry picked from commit 4e1284147e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	ui/dictionary2.jsp
2015-03-23 16:44:06 +05:30
Harikrishna Patnala f947fad197 CS-17504: Weak SSL ciphers supported by the management server
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-13 13:25:33 +05:30
Min Chen 0b5b9c91e4 CS-19734:Session cookie is exposed to scripts.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-13 12:51:06 +05:30
Rohit Yadav c198dfdb7a Update pom and version usage to 4.5.1-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-12 12:13:18 +05:30
Rohit Yadav 9533c54db6 CLOUDSTACK-5237: Add a default PBKDF2-SHA-256 based authenticator
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-27 15:50:09 +05:30
Pierre-Luc Dion 177c190367 CLOUDSTACK-8188: missing labe:label.password.reset.confirm. removed duplicate label.vlan.id from dictionary2.jsp removed duplicate label.vlan from message.properties 2015-02-19 22:12:32 -05:00
Pierre-Luc Dion 34c75f296b fix CLOUDSTACK-8187 and CLOUDSTACK-8232: missing UI labels 2015-02-19 21:00:33 -05:00
Rohit Yadav 876c78fe1b CLOUDSTACK-8191: SAML users should have their own accounts
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 19:56:25 +05:30
Rohit Yadav debfcdef78 CLOUDSTACK-8160: use preferable protocols
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-21 18:02:58 +05:30
Rohit Yadav bf88be5b25 Revert "CLOUDSTACK-8011: Upgrade maven dependencies"
This reverts commit 482815d084.
2014-12-04 19:47:23 +05:30
Rohit Yadav 482815d084 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>
(cherry picked from commit fac7bfc5d5)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	pom.xml
2014-12-04 02:14:54 +05:30
Wei Zhou 21b0ad4a62 Remove error message when start management server if JAVA_HOME is not set
(cherry picked from commit 449d123ce7)
2014-12-01 13:38:27 +01:00
Daniel Vega ba6dfd8470 CLOUDSTACK-7915: Remove hard-coded values for Load Balancer algorithms in UI
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2014-11-25 11:56:34 +05:30
Frank Zhang 2db1dd7432 CLOUDSTACK-7629
addBaremetalRct() API call is not available in cloudstackAPI library in marvin.
2014-11-19 17:01:34 -08:00
Milamber 303fc90057 Update L10N resource files on master branch (with 4.5 translation strings) 2014-11-15 08:40:23 +00:00
Rohit Yadav cd52bed477 saml: Use camelCase api names for SAML login/logout apis
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 85c0bd68ae8a76c231ab402dd0311e3672155f71)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-10-31 00:32:29 +05:30
Jessica Wang e796d418b4 CLOUDSTACK-5576: UI > IP Address > EnableVPN, DisableVPN: change label. 2014-10-17 14:57:51 -07:00
Mihaela Stoica 28f8c41a19 CLOUDSTACK-7645: [UI] Fixing incorrect labels, including instances of "???label.*???"
- removed duplicate entries in dictionary
- added dictionary entries that have been missed during the dictionary split
- added missing entries in messages.properties
- fixed other localization issues

(cherry picked from commit 0646588fc6)
2014-10-13 00:23:20 -04:00
Anthony Xu 69d1b44bbf cloudmanagementserver.keystore is corrupted by ant.filters.ReplaceTokens,
(cherry picked from commit 055fdd5048)
2014-10-13 00:07:16 -04:00