You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by necouchman <gi...@git.apache.org> on 2017/02/10 14:05:47 UTC

[GitHub] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

GitHub user necouchman opened a pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121

    GUACAMOLE-204: Implement CAS Single Sign On Support

    This pull request implements support for the Apereo CAS Single Sign On system.

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

    $ git pull https://github.com/necouchman/incubator-guacamole-client GUACAMOLE-204

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

    https://github.com/apache/incubator-guacamole-client/pull/121.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 #121
    
----
commit 6598544cff3bad7a3afa03e595958e026dbda980
Author: Nick Couchman <ni...@cotyinc.com>
Date:   2017-02-10T13:59:37Z

    GUACAMOLE-204: Implementation of CAS SSO module for Guacamole authentication.

commit f8920d642e5919b39f339e7f75e84061bc4dc1a6
Author: Nick Couchman <ni...@yahoo.com>
Date:   2017-02-10T14:03:41Z

    GUACAMOLE-204: Fix compile issues - catch() requires braces, and throw should be lower-case.

----


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r108329670
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,52 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider','$windowProvider',
    +        function indexRouteConfig($routeProvider,$windowProvider) {
    +
    +    var $window = $windowProvider.$get();
    +    var curPath = $window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    +    if (ticketPos > 0 && ticketPos < hashPos) {
    +        var ticket = curPath.substring(ticketPos, hashPos);
    +        var newPath = curPath.substring(0,ticketPos - 8) + '#/?ticket=' + ticket;
    +        $window.location.href = newPath;
    --- End diff --
    
    > I suppose I could try to go the iFrame route ...
    
    Nooooooooo
    
    > Maybe it would end up looking a lot more like the Duo module
    
    Hopefully not - we were forced to use an `<iframe>` there because that's the only way their "Web SDK" works, but I cringe at being forced to do that here.
    
    I'll comment on the new changes so things remain visible - had to dig a bit to find the old comments. ;)


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111689115
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    +------------------------------------------------
    +
    +    Version: 1.4
    +    From: 'Apache Software Foundation' (http://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/commons-codec/LICENSE-2.0.txt)
    +
    +
    +Google Guice (https://github.com/google/guice)
    +----------------------------------------------
    +
    +    Version: 3.0
    +    From: 'Google Inc.' (http://www.google.com/)
    +    License(s):
    +        Apache v2.0 (bundled/guice-3.0/COPYING)
    +
    +Javax Servlet API (http://servlet-spec.java.net/)
    --- End diff --
    
    It's a dependency listed in the cas-client POM.  This is one of the reasons I was asking how deep I needed to go.  I'll pull it out.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111652865
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    +------------------------------------------------
    +
    +    Version: 1.4
    +    From: 'Apache Software Foundation' (http://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/commons-codec/LICENSE-2.0.txt)
    +
    +
    +Google Guice (https://github.com/google/guice)
    +----------------------------------------------
    +
    +    Version: 3.0
    +    From: 'Google Inc.' (http://www.google.com/)
    +    License(s):
    +        Apache v2.0 (bundled/guice-3.0/COPYING)
    +
    +Javax Servlet API (http://servlet-spec.java.net/)
    +-------------------------------------------------
    +
    +    Version: 3.0.1
    +    From: 'GlassFish Community' (http://servlet-spec.java.net/)
    +    License(s):
    +        CDDL 2 + GPLv2 with ClassPath Exception (bundled/javax.servlet-api/LICENSE)
    +
    +
    +JSR-330 / Dependency Injection for Java (http://code.google.com/p/atinject/)
    +----------------------------------------------------------------------------
    +
    +    Version: 1
    +    From: 'JSR-330 Expert Group' (https://jcp.org/en/jsr/detail?id=330)
    +    License(s):
    +        Apache v2.0 (bundled/javax.inject-1/LICENSE-2.0.txt)
    +
    +JUnit (http://junit.org)
    +------------------------
    +
    +    Version: 4.8.2
    +    From: 'JUnit' (http://junit.org)
    +    License(s):
    +        CPL v1.0 (bundled/junit/LICENSE-1.0.txt)
    +
    +LOG4J (http://logging.apache.org/log4j/1.2/)
    +--------------------------------------------
    +
    +    Version: 1.2.15
    +    From: 'Apache Software Foundation' (https://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/log4j/LICENSE-2.0.txt)
    +
    +slf4j (http://www.slf4j.org)
    --- End diff --
    
    If this does end up bundled, we should exclude it. It will be provided at runtime by the Guacamole webapp, thus there is no need for the extension to include it, too:
    
    https://github.com/apache/incubator-guacamole-client/blob/e8f4cd55155fef8e256b81b8047799eedcc009bd/guacamole/pom.xml#L266-L270



---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100600594
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,51 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider',
    +        function indexRouteConfig($routeProvider) {
    +
    +    var curPath = window.location.href;
    --- End diff --
    
    I believe I have this implemented in the more proper AngularJS way.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100611396
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,51 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider',
    +        function indexRouteConfig($routeProvider) {
    +
    +    var curPath = window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    --- End diff --
    
    So, I can definitely use $window.location.search to extract the ticket parameter from the current URL.  I'm still not entirely sure the most elegant way to then take that, strip it off of the current path, and add it on the end past the route parameters?


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107400372
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,52 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider','$windowProvider',
    +        function indexRouteConfig($routeProvider,$windowProvider) {
    +
    +    var $window = $windowProvider.$get();
    +    var curPath = $window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    +    if (ticketPos > 0 && ticketPos < hashPos) {
    --- End diff --
    
    Added some logic to check for the -1 and return if not found, then proceed on.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111653010
  
    --- Diff: extensions/guacamole-auth-cas/pom.xml ---
    @@ -0,0 +1,175 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +-->
    +<project xmlns="http://maven.apache.org/POM/4.0.0"
    +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    +                        http://maven.apache.org/maven-v4_0_0.xsd">
    +
    +    <modelVersion>4.0.0</modelVersion>
    +    <groupId>org.apache.guacamole</groupId>
    +    <artifactId>guacamole-auth-cas</artifactId>
    +    <packaging>jar</packaging>
    +    <version>0.9.11-incubating</version>
    --- End diff --
    
    Now that 0.9.12-incubating is out, this needs to be updated to 0.9.12-incubating.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111653024
  
    --- Diff: extensions/guacamole-auth-cas/pom.xml ---
    @@ -0,0 +1,175 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +-->
    +<project xmlns="http://maven.apache.org/POM/4.0.0"
    +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    +                        http://maven.apache.org/maven-v4_0_0.xsd">
    +
    +    <modelVersion>4.0.0</modelVersion>
    +    <groupId>org.apache.guacamole</groupId>
    +    <artifactId>guacamole-auth-cas</artifactId>
    +    <packaging>jar</packaging>
    +    <version>0.9.11-incubating</version>
    +    <name>guacamole-auth-cas</name>
    +    <url>http://guacamole.incubator.apache.org/</url>
    +
    +    <properties>
    +        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    +    </properties>
    +
    +    <build>
    +        <plugins>
    +
    +            <!-- Written for 1.6 -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-compiler-plugin</artifactId>
    +                <version>3.3</version>
    +                <configuration>
    +                    <source>1.6</source>
    +                    <target>1.6</target>
    +                    <compilerArgs>
    +                        <arg>-Xlint:all</arg>
    +                        <arg>-Werror</arg>
    +                    </compilerArgs>
    +                    <fork>true</fork>
    +                </configuration>
    +            </plugin>
    +
    +            <!-- Copy dependencies prior to packaging -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-dependency-plugin</artifactId>
    +                <version>2.10</version>
    +                <executions>
    +                    <execution>
    +                        <id>unpack-dependencies</id>
    +                        <phase>prepare-package</phase>
    +                        <goals>
    +                            <goal>unpack-dependencies</goal>
    +                        </goals>
    +                        <configuration>
    +                            <includeScope>runtime</includeScope>
    +                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
    +                        </configuration>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Assembly plugin - for easy distribution -->
    +            <plugin>
    +                <artifactId>maven-assembly-plugin</artifactId>
    +                <version>2.5.3</version>
    +                <configuration>
    +                    <finalName>${project.artifactId}-${project.version}</finalName>
    +                    <appendAssemblyId>false</appendAssemblyId>
    +                    <descriptors>
    +                        <descriptor>src/main/assembly/dist.xml</descriptor>
    +                    </descriptors>
    +                </configuration>
    +                <executions>
    +                    <execution>
    +                        <id>make-dist-archive</id>
    +                        <phase>package</phase>
    +                        <goals>
    +                            <goal>single</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Verify format using Apache RAT -->
    +            <plugin>
    +                <groupId>org.apache.rat</groupId>
    +                <artifactId>apache-rat-plugin</artifactId>
    +                <version>0.12</version>
    +
    +                <configuration>
    +                    <excludes>
    +                        <exclude>**/*.json</exclude>
    +                        <exclude>src/licenses/**/*</exclude>
    +                    </excludes>
    +                </configuration>
    +
    +                <!-- Bind RAT to validate phase -->
    +                <executions>
    +                    <execution>
    +                        <id>validate</id>
    +                        <phase>validate</phase>
    +                        <goals>
    +                            <goal>check</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +
    +            </plugin>
    +
    +        </plugins>
    +    </build>
    +
    +    <dependencies>
    +
    +        <!-- Guacamole Java API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-common</artifactId>
    +            <version>0.9.10-incubating</version>
    +            <scope>provided</scope>
    +        </dependency>
    +
    +        <!-- Guacamole Extension API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-ext</artifactId>
    +            <version>0.9.11-incubating</version>
    --- End diff --
    
    0.9.12-incubating


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by jmuehlner <gi...@git.apache.org>.
Github user jmuehlner commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100588946
  
    --- Diff: extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/CASAuthenticationProvider.java ---
    @@ -0,0 +1,107 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.guacamole.auth.cas;
    +
    +import com.google.inject.Guice;
    +import com.google.inject.Injector;
    +import org.apache.guacamole.GuacamoleException;
    +import org.apache.guacamole.net.auth.AuthenticatedUser;
    +import org.apache.guacamole.net.auth.AuthenticationProvider;
    +import org.apache.guacamole.net.auth.Credentials;
    +import org.apache.guacamole.net.auth.UserContext;
    +
    +/**
    + * Guacamole authentication backend which authenticates users using an
    + * arbitrary external system implementing CAS. No storage for connections is
    + * provided - only authentication. Storage must be provided by some other
    + * extension.
    + *
    + * @author Michael Jumper
    --- End diff --
    
    I'm guessing you meant this to say "Nick Couchman"? Same for CASAuthenticationProviderModule.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111689175
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    +------------------------------------------------
    +
    +    Version: 1.4
    +    From: 'Apache Software Foundation' (http://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/commons-codec/LICENSE-2.0.txt)
    +
    +
    +Google Guice (https://github.com/google/guice)
    +----------------------------------------------
    +
    +    Version: 3.0
    +    From: 'Google Inc.' (http://www.google.com/)
    +    License(s):
    +        Apache v2.0 (bundled/guice-3.0/COPYING)
    +
    +Javax Servlet API (http://servlet-spec.java.net/)
    +-------------------------------------------------
    +
    +    Version: 3.0.1
    +    From: 'GlassFish Community' (http://servlet-spec.java.net/)
    +    License(s):
    +        CDDL 2 + GPLv2 with ClassPath Exception (bundled/javax.servlet-api/LICENSE)
    +
    +
    +JSR-330 / Dependency Injection for Java (http://code.google.com/p/atinject/)
    +----------------------------------------------------------------------------
    +
    +    Version: 1
    +    From: 'JSR-330 Expert Group' (https://jcp.org/en/jsr/detail?id=330)
    +    License(s):
    +        Apache v2.0 (bundled/javax.inject-1/LICENSE-2.0.txt)
    +
    +JUnit (http://junit.org)
    +------------------------
    +
    +    Version: 4.8.2
    +    From: 'JUnit' (http://junit.org)
    +    License(s):
    +        CPL v1.0 (bundled/junit/LICENSE-1.0.txt)
    +
    +LOG4J (http://logging.apache.org/log4j/1.2/)
    +--------------------------------------------
    +
    +    Version: 1.2.15
    +    From: 'Apache Software Foundation' (https://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/log4j/LICENSE-2.0.txt)
    +
    +slf4j (http://www.slf4j.org)
    --- End diff --
    
    Removed.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107400181
  
    --- Diff: extensions/guacamole-auth-cas/pom.xml ---
    @@ -0,0 +1,172 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +-->
    +<project xmlns="http://maven.apache.org/POM/4.0.0"
    +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    +                        http://maven.apache.org/maven-v4_0_0.xsd">
    +
    +    <modelVersion>4.0.0</modelVersion>
    +    <groupId>org.apache.guacamole</groupId>
    +    <artifactId>guacamole-auth-cas</artifactId>
    +    <packaging>jar</packaging>
    +    <version>0.9.11-incubating</version>
    +    <name>guacamole-auth-cas</name>
    +    <url>http://guacamole.incubator.apache.org/</url>
    +
    +    <properties>
    +        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    +    </properties>
    +
    +    <build>
    +        <plugins>
    +
    +            <!-- Written for 1.6 -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-compiler-plugin</artifactId>
    +                <version>3.3</version>
    +                <configuration>
    +                    <source>1.6</source>
    +                    <target>1.6</target>
    +                    <compilerArgs>
    +                        <arg>-Xlint:all</arg>
    +                        <arg>-Werror</arg>
    +                    </compilerArgs>
    +                    <fork>true</fork>
    +                </configuration>
    +            </plugin>
    +
    +            <!-- Copy dependencies prior to packaging -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-dependency-plugin</artifactId>
    +                <version>2.10</version>
    +                <executions>
    +                    <execution>
    +                        <id>unpack-dependencies</id>
    +                        <phase>prepare-package</phase>
    +                        <goals>
    +                            <goal>unpack-dependencies</goal>
    +                        </goals>
    +                        <configuration>
    +                            <includeScope>runtime</includeScope>
    +                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
    +                        </configuration>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Assembly plugin - for easy distribution -->
    +            <plugin>
    +                <artifactId>maven-assembly-plugin</artifactId>
    +                <version>2.5.3</version>
    +                <configuration>
    +                    <finalName>${project.artifactId}-${project.version}</finalName>
    +                    <appendAssemblyId>false</appendAssemblyId>
    +                    <descriptors>
    +                        <descriptor>src/main/assembly/dist.xml</descriptor>
    +                    </descriptors>
    +                </configuration>
    +                <executions>
    +                    <execution>
    +                        <id>make-dist-archive</id>
    +                        <phase>package</phase>
    +                        <goals>
    +                            <goal>single</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Verify format using Apache RAT -->
    +            <plugin>
    +                <groupId>org.apache.rat</groupId>
    +                <artifactId>apache-rat-plugin</artifactId>
    +                <version>0.12</version>
    +
    +                <configuration>
    +                    <excludes>
    +                        <exclude>**/*.json</exclude>
    +                        <exclude>src/licenses/**/*</exclude>
    +                    </excludes>
    +                </configuration>
    +
    +                <!-- Bind RAT to validate phase -->
    +                <executions>
    +                    <execution>
    +                        <id>validate</id>
    +                        <phase>validate</phase>
    +                        <goals>
    +                            <goal>check</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +
    +            </plugin>
    +
    +        </plugins>
    +    </build>
    +
    +    <dependencies>
    +
    +        <!-- Guacamole Java API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-common</artifactId>
    +            <version>0.9.10-incubating</version>
    +            <scope>provided</scope>
    +        </dependency>
    +
    +        <!-- Guacamole Extension API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-ext</artifactId>
    +            <version>0.9.11-incubating</version>
    +            <scope>provided</scope>
    +        </dependency>
    +        <dependency>
    +          <groupId>org.jasig.cas.client</groupId>
    +          <artifactId>cas-client-core</artifactId>
    --- End diff --
    
    Good question...will have to check on this.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111652671
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    +------------------------------------------------
    +
    +    Version: 1.4
    +    From: 'Apache Software Foundation' (http://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/commons-codec/LICENSE-2.0.txt)
    +
    +
    +Google Guice (https://github.com/google/guice)
    +----------------------------------------------
    +
    +    Version: 3.0
    +    From: 'Google Inc.' (http://www.google.com/)
    +    License(s):
    +        Apache v2.0 (bundled/guice-3.0/COPYING)
    +
    +Javax Servlet API (http://servlet-spec.java.net/)
    --- End diff --
    
    This is not bundled, but already provided by the servlet container hosting the Guacamole webapp. If it does turn up within the extension, it'll need to be excluded to avoid conflicts.
    
    3.0.1? Is this a transitive dependency of the CAS client library?


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107336216
  
    --- Diff: extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/conf/ConfigurationService.java ---
    @@ -0,0 +1,71 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.guacamole.auth.cas.conf;
    +
    +import com.google.inject.Inject;
    +import org.apache.guacamole.GuacamoleException;
    +import org.apache.guacamole.environment.Environment;
    +
    +/**
    + * Service for retrieving configuration information regarding the CAS service.
    + */
    +public class ConfigurationService {
    +
    +    /**
    +     * The Guacamole server environment.
    +     */
    +    @Inject
    +    private Environment environment;
    +
    +    /**
    +     * Returns the authorization endpoint (URI) of the CAS service as
    +     * configured with guacamole.properties.
    +     *
    +     * @return
    +     *     The authorization endpoint of the CAS service, as configured with
    +     *     guacamole.properties.
    +     *
    +     * @throws GuacamoleException
    +     *     If guacamole.properties cannot be parsed, or if the authorization
    +     *     endpoint property is missing.
    +     */
    +    public String getAuthorizationEndpoint() throws GuacamoleException {
    +        return environment.getRequiredProperty(CASGuacamoleProperties.CAS_AUTHORIZATION_ENDPOINT);
    +    }
    +
    +    /**
    +     * Returns the URI that the CAS service should redirect to after
    +     * the authentication process is complete, as configured with
    +     * guacamole.properties. This must be the full URL that a user would enter
    +     * into their browser to access Guacamole.
    +     *
    +     * @return
    +     *     The client secret to use when communicating with the CAS service,
    --- End diff --
    
    Looks like some copy pasta here. You mean the redirect URI?


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100593906
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,51 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider',
    +        function indexRouteConfig($routeProvider) {
    +
    +    var curPath = window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    --- End diff --
    
    I recommend looking a bit further into AngularJS and its built-in parsing of route URLs (as well as JavaScript's built-in parsing of URLs). In plain JS, you can grab the various things after and including the `?` using [`window.location.search`](https://developer.mozilla.org/en-US/docs/Web/API/Location), and AngularJS provides the [`$routeParams`](https://code.angularjs.org/1.3.16/docs/api/ngRoute/service/$routeParams).


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107338075
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/translations/en.json ---
    @@ -0,0 +1,7 @@
    +{
    +
    +    "LOGIN" : {
    +        "FIELD_HEADER_TICKET" : ""
    --- End diff --
    
    What's the purpose of defining an empty translation string for the field header?


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111652884
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    +------------------------------------------------
    +
    +    Version: 1.4
    +    From: 'Apache Software Foundation' (http://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/commons-codec/LICENSE-2.0.txt)
    +
    +
    +Google Guice (https://github.com/google/guice)
    +----------------------------------------------
    +
    +    Version: 3.0
    +    From: 'Google Inc.' (http://www.google.com/)
    +    License(s):
    +        Apache v2.0 (bundled/guice-3.0/COPYING)
    +
    +Javax Servlet API (http://servlet-spec.java.net/)
    +-------------------------------------------------
    +
    +    Version: 3.0.1
    +    From: 'GlassFish Community' (http://servlet-spec.java.net/)
    +    License(s):
    +        CDDL 2 + GPLv2 with ClassPath Exception (bundled/javax.servlet-api/LICENSE)
    +
    +
    +JSR-330 / Dependency Injection for Java (http://code.google.com/p/atinject/)
    +----------------------------------------------------------------------------
    +
    +    Version: 1
    +    From: 'JSR-330 Expert Group' (https://jcp.org/en/jsr/detail?id=330)
    +    License(s):
    +        Apache v2.0 (bundled/javax.inject-1/LICENSE-2.0.txt)
    +
    +JUnit (http://junit.org)
    +------------------------
    +
    +    Version: 4.8.2
    +    From: 'JUnit' (http://junit.org)
    +    License(s):
    +        CPL v1.0 (bundled/junit/LICENSE-1.0.txt)
    +
    +LOG4J (http://logging.apache.org/log4j/1.2/)
    --- End diff --
    
    Are you sure? As with some of the other dependencies, I don't see this bundled nor listed by Maven.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111689034
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/guac-manifest.json ---
    @@ -0,0 +1,19 @@
    +{
    +
    +    "guacamoleVersion" : "0.9.11-incubating",
    --- End diff --
    
    Updated.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100594378
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,51 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider',
    +        function indexRouteConfig($routeProvider) {
    +
    +    var curPath = window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    --- End diff --
    
    I'll take a look - I actually meant to ask for help with this specifically.  This is pretty hacked together, but I fought with Angular for quite a while trying to pull the ticket= parameter out of the return URL and put it in the right place, and literally cutting it out and putting it at the right position ended up being the way I had to go.  I'll go back and review, but it seemed like I stumbled across a couple of limitations in Angular that prevented me from doing it in a more elegant way.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107402294
  
    --- Diff: extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/conf/ConfigurationService.java ---
    @@ -0,0 +1,71 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.guacamole.auth.cas.conf;
    +
    +import com.google.inject.Inject;
    +import org.apache.guacamole.GuacamoleException;
    +import org.apache.guacamole.environment.Environment;
    +
    +/**
    + * Service for retrieving configuration information regarding the CAS service.
    + */
    +public class ConfigurationService {
    +
    +    /**
    +     * The Guacamole server environment.
    +     */
    +    @Inject
    +    private Environment environment;
    +
    +    /**
    +     * Returns the authorization endpoint (URI) of the CAS service as
    +     * configured with guacamole.properties.
    +     *
    +     * @return
    +     *     The authorization endpoint of the CAS service, as configured with
    +     *     guacamole.properties.
    +     *
    +     * @throws GuacamoleException
    +     *     If guacamole.properties cannot be parsed, or if the authorization
    +     *     endpoint property is missing.
    +     */
    +    public String getAuthorizationEndpoint() throws GuacamoleException {
    +        return environment.getRequiredProperty(CASGuacamoleProperties.CAS_AUTHORIZATION_ENDPOINT);
    +    }
    +
    +    /**
    +     * Returns the URI that the CAS service should redirect to after
    +     * the authentication process is complete, as configured with
    +     * guacamole.properties. This must be the full URL that a user would enter
    +     * into their browser to access Guacamole.
    +     *
    +     * @return
    +     *     The client secret to use when communicating with the CAS service,
    --- End diff --
    
    Fixed.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r108337547
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/translations/en.json ---
    @@ -0,0 +1,7 @@
    +{
    +
    +    "LOGIN" : {
    +        "FIELD_HEADER_TICKET" : ""
    --- End diff --
    
    I took a quick stab at simply not rendering fields or their headers if they have no associated content: mike-jumper/incubator-guacamole-client@6c5cdae
    
    If that solves the case you're working around here, I'll open a pull request for that commit.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100592420
  
    --- Diff: extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/AuthenticationProviderService.java ---
    @@ -0,0 +1,111 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.guacamole.auth.cas;
    +
    +import com.google.inject.Inject;
    +import com.google.inject.Provider;
    +import java.util.Arrays;
    +import java.util.Enumeration;
    +import javax.servlet.http.HttpServletRequest;
    +import javax.servlet.http.HttpSession;
    +import org.apache.guacamole.GuacamoleException;
    +import org.apache.guacamole.form.Field;
    +import org.apache.guacamole.net.auth.Credentials;
    +import org.apache.guacamole.net.auth.credentials.CredentialsInfo;
    +import org.apache.guacamole.net.auth.credentials.GuacamoleInvalidCredentialsException;
    +import org.apache.guacamole.auth.cas.conf.ConfigurationService;
    +import org.apache.guacamole.auth.cas.form.CASTicketField;
    +import org.apache.guacamole.auth.cas.ticket.TicketValidationService;
    +import org.apache.guacamole.auth.cas.user.AuthenticatedUser;
    +
    +/**
    + * Service providing convenience functions for the CAS AuthenticationProvider
    + * implementation.
    + *
    + * @author Nick Couchman
    + */
    +public class AuthenticationProviderService {
    +
    +    /**
    +     * Service for retrieving CAS configuration information.
    +     */
    +    @Inject
    +    private ConfigurationService confService;
    +
    +    /**
    +     * Service for validating received ID tickets.
    +     */
    +    @Inject
    +    private TicketValidationService ticketService;
    +
    +    /**
    +     * Provider for AuthenticatedUser objects.
    +     */
    +    @Inject
    +    private Provider<AuthenticatedUser> authenticatedUserProvider;
    +
    +    /**
    +     * Returns an AuthenticatedUser representing the user authenticated by the
    +     * given credentials.
    +     *
    +     * @param credentials
    +     *     The credentials to use for authentication.
    +     *
    +     * @return
    +     *     An AuthenticatedUser representing the user authenticated by the
    +     *     given credentials.
    +     *
    +     * @throws GuacamoleException
    +     *     If an error occurs while authenticating the user, or if access is
    +     *     denied.
    +     */
    +    public AuthenticatedUser authenticateUser(Credentials credentials)
    +            throws GuacamoleException {
    +
    +        String ticket = null;
    --- End diff --
    
    This `null` value will never be used (unnecessary initialization). As this variable isn't used outside the body of the `if` below anyway, perhaps it would make more sense to inline the declaration there?


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100593527
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,51 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider',
    +        function indexRouteConfig($routeProvider) {
    +
    +    var curPath = window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    +    if(ticketPos > 0 && ticketPos < hashPos) {
    --- End diff --
    
    -Sigh- I had even gone through and checked specifically for that.  Fixed.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111689043
  
    --- Diff: extensions/guacamole-auth-cas/pom.xml ---
    @@ -0,0 +1,175 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +-->
    +<project xmlns="http://maven.apache.org/POM/4.0.0"
    +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    +                        http://maven.apache.org/maven-v4_0_0.xsd">
    +
    +    <modelVersion>4.0.0</modelVersion>
    +    <groupId>org.apache.guacamole</groupId>
    +    <artifactId>guacamole-auth-cas</artifactId>
    +    <packaging>jar</packaging>
    +    <version>0.9.11-incubating</version>
    +    <name>guacamole-auth-cas</name>
    +    <url>http://guacamole.incubator.apache.org/</url>
    +
    +    <properties>
    +        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    +    </properties>
    +
    +    <build>
    +        <plugins>
    +
    +            <!-- Written for 1.6 -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-compiler-plugin</artifactId>
    +                <version>3.3</version>
    +                <configuration>
    +                    <source>1.6</source>
    +                    <target>1.6</target>
    +                    <compilerArgs>
    +                        <arg>-Xlint:all</arg>
    +                        <arg>-Werror</arg>
    +                    </compilerArgs>
    +                    <fork>true</fork>
    +                </configuration>
    +            </plugin>
    +
    +            <!-- Copy dependencies prior to packaging -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-dependency-plugin</artifactId>
    +                <version>2.10</version>
    +                <executions>
    +                    <execution>
    +                        <id>unpack-dependencies</id>
    +                        <phase>prepare-package</phase>
    +                        <goals>
    +                            <goal>unpack-dependencies</goal>
    +                        </goals>
    +                        <configuration>
    +                            <includeScope>runtime</includeScope>
    +                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
    +                        </configuration>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Assembly plugin - for easy distribution -->
    +            <plugin>
    +                <artifactId>maven-assembly-plugin</artifactId>
    +                <version>2.5.3</version>
    +                <configuration>
    +                    <finalName>${project.artifactId}-${project.version}</finalName>
    +                    <appendAssemblyId>false</appendAssemblyId>
    +                    <descriptors>
    +                        <descriptor>src/main/assembly/dist.xml</descriptor>
    +                    </descriptors>
    +                </configuration>
    +                <executions>
    +                    <execution>
    +                        <id>make-dist-archive</id>
    +                        <phase>package</phase>
    +                        <goals>
    +                            <goal>single</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Verify format using Apache RAT -->
    +            <plugin>
    +                <groupId>org.apache.rat</groupId>
    +                <artifactId>apache-rat-plugin</artifactId>
    +                <version>0.12</version>
    +
    +                <configuration>
    +                    <excludes>
    +                        <exclude>**/*.json</exclude>
    +                        <exclude>src/licenses/**/*</exclude>
    +                    </excludes>
    +                </configuration>
    +
    +                <!-- Bind RAT to validate phase -->
    +                <executions>
    +                    <execution>
    +                        <id>validate</id>
    +                        <phase>validate</phase>
    +                        <goals>
    +                            <goal>check</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +
    +            </plugin>
    +
    +        </plugins>
    +    </build>
    +
    +    <dependencies>
    +
    +        <!-- Guacamole Java API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-common</artifactId>
    +            <version>0.9.10-incubating</version>
    +            <scope>provided</scope>
    +        </dependency>
    +
    +        <!-- Guacamole Extension API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-ext</artifactId>
    +            <version>0.9.11-incubating</version>
    --- End diff --
    
    Updated.  Do I need to rebase on the 0.9.12-incubating code?  As it is this extension won't build because it'll require the updated dependency, which won't be there unless I rebase.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107401901
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,52 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider','$windowProvider',
    +        function indexRouteConfig($routeProvider,$windowProvider) {
    +
    +    var $window = $windowProvider.$get();
    +    var curPath = $window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    +    if (ticketPos > 0 && ticketPos < hashPos) {
    +        var ticket = curPath.substring(ticketPos, hashPos);
    +        var newPath = curPath.substring(0,ticketPos - 8) + '#/?ticket=' + ticket;
    +        $window.location.href = newPath;
    --- End diff --
    
    Yeah, I tried to figure that out, but ran into a significant road-block going that route, and, after hours of searching and trying, resorted to this admittedly messy way of accomplishing this.  Here's the issue...
    
    When CAS redirects back to Guacamole, the URL that comes back is something like this:
    http://guacamole.example.com/guacamole?ticket=<BIG LONG STRING>
    
    What happens is that Angular then appends the trailing slash and the hash tag onto the end of that:
    http://guacamole.example.com/guacamole?ticket=<BIG LONG STRING>/#/
    
    So, if I try to use the Angular built-in routing functions, it's only looking for the ticket= after the trailing slash.  It doesn't process anything ahead of that slash.  I tried several incantations, including putting a trailing slash in the redirect URI, but just ended up with this:
    http://guacamole.example.com/guacamole/?ticket=<BIG LONG STRING>/#/
    
    I also tried putting the #/ in the CAS redirect URI, and that didn't work, either.  I think the core of the issue is that, during authentication, it isn't just an iFrame or something like that that accomplishes the authentication (as in the case of Duo) - it actually redirects completely away from the site, then back, with this ticket= parameter in the URL.  Since the ticket= parameter is placed there before Angular ever initializes, Angular believes that it is part of the URL it should be using, appends it /#/ to the end, and goes on.  So, I have to manually move the ?ticket= chunk to the end.
    
    I'm definitely open to suggestions and help with this one - I banged my head on a kitchen table for quite a while trying to figure out where I went wrong, and came away with the belief that the way CAS interacts with the page here just doesn't place well with Angular.
    
    I suppose I could try to go the iFrame route, instead of a full redirect, and see if that changes things?  Maybe it would end up looking a lot more like the Duo module...and it might dovetail nicely with the suggestion below about having a separate button for the user to click to authenticate with CAS, rather than just having it redirect to CAS authentication automatically.  Based on how I've explained CAS to you, does that sound more feasible (and desirable) than redirecting completely away??


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111689217
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    --- End diff --
    
    It's an optional dependency listed in the cas-client-core POM.  So, guacamole-auth-cas -> cas-client -> cas-client-core -> commons-codec.  I'll remove it.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111652748
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    +------------------------------------------------
    +
    +    Version: 1.4
    +    From: 'Apache Software Foundation' (http://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/commons-codec/LICENSE-2.0.txt)
    +
    +
    +Google Guice (https://github.com/google/guice)
    +----------------------------------------------
    +
    +    Version: 3.0
    +    From: 'Google Inc.' (http://www.google.com/)
    +    License(s):
    +        Apache v2.0 (bundled/guice-3.0/COPYING)
    +
    +Javax Servlet API (http://servlet-spec.java.net/)
    +-------------------------------------------------
    +
    +    Version: 3.0.1
    +    From: 'GlassFish Community' (http://servlet-spec.java.net/)
    +    License(s):
    +        CDDL 2 + GPLv2 with ClassPath Exception (bundled/javax.servlet-api/LICENSE)
    +
    +
    +JSR-330 / Dependency Injection for Java (http://code.google.com/p/atinject/)
    +----------------------------------------------------------------------------
    +
    +    Version: 1
    +    From: 'JSR-330 Expert Group' (https://jcp.org/en/jsr/detail?id=330)
    +    License(s):
    +        Apache v2.0 (bundled/javax.inject-1/LICENSE-2.0.txt)
    +
    +JUnit (http://junit.org)
    --- End diff --
    
    This is not bundled. It might be a transitive dependency, but only for running the build-time unit tests of that dependency.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r108330063
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,55 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" parameter provided by the CAS authentication process.
    + */
    +angular.module('index').config(['$routeProvider','$windowProvider',
    +        function indexRouteConfig($routeProvider,$windowProvider) {
    --- End diff --
    
    Issues with the query parameter vs. Angular's routing notwithstanding, the following issues remain:
    
    1. This is a `.config()` block which doesn't actually do any configuration. Besides being not very Angular-y, this will only run once when the application first loads. Any time after that will not work as expected, including when navigating from page to page or after logging out.
    2. As you've noted, it's sloppy.
    
    Have you had any luck using the same technique as my WIP OpenID auth?
    
    https://github.com/mike-jumper/incubator-guacamole-client/blob/9deaac26df8220efeca90a0c9f8e9bdde39c86ff/extensions/guacamole-auth-openid/src/main/resources/openidConfig.js#L34-L52
    
    If not ... there must be some reasonable way of doing this. Let me know if the above doesn't work (and an example of the URL used by CAS for its redirect), and I'll dig in to see if this can be fixed globally somehow.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107400233
  
    --- Diff: extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java ---
    @@ -0,0 +1,80 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.guacamole.auth.cas.ticket;
    +
    +import com.google.inject.Inject;
    +import org.apache.guacamole.GuacamoleException;
    +import org.apache.guacamole.GuacamoleSecurityException;
    +import org.apache.guacamole.GuacamoleServerException;
    +import org.apache.guacamole.auth.cas.conf.ConfigurationService;
    +import org.jasig.cas.client.authentication.AttributePrincipal;
    +import org.jasig.cas.client.validation.Assertion;
    +import org.jasig.cas.client.validation.Cas20ProxyTicketValidator;
    +import org.jasig.cas.client.validation.TicketValidationException;
    +
    +/**
    + * Service for validating ID tickets forwarded to us by the client, verifying
    + * that they did indeed come from the CAS service.
    + */
    +public class TicketValidationService {
    +
    +    /**
    +     * Service for retrieving CAS configuration information.
    +     */
    +    @Inject
    +    private ConfigurationService confService;
    +
    +    /**
    +     * Validates and parses the given ID ticket, returning the username contained
    +     * therein, as defined by the username claim type given in
    +     * guacamole.properties. If the username claim type is missing or the ID
    +     * ticket is invalid, an exception is thrown instead.
    +     *
    +     * @param ticket
    +     *     The ID ticket to validate and parse.
    +     *
    +     * @return
    +     *     The username contained within the given ID ticket.
    +     *
    +     * @throws GuacamoleException
    +     *     If the ID ticket is not valid, the username claim type is missing, or
    +     *     guacamole.properties could not be parsed.
    +     */
    +    public String processUsername(String ticket) throws GuacamoleException {
    +        AttributePrincipal principal = null;
    +
    +        // Retrieve the configured CAS URL and establish a ticket validator
    +        String casServerUrl = confService.getAuthorizationEndpoint();
    +        Cas20ProxyTicketValidator sv = new Cas20ProxyTicketValidator(casServerUrl);
    +        sv.setAcceptAnyProxy(true);
    +        try {
    +            String confRedirectURI = confService.getRedirectURI();
    +            Assertion a = sv.validate(ticket, confRedirectURI);
    --- End diff --
    
    Beefed up those comments a bit.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111689242
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    +------------------------------------------------
    +
    +    Version: 1.4
    +    From: 'Apache Software Foundation' (http://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/commons-codec/LICENSE-2.0.txt)
    +
    +
    +Google Guice (https://github.com/google/guice)
    +----------------------------------------------
    +
    +    Version: 3.0
    +    From: 'Google Inc.' (http://www.google.com/)
    +    License(s):
    +        Apache v2.0 (bundled/guice-3.0/COPYING)
    +
    +Javax Servlet API (http://servlet-spec.java.net/)
    +-------------------------------------------------
    +
    +    Version: 3.0.1
    +    From: 'GlassFish Community' (http://servlet-spec.java.net/)
    +    License(s):
    +        CDDL 2 + GPLv2 with ClassPath Exception (bundled/javax.servlet-api/LICENSE)
    +
    +
    +JSR-330 / Dependency Injection for Java (http://code.google.com/p/atinject/)
    +----------------------------------------------------------------------------
    +
    +    Version: 1
    +    From: 'JSR-330 Expert Group' (https://jcp.org/en/jsr/detail?id=330)
    +    License(s):
    +        Apache v2.0 (bundled/javax.inject-1/LICENSE-2.0.txt)
    +
    +JUnit (http://junit.org)
    +------------------------
    +
    +    Version: 4.8.2
    +    From: 'JUnit' (http://junit.org)
    +    License(s):
    +        CPL v1.0 (bundled/junit/LICENSE-1.0.txt)
    +
    +LOG4J (http://logging.apache.org/log4j/1.2/)
    +--------------------------------------------
    +
    +    Version: 1.2.15
    +    From: 'Apache Software Foundation' (https://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/log4j/LICENSE-2.0.txt)
    +
    +slf4j (http://www.slf4j.org)
    +----------------------------
    +
    +    Version: 1.7.1
    +    From: 'Quality Open Software' (http://www.qos.ch)
    +    License(s):
    +        MIT (bundled/slf4j/LICENSE)
    +
    +Spring Framework (https://projects.spring.io/spring-framework/)
    +---------------------------------------------------------------
    +
    +    Version: 3.0.5.RELEASE
    +    From: 'Spring by Pivotal' (https://spring.io)
    +    License(s):
    +        Apache v2.0 (bundled/springframework/LICENSE-2.0.txt)
    +
    +XML Security (http://santuario.apache.org)
    --- End diff --
    
    Listed as optional runtime dependency in the cas-client-core POM.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107335710
  
    --- Diff: extensions/guacamole-auth-cas/pom.xml ---
    @@ -0,0 +1,172 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +-->
    +<project xmlns="http://maven.apache.org/POM/4.0.0"
    +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    +                        http://maven.apache.org/maven-v4_0_0.xsd">
    +
    +    <modelVersion>4.0.0</modelVersion>
    +    <groupId>org.apache.guacamole</groupId>
    +    <artifactId>guacamole-auth-cas</artifactId>
    +    <packaging>jar</packaging>
    +    <version>0.9.11-incubating</version>
    +    <name>guacamole-auth-cas</name>
    +    <url>http://guacamole.incubator.apache.org/</url>
    +
    +    <properties>
    +        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    +    </properties>
    +
    +    <build>
    +        <plugins>
    +
    +            <!-- Written for 1.6 -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-compiler-plugin</artifactId>
    +                <version>3.3</version>
    +                <configuration>
    +                    <source>1.6</source>
    +                    <target>1.6</target>
    +                    <compilerArgs>
    +                        <arg>-Xlint:all</arg>
    +                        <arg>-Werror</arg>
    +                    </compilerArgs>
    +                    <fork>true</fork>
    +                </configuration>
    +            </plugin>
    +
    +            <!-- Copy dependencies prior to packaging -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-dependency-plugin</artifactId>
    +                <version>2.10</version>
    +                <executions>
    +                    <execution>
    +                        <id>unpack-dependencies</id>
    +                        <phase>prepare-package</phase>
    +                        <goals>
    +                            <goal>unpack-dependencies</goal>
    +                        </goals>
    +                        <configuration>
    +                            <includeScope>runtime</includeScope>
    +                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
    +                        </configuration>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Assembly plugin - for easy distribution -->
    +            <plugin>
    +                <artifactId>maven-assembly-plugin</artifactId>
    +                <version>2.5.3</version>
    +                <configuration>
    +                    <finalName>${project.artifactId}-${project.version}</finalName>
    +                    <appendAssemblyId>false</appendAssemblyId>
    +                    <descriptors>
    +                        <descriptor>src/main/assembly/dist.xml</descriptor>
    +                    </descriptors>
    +                </configuration>
    +                <executions>
    +                    <execution>
    +                        <id>make-dist-archive</id>
    +                        <phase>package</phase>
    +                        <goals>
    +                            <goal>single</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Verify format using Apache RAT -->
    +            <plugin>
    +                <groupId>org.apache.rat</groupId>
    +                <artifactId>apache-rat-plugin</artifactId>
    +                <version>0.12</version>
    +
    +                <configuration>
    +                    <excludes>
    +                        <exclude>**/*.json</exclude>
    +                        <exclude>src/licenses/**/*</exclude>
    +                    </excludes>
    +                </configuration>
    +
    +                <!-- Bind RAT to validate phase -->
    +                <executions>
    +                    <execution>
    +                        <id>validate</id>
    +                        <phase>validate</phase>
    +                        <goals>
    +                            <goal>check</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +
    +            </plugin>
    +
    +        </plugins>
    +    </build>
    +
    +    <dependencies>
    +
    +        <!-- Guacamole Java API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-common</artifactId>
    +            <version>0.9.10-incubating</version>
    +            <scope>provided</scope>
    +        </dependency>
    +
    +        <!-- Guacamole Extension API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-ext</artifactId>
    +            <version>0.9.11-incubating</version>
    +            <scope>provided</scope>
    +        </dependency>
    +        <dependency>
    +          <groupId>org.jasig.cas.client</groupId>
    --- End diff --
    
    Indentation here is wonky (should be four spaces, not two).
    
    This is also crammed into the section labelled "Guacamole Extension API", which is incorrect. Should separate this section from the others with blank lines and add a human-readable comment noting what the dependency is, like the other deps.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107336787
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,52 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider','$windowProvider',
    +        function indexRouteConfig($routeProvider,$windowProvider) {
    +
    +    var $window = $windowProvider.$get();
    +    var curPath = $window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    +    if (ticketPos > 0 && ticketPos < hashPos) {
    --- End diff --
    
    The test `ticketPos > 0` will always be true, as you're adding `8` to the result of `indexOf()`, masking the potential `-1` return value indicating the absence of the string `"?ticket="`.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107337579
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,52 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider','$windowProvider',
    +        function indexRouteConfig($routeProvider,$windowProvider) {
    +
    +    var $window = $windowProvider.$get();
    +    var curPath = $window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    +    if (ticketPos > 0 && ticketPos < hashPos) {
    +        var ticket = curPath.substring(ticketPos, hashPos);
    +        var newPath = curPath.substring(0,ticketPos - 8) + '#/?ticket=' + ticket;
    +        $window.location.href = newPath;
    --- End diff --
    
    There is a more Angular-y way to accomplish this, rather than manually parsing everything, since Angular already has to do this when parsing the URL to handle its own routing.
    
    I'm actually not 100% positive this block of code will work as expected - it's a config block which doesn't actually do any configging. If you want an example of an approach which embraces Angular's own routing, take a peek at the WIP OpenID support:
    
    https://github.com/mike-jumper/incubator-guacamole-client/blob/9deaac26df8220efeca90a0c9f8e9bdde39c86ff/extensions/guacamole-auth-openid/src/main/resources/openidConfig.js#L34-L52
    
    I suspect that's what you were already looking at when you first started. ;)


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107336670
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,52 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    --- End diff --
    
    You mean CAS?


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111689146
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    +------------------------------------------------
    +
    +    Version: 1.4
    +    From: 'Apache Software Foundation' (http://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/commons-codec/LICENSE-2.0.txt)
    +
    +
    +Google Guice (https://github.com/google/guice)
    +----------------------------------------------
    +
    +    Version: 3.0
    +    From: 'Google Inc.' (http://www.google.com/)
    +    License(s):
    +        Apache v2.0 (bundled/guice-3.0/COPYING)
    +
    +Javax Servlet API (http://servlet-spec.java.net/)
    +-------------------------------------------------
    +
    +    Version: 3.0.1
    +    From: 'GlassFish Community' (http://servlet-spec.java.net/)
    +    License(s):
    +        CDDL 2 + GPLv2 with ClassPath Exception (bundled/javax.servlet-api/LICENSE)
    +
    +
    +JSR-330 / Dependency Injection for Java (http://code.google.com/p/atinject/)
    +----------------------------------------------------------------------------
    +
    +    Version: 1
    +    From: 'JSR-330 Expert Group' (https://jcp.org/en/jsr/detail?id=330)
    +    License(s):
    +        Apache v2.0 (bundled/javax.inject-1/LICENSE-2.0.txt)
    +
    +JUnit (http://junit.org)
    +------------------------
    +
    +    Version: 4.8.2
    +    From: 'JUnit' (http://junit.org)
    +    License(s):
    +        CPL v1.0 (bundled/junit/LICENSE-1.0.txt)
    +
    +LOG4J (http://logging.apache.org/log4j/1.2/)
    --- End diff --
    
    Also listed in cas-client POM, but it has "compile" as the scope, so probably only needed for compile-time.  Removed.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r108404321
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,55 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" parameter provided by the CAS authentication process.
    + */
    +angular.module('index').config(['$routeProvider','$windowProvider',
    +        function indexRouteConfig($routeProvider,$windowProvider) {
    --- End diff --
    
    1) Okay, I'll figure out some other block type to move it to.
    2) Yeah.
    
    No, the block of code you highlighted there falls into the hole I mentioned before.  Specifically:
    - The comment indicates that it transforms /#/id_token= to /#/?id_token=.  The situation I end up with is that I need to transform ?id_token=/#/ to /#/?id_token=.
    - Because the ?id_token= parameter gets placed before the /#/, the $routeProvider.when block never actually executes, because the $routeProvider code only ever looks at anything passed the hash tag.
    - I can't remember for sure if this was true or not, but I believe that this also means that the $location.search(params) line also does not work, because it's looking at anything trailing the #/ on the URL, not what occurs in front of it.
    
    I'm happy to continue trying stuff to find a better solution to this - let me know if you have other suggestions!


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111652580
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    --- End diff --
    
    What pulls this in? I didn't see it in the list when I ran the Maven dependency plugin.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r108330337
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/translations/en.json ---
    @@ -0,0 +1,7 @@
    +{
    +
    +    "LOGIN" : {
    +        "FIELD_HEADER_TICKET" : ""
    --- End diff --
    
    Hm ... This issue will likely bite me, as well, with the OpenID dev. In fact, I suspect it may have already and I just don't remember. It's been a bit since I actively worked with that code.
    
    I wonder if perhaps we should modify the handling of fields such that fields without defined templates do not render at all... That way automatically-populated fields required for credentials, etc. could be defined without requiring repeated CSS or empty translation string hackery.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107336027
  
    --- Diff: extensions/guacamole-auth-cas/pom.xml ---
    @@ -0,0 +1,172 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +-->
    +<project xmlns="http://maven.apache.org/POM/4.0.0"
    +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    +                        http://maven.apache.org/maven-v4_0_0.xsd">
    +
    +    <modelVersion>4.0.0</modelVersion>
    +    <groupId>org.apache.guacamole</groupId>
    +    <artifactId>guacamole-auth-cas</artifactId>
    +    <packaging>jar</packaging>
    +    <version>0.9.11-incubating</version>
    +    <name>guacamole-auth-cas</name>
    +    <url>http://guacamole.incubator.apache.org/</url>
    +
    +    <properties>
    +        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    +    </properties>
    +
    +    <build>
    +        <plugins>
    +
    +            <!-- Written for 1.6 -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-compiler-plugin</artifactId>
    +                <version>3.3</version>
    +                <configuration>
    +                    <source>1.6</source>
    +                    <target>1.6</target>
    +                    <compilerArgs>
    +                        <arg>-Xlint:all</arg>
    +                        <arg>-Werror</arg>
    +                    </compilerArgs>
    +                    <fork>true</fork>
    +                </configuration>
    +            </plugin>
    +
    +            <!-- Copy dependencies prior to packaging -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-dependency-plugin</artifactId>
    +                <version>2.10</version>
    +                <executions>
    +                    <execution>
    +                        <id>unpack-dependencies</id>
    +                        <phase>prepare-package</phase>
    +                        <goals>
    +                            <goal>unpack-dependencies</goal>
    +                        </goals>
    +                        <configuration>
    +                            <includeScope>runtime</includeScope>
    +                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
    +                        </configuration>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Assembly plugin - for easy distribution -->
    +            <plugin>
    +                <artifactId>maven-assembly-plugin</artifactId>
    +                <version>2.5.3</version>
    +                <configuration>
    +                    <finalName>${project.artifactId}-${project.version}</finalName>
    +                    <appendAssemblyId>false</appendAssemblyId>
    +                    <descriptors>
    +                        <descriptor>src/main/assembly/dist.xml</descriptor>
    +                    </descriptors>
    +                </configuration>
    +                <executions>
    +                    <execution>
    +                        <id>make-dist-archive</id>
    +                        <phase>package</phase>
    +                        <goals>
    +                            <goal>single</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Verify format using Apache RAT -->
    +            <plugin>
    +                <groupId>org.apache.rat</groupId>
    +                <artifactId>apache-rat-plugin</artifactId>
    +                <version>0.12</version>
    +
    +                <configuration>
    +                    <excludes>
    +                        <exclude>**/*.json</exclude>
    +                        <exclude>src/licenses/**/*</exclude>
    +                    </excludes>
    +                </configuration>
    +
    +                <!-- Bind RAT to validate phase -->
    +                <executions>
    +                    <execution>
    +                        <id>validate</id>
    +                        <phase>validate</phase>
    +                        <goals>
    +                            <goal>check</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +
    +            </plugin>
    +
    +        </plugins>
    +    </build>
    +
    +    <dependencies>
    +
    +        <!-- Guacamole Java API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-common</artifactId>
    +            <version>0.9.10-incubating</version>
    +            <scope>provided</scope>
    +        </dependency>
    +
    +        <!-- Guacamole Extension API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-ext</artifactId>
    +            <version>0.9.11-incubating</version>
    +            <scope>provided</scope>
    +        </dependency>
    +        <dependency>
    +          <groupId>org.jasig.cas.client</groupId>
    +          <artifactId>cas-client-core</artifactId>
    --- End diff --
    
    What license is `cas-client-core` under?
    
    Just as with `guacamole-auth-header`, we'll need to include the licenses of all bundled dependencies, and ensure that the licensing is compliant with ASF policy (see https://www.apache.org/legal/resolved.html).
    
    Some of these dependencies are the same as other extensions, so things like Guice should be easy to copy into place, but you'll have to track down the licensing of the CAS client, include it within `src/licenses/...` like the others, and so on.
    
    Note also that the CAS client may itself pull in transitive dependencies which end up bundled, too, and we'll need to track down *those* licenses and do the same there.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100595271
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,51 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider',
    +        function indexRouteConfig($routeProvider) {
    +
    +    var curPath = window.location.href;
    --- End diff --
    
    @jmuehlner would probably also point out that AngularJS wraps `window` and provides [`$window`](https://code.angularjs.org/1.3.16/docs/api/ng/service/$window) to help facilitate unit testing (whenever we get around to having such things at the JS level).


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r108432814
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,55 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" parameter provided by the CAS authentication process.
    + */
    +angular.module('index').config(['$routeProvider','$windowProvider',
    +        function indexRouteConfig($routeProvider,$windowProvider) {
    --- End diff --
    
    > This is a .config() block which doesn't actually do any configuration. Besides being not very Angular-y, this will only run once when the application first loads. Any time after that will not work as expected, including when navigating from page to page or after logging out.
    
    What would be the proper place in Angular to do something like this?  I took a stab at creating a new controller in the index module and putting it there, but I'm guessing the controller functions don't get run automatically (need to be called), so is there a service/controller/directive/etc. that will get run automatically, or some place I should call the controller?


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100600780
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/cas.css ---
    @@ -0,0 +1,23 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/* Hide login dialog */
    +.login-ui div.login-dialog {
    +    display: none;
    --- End diff --
    
    Removed this and the CSS file altogether, and added a translation file just to blank out the LOGIN.FIELD_HEADER_TICKET text in the login box.  A login box is now displayed very briefly while the page redirects.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107402113
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/translations/en.json ---
    @@ -0,0 +1,7 @@
    +{
    +
    +    "LOGIN" : {
    +        "FIELD_HEADER_TICKET" : ""
    --- End diff --
    
    Since in the current implementation the redirect to CAS is transparent, and the ticket is handled transparently, this just serves to make sure any passing UI components are essentially blank as the user gets redirected to the authentication page and back.  Maybe it's unnecessary...


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100601993
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,51 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider',
    +        function indexRouteConfig($routeProvider) {
    +
    +    var curPath = window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    --- End diff --
    
    This was several weeks ago, but, IIRC, the reason I had to hack this together is that $routeParams only looks at everything past the #/ part of the URL.  When CAS redirects back to Guacamole, the URL comes in looking like this:
    https://my.server.local/guacamole/?ticket=blahblahblah/#
    
    $routeParams then pulls in nothing, because it sees nothing after the #.  I can't remember how much I played with window.location.search, but I'm looking into that now to see if I can pull this without having to use nasty code like strlen :-).


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100592582
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/cas.css ---
    @@ -0,0 +1,23 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/* Hide login dialog */
    +.login-ui div.login-dialog {
    +    display: none;
    --- End diff --
    
    Probably so, and, come to think of it, it really shouldn't be necessary since loading the form should redirect to the SSO page, then back to Guacamole after authentication.  I'll remove it, build it and make sure it still works, and commit after verifying.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100592983
  
    --- Diff: extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/AuthenticationProviderService.java ---
    @@ -0,0 +1,111 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.guacamole.auth.cas;
    +
    +import com.google.inject.Inject;
    +import com.google.inject.Provider;
    +import java.util.Arrays;
    +import java.util.Enumeration;
    +import javax.servlet.http.HttpServletRequest;
    +import javax.servlet.http.HttpSession;
    +import org.apache.guacamole.GuacamoleException;
    +import org.apache.guacamole.form.Field;
    +import org.apache.guacamole.net.auth.Credentials;
    +import org.apache.guacamole.net.auth.credentials.CredentialsInfo;
    +import org.apache.guacamole.net.auth.credentials.GuacamoleInvalidCredentialsException;
    +import org.apache.guacamole.auth.cas.conf.ConfigurationService;
    +import org.apache.guacamole.auth.cas.form.CASTicketField;
    +import org.apache.guacamole.auth.cas.ticket.TicketValidationService;
    +import org.apache.guacamole.auth.cas.user.AuthenticatedUser;
    +
    +/**
    + * Service providing convenience functions for the CAS AuthenticationProvider
    + * implementation.
    + *
    + * @author Nick Couchman
    + */
    +public class AuthenticationProviderService {
    +
    +    /**
    +     * Service for retrieving CAS configuration information.
    +     */
    +    @Inject
    +    private ConfigurationService confService;
    +
    +    /**
    +     * Service for validating received ID tickets.
    +     */
    +    @Inject
    +    private TicketValidationService ticketService;
    +
    +    /**
    +     * Provider for AuthenticatedUser objects.
    +     */
    +    @Inject
    +    private Provider<AuthenticatedUser> authenticatedUserProvider;
    +
    +    /**
    +     * Returns an AuthenticatedUser representing the user authenticated by the
    +     * given credentials.
    +     *
    +     * @param credentials
    +     *     The credentials to use for authentication.
    +     *
    +     * @return
    +     *     An AuthenticatedUser representing the user authenticated by the
    +     *     given credentials.
    +     *
    +     * @throws GuacamoleException
    +     *     If an error occurs while authenticating the user, or if access is
    +     *     denied.
    +     */
    +    public AuthenticatedUser authenticateUser(Credentials credentials)
    +            throws GuacamoleException {
    +
    +        String ticket = null;
    --- End diff --
    
    Fixed.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107337120
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,52 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider','$windowProvider',
    +        function indexRouteConfig($routeProvider,$windowProvider) {
    +
    +    var $window = $windowProvider.$get();
    +    var curPath = $window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    --- End diff --
    
    Beware that, by convention, strings in JavaScript should be `'single quoted'`, not `"double quoted"`. They're both legal ... so all the more reason to pick one and only one for consistency's sake. We happen to have gone with the prevailing convention in JavaScript programming land of single quotes.
    
    From http://guacamole.incubator.apache.org/guac-style/#naming:
    
    > Prefer `'single quotes'` over `"double quotes"` for strings in JavaScript.
    
    I had to get used to that one, too. You'll find much of the older guac JavaScript code using double quotes as I used to resist that convention. New code uses single quotes, 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.
---

[GitHub] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100592549
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,51 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider',
    +        function indexRouteConfig($routeProvider) {
    +
    +    var curPath = window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    +    if(ticketPos > 0 && ticketPos < hashPos) {
    --- End diff --
    
    `if(` \U0001f62d 


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107336586
  
    --- Diff: extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java ---
    @@ -0,0 +1,80 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.guacamole.auth.cas.ticket;
    +
    +import com.google.inject.Inject;
    +import org.apache.guacamole.GuacamoleException;
    +import org.apache.guacamole.GuacamoleSecurityException;
    +import org.apache.guacamole.GuacamoleServerException;
    +import org.apache.guacamole.auth.cas.conf.ConfigurationService;
    +import org.jasig.cas.client.authentication.AttributePrincipal;
    +import org.jasig.cas.client.validation.Assertion;
    +import org.jasig.cas.client.validation.Cas20ProxyTicketValidator;
    +import org.jasig.cas.client.validation.TicketValidationException;
    +
    +/**
    + * Service for validating ID tickets forwarded to us by the client, verifying
    + * that they did indeed come from the CAS service.
    + */
    +public class TicketValidationService {
    +
    +    /**
    +     * Service for retrieving CAS configuration information.
    +     */
    +    @Inject
    +    private ConfigurationService confService;
    +
    +    /**
    +     * Validates and parses the given ID ticket, returning the username contained
    +     * therein, as defined by the username claim type given in
    +     * guacamole.properties. If the username claim type is missing or the ID
    +     * ticket is invalid, an exception is thrown instead.
    +     *
    +     * @param ticket
    +     *     The ID ticket to validate and parse.
    +     *
    +     * @return
    +     *     The username contained within the given ID ticket.
    +     *
    +     * @throws GuacamoleException
    +     *     If the ID ticket is not valid, the username claim type is missing, or
    +     *     guacamole.properties could not be parsed.
    +     */
    +    public String processUsername(String ticket) throws GuacamoleException {
    +        AttributePrincipal principal = null;
    +
    +        // Retrieve the configured CAS URL and establish a ticket validator
    +        String casServerUrl = confService.getAuthorizationEndpoint();
    +        Cas20ProxyTicketValidator sv = new Cas20ProxyTicketValidator(casServerUrl);
    +        sv.setAcceptAnyProxy(true);
    +        try {
    +            String confRedirectURI = confService.getRedirectURI();
    +            Assertion a = sv.validate(ticket, confRedirectURI);
    --- End diff --
    
    Can you clean up and comment the logic here? I see you say:
    
        // Retrieve the configured CAS URL and establish a ticket validator
    
    but there seems to be more going on here than that. What is `sv`? The ticket validator? What are we doing with that ticket validator which results in us ultimately returning the username?


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r108406427
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/translations/en.json ---
    @@ -0,0 +1,7 @@
    +{
    +
    +    "LOGIN" : {
    +        "FIELD_HEADER_TICKET" : ""
    --- End diff --
    
    I think that helps, although the redirect happens quickly enough that it's a little hard to tell.  I'll at least remove the empty translation information from my extension.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107412533
  
    --- Diff: extensions/guacamole-auth-cas/pom.xml ---
    @@ -0,0 +1,172 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +-->
    +<project xmlns="http://maven.apache.org/POM/4.0.0"
    +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    +                        http://maven.apache.org/maven-v4_0_0.xsd">
    +
    +    <modelVersion>4.0.0</modelVersion>
    +    <groupId>org.apache.guacamole</groupId>
    +    <artifactId>guacamole-auth-cas</artifactId>
    +    <packaging>jar</packaging>
    +    <version>0.9.11-incubating</version>
    +    <name>guacamole-auth-cas</name>
    +    <url>http://guacamole.incubator.apache.org/</url>
    +
    +    <properties>
    +        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    +    </properties>
    +
    +    <build>
    +        <plugins>
    +
    +            <!-- Written for 1.6 -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-compiler-plugin</artifactId>
    +                <version>3.3</version>
    +                <configuration>
    +                    <source>1.6</source>
    +                    <target>1.6</target>
    +                    <compilerArgs>
    +                        <arg>-Xlint:all</arg>
    +                        <arg>-Werror</arg>
    +                    </compilerArgs>
    +                    <fork>true</fork>
    +                </configuration>
    +            </plugin>
    +
    +            <!-- Copy dependencies prior to packaging -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-dependency-plugin</artifactId>
    +                <version>2.10</version>
    +                <executions>
    +                    <execution>
    +                        <id>unpack-dependencies</id>
    +                        <phase>prepare-package</phase>
    +                        <goals>
    +                            <goal>unpack-dependencies</goal>
    +                        </goals>
    +                        <configuration>
    +                            <includeScope>runtime</includeScope>
    +                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
    +                        </configuration>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Assembly plugin - for easy distribution -->
    +            <plugin>
    +                <artifactId>maven-assembly-plugin</artifactId>
    +                <version>2.5.3</version>
    +                <configuration>
    +                    <finalName>${project.artifactId}-${project.version}</finalName>
    +                    <appendAssemblyId>false</appendAssemblyId>
    +                    <descriptors>
    +                        <descriptor>src/main/assembly/dist.xml</descriptor>
    +                    </descriptors>
    +                </configuration>
    +                <executions>
    +                    <execution>
    +                        <id>make-dist-archive</id>
    +                        <phase>package</phase>
    +                        <goals>
    +                            <goal>single</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Verify format using Apache RAT -->
    +            <plugin>
    +                <groupId>org.apache.rat</groupId>
    +                <artifactId>apache-rat-plugin</artifactId>
    +                <version>0.12</version>
    +
    +                <configuration>
    +                    <excludes>
    +                        <exclude>**/*.json</exclude>
    +                        <exclude>src/licenses/**/*</exclude>
    +                    </excludes>
    +                </configuration>
    +
    +                <!-- Bind RAT to validate phase -->
    +                <executions>
    +                    <execution>
    +                        <id>validate</id>
    +                        <phase>validate</phase>
    +                        <goals>
    +                            <goal>check</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +
    +            </plugin>
    +
    +        </plugins>
    +    </build>
    +
    +    <dependencies>
    +
    +        <!-- Guacamole Java API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-common</artifactId>
    +            <version>0.9.10-incubating</version>
    +            <scope>provided</scope>
    +        </dependency>
    +
    +        <!-- Guacamole Extension API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-ext</artifactId>
    +            <version>0.9.11-incubating</version>
    +            <scope>provided</scope>
    +        </dependency>
    +        <dependency>
    +          <groupId>org.jasig.cas.client</groupId>
    +          <artifactId>cas-client-core</artifactId>
    --- End diff --
    
    JASIG CAS client is licensed under Apache 2.0.  So that works well :-).
    
    Here are the dependencies that get pulled in by either org.jasig.cas-client or org.jasig.cas-client-core:
    org.springframework.spring-core (Apache 2.0)
    org.springframework.spring-context (Apache 2.0)
    org.springframework.spring-test (Apache 2.0)
    org.springframework.spring-beans (Apache 2.0)
    log4j.log4j (Apache 2.0)
    junit.junit (EPL 1.0)
    org.slf4j.slf4j-api (MIT)
    org.slf4j.jcl-over-slf4j (MIT)
    org.slf4j.slf4j-simple (MIT)
    javax.servlet.servlet-api (CDDL/GPL2.0)
    xml-security.xmlsec (Apache 2.0)
    commons-codec.commons-codec (Apache 2.0)



---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100589915
  
    --- Diff: extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/CASAuthenticationProvider.java ---
    @@ -0,0 +1,107 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.guacamole.auth.cas;
    +
    +import com.google.inject.Guice;
    +import com.google.inject.Injector;
    +import org.apache.guacamole.GuacamoleException;
    +import org.apache.guacamole.net.auth.AuthenticatedUser;
    +import org.apache.guacamole.net.auth.AuthenticationProvider;
    +import org.apache.guacamole.net.auth.Credentials;
    +import org.apache.guacamole.net.auth.UserContext;
    +
    +/**
    + * Guacamole authentication backend which authenticates users using an
    + * arbitrary external system implementing CAS. No storage for connections is
    + * provided - only authentication. Storage must be provided by some other
    + * extension.
    + *
    + * @author Michael Jumper
    --- End diff --
    
    Well, since I had basically copied and pasted files that Mike wrote with almost no changes, I was trying to avoid plagiarizing someone else's work.  I've updated them to have my name...


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100593104
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,51 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider',
    +        function indexRouteConfig($routeProvider) {
    +
    +    var curPath = window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    +    if(ticketPos > 0 && ticketPos < hashPos) {
    +        var ticket = curPath.substring(ticketPos, hashPos);
    +        var newPath = curPath.substring(0,ticketPos - 8) + '#/?ticket=' + ticket;
    +        window.location=newPath;
    --- End diff --
    
    Is CAS OK with this sort of thing? I recall having difficulty with redirect URLs and OpenID as endpoints prohibited the presence of `#`.
    
    Stylewise, should have spaces around the `=` like everywhere else.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111689152
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    +------------------------------------------------
    +
    +    Version: 1.4
    +    From: 'Apache Software Foundation' (http://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/commons-codec/LICENSE-2.0.txt)
    +
    +
    +Google Guice (https://github.com/google/guice)
    +----------------------------------------------
    +
    +    Version: 3.0
    +    From: 'Google Inc.' (http://www.google.com/)
    +    License(s):
    +        Apache v2.0 (bundled/guice-3.0/COPYING)
    +
    +Javax Servlet API (http://servlet-spec.java.net/)
    +-------------------------------------------------
    +
    +    Version: 3.0.1
    +    From: 'GlassFish Community' (http://servlet-spec.java.net/)
    +    License(s):
    +        CDDL 2 + GPLv2 with ClassPath Exception (bundled/javax.servlet-api/LICENSE)
    +
    +
    +JSR-330 / Dependency Injection for Java (http://code.google.com/p/atinject/)
    +----------------------------------------------------------------------------
    +
    +    Version: 1
    +    From: 'JSR-330 Expert Group' (https://jcp.org/en/jsr/detail?id=330)
    +    License(s):
    +        Apache v2.0 (bundled/javax.inject-1/LICENSE-2.0.txt)
    +
    +JUnit (http://junit.org)
    --- End diff --
    
    Removed.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111689036
  
    --- Diff: extensions/guacamole-auth-cas/pom.xml ---
    @@ -0,0 +1,175 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +-->
    +<project xmlns="http://maven.apache.org/POM/4.0.0"
    +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    +                        http://maven.apache.org/maven-v4_0_0.xsd">
    +
    +    <modelVersion>4.0.0</modelVersion>
    +    <groupId>org.apache.guacamole</groupId>
    +    <artifactId>guacamole-auth-cas</artifactId>
    +    <packaging>jar</packaging>
    +    <version>0.9.11-incubating</version>
    --- End diff --
    
    Updated.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111689233
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    +------------------------------------------------
    +
    +    Version: 1.4
    +    From: 'Apache Software Foundation' (http://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/commons-codec/LICENSE-2.0.txt)
    +
    +
    +Google Guice (https://github.com/google/guice)
    +----------------------------------------------
    +
    +    Version: 3.0
    +    From: 'Google Inc.' (http://www.google.com/)
    +    License(s):
    +        Apache v2.0 (bundled/guice-3.0/COPYING)
    +
    +Javax Servlet API (http://servlet-spec.java.net/)
    +-------------------------------------------------
    +
    +    Version: 3.0.1
    +    From: 'GlassFish Community' (http://servlet-spec.java.net/)
    +    License(s):
    +        CDDL 2 + GPLv2 with ClassPath Exception (bundled/javax.servlet-api/LICENSE)
    +
    +
    +JSR-330 / Dependency Injection for Java (http://code.google.com/p/atinject/)
    +----------------------------------------------------------------------------
    +
    +    Version: 1
    +    From: 'JSR-330 Expert Group' (https://jcp.org/en/jsr/detail?id=330)
    +    License(s):
    +        Apache v2.0 (bundled/javax.inject-1/LICENSE-2.0.txt)
    +
    +JUnit (http://junit.org)
    +------------------------
    +
    +    Version: 4.8.2
    +    From: 'JUnit' (http://junit.org)
    +    License(s):
    +        CPL v1.0 (bundled/junit/LICENSE-1.0.txt)
    +
    +LOG4J (http://logging.apache.org/log4j/1.2/)
    +--------------------------------------------
    +
    +    Version: 1.2.15
    +    From: 'Apache Software Foundation' (https://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/log4j/LICENSE-2.0.txt)
    +
    +slf4j (http://www.slf4j.org)
    +----------------------------
    +
    +    Version: 1.7.1
    +    From: 'Quality Open Software' (http://www.qos.ch)
    +    License(s):
    +        MIT (bundled/slf4j/LICENSE)
    +
    +Spring Framework (https://projects.spring.io/spring-framework/)
    --- End diff --
    
    Another one listed for cas-client in its POM file.  Removed.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r108435353
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,55 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" parameter provided by the CAS authentication process.
    + */
    +angular.module('index').config(['$routeProvider','$windowProvider',
    +        function indexRouteConfig($routeProvider,$windowProvider) {
    --- End diff --
    
    So, still not sure this is the way to do this, but I moved this out of the config() block and into a run() block.  Code should reflect changes.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111652821
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    +------------------------------------------------
    +
    +    Version: 1.4
    +    From: 'Apache Software Foundation' (http://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/commons-codec/LICENSE-2.0.txt)
    +
    +
    +Google Guice (https://github.com/google/guice)
    +----------------------------------------------
    +
    +    Version: 3.0
    +    From: 'Google Inc.' (http://www.google.com/)
    +    License(s):
    +        Apache v2.0 (bundled/guice-3.0/COPYING)
    +
    +Javax Servlet API (http://servlet-spec.java.net/)
    +-------------------------------------------------
    +
    +    Version: 3.0.1
    +    From: 'GlassFish Community' (http://servlet-spec.java.net/)
    +    License(s):
    +        CDDL 2 + GPLv2 with ClassPath Exception (bundled/javax.servlet-api/LICENSE)
    +
    +
    +JSR-330 / Dependency Injection for Java (http://code.google.com/p/atinject/)
    +----------------------------------------------------------------------------
    +
    +    Version: 1
    +    From: 'JSR-330 Expert Group' (https://jcp.org/en/jsr/detail?id=330)
    +    License(s):
    +        Apache v2.0 (bundled/javax.inject-1/LICENSE-2.0.txt)
    +
    +JUnit (http://junit.org)
    +------------------------
    +
    +    Version: 4.8.2
    +    From: 'JUnit' (http://junit.org)
    +    License(s):
    +        CPL v1.0 (bundled/junit/LICENSE-1.0.txt)
    +
    +LOG4J (http://logging.apache.org/log4j/1.2/)
    +--------------------------------------------
    +
    +    Version: 1.2.15
    +    From: 'Apache Software Foundation' (https://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/log4j/LICENSE-2.0.txt)
    +
    +slf4j (http://www.slf4j.org)
    +----------------------------
    +
    +    Version: 1.7.1
    +    From: 'Quality Open Software' (http://www.qos.ch)
    +    License(s):
    +        MIT (bundled/slf4j/LICENSE)
    +
    +Spring Framework (https://projects.spring.io/spring-framework/)
    +---------------------------------------------------------------
    +
    +    Version: 3.0.5.RELEASE
    +    From: 'Spring by Pivotal' (https://spring.io)
    +    License(s):
    +        Apache v2.0 (bundled/springframework/LICENSE-2.0.txt)
    +
    +XML Security (http://santuario.apache.org)
    --- End diff --
    
    What pulls this in? I don't see this in the dependency list produced by Maven either.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111652987
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/guac-manifest.json ---
    @@ -0,0 +1,19 @@
    +{
    +
    +    "guacamoleVersion" : "0.9.11-incubating",
    --- End diff --
    
    Correct at the time this PR was originally opened, but needs to be `0.9.12-incubating` 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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111689064
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/NOTICE ---
    @@ -0,0 +1,5 @@
    +Apache Guacamole
    +Copyright 2016 The Apache Software Foundation
    --- End diff --
    
    Updated


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107404577
  
    --- Diff: extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/form/CASTicketField.java ---
    @@ -0,0 +1,97 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.guacamole.auth.cas.form;
    +
    +import java.io.UnsupportedEncodingException;
    +import java.math.BigInteger;
    +import java.net.URLEncoder;
    +import java.security.SecureRandom;
    +import org.apache.guacamole.form.Field;
    +
    +
    +/**
    + * Field definition which represents the ticket returned by an CAS service.
    + * Within the user interface, this will be rendered as an appropriate "Log in
    + * with ..." button which links to the CAS service.
    --- End diff --
    
    Good question.  It seems like the default behavior by all of the applications I have integrated with CAS is that, as soon as the application login page is displayed, you are redirected transparently to the CAS login page, then, once you've successfully authenticated, you're redirected back to the application page where the ticket is validated and the application allows you in.  My guess is that most of the applications that people want SSO integration with in CAS they want people to be able to hit a page, login and then, after that, just get transparently logged into each application without having to do anything - including click another button to trigger the CAS SSO login.
    
    This is a little different from something like OpenID (or Google, Yahoo, Live, etc.), where so many different providers are integrating with the SSO system, and you want some clue that your data in the SSO system is going to be accessed by the application you're trying to use.  In the case of CAS, the target is more organizations that are intentionally building and integrating applications into an SSO framework, and trying to make it as easy as possible for users to interact with those applications.
    
    That said, I'm not opposed to have a single SSO button somewhere that allows the user to bypass username/password authentication to Guacamole and proceed to SSO, if that's what we think should happen?
    
    So, the short answer to "What would be the ideal user experience?"  That depends :-).


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107400316
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,52 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider','$windowProvider',
    +        function indexRouteConfig($routeProvider,$windowProvider) {
    +
    +    var $window = $windowProvider.$get();
    +    var curPath = $window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    --- End diff --
    
    Fixed here, need to check other JS source files to make sure.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100592105
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/cas.css ---
    @@ -0,0 +1,23 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/* Hide login dialog */
    +.login-ui div.login-dialog {
    +    display: none;
    --- End diff --
    
    Why is the login dialog being hidden? Won't this break things for all other auth methods?


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107337980
  
    --- Diff: extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/form/CASTicketField.java ---
    @@ -0,0 +1,97 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.guacamole.auth.cas.form;
    +
    +import java.io.UnsupportedEncodingException;
    +import java.math.BigInteger;
    +import java.net.URLEncoder;
    +import java.security.SecureRandom;
    +import org.apache.guacamole.form.Field;
    +
    +
    +/**
    + * Field definition which represents the ticket returned by an CAS service.
    + * Within the user interface, this will be rendered as an appropriate "Log in
    + * with ..." button which links to the CAS service.
    --- End diff --
    
    > Within the user interface, this will be rendered as an appropriate "Log in with ..." button which links to the CAS service.
    
    Is this the case? The code looks like it takes the user to the CAS service immediately. If it does take the user to the CAS service immediately ... should there be a button? What would be the ideal user experience?


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r100593470
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,51 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    + */
    +angular.module('index').config(['$routeProvider',
    +        function indexRouteConfig($routeProvider) {
    +
    +    var curPath = window.location.href;
    +    var ticketPos = curPath.indexOf("?ticket=") + 8;
    +    var hashPos = curPath.indexOf("#/");
    +    if(ticketPos > 0 && ticketPos < hashPos) {
    +        var ticket = curPath.substring(ticketPos, hashPos);
    +        var newPath = curPath.substring(0,ticketPos - 8) + '#/?ticket=' + ticket;
    +        window.location=newPath;
    --- End diff --
    
    CAS doesn't seem to mind this, no - the redirect and authentication seems to work fine.
    
    Style issue fixed.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

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

    https://github.com/apache/incubator-guacamole-client/pull/121


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107400273
  
    --- Diff: extensions/guacamole-auth-cas/src/main/resources/casConfig.js ---
    @@ -0,0 +1,52 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +/**
    + * Config block which registers CAS-specific field types.
    + */
    +angular.module('guacCAS').config(['formServiceProvider',
    +        function guacCASConfig(formServiceProvider) {
    +
    +    // Define field for ticket from CAS service
    +    formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
    +        templateUrl   : '',
    +        controller    : 'guacCASController',
    +        module        : 'guacCAS'
    +    });
    +
    +}]);
    +
    +/**
    + * Config block which augments the existing routing, providing special handling
    + * for the "ticket=" fragments provided by OpenID Connect.
    --- End diff --
    
    Uh...yeah.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111652891
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/NOTICE ---
    @@ -0,0 +1,5 @@
    +Apache Guacamole
    +Copyright 2016 The Apache Software Foundation
    --- End diff --
    
    2017 ;)


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r111652786
  
    --- Diff: extensions/guacamole-auth-cas/src/licenses/LICENSE ---
    @@ -0,0 +1,294 @@
    +
    +                                 Apache License
    +                           Version 2.0, January 2004
    +                        http://www.apache.org/licenses/
    +
    +   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +   1. Definitions.
    +
    +      "License" shall mean the terms and conditions for use, reproduction,
    +      and distribution as defined by Sections 1 through 9 of this document.
    +
    +      "Licensor" shall mean the copyright owner or entity authorized by
    +      the copyright owner that is granting the License.
    +
    +      "Legal Entity" shall mean the union of the acting entity and all
    +      other entities that control, are controlled by, or are under common
    +      control with that entity. For the purposes of this definition,
    +      "control" means (i) the power, direct or indirect, to cause the
    +      direction or management of such entity, whether by contract or
    +      otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +      outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +      "You" (or "Your") shall mean an individual or Legal Entity
    +      exercising permissions granted by this License.
    +
    +      "Source" form shall mean the preferred form for making modifications,
    +      including but not limited to software source code, documentation
    +      source, and configuration files.
    +
    +      "Object" form shall mean any form resulting from mechanical
    +      transformation or translation of a Source form, including but
    +      not limited to compiled object code, generated documentation,
    +      and conversions to other media types.
    +
    +      "Work" shall mean the work of authorship, whether in Source or
    +      Object form, made available under the License, as indicated by a
    +      copyright notice that is included in or attached to the work
    +      (an example is provided in the Appendix below).
    +
    +      "Derivative Works" shall mean any work, whether in Source or Object
    +      form, that is based on (or derived from) the Work and for which the
    +      editorial revisions, annotations, elaborations, or other modifications
    +      represent, as a whole, an original work of authorship. For the purposes
    +      of this License, Derivative Works shall not include works that remain
    +      separable from, or merely link (or bind by name) to the interfaces of,
    +      the Work and Derivative Works thereof.
    +
    +      "Contribution" shall mean any work of authorship, including
    +      the original version of the Work and any modifications or additions
    +      to that Work or Derivative Works thereof, that is intentionally
    +      submitted to Licensor for inclusion in the Work by the copyright owner
    +      or by an individual or Legal Entity authorized to submit on behalf of
    +      the copyright owner. For the purposes of this definition, "submitted"
    +      means any form of electronic, verbal, or written communication sent
    +      to the Licensor or its representatives, including but not limited to
    +      communication on electronic mailing lists, source code control systems,
    +      and issue tracking systems that are managed by, or on behalf of, the
    +      Licensor for the purpose of discussing and improving the Work, but
    +      excluding communication that is conspicuously marked or otherwise
    +      designated in writing by the copyright owner as "Not a Contribution."
    +
    +      "Contributor" shall mean Licensor and any individual or Legal Entity
    +      on behalf of whom a Contribution has been received by Licensor and
    +      subsequently incorporated within the Work.
    +
    +   2. Grant of Copyright License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      copyright license to reproduce, prepare Derivative Works of,
    +      publicly display, publicly perform, sublicense, and distribute the
    +      Work and such Derivative Works in Source or Object form.
    +
    +   3. Grant of Patent License. Subject to the terms and conditions of
    +      this License, each Contributor hereby grants to You a perpetual,
    +      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +      (except as stated in this section) patent license to make, have made,
    +      use, offer to sell, sell, import, and otherwise transfer the Work,
    +      where such license applies only to those patent claims licensable
    +      by such Contributor that are necessarily infringed by their
    +      Contribution(s) alone or by combination of their Contribution(s)
    +      with the Work to which such Contribution(s) was submitted. If You
    +      institute patent litigation against any entity (including a
    +      cross-claim or counterclaim in a lawsuit) alleging that the Work
    +      or a Contribution incorporated within the Work constitutes direct
    +      or contributory patent infringement, then any patent licenses
    +      granted to You under this License for that Work shall terminate
    +      as of the date such litigation is filed.
    +
    +   4. Redistribution. You may reproduce and distribute copies of the
    +      Work or Derivative Works thereof in any medium, with or without
    +      modifications, and in Source or Object form, provided that You
    +      meet the following conditions:
    +
    +      (a) You must give any other recipients of the Work or
    +          Derivative Works a copy of this License; and
    +
    +      (b) You must cause any modified files to carry prominent notices
    +          stating that You changed the files; and
    +
    +      (c) You must retain, in the Source form of any Derivative Works
    +          that You distribute, all copyright, patent, trademark, and
    +          attribution notices from the Source form of the Work,
    +          excluding those notices that do not pertain to any part of
    +          the Derivative Works; and
    +
    +      (d) If the Work includes a "NOTICE" text file as part of its
    +          distribution, then any Derivative Works that You distribute must
    +          include a readable copy of the attribution notices contained
    +          within such NOTICE file, excluding those notices that do not
    +          pertain to any part of the Derivative Works, in at least one
    +          of the following places: within a NOTICE text file distributed
    +          as part of the Derivative Works; within the Source form or
    +          documentation, if provided along with the Derivative Works; or,
    +          within a display generated by the Derivative Works, if and
    +          wherever such third-party notices normally appear. The contents
    +          of the NOTICE file are for informational purposes only and
    +          do not modify the License. You may add Your own attribution
    +          notices within Derivative Works that You distribute, alongside
    +          or as an addendum to the NOTICE text from the Work, provided
    +          that such additional attribution notices cannot be construed
    +          as modifying the License.
    +
    +      You may add Your own copyright statement to Your modifications and
    +      may provide additional or different license terms and conditions
    +      for use, reproduction, or distribution of Your modifications, or
    +      for any such Derivative Works as a whole, provided Your use,
    +      reproduction, and distribution of the Work otherwise complies with
    +      the conditions stated in this License.
    +
    +   5. Submission of Contributions. Unless You explicitly state otherwise,
    +      any Contribution intentionally submitted for inclusion in the Work
    +      by You to the Licensor shall be under the terms and conditions of
    +      this License, without any additional terms or conditions.
    +      Notwithstanding the above, nothing herein shall supersede or modify
    +      the terms of any separate license agreement you may have executed
    +      with Licensor regarding such Contributions.
    +
    +   6. Trademarks. This License does not grant permission to use the trade
    +      names, trademarks, service marks, or product names of the Licensor,
    +      except as required for reasonable and customary use in describing the
    +      origin of the Work and reproducing the content of the NOTICE file.
    +
    +   7. Disclaimer of Warranty. Unless required by applicable law or
    +      agreed to in writing, Licensor provides the Work (and each
    +      Contributor provides its Contributions) on an "AS IS" BASIS,
    +      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +      implied, including, without limitation, any warranties or conditions
    +      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +      PARTICULAR PURPOSE. You are solely responsible for determining the
    +      appropriateness of using or redistributing the Work and assume any
    +      risks associated with Your exercise of permissions under this License.
    +
    +   8. Limitation of Liability. In no event and under no legal theory,
    +      whether in tort (including negligence), contract, or otherwise,
    +      unless required by applicable law (such as deliberate and grossly
    +      negligent acts) or agreed to in writing, shall any Contributor be
    +      liable to You for damages, including any direct, indirect, special,
    +      incidental, or consequential damages of any character arising as a
    +      result of this License or out of the use or inability to use the
    +      Work (including but not limited to damages for loss of goodwill,
    +      work stoppage, computer failure or malfunction, or any and all
    +      other commercial damages or losses), even if such Contributor
    +      has been advised of the possibility of such damages.
    +
    +   9. Accepting Warranty or Additional Liability. While redistributing
    +      the Work or Derivative Works thereof, You may choose to offer,
    +      and charge a fee for, acceptance of support, warranty, indemnity,
    +      or other liability obligations and/or rights consistent with this
    +      License. However, in accepting such obligations, You may act only
    +      on Your own behalf and on Your sole responsibility, not on behalf
    +      of any other Contributor, and only if You agree to indemnify,
    +      defend, and hold each Contributor harmless for any liability
    +      incurred by, or claims asserted against, such Contributor by reason
    +      of your accepting any such warranty or additional liability.
    +
    +   END OF TERMS AND CONDITIONS
    +
    +   APPENDIX: How to apply the Apache License to your work.
    +
    +      To apply the Apache License to your work, attach the following
    +      boilerplate notice, with the fields enclosed by brackets "[]"
    +      replaced with your own identifying information. (Don't include
    +      the brackets!)  The text should be enclosed in the appropriate
    +      comment syntax for the file format. We also recommend that a
    +      file or class name and description of purpose be included on the
    +      same "printed page" as the copyright notice for easier
    +      identification within third-party archives.
    +
    +   Copyright [yyyy] [name of copyright owner]
    +
    +   Licensed under the Apache License, Version 2.0 (the "License");
    +   you may not use this file except in compliance with the License.
    +   You may obtain a copy of the License at
    +
    +       http://www.apache.org/licenses/LICENSE-2.0
    +
    +   Unless required by applicable law or agreed to in writing, software
    +   distributed under the License is distributed on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +   See the License for the specific language governing permissions and
    +   limitations under the License.
    +
    +
    +==============================================================================
    +
    +APACHE GUACAMOLE SUBCOMPONENTS
    +
    +Apache Guacamole includes a number of subcomponents with separate copyright
    +notices and license terms. Your use of these subcomponents is subject to the
    +terms and conditions of the following licenses.
    +
    +
    +AOP Alliance (http://aopalliance.sourceforge.net/)
    +--------------------------------------------------
    +
    +    Version: 1.0
    +    From: 'AOP Alliance' (http://aopalliance.sourceforge.net/members.html)
    +    License(s):
    +        Public Domain (bundled/aopalliance-1.0/LICENSE)
    +
    +Commons Codec (http://commons.apache.org/codec/)
    +------------------------------------------------
    +
    +    Version: 1.4
    +    From: 'Apache Software Foundation' (http://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/commons-codec/LICENSE-2.0.txt)
    +
    +
    +Google Guice (https://github.com/google/guice)
    +----------------------------------------------
    +
    +    Version: 3.0
    +    From: 'Google Inc.' (http://www.google.com/)
    +    License(s):
    +        Apache v2.0 (bundled/guice-3.0/COPYING)
    +
    +Javax Servlet API (http://servlet-spec.java.net/)
    +-------------------------------------------------
    +
    +    Version: 3.0.1
    +    From: 'GlassFish Community' (http://servlet-spec.java.net/)
    +    License(s):
    +        CDDL 2 + GPLv2 with ClassPath Exception (bundled/javax.servlet-api/LICENSE)
    +
    +
    +JSR-330 / Dependency Injection for Java (http://code.google.com/p/atinject/)
    +----------------------------------------------------------------------------
    +
    +    Version: 1
    +    From: 'JSR-330 Expert Group' (https://jcp.org/en/jsr/detail?id=330)
    +    License(s):
    +        Apache v2.0 (bundled/javax.inject-1/LICENSE-2.0.txt)
    +
    +JUnit (http://junit.org)
    +------------------------
    +
    +    Version: 4.8.2
    +    From: 'JUnit' (http://junit.org)
    +    License(s):
    +        CPL v1.0 (bundled/junit/LICENSE-1.0.txt)
    +
    +LOG4J (http://logging.apache.org/log4j/1.2/)
    +--------------------------------------------
    +
    +    Version: 1.2.15
    +    From: 'Apache Software Foundation' (https://www.apache.org)
    +    License(s):
    +        Apache v2.0 (bundled/log4j/LICENSE-2.0.txt)
    +
    +slf4j (http://www.slf4j.org)
    +----------------------------
    +
    +    Version: 1.7.1
    +    From: 'Quality Open Software' (http://www.qos.ch)
    +    License(s):
    +        MIT (bundled/slf4j/LICENSE)
    +
    +Spring Framework (https://projects.spring.io/spring-framework/)
    --- End diff --
    
    Is this bundled? I don't see it as a dependency (even transitive), nor do I see anything springy in the resulting `.jar`.


---
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] incubator-guacamole-client pull request #121: GUACAMOLE-204: Implement CAS S...

Posted by necouchman <gi...@git.apache.org>.
Github user necouchman commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-client/pull/121#discussion_r107400128
  
    --- Diff: extensions/guacamole-auth-cas/pom.xml ---
    @@ -0,0 +1,172 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +      http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +-->
    +<project xmlns="http://maven.apache.org/POM/4.0.0"
    +    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    +    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
    +                        http://maven.apache.org/maven-v4_0_0.xsd">
    +
    +    <modelVersion>4.0.0</modelVersion>
    +    <groupId>org.apache.guacamole</groupId>
    +    <artifactId>guacamole-auth-cas</artifactId>
    +    <packaging>jar</packaging>
    +    <version>0.9.11-incubating</version>
    +    <name>guacamole-auth-cas</name>
    +    <url>http://guacamole.incubator.apache.org/</url>
    +
    +    <properties>
    +        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    +    </properties>
    +
    +    <build>
    +        <plugins>
    +
    +            <!-- Written for 1.6 -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-compiler-plugin</artifactId>
    +                <version>3.3</version>
    +                <configuration>
    +                    <source>1.6</source>
    +                    <target>1.6</target>
    +                    <compilerArgs>
    +                        <arg>-Xlint:all</arg>
    +                        <arg>-Werror</arg>
    +                    </compilerArgs>
    +                    <fork>true</fork>
    +                </configuration>
    +            </plugin>
    +
    +            <!-- Copy dependencies prior to packaging -->
    +            <plugin>
    +                <groupId>org.apache.maven.plugins</groupId>
    +                <artifactId>maven-dependency-plugin</artifactId>
    +                <version>2.10</version>
    +                <executions>
    +                    <execution>
    +                        <id>unpack-dependencies</id>
    +                        <phase>prepare-package</phase>
    +                        <goals>
    +                            <goal>unpack-dependencies</goal>
    +                        </goals>
    +                        <configuration>
    +                            <includeScope>runtime</includeScope>
    +                            <outputDirectory>${project.build.directory}/classes</outputDirectory>
    +                        </configuration>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Assembly plugin - for easy distribution -->
    +            <plugin>
    +                <artifactId>maven-assembly-plugin</artifactId>
    +                <version>2.5.3</version>
    +                <configuration>
    +                    <finalName>${project.artifactId}-${project.version}</finalName>
    +                    <appendAssemblyId>false</appendAssemblyId>
    +                    <descriptors>
    +                        <descriptor>src/main/assembly/dist.xml</descriptor>
    +                    </descriptors>
    +                </configuration>
    +                <executions>
    +                    <execution>
    +                        <id>make-dist-archive</id>
    +                        <phase>package</phase>
    +                        <goals>
    +                            <goal>single</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +            </plugin>
    +
    +            <!-- Verify format using Apache RAT -->
    +            <plugin>
    +                <groupId>org.apache.rat</groupId>
    +                <artifactId>apache-rat-plugin</artifactId>
    +                <version>0.12</version>
    +
    +                <configuration>
    +                    <excludes>
    +                        <exclude>**/*.json</exclude>
    +                        <exclude>src/licenses/**/*</exclude>
    +                    </excludes>
    +                </configuration>
    +
    +                <!-- Bind RAT to validate phase -->
    +                <executions>
    +                    <execution>
    +                        <id>validate</id>
    +                        <phase>validate</phase>
    +                        <goals>
    +                            <goal>check</goal>
    +                        </goals>
    +                    </execution>
    +                </executions>
    +
    +            </plugin>
    +
    +        </plugins>
    +    </build>
    +
    +    <dependencies>
    +
    +        <!-- Guacamole Java API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-common</artifactId>
    +            <version>0.9.10-incubating</version>
    +            <scope>provided</scope>
    +        </dependency>
    +
    +        <!-- Guacamole Extension API -->
    +        <dependency>
    +            <groupId>org.apache.guacamole</groupId>
    +            <artifactId>guacamole-ext</artifactId>
    +            <version>0.9.11-incubating</version>
    +            <scope>provided</scope>
    +        </dependency>
    +        <dependency>
    +          <groupId>org.jasig.cas.client</groupId>
    --- End diff --
    
    Should be fixed.


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