From c2680931f1a10a69df18a5d2bbd5719bf6ab5a0a Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 18 Feb 2016 10:42:11 -0500 Subject: [PATCH] LP#1468422 Release notes example avoid re-migrate Update the batch password migrate example code in the release notes to avoid attempts at migrating already migrated passwords. Signed-off-by: Bill Erickson Signed-off-by: Dan Wells --- .../password-storage.lp1468422.adoc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/RELEASE_NOTES_NEXT/Administration/password-storage.lp1468422.adoc b/docs/RELEASE_NOTES_NEXT/Administration/password-storage.lp1468422.adoc index 02e6c0a84e..bb6206c47d 100644 --- a/docs/RELEASE_NOTES_NEXT/Administration/password-storage.lp1468422.adoc +++ b/docs/RELEASE_NOTES_NEXT/Administration/password-storage.lp1468422.adoc @@ -16,14 +16,21 @@ password migration for a given user via a database function: [source,sql] ------------------------------------------------------------ -evergreen=# SELECT actor.migrate_passwd(); +-- actor.migrate_passwd() will only migrate un-migrated +-- accounts, but it's faster to avoid any re-migration attempts. +SELECT actor.migrate_passwd(au.id) +FROM actor.usr au + LEFT JOIN actor.passwd pw ON (pw.usr = au.id) +WHERE pw.usr IS NULL; ------------------------------------------------------------ Using this, admins could perform manual batch updates to force all users to use the new, more secure passwords, regardless of when or -whether a patron logs back into the system. Beware that doing this -for all users in the a large database will take a long time and -should proably be performed in batches. +whether a patron logs back into the system. + +Beware that doing this for all users in the a large database will +take some time and should proably be performed in batches. (On +Bill's test VM it took 14 seconds to migrate 233 users). open-ils.auth_internal ++++++++++++++++++++++ -- 2.43.2