Commit Graph

581 Commits

Author SHA1 Message Date
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
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 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 c164ffee3b metrics: Increase UI width, fix metrics ui issues
- Add instances count in host view, ip address in instances view
- Add ipaddress in instances view
- Increase UI container width by 200px
- Allow all users to see resource metrics
- Fix instance count issue on host metrics view
- Fix sorting issue in metrics tables
- Fix instances null check regression from 2f250e2

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-20 12:57:09 +01:00
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
Nitin Kumar Maharana 3a6054e549 CLOUDSTACK-8913: Search box in Templates tab out of alignment
Increased the margin and padding to accomodate all the boxes inside toolbar.

(cherry picked from commit febaeb2a15)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-01-20 12:54:05 +01:00
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 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
Rafael da Fonseca ddd0328c8c Fixes breadcrumbs problem described in CLOUDSTACK-7907
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>

This closes #282
2015-05-22 10:36:09 +05:30
Laszlo Hornyak 4ec24ad468 CSS for the hungarian localization
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
ramamurtis fde2887476 CLOUDSTACK-8307: UI not showing all Domains, if there are more than 24 domains then the last domain gets cut off on firefox and IE. Added a flag in treeview widget and based on the flag adding css class which will make overflow as scroll instead of the default auto.
Fixes #101

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 8591383bcc)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-09 14:27:23 +05:30
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
Brian Federle e7a96fde79 CLOUDSTACK-8075: Front-end support for shared templates/ISOs 2014-12-16 15:16:30 -08:00
Mihaela Stoica 6490694231 CLOUDSTACK-7837: [UI] Make the Source CIDR column wide enough to fit the CIDR value without ellipsizing
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2014-11-05 16:17:09 +05:30
Brian Federle 0940e0b6f5 Quickview: Fix alignment 2014-09-04 12:21:51 -07:00
Brian Federle e7e6b7233b CLOUDSTACK-4046: Fix global settings CSS
-Truncate key/name field to prevent long strings from stretching the
 table width beyond the container bounds.

-Update min-width for truncated fields for better compatibility
2014-08-26 14:17:54 -07:00
Brian Federle 117fd14291 Zone wizard UI: Increase height of text fields to prevent cutoff 2014-08-26 12:55:11 -07:00
Brian Federle 7c759f2063 CSS: Fix body height
Removes fixed height for <body> -- this was causing strange scrollbar
behavior on the page on Webkit browsers.
2014-08-25 12:23:53 -07:00
Brian Federle cff65a33a4 Minor CSS cleanup
-Fix some CSS formatting

-Zone dashboard: Fixes overflow in chart area caused by height being too
 long
2014-08-25 12:10:42 -07:00
seif 4e5dc59218 Support a new control for storage tags on the Add Compute Offering and Add Disk Offering windows 2014-08-19 18:03:48 -06:00
Mihaela Stoica 3bcd22bdaf Added the ability to show warning (exclamation mark) icon on confirmation dialogs.
Signed-off-by: Brian Federle <brian.federle@citrix.com>
2014-08-14 14:04:22 -07:00
Mike Tutkowski d5c71677db License info related to a new GUI control 2014-08-14 11:11:32 -06:00
seif 9d776f4f2c GUI changes to leverage a new control for storage tags 2014-08-12 14:41:22 -06:00
Mihaela Stoica 57f611df16 CLOUDSTACK-6695: Added support to the UI for uploading a chain of certificates
In the "SSL Certificate" dialog we added:
- new field for the root certificate;
- a button to add intermediate certificates if necessary; when this is pressed, a new field, called "Intermediate certificate 1" is added; pressed again, "Intermediate certificate 2" field is added, and so on.

We upload the certificates in order: first the root certificate (with id=1), then the intermediate certificates (with id=2,3,..) and finally the server certificate.
When uploading a certificate, we wait for the upload to be completed successfully and only then we proceed to uploading the next one. If one fails, we report failure and don't continue with the remaining.

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2014-08-08 10:57:12 -07:00
Brian Federle 2a01fd4c51 Quick view: remove extra padding area
Remove extra 'buffer zone' around quick view tooltip. This was
causing misleading behavior in some cases, due to the cursor being
hovered over a different row while another row's quick view was
still open
2014-07-17 11:42:32 -07:00
Gabor Apati-Nagy 9fa9e3aaff CLOUDSTACK-6565: [UI] New Zones tab for Templates and ISOs 2014-05-23 10:58:17 -07:00
Brian Federle 35d5621bda List view: Fix text wrapping on table header 2014-05-22 15:10:50 -07:00
Jessica Wang 7ae8dc8fbd Revert "CLOUDSTACK-6565: [UI] New Zones tab for Templates and ISOs"
This reverts commit 348fb7bcb6.
2014-05-12 12:26:37 -07:00
Gabor Apati-Nagy 348fb7bcb6 CLOUDSTACK-6565: [UI] New Zones tab for Templates and ISOs 2014-05-12 11:40:24 -07:00
Brian Federle 4d84970ddc CLOUDSTACK-6342: Fix LB table listing for Firefox 2014-05-05 12:32:40 -07:00
Brian Federle 5335ae7753 List view, dialog VM select: Widen name field to better fit IP subselect box 2014-04-24 11:30:20 -07:00
Mihaela Stoica f3cf85bb62 CLOUDSTACK-6233: Add new tab "GPU" in Host detailView for gpu enabled hosts
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Signed-off-by: Sanjay Tripathi <sanjay.tripathi@citrix.com>
2014-04-16 16:09:41 +05:30
Brian Federle e35bec515f CLOUDSTACK-6342: UI changes for secondary IP on LB rules
This is front-end only; API call changes still need to be done.
2014-04-15 14:42:11 -07:00
Brian Federle a82a1299ec WIP: Instance wizard UI: Support multi-disk offerings
Adds front-end support to instance wizard UI for service offerings
supporting multiple disks.

The UI changes will show if a list 'multipleDisks: []' is passed with
the disk offering data options.
2014-04-02 16:28:15 -07:00
Gabor Apati-Nagy e65d6bd3a8 CLOUDSTACK-6227 (Add copy-paste support for detail view fields):
DetailView widget now supports bool isCopyPaste property that can be set
for fields. If this is set to true, the text of this field is displayed
using ellipsis formatting* and a copy-paste icon is available right next
to it. On clicking this icon, the full text is displayed

*: tooltip is also enabled showing the original non-ellipsed value
2014-03-28 10:15:19 -07:00
Mihaela Stoica 7810107818 UI: Fixed truncated icon on confirmation dialogs
Signed-off-by: Brian Federle <brian.federle@citrix.com>
2014-03-27 14:35:18 -07:00
Mike Tutkowski 312ec6de6c CLOUDSTACK-6170 (fixing a GUI formatting issue) 2014-03-25 12:44:31 -06:00
Mike Tutkowski 41d189a707 CLOUDSTACK-6170 (fixing a GUI formatting issue) 2014-03-24 21:12:25 -06:00
Brian Federle b51e0df234 CLOUDSTACK-6272: Fix icons for recover/restore VM 2014-03-21 14:57:49 -07:00
Mike Tutkowski d55c4dd804 CLOUDSTACK-6170 2014-03-14 23:47:20 -06:00
Brian Federle a1b778fc2c Fix truncation issue with refresh, add button icons 2014-03-10 07:43:28 -07:00
Mike Tutkowski c427e8db1c CLOUDSTACK-6170 2014-03-07 15:38:50 -07:00
Brian Federle 4df897f4ab Add hover states for nav icons 2014-03-04 16:04:17 -08:00
Brian Federle 45fa91c490 Alerts UI: Remove left border pane 2014-03-04 13:50:52 -08:00
Brian Federle 952888ab84 Icons: make monochromatic 2014-03-04 13:31:53 -08:00
Brian Federle 6726b7fee0 Dashboard: Restore colors/appearance for alert items 2014-03-03 11:56:59 -08:00
Brian Federle f03263782f Main UI layout: Tweak font sizes for better readability 2014-03-03 11:46:48 -08:00
Brian Federle 0d688fec73 VM wizard: Add specify IP field when in VPC flow 2014-03-03 10:52:53 -08:00
Brian Federle d896aedccd LDAP Account Wizard: cleanup layout
-Fix table column sizing
-Add ellipses/alt tags to fields to help overflow
2014-02-28 08:36:25 -08:00
Brian Federle 56684a52bc UI: VM wizard: Fix specify IP field when new network is unchecked 2014-02-27 14:50:03 -08:00