You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by mike-jumper <gi...@git.apache.org> on 2017/01/05 18:37:57 UTC

[GitHub] incubator-guacamole-client pull request #102: GUACAMOLE-36: Add support for ...

GitHub user mike-jumper opened a pull request:

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

    GUACAMOLE-36: Add support for tracking password history

    This change adds optional tracking and past passwords (hashes+salts only), and adds policy options which prevent password reuse.

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

    $ git pull https://github.com/mike-jumper/incubator-guacamole-client password-history

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

    https://github.com/apache/incubator-guacamole-client/pull/102.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 #102
    
----
commit 3c718f27bffb3f28f83b3f632b7b7288c9a13302
Author: Michael Jumper <mj...@apache.org>
Date:   2016-08-22T22:43:52Z

    GUACAMOLE-36: Define historical password records. Use password records for password age comparisons.

commit e51de6a27f34570fb7ec8b438a06cf57a4be9505
Author: Michael Jumper <mj...@apache.org>
Date:   2016-08-23T00:24:38Z

    GUACAMOLE-36: Define and map historical password record table.

commit 008adeb8b68f15d8a86a6d3801ba3a5014f46b5e
Author: Michael Jumper <mj...@apache.org>
Date:   2016-08-23T05:06:44Z

    GUACAMOLE-36: Record and maintain password history.

commit e685a1027b939ab2aa040388a29c8ee949c1f0ea
Author: Michael Jumper <mj...@apache.org>
Date:   2016-08-23T06:11:48Z

    GUACAMOLE-36: Verify new passwords against history.

----


---
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 #102: GUACAMOLE-36: Add support for ...

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/102#discussion_r94853959
  
    --- Diff: extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java ---
    @@ -189,10 +189,10 @@
         private String password = null;
     
         /**
    -     * The time and date that this user's password was previously set (prior to
    -     * being queried). If the user is new, this will be null.
    +     * The data associated with this user's password at the time this user was
    +     * queried. If the user is new, this will be null.
          */
    -    private Timestamp previousPasswordDate = null;
    --- End diff --
    
    What about simply `getPasswordRecord()`?


---
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 #102: GUACAMOLE-36: Add support for ...

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/102#discussion_r94825282
  
    --- Diff: extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicy.java ---
    @@ -73,6 +73,20 @@
         int getMaximumAge() throws GuacamoleException;
     
         /**
    +     * Returns the number of previous passwords remembered for each user. If
    +     * greater than zero, users will be prohibited from reusing their past
    +     * passwords.
    --- End diff --
    
    They'll be prohibited from reusing passwords in this history, right? This is a little vague and sounds like turning on this property ensures that a password can never be reused.


---
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 #102: GUACAMOLE-36: Add support for ...

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/102#discussion_r94853758
  
    --- Diff: extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java ---
    @@ -189,10 +189,10 @@
         private String password = null;
     
         /**
    -     * The time and date that this user's password was previously set (prior to
    -     * being queried). If the user is new, this will be null.
    +     * The data associated with this user's password at the time this user was
    +     * queried. If the user is new, this will be null.
          */
    -    private Timestamp previousPasswordDate = null;
    --- End diff --
    
    Ok


---
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 #102: GUACAMOLE-36: Add support for ...

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

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


---
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 #102: GUACAMOLE-36: Add support for ...

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/102#discussion_r94853383
  
    --- Diff: extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml ---
    @@ -0,0 +1,82 @@
    +<?xml version="1.0" encoding="UTF-8" ?>
    +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
    +    "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
    +
    +<!--
    +    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.
    +-->
    +
    +<mapper namespace="org.apache.guacamole.auth.jdbc.user.PasswordRecordMapper" >
    +
    +    <!-- Result mapper for system permissions -->
    --- End diff --
    
    Oops.


---
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 #102: GUACAMOLE-36: Add support for ...

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/102#discussion_r94826842
  
    --- Diff: extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java ---
    @@ -189,10 +189,10 @@
         private String password = null;
     
         /**
    -     * The time and date that this user's password was previously set (prior to
    -     * being queried). If the user is new, this will be null.
    +     * The data associated with this user's password at the time this user was
    +     * queried. If the user is new, this will be null.
          */
    -    private Timestamp previousPasswordDate = null;
    --- End diff --
    
    So... we're no longer using the "previousPasswordDate" column? Can it be 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 #102: GUACAMOLE-36: Add support for ...

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/102#discussion_r94851326
  
    --- Diff: extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/security/PasswordPolicy.java ---
    @@ -73,6 +73,20 @@
         int getMaximumAge() throws GuacamoleException;
     
         /**
    +     * Returns the number of previous passwords remembered for each user. If
    +     * greater than zero, users will be prohibited from reusing their past
    +     * passwords.
    --- End diff --
    
    Yes, that's correct. I'll try to improve the wording.


---
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 #102: GUACAMOLE-36: Add support for ...

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/102#discussion_r94854369
  
    --- Diff: extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java ---
    @@ -189,10 +189,10 @@
         private String password = null;
     
         /**
    -     * The time and date that this user's password was previously set (prior to
    -     * being queried). If the user is new, this will be null.
    +     * The data associated with this user's password at the time this user was
    +     * queried. If the user is new, this will be null.
          */
    -    private Timestamp previousPasswordDate = null;
    --- End diff --
    
    Yeah, that part is a bit confusing as well. It took me a little bit to figure out what was going on. getPasswordRecord might be better, 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 #102: GUACAMOLE-36: Add support for ...

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/102#discussion_r94853826
  
    --- Diff: extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java ---
    @@ -189,10 +189,10 @@
         private String password = null;
     
         /**
    -     * The time and date that this user's password was previously set (prior to
    -     * being queried). If the user is new, this will be null.
    +     * The data associated with this user's password at the time this user was
    +     * queried. If the user is new, this will be null.
          */
    -    private Timestamp previousPasswordDate = null;
    --- End diff --
    
    Perhaps the `getPreviousPassword()` naming is overly confusing? It only makes sense when the password has been reset via `setPassword()` on the user ovject, since it continues to refer to the historical data of the password that was set at the time the model was retrieved.
    
    I'm open to 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 #102: GUACAMOLE-36: Add support for ...

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/102#discussion_r94827225
  
    --- Diff: extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/user/PasswordRecordMapper.xml ---
    @@ -0,0 +1,82 @@
    +<?xml version="1.0" encoding="UTF-8" ?>
    +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
    +    "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
    +
    +<!--
    +    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.
    +-->
    +
    +<mapper namespace="org.apache.guacamole.auth.jdbc.user.PasswordRecordMapper" >
    +
    +    <!-- Result mapper for system permissions -->
    --- End diff --
    
    System permissions?


---
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 #102: GUACAMOLE-36: Add support for ...

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/102#discussion_r94853327
  
    --- Diff: extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java ---
    @@ -189,10 +189,10 @@
         private String password = null;
     
         /**
    -     * The time and date that this user's password was previously set (prior to
    -     * being queried). If the user is new, this will be null.
    +     * The data associated with this user's password at the time this user was
    +     * queried. If the user is new, this will be null.
          */
    -    private Timestamp previousPasswordDate = null;
    --- End diff --
    
    There is no `previousPasswordDate` column. The mechanism for retrieving the historical data related to the current password (or "previous" password, at the time the password is being set) is simply different now. Rather than separating things out by column, the same password record object is used, that way internal representation is consistent and updating the history can be a simple insert.


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