413 Commits

Author SHA1 Message Date
Rohit Yadav
4347776ac6 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

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-11 09:45:19 +05:30
Rohit Yadav
ad592835c8 CLOUDSTACK-9020: Metrics views for CloudStack UI
Implements various metrics views based on a listView based widget that has following
properties:
  - 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
  - sorts after metrics is refreshed, if a column was previously sorted
  - sorts after adding rows on infinite scrolling if a column was pre-sorted
- 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>
2015-11-19 15:17:44 +05:30
Wei Zhou
0cdca3137f [UI] fix typo for user data field 2015-11-05 08:06:51 +01:00
Remi Bergsma
c60a8a8056 Revert "Merge pull request #961 from K0zka/CLOUDSTACK-8977"
This reverts commit 29d42c7174f90bfeda91aa9ad9fca7deb985911b, reversing
changes made to 5cacd995700a915d239a45b23bd8ea8e5a4fca8f.
2015-10-29 19:11:19 +01:00
Laszlo Hornyak
040810e67a CLOUDSTACK-8977: remove session creation from index.jsp
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2015-10-21 21:36:15 +02:00
Rajani Karuturi
ef563c5526 Merge pull request #712 from milamberspace/CLOUDSTACK-8744-AnotherMissingL10N-4-master
CLOUDSTACK-8744 Add missing localization (l10n) for several parts in the UI

- l10n for the SSH Key Pairs behavior
- l10n for Autoscaling / LB sections
- l10n for Reset password
- l10n on some strings for the installation Wizard
- l10n on some strings in VPN/VPC section
- l10n on Service offerings sections
- improve some FR translations

* pr/712:
  CLOUDSTACK-8744 Add missing localization (l10n) for several parts in the UI - l10n for the SSH Key Pairs behavior - l10n for Autoscaling / LB sections - l10n for Reset password - l10n on some strings for the installation Wizard - l10n on some strings in VPN/VPC section - l10n on Service offerings sections - improve some FR translations

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-08-19 14:03:58 +05:30
Milamber
267994fa0b CLOUDSTACK-8744 Add missing localization (l10n) for several parts in the UI
- l10n for the SSH Key Pairs behavior
- l10n for Autoscaling / LB sections
- l10n for Reset password
- l10n on some strings for the installation Wizard
- l10n on some strings in VPN/VPC section
- l10n on Service offerings sections
- improve some FR translations
2015-08-18 11:16:14 +01:00
Rene Moser
b1978a1169 CLOUDSTACK-8740: add custom.css to make custom UI styles easier 2015-08-17 14:10:08 +02:00
Rohit Yadav
1ec4d0155a 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

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

Conflicts:
	plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmd.java
	ui/index.jsp
2015-08-14 11:58:44 +05:30
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
Rafael da Fonseca
487d90148c Fixed problem with static files reload: - Tomcat was not caching most static files in index.jsp due to changing timestamp - Page reload performance was very poor - Issue affects all versions since 4.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #277
2015-05-22 15:22:16 +01:00
Laszlo Hornyak
e77226b07b 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-09 08:37:53 +02:00
Laszlo Hornyak
0347f733dd added favicon
This closes #225

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-03 15:23:32 +02:00
Rohit Yadav
008911d4b1 CLOUDSTACK-8195: Don't break IdP, return metadata XML
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 1172867df022358e8b5a2cd435dc1d8331fca8c9)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-03 17:05:29 +05:30
Rohit Yadav
552f2ae60c CLOUDSTACK-8191: SAML users should have their own accounts
(cherry picked from commit 876c78fe1ba6abe132131b3449b21fd09f2c14e1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 19:58:10 +05:30
Brian Federle
5f9e0fcd7e CLOUDSTACK-8075: Front-end support for shared templates/ISOs 2014-12-16 14:53:20 -08:00
Wei Zhou
19e99848c8 CLOUDSTACK-7882: SSH Keypair Creation/Selection in UI
Thanks Ilia Shakitko for the porting and testing.
2014-12-12 14:30:34 +01:00
Jean-Francois Vincent
068e508e3b Add the Userdata setting to the UI on VM creation step 2014-12-09 11:32:49 +01:00
vetrivelc
9ce8a1cd00 Fixed label issue and externalized hardcoding issues
Signed-off-by: vetrivelc <vetrivel.chinnasamy@citrix.com>
2014-12-04 11:28:44 -08:00
Sanjay Tripathi
a45ddb514c CLOUDSTACK-7969: SC: Win8.1: Key translation fails for some EN-US keyboard keys. 2014-11-26 13:35:24 +05:30
Brian Federle
9717bbdc51 CLOUDSTACK-7645: UI: Fix dictionary JSP include order
-Places dictionary JSP includes at top of script includes, to help solve
a potential issue where the dictionary may not always be loaded before
the UI initializes
2014-11-13 15:41:02 -08:00
Gabor Apati-Nagy
70c09ed92a CLOUDSTACK-7659: UI: Upgrade jquery-validate lib to the latest 1.13.0 version with the additional-methods included. 2014-10-28 14:20:56 -07:00
Brian Federle
f4326aec82 CLOUDSTACK-7661: VM wizard: Add keyboard language dropdown 2014-10-07 13:28:29 -07:00
vetrivelc
6a11d099cf Fix Externalization of hard-coded label strings
-Split 'dictionary.jsp' into two files -> 'dictionary.jsp' and
'dictionary2.jsp' -- this is due to JSP file constraints as the
localization object is getting quite long

-Per change above, 'dictionary' object is now split into an additonal
'dictionary2' object, which is merged with the main dict object on page
load

-All new dictionary mappings should be added to 'dictionary2' now.

Signed-off-by: Brian Federle <brian.federle@citrix.com>
2014-09-17 13:59:13 -07:00
seif
9d776f4f2c GUI changes to leverage a new control for storage tags 2014-08-12 14:41:22 -06: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
883d7f17f7 Value of Global parameter "custom.diskoffering.size.min" is not reflected in UI during new instance creation.
Added fields to /api and /server classes for CustomDiskOfferingMinSize
to be available in CapabilitiesResponse. Fixed UI code in Instance
Wizard to have this config value as the minimum selectable option when
we are in custom disk size mode.
2014-04-01 10:57:36 -07:00
Mike Tutkowski
312ec6de6c CLOUDSTACK-6170 (fixing a GUI formatting issue) 2014-03-25 12:44:31 -06:00
Brian Federle
86b02e65eb CLOUDSTACK-6227: Fix IE9 instance wizard
Fixes HTML incompatibility causing rendering issues in IE9 when viewing
instance wizard->network step
2014-03-24 10:01:29 -07:00
Jessica Wang
dadaf85860 CLOUDSTACK-6246: UI > Infrastructure > SSL Certificate > update (1) mouse-over hint of SSL Certificate button. (2) description in SSL Certificate dialog. 2014-03-17 15:41:48 -07:00
Mike Tutkowski
d55c4dd804 CLOUDSTACK-6170 2014-03-14 23:47:20 -06:00
Mike Tutkowski
c427e8db1c CLOUDSTACK-6170 2014-03-07 15:38:50 -07: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
Milamber
cb7b1dc276 Add Dutch (Netherlands, Polish languages in Web UI Change Japanese code (ja -> ja_JP) Update transifex sync config
Conflicts:
	client/WEB-INF/classes/resources/messages_es.properties
	client/WEB-INF/classes/resources/messages_pt_BR.properties
2014-01-17 11:15:09 +00:00
Jessica Wang
5fb80f90f0 CLOUDSTACK-4738: UI > VM Wizard > select compute offering step > make Number of CPU Cores/CPU/Memory field required when selected compute offering is customized. 2013-12-18 14:49:24 -08:00
Rajani Karuturi
fdf7639eb8 Fixed some html validation errors
language tag in script is deprecated. used type
<script> tag after </html> is invalid. moved the localized messages dictionary inside html body.
2013-11-05 10:23:32 -08:00
Brian Federle
16bb286729 Sockets: new UI flow
-Removes socket display from the main infra. dashboard and onto a
 separate page. This is due to performance issues with the API calls
 that query each hypervisor's socket data.

-Convert socket display to a list view, for simplicity/consistency.
2013-10-31 12:03:20 -07:00
Brian Federle
25d4333d45 Rename 'socket info' title to 'hypervisors'
Rename 'socket info' title to 'hypervisors' to make it more generic, as
the dashboard section contains hypervisor host counts which are useful
in other contexts.
2013-10-30 11:37:54 -07:00
Brian Federle
2189da6c72 CLOUDSTACK-4758: Make root disk size a text field 2013-10-30 11:20:02 -07:00
Brian Federle
bed42deb88 CLOUDSTACK-4908: UI for report CPU sockets
-Adds socket info for hypervisors on infrastructure chart

-Displays # of sockets, and # of hosts

-Currently only dummy data set to 0 for all info
2013-10-29 14:16:25 -07:00
Brian Federle
f0a8aa7f5e CLOUDSTACK-4738: VM wizard: Add custom fields for compute offering 2013-10-29 13:29:13 -07:00
Jessica Wang
a1be4fffe5 UI > Instance Wizard > Step 4 > correct label from "Data Disk Offering" to "Disk Offering" since selected disk offering here refers to root disk volume when selected template is of ISO format, data disk volume otherwise. 2013-10-24 11:29:47 -07:00
Brian Federle
43b18025e3 CLOUDSTACK-4758: Add 'root disk size' field
Add 'root disk size' slider to instance wizard UI, under select
template/iso, if the selected template's size is able to be customized.
2013-10-22 11:45:18 -07:00
Brian Federle
b04b6a0fbe Whitespace cleanup on index.jsp 2013-10-22 10:44:15 -07:00
Brian Federle
ae7b0c50db Cleanup formatting on index.jsp, to comply with indentation standards 2013-10-22 10:43:15 -07:00
Jessica Wang
343ca473e7 CLOUDSTACK-4642: UI > storage > volume > recurring snapshot > timezone dropdown > remove hardcoding dropdown option from index.jsp since dropdown option is generated on the fly from timezoneMap variable in JavaScript file. 2013-09-10 16:21:02 -07:00
Ian Duffy
bdba0ddeed Bring up to date with master 2013-08-31 00:25:48 +01:00
Brian Federle
4dafb54884 CLOUDSTACK-4124: Add affinity group list to review step 2013-08-07 16:41:33 -07:00
Ian Duffy
ec064b3077 New LDAP UI
Signed-off-by: Sebastien Goasguen <runseb@gmail.com>
2013-07-29 05:58:00 -04:00