Commit Graph

6240 Commits

Author SHA1 Message Date
Rohit Yadav 74c34d797a quota;e2etesting
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-07 10:58:36 +05:30
Rohit Yadav e2c2e0696d quota: show ui balance if start/end balance are defined (any values)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-04 10:39:21 +05:30
Rohit Yadav 57bc5cb904 quota: minor credits ui fixes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-03 15:33:48 +05:30
Rohit Yadav a39b6cddc9 quota ui: add min threshold and checkbox to enforce locking
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-03 11:36:37 +05:30
Rohit Yadav 40914ed0bb quota: improve css and element usage; align inputs below labels
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-30 17:31:02 +05:30
Rohit Yadav 53f3b3c304 quota: fix css of the ui, make element similar to other cloudstack UI elements
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-30 17:31:02 +05:30
Rohit Yadav 8483c4a3ce quota: add currency in case of users too
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-30 14:35:54 +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 b2dd5e1374 quota: fix ui to grab currency from the response
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-29 11:45:31 +05:30
Rohit Yadav 7b562b0696 quota: add new template for sending unlocked email account 2015-07-29 11:26:59 +05:30
Rohit Yadav a4e8301941 quota ui: grab current date in the browser's tariff
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-28 17:10:23 +05:30
Rohit Yadav c11f84d88a ui: show actual backend error, if it's not auth failure
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-28 14:59:37 +05:30
Rohit Yadav 247e539b6e ui: fix UI, API usage and display rendering; fix template saving to use POST
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-27 13:24:22 +05:30
Rohit Yadav 7617182294 quota: fix ui - statement, tariff and templates
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-24 14:35:09 +05:30
Rohit Yadav 355b2e6330 quota: implement quota email alert methods/classes and template engine to substitute variable options
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-24 12:40:33 +05:30
Rohit Yadav 6fedff6053 quota: fix UI's escaping quotes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-23 18:51:36 +05:30
Rohit Yadav 6b11c83fca quota: add email template UI
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-23 18:45:19 +05:30
Rohit Yadav e2ab24a7bc ui: add effective from date in tariff list/table, add error handling dialogs
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-22 15:12:04 +05:30
Rohit Yadav 5c7befbd95 quota: assume start/end date in the balance API will be returned
enhances UI, to reflect balance api changes

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-21 15:37:52 +05:30
Rohit Yadav e38cd4566a quota: re-order date vs domain/account checking
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-21 15:24:30 +05:30
Rohit Yadav ab68f38fd1 quota: remove invalid ui code, add additional checks
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-21 14:24:02 +05:30
Rohit Yadav 02234778d7 quota: add quota balance/credit statement in the statement tab
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-21 12:34:59 +05:30
Rohit Yadav b3eeb6ce57 quota: remove console.log statement
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-21 11:37:23 +05:30
Rohit Yadav a9e8ceccdd quota: add quota currency on tarriff table
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-21 11:36:26 +05:30
Rohit Yadav 5397fc21c6 quota: add credit management in the ui
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-21 11:17:50 +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
Rohit Yadav b13d2b955e quota: UI view for quota tariff
listing and editing supported; global settings removed

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-16 18:24:48 +05:30
Rohit Yadav c8473d2f3a quota: remove unwanted changes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-14 18:04:54 +05:30
Rohit Yadav 82b176b47d quota-ui: fix settings view
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-14 17:15:55 +05:30
Rohit Yadav fe422de985 client: fix label and usage
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-14 14:08:19 +05:30
Abhinandan Prateek 1b579afaeb CLOUDSTACK-8592: refactoring, cleanup 2015-07-14 11:35:52 +05:30
Rohit Yadav f6e7c52c12 ui/scripts/cloudStack: simplify plugin loop and display check
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-14 11:35:52 +05:30
Rohit Yadav 0b64910e09 ui/plugins: Add initial Quota plugin
- Adds a stub
- Adds a Quota tab on the user's page

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-14 11:35:52 +05:30
Rohit Yadav dec8928749 ui: Allow plugins to be shown on navigation bar, if they want to
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-14 11:35:52 +05:30
Abhinandan Prateek 605239df72 quota: initial commit 2015-07-14 11:35:51 +05:30
Rohit Yadav d2e5bc6649 CLOUDSTACK-8457: SAML UI Dialog fixes to use local $form
This uses local selector to access the DOM elements, the previous commit
would find a global element which is not in the context and fail changing the
element in the opened dialog.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-14 11:31:27 +05:30
Rohit Yadav 3938b43c4d CLOUDSTACK-8457: SAML UI enhancements
Add option to authorize SAML SSO for user when adding user. Appends a domain to
user/account name if global setting is enabled, useful in case of multiple IDP
server. By default the setting is set to false (keep as it is).

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

This closes #575

(cherry picked from commit 7d11c7bc70)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-07-14 10:23:11 +05:30
Rohit Yadav 5f51a6431d CLOUDSTACK-8622: Reinstate working sessions in browser
- Login is based on sessionkey HttpOnly Cookie
- ApiServlet does login verification using sessionKey from both the request cookies
  and the API parameters. In both cases, if either or both are passed they should
  match the sessionKey stored in the current session of the HttpRequest
- UI: it no longer needs to read or set sessionkey cookie
- UI: it no longer needs to return g_sessionKey value in the API requests, though
  to support a sso mechanism g_sessionKey is still passed in the API is not null
- Secure jsessionid cookie is set to be HttpOnly and Secure
- SAML login should also set HttpOnly cookie before redirecting to UI
- SAML: listIdps & getSPMetadata APIs are readonly now, won't log out a logged in user

Performed tests (login, saml login if applicable, page refreshes, opening
multiple tabs, logout) with following combinations:
- SAML disabled, normal auth as admin, domain-admin and user
- SAML enabled, normal auth as admin, domain-admin and user; and saml sso as
  admin, domain-admin and user

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

This closes #574
This closes #308

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

Conflicts:
	server/src/com/cloud/api/ApiServlet.java
	utils/src/com/cloud/utils/HttpUtils.java
2015-07-14 10:22:40 +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
Rohit Yadav 7520c60378 engine: add upgrade path from 4.5.1 to 4.5.2
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-29 13:36:22 +02:00
Rohit Yadav cb3d03c7b0 ui: use cloudstack logo as favicon
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit ba9c4cfa81)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-03 15:25:44 +02:00
Laszlo Hornyak a686d2e8b3 added favicon
This closes #225

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 0347f733dd)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-03 15:25:34 +02:00
Remi Bergsma 9a8ee5664f CLOUDSTACK-6543 Sort domain lists in UI
As recently discussed on the dev list:
This sorts the domain lists based on their path.
Especially handy when having a lot of domains,
like in a public cloud.

Cherry-picked to 4.5 branch since commit exists in 4.4 and master branch.

(cherry picked from commit befa28251d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:18:16 +02:00
Rohit Yadav 1ef585f9e6 CLOUDSTACK-8364: don't async poll for deleteVolume which is not an async API
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-09 12:41:03 +05:30
Rohit Yadav 6f2facfa39 CLOUDSTACK-8231: use hardcoded list of LB algorithms as backup
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-27 09:28:16 +05:30
Rohit Yadav 221e429b45 CLOUDSTACK-7915: as a backup use hardcoded LB algorithms in UI
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-26 12:45:30 +05:30
Rohit Yadav ca1e5c1690 ui: list all networks
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-26 12:45:16 +05:30
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
Wei Zhou 5a860fe0ae UI: Fix typo in ui/scripts/configuration.js 2015-03-16 12:50:10 +01:00
Rohit Yadav b79f13ccb5 ui: if session cookie exists, use it to set global session holder and invalidate it
The 19e3c0168e commit breaks SAML login and any
login where redirection is used.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-13 15:01:51 +05:30