Commit Graph

23 Commits

Author SHA1 Message Date
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 20ce346f3a)
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
Rajani Karuturi 8571314406 Fixed blocker issues reported by sonarqube in js files
All of them are trailing comma in array or object

more details @
https://analysis.apache.org/component_issues?id=org.apache.cloudstack%3Acloudstack#resolved=false|severities=BLOCKER|languages=js
2015-05-20 17:19:20 +05:30
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 1172867df0)
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 876c78fe1b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-02 19:58:10 +05:30
Ian Duffy ad69bc8da3 Format JS 2013-07-18 12:34:20 -04:00
Brian Federle 7ce0bd69a8 UI plugin framework: Fix load order
Fixes potential issue where plugins could load after cloudStack UI is initialized,
preventing their functionality from showing up.

Now, the main UI is only loaded after all plugins have loaded; this is via
'cloudStack.pluginReady' event.
2013-07-10 11:18:27 -07:00
Brian Federle d6e8701cae Regions UI: Change loading state text to 'Loading...' 2013-03-26 10:19:02 -07:00
Brian Federle c9f4e51300 Regions UI: Add 'redirecting to region' text during login loading 2013-03-21 15:57:05 -07:00
Brian Federle 0fbf1b91b0 Regions single-sign-on: Hide login form on redirect
If login URL is passed to management server on load, show loading
screen in place of login form.
2013-03-21 15:27:44 -07:00
olgasmola b7d68ac5d5 CS-15325: Fix selected name of user from the drop down list overlay. 2012-07-27 16:27:59 +03:00
olgasmola b10a619635 CS-15518: Fix password field garbling on login screen. 2012-07-27 15:36:58 +03:00
David Nalley 9687520712 applying Chip Childer's patches for license headers in the ui directory 2012-06-26 10:46:53 -04:00
Jessica Wang 89ee1b4814 cloudstack 3.0 UI - login page - add a blank option to language dropdown. When this blank option is selected, browser's default language will be used. 2012-05-03 15:41:38 -07:00
Brian Federle fc0327677a Cleanup whitespace + indentation for UI widgets 2012-04-03 15:35:36 -07:00
frank 2f634c0913 Switch to Apache license 2012-04-03 04:50:05 -07:00
Jessica Wang 377fa4361f bug 12981: login screen - show explicit error messages when login fails. 2012-03-02 16:43:14 -08:00
Brian Federle cebbce42a7 Make default language English, if no cookie set 2012-02-22 11:05:20 -08:00
Brian Federle d3cc43e83f bug 13815
Add language drop-down to login screen

status 13815: resolved fixed
2012-02-17 11:28:14 -08:00
Brian Federle 2e82439a53 Hide Citrix logo if no EULA is present (i.e., is OSS version) 2012-02-16 16:22:23 -08:00
Brian Federle 91bb0cfeea bug 12081
-Always login field labels, until text is present in input field

-Focus username field on load

status 12081: resolved fixed
2011-12-09 11:07:53 -08:00
Brian Federle 08bbd79ff9 Fix login error message 2011-12-05 19:28:53 -08:00
Brian Federle c067758a34 bug 12309: Implement generic error handling 2011-12-02 14:59:06 -08:00
Brian Federle 29f510772c Add new UI; move old UI to old/ 2011-11-03 10:59:57 -07:00