Details

    Description

      MariaDB should have support for expiring user passwords manually
      via the PASSWORD EXPIRE option for the CREATE USER
      and ALTER USER statements. We should also implement global and
      per-account policies for automatic password expiration.

      Given MySQL 5.7 already has this feature, we should preserve
      compatibility in terms of both API and datadir migration.

      We should support the following use cases:

          CREATE USER user@localhost PASSWORD EXPIRE [option];
      

          ALTER USER user@localhost PASSWORD EXPIRE [option];
      

      • If no option is specified, the password should be expired with immediate effect.
      • If option is DEFAULT, the password is expired every N days since last changed,
        where N is set in a system var such as default_password_lifetime.
      • If option is NEVER, the password is never expired for user@localhost.
      • Option can also be INTERVAL N DAY, this way the password is expired
        every N days.

      The effect of an expired password should be controlled via a new system var
      such as disconnect_on_expired_password. When this var is true, new client
      connections for the expired account should be refused with the error code ER_MUST_CHANGE_PASSWORD_LOGIN.
      If false, new client connections are restricted to use only statements for changing
      the password (e.g. ALTER USER, SET PASSWORD). The execution of any other
      statement should return ER_MUST_CHANGE_PASSWORD.

      Clients should be able to specify whether they can handle a disconnect with an
      option for the mysql binary such as --connect-expired-password or by passing
      the MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS flag to mysql_options() for the C
      library.

      Implementation details:

      • The password expiration state of an account should be kept in the JSON Priv column of
        mysql.global_priv. The User_table_json class will be enriched with accessors
        for reading/writing from/to this JSON field.

            MariaDB [(none)]> select user, host, Priv from mysql.global_priv where user='user';
            +-------+-----------+-------------------------------------------------------------------------------------------------------+
            | user  | host      | Priv                                                                                                  |
            +-------+-----------+-------------------------------------------------------------------------------------------------------+
            | user  | localhost | {..., "password_expired":true, "password_last_changed":"2019-02-20, 00:00:00", "password_lifetime":5} |
            +-------+-----------+-------------------------------------------------------------------------------------------------------+
            1 row in set (0.001 sec)
        

      • To preserve the drop-in replacement property for MySQL 5.7 datadirs, we have to add
        similar accessors with the ones above to the User_table_tabular class which
        will read/write from/to the password expiration columns in the mysql.user table.

      References:
      http://dev.mysql.com/doc/refman/5.6/en/password-expiration-sandbox-mode.html

      Attachments

        Issue Links

          Activity

            ratzpo Rasmus Johansson (Inactive) created issue -
            ratzpo Rasmus Johansson (Inactive) made changes -
            Field Original Value New Value
            ratzpo Rasmus Johansson (Inactive) made changes -
            Assignee Sergei Golubchik [ serg ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Description There is a request for adding password expiration functionality to MariaDB. In an earlier discussion it was mentioned that this should be done either in a special authentication plugin or in the server itself.
            There is a request for adding password expiration functionality to MariaDB. In an earlier discussion it was mentioned that this should be done either in a special authentication plugin or in the server itself.

            Check MySQL 5.6's corresponding functionality: http://dev.mysql.com/doc/refman/5.6/en/password-expiration-sandbox-mode.html
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Fix Version/s 10.1 [ 16100 ]
            Fix Version/s 10.1.4 [ 18400 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Workflow MariaDB v2 [ 59704 ] MariaDB v3 [ 64369 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.1 [ 16100 ]
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Fix Version/s 10.2 [ 14601 ]
            alvinr Alvin Richards (Inactive) made changes -
            Fix Version/s 10.3 [ 22126 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.3 [ 22126 ]
            Labels pf5 pf5 security
            serg Sergei Golubchik made changes -
            julien.fritsch Julien Fritsch made changes -
            Epic Link PT-73 [ 68549 ]
            serg Sergei Golubchik made changes -
            Comment [ A comment with security level 'Developers' was removed. ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Rank Ranked higher
            diego dupin Diego Dupin made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Robert Bindar [ robertbindar ]
            robertbindar Robert Bindar made changes -
            Description There is a request for adding password expiration functionality to MariaDB. In an earlier discussion it was mentioned that this should be done either in a special authentication plugin or in the server itself.

            Check MySQL 5.6's corresponding functionality: http://dev.mysql.com/doc/refman/5.6/en/password-expiration-sandbox-mode.html
            MariaDB should have support for expiring user passwords manually
            via the _PASSWORD EXPIRE_ option for the _CREATE USER_
            and _ALTER USER_ statements. We should also implement global and
            per-account policies for automatic password expiration.

            Given MySQL 5.7 already has this feature, we should preserve
            compatibility in terms of both API and datadir migration.

            We should support the following use cases:

            {noformat}
                CREATE USER user@localhost PASSWORD EXPIRE [option];
            {noformat}

            {noformat}
                ALTER USER user@localhost PASSWORD EXPIRE [option];
            {noformat}

            *If no option is specified, the password should be expired with immediate effect.
            *If option is _DEFAULT_, the password is expired every *N* days since last changed,
             where *N* is set in a system var such as *default_password_lifetime*.
            *If option is _NEVER_, the password is never expired for user@localhost.
            *Option can also be _INTERVAL_ *N* _DAY_, this way the password is expired
             every *N* days.

            The effect of an expired password should be controlled via a new system var
            such as *disconnect_on_expired_password*. When this var is true, new client
            connections for the expired account should be refused with the error code
            _ER_MUST_CHANGE_PASSWORD_LOGIN_.
            If false, new client connections are restricted to use only statements for changing
            the password (e.g. _ALTER USER_, _SET PASSWORD_). The execution of any other
            statement should return _ER_MUST_CHANGE_PASSWORD_.

            Clients should be able to specify whether they can handle a disconnect with an
            option for the mysql binary such as *--connect-expired-password* or by passing
            the *MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS* flag to _mysql_options()_ for the _C_
            library.
            robertbindar Robert Bindar made changes -
            Description MariaDB should have support for expiring user passwords manually
            via the _PASSWORD EXPIRE_ option for the _CREATE USER_
            and _ALTER USER_ statements. We should also implement global and
            per-account policies for automatic password expiration.

            Given MySQL 5.7 already has this feature, we should preserve
            compatibility in terms of both API and datadir migration.

            We should support the following use cases:

            {noformat}
                CREATE USER user@localhost PASSWORD EXPIRE [option];
            {noformat}

            {noformat}
                ALTER USER user@localhost PASSWORD EXPIRE [option];
            {noformat}

            *If no option is specified, the password should be expired with immediate effect.
            *If option is _DEFAULT_, the password is expired every *N* days since last changed,
             where *N* is set in a system var such as *default_password_lifetime*.
            *If option is _NEVER_, the password is never expired for user@localhost.
            *Option can also be _INTERVAL_ *N* _DAY_, this way the password is expired
             every *N* days.

            The effect of an expired password should be controlled via a new system var
            such as *disconnect_on_expired_password*. When this var is true, new client
            connections for the expired account should be refused with the error code
            _ER_MUST_CHANGE_PASSWORD_LOGIN_.
            If false, new client connections are restricted to use only statements for changing
            the password (e.g. _ALTER USER_, _SET PASSWORD_). The execution of any other
            statement should return _ER_MUST_CHANGE_PASSWORD_.

            Clients should be able to specify whether they can handle a disconnect with an
            option for the mysql binary such as *--connect-expired-password* or by passing
            the *MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS* flag to _mysql_options()_ for the _C_
            library.
            MariaDB should have support for expiring user passwords manually
            via the _PASSWORD EXPIRE_ option for the _CREATE USER_
            and _ALTER USER_ statements. We should also implement global and
            per-account policies for automatic password expiration.

            Given MySQL 5.7 already has this feature, we should preserve
            compatibility in terms of both API and datadir migration.

            We should support the following use cases:

            {noformat}
                CREATE USER user@localhost PASSWORD EXPIRE [option];
            {noformat}

            {noformat}
                ALTER USER user@localhost PASSWORD EXPIRE [option];
            {noformat}

            * If no option is specified, the password should be expired with immediate effect.
            * If option is _DEFAULT_, the password is expired every *N* days since last changed,
             where *N* is set in a system var such as *default_password_lifetime*.
            * If option is _NEVER_, the password is never expired for user@localhost.
            * Option can also be _INTERVAL_ *N* _DAY_, this way the password is expired
             every *N* days.

            The effect of an expired password should be controlled via a new system var
            such as *disconnect_on_expired_password*. When this var is true, new client
            connections for the expired account should be refused with the error code
            _ER_MUST_CHANGE_PASSWORD_LOGIN_.
            If false, new client connections are restricted to use only statements for changing
            the password (e.g. _ALTER USER_, _SET PASSWORD_). The execution of any other
            statement should return _ER_MUST_CHANGE_PASSWORD_.

            Clients should be able to specify whether they can handle a disconnect with an
            option for the mysql binary such as *--connect-expired-password* or by passing
            the *MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS* flag to _mysql_options()_ for the _C_
            library.

            Implementation details:
            * The password expiration state of an account should be kept in the JSON Priv column of
              mysql.global_priv. The User_table_json class will be enriched with accessors
              for reading/writing from/to this JSON field.
            {noformat}
                MariaDB [(none)]> select user, host, Priv from mysql.global_priv where user='user';
                +-------+-----------+-------------------------------------------------------------------------------------------------------+
                | user | host | Priv |
                +-------+-----------+-------------------------------------------------------------------------------------------------------+
                | user | localhost | {..., "password_expired":true, "password_last_changed":"2019-02-20, 00:00:00", "password_lifetime":5} |
                +-------+-----------+-------------------------------------------------------------------------------------------------------+
                1 row in set (0.001 sec)
            {noformat}

            * To preserve the drop-in replacement for MySQL 5.7 datadirs, we have to add
            similar accessors with the ones above to the User_table_tabular class which
            will read/write from/to the password expiration columns in the mysql.user table.


            References:
            http://dev.mysql.com/doc/refman/5.6/en/password-expiration-sandbox-mode.html
            robertbindar Robert Bindar made changes -
            Description MariaDB should have support for expiring user passwords manually
            via the _PASSWORD EXPIRE_ option for the _CREATE USER_
            and _ALTER USER_ statements. We should also implement global and
            per-account policies for automatic password expiration.

            Given MySQL 5.7 already has this feature, we should preserve
            compatibility in terms of both API and datadir migration.

            We should support the following use cases:

            {noformat}
                CREATE USER user@localhost PASSWORD EXPIRE [option];
            {noformat}

            {noformat}
                ALTER USER user@localhost PASSWORD EXPIRE [option];
            {noformat}

            * If no option is specified, the password should be expired with immediate effect.
            * If option is _DEFAULT_, the password is expired every *N* days since last changed,
             where *N* is set in a system var such as *default_password_lifetime*.
            * If option is _NEVER_, the password is never expired for user@localhost.
            * Option can also be _INTERVAL_ *N* _DAY_, this way the password is expired
             every *N* days.

            The effect of an expired password should be controlled via a new system var
            such as *disconnect_on_expired_password*. When this var is true, new client
            connections for the expired account should be refused with the error code
            _ER_MUST_CHANGE_PASSWORD_LOGIN_.
            If false, new client connections are restricted to use only statements for changing
            the password (e.g. _ALTER USER_, _SET PASSWORD_). The execution of any other
            statement should return _ER_MUST_CHANGE_PASSWORD_.

            Clients should be able to specify whether they can handle a disconnect with an
            option for the mysql binary such as *--connect-expired-password* or by passing
            the *MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS* flag to _mysql_options()_ for the _C_
            library.

            Implementation details:
            * The password expiration state of an account should be kept in the JSON Priv column of
              mysql.global_priv. The User_table_json class will be enriched with accessors
              for reading/writing from/to this JSON field.
            {noformat}
                MariaDB [(none)]> select user, host, Priv from mysql.global_priv where user='user';
                +-------+-----------+-------------------------------------------------------------------------------------------------------+
                | user | host | Priv |
                +-------+-----------+-------------------------------------------------------------------------------------------------------+
                | user | localhost | {..., "password_expired":true, "password_last_changed":"2019-02-20, 00:00:00", "password_lifetime":5} |
                +-------+-----------+-------------------------------------------------------------------------------------------------------+
                1 row in set (0.001 sec)
            {noformat}

            * To preserve the drop-in replacement for MySQL 5.7 datadirs, we have to add
            similar accessors with the ones above to the User_table_tabular class which
            will read/write from/to the password expiration columns in the mysql.user table.


            References:
            http://dev.mysql.com/doc/refman/5.6/en/password-expiration-sandbox-mode.html
            MariaDB should have support for expiring user passwords manually
            via the _PASSWORD EXPIRE_ option for the _CREATE USER_
            and _ALTER USER_ statements. We should also implement global and
            per-account policies for automatic password expiration.

            Given MySQL 5.7 already has this feature, we should preserve
            compatibility in terms of both API and datadir migration.

            We should support the following use cases:

            {noformat}
                CREATE USER user@localhost PASSWORD EXPIRE [option];
            {noformat}

            {noformat}
                ALTER USER user@localhost PASSWORD EXPIRE [option];
            {noformat}

            * If no option is specified, the password should be expired with immediate effect.
            * If option is _DEFAULT_, the password is expired every *N* days since last changed,
             where *N* is set in a system var such as *default_password_lifetime*.
            * If option is _NEVER_, the password is never expired for user@localhost.
            * Option can also be _INTERVAL_ *N* _DAY_, this way the password is expired
             every *N* days.

            The effect of an expired password should be controlled via a new system var
            such as *disconnect_on_expired_password*. When this var is true, new client
            connections for the expired account should be refused with the error code _ER_MUST_CHANGE_PASSWORD_LOGIN_.
            If false, new client connections are restricted to use only statements for changing
            the password (e.g. _ALTER USER_, _SET PASSWORD_). The execution of any other
            statement should return _ER_MUST_CHANGE_PASSWORD_.

            Clients should be able to specify whether they can handle a disconnect with an
            option for the mysql binary such as *--connect-expired-password* or by passing
            the *MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS* flag to _mysql_options()_ for the _C_
            library.

            Implementation details:
            * The password expiration state of an account should be kept in the JSON Priv column of
              mysql.global_priv. The User_table_json class will be enriched with accessors
              for reading/writing from/to this JSON field.
            {noformat}
                MariaDB [(none)]> select user, host, Priv from mysql.global_priv where user='user';
                +-------+-----------+-------------------------------------------------------------------------------------------------------+
                | user | host | Priv |
                +-------+-----------+-------------------------------------------------------------------------------------------------------+
                | user | localhost | {..., "password_expired":true, "password_last_changed":"2019-02-20, 00:00:00", "password_lifetime":5} |
                +-------+-----------+-------------------------------------------------------------------------------------------------------+
                1 row in set (0.001 sec)
            {noformat}

            * To preserve the drop-in replacement property for MySQL 5.7 datadirs, we have to add
            similar accessors with the ones above to the User_table_tabular class which
            will read/write from/to the password expiration columns in the mysql.user table.

            References:
            http://dev.mysql.com/doc/refman/5.6/en/password-expiration-sandbox-mode.html
            robertbindar Robert Bindar made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            robertbindar Robert Bindar made changes -
            Assignee Robert Bindar [ robertbindar ] Sergei Golubchik [ serg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Robert Bindar [ robertbindar ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            Lawrin Lawrin Novitsky made changes -
            diego dupin Diego Dupin made changes -
            serg Sergei Golubchik made changes -
            Assignee Robert Bindar [ robertbindar ] Sergei Golubchik [ serg ]
            serg Sergei Golubchik made changes -
            Component/s Authentication and Privilege System [ 13101 ]
            Component/s Plugins [ 10118 ]
            Fix Version/s 10.4.3 [ 23230 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Robert Bindar [ robertbindar ]
            greenman Ian Gilfillan made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            Richard Richard Stracke made changes -
            greenman Ian Gilfillan made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 64369 ] MariaDB v4 [ 132519 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 132255

            People

              robertbindar Robert Bindar
              ratzpo Rasmus Johansson (Inactive)
              Votes:
              15 Vote for this issue
              Watchers:
              22 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.