You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by bhaisaab <gi...@git.apache.org> on 2015/06/19 13:14:29 UTC

[GitHub] cloudstack pull request: CLOUDSTACK-8457: SAML auth plugin improve...

GitHub user bhaisaab opened a pull request:

    https://github.com/apache/cloudstack/pull/489

    CLOUDSTACK-8457: SAML auth plugin improvements for production usage

    Squashed branch saml-production-grade branch to one commit for easy merge/commit. Open for review but please don't merge it yet as I'm yet to improve some UI changes.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/cloudstack saml-pp-squashed

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/489.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #489
    
----
commit 2721bf0cffbd1b99bc9ced44697be32e4b52c41e
Author: Rohit Yadav <ro...@shapeblue.com>
Date:   2015-05-28T12:50:12Z

    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
    
    - 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
        * 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

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8457: SAML auth plugin improve...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/489#issuecomment-115283322
  
    @terbolous doing some UI changes now


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8457: SAML auth plugin improve...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/489#issuecomment-115283228
  
    @terbolous I plan to build and share a repo tomorrow that you can use


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8457: SAML auth plugin improve...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/489#issuecomment-115258944
  
    open for review


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8457: SAML auth plugin improve...

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on the pull request:

    https://github.com/apache/cloudstack/pull/489#issuecomment-115341413
  
    With the plugin enabled, only then users are shown a choice of login options:
    ![screen shot 2015-06-25 at 5 32 07 pm](https://cloud.githubusercontent.com/assets/95203/8361177/cf460ef4-1b71-11e5-83ea-9d895e6b7754.png)
    
    Localization example with local login selected:
    ![screen shot 2015-06-25 at 5 32 29 pm](https://cloud.githubusercontent.com/assets/95203/8361187/e3fd2df0-1b71-11e5-9a65-2bd717288da0.png)
    
    After user selects a IDP server, they may optionally pass a domain path if they have multiple accounts across various domains for the authorized IDP server:
    ![screen shot 2015-06-25 at 5 26 30 pm](https://cloud.githubusercontent.com/assets/95203/8361210/07c0636a-1b72-11e5-978a-54d7538e3524.png)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8457: SAML auth plugin improve...

Posted by terbolous <gi...@git.apache.org>.
Github user terbolous commented on the pull request:

    https://github.com/apache/cloudstack/pull/489#issuecomment-115305839
  
    Excellent, let me know when you consider it ready and I'll give it a spin.
    
    Erik
    
    Den torsdag 25. juni 2015 skrev Rohit Yadav <no...@github.com>
    følgende:
    
    > @terbolous <https://github.com/terbolous> doing some UI changes now
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/cloudstack/pull/489#issuecomment-115283322>.
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8457: SAML auth plugin improve...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cloudstack/pull/489


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8457: SAML auth plugin improve...

Posted by terbolous <gi...@git.apache.org>.
Github user terbolous commented on the pull request:

    https://github.com/apache/cloudstack/pull/489#issuecomment-115259844
  
    I can test your changes against ADFS if you want to, not sure if I can find time this week though.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---