Skip to content

Commit

Permalink
LP#2068740 Concerto and Enhanced default password
Browse files Browse the repository at this point in the history
This will update both datasets to have a default password of
'demo123' for all accounts. Passing the admin password via
the command line is not affected. Your desired password for
the admin account will be respected as it's set after* the
[enhanced]concerto dataset is installed.

Updated the test suites that assume the old password model.
As a bonus, I re-generated the enhanced concerto set to match
current main.

Release-note: Changes all Concerto test data passwords to demo123.

Signed-off-by: Blake Graham Henderson <[email protected]>
Signed-off-by: Ruth Davis <[email protected]>
Signed-off-by: Terran McCanna <[email protected]>
  • Loading branch information
bmagic007 authored and tmccanna committed Sep 19, 2024
1 parent 58b6558 commit daf5ad3
Show file tree
Hide file tree
Showing 28 changed files with 1,392 additions and 1,371 deletions.
2 changes: 1 addition & 1 deletion Open-ILS/src/eg2/nightwatch/src/staff/acq/provider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { navigateToEgUrl } from '../../utils';

module.exports = {
before: (browser: NightwatchBrowser) => {
browser.page.login().loginToWebClient(browser, 'br1breid', 'barbarar1234');
browser.page.login().loginToWebClient(browser, 'br1breid', 'demo123');
},

after: (browser: NightwatchBrowser) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {NightwatchBrowser} from 'nightwatch';
module.exports = {
before: (browser: NightwatchBrowser) => {
// log in as circ admin
browser.page.login().loginToWebClient(browser, 'br3kwright', 'kayw1234');
browser.page.login().loginToWebClient(browser, 'br3kwright', 'demo123');
browser.navigateTo('eg2/en-US/staff/admin/booking/resource')
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {randomString} from '../../../utils';

module.exports = {
before: (browser: NightwatchBrowser) => {
browser.page.login().loginToWebClient(browser, 'br1csmith', 'cathys1234');
browser.page.login().loginToWebClient(browser, 'br1csmith', 'demo123');
},

after: (browser: NightwatchBrowser) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const courseData = [
module.exports = {
before: (browser: NightwatchBrowser) => {
// log in as circ admin
browser.page.login().loginToWebClient(browser, 'br3kwright', 'kayw1234');
browser.page.login().loginToWebClient(browser, 'br3kwright', 'demo123');
browser.navigateTo('eg2/en-US/staff/admin/local/asset/course_list')

// Change the grid to show more rows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {NightwatchBrowser} from 'nightwatch';

module.exports = {
before: (browser: NightwatchBrowser) => {
browser.page.login().loginToWebClient(browser, 'br1mneal', 'melvinn1234'); // circulation admin
browser.page.login().loginToWebClient(browser, 'br1mneal', 'demo123'); // circulation admin
},

after: (browser: NightwatchBrowser) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {navigateToEgUrl, scrollToTopOfPage} from '../../utils'

module.exports = {
before: (browser: NightwatchBrowser) => {
browser.page.login().loginToWebClient(browser, 'bm1cmartinez', 'carolynm1234');
browser.page.login().loginToWebClient(browser, 'bm1cmartinez', 'demo123');
},

after: (browser: NightwatchBrowser) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ my @authtoken = ();
# Login as staff at BR1
$authtoken[0] = $script->authenticate({
username => 'br1vcampbell',
password => 'vincentc1234',
password => 'demo123',
type => 'staff'
});

Expand All @@ -39,15 +39,15 @@ $script->logout($authtoken[0]);
# Login as staff at BR1 using workstation.
$authtoken[0] = $script->authenticate({
username => 'br1vcampbell',
password => 'vincentc1234',
password => 'demo123',
type => 'staff',
workstation => BR1_WORKSTATION
});

# Login as staff at BR3
$authtoken[1] = $script->authenticate({
username => 'br3sforbes',
password => 'samuelf1234',
password => 'demo123',
type => 'staff'
});

Expand All @@ -62,7 +62,7 @@ $script->logout($authtoken[1]);
# Login as staff at BR3 using workstation.
$authtoken[1] = $script->authenticate({
username => 'br3sforbes',
password => 'samuelf1234',
password => 'demo123',
type => 'staff',
workstation => BR3_WORKSTATION
});
Expand Down
2 changes: 1 addition & 1 deletion Open-ILS/src/perlmods/live_t/20-lp1541559-ebook-api.t
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use constant EBOOK_API_OU => 1;

# Patrons.
use constant EBOOK_API_PATRON_USERNAME => '99999359616';
use constant EBOOK_API_PATRON_PASSWORD => 'andreac1234';
use constant EBOOK_API_PATRON_PASSWORD => 'demo123';
use constant EBOOK_API_PATRON_NOT_FOUND => 'patron-not-found';

my $script = OpenILS::Utils::TestUtils->new();
Expand Down
8 changes: 4 additions & 4 deletions Open-ILS/src/perlmods/live_t/24-lp1710949-login-api.t
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ $resp = $U->simplereq(
'open-ils.auth',
'open-ils.auth.login', {
barcode => '99999381970',
password => 'montyc1234',
password => 'demo123',
type => 'staff'
}
);
Expand All @@ -62,7 +62,7 @@ $resp = $U->simplereq(
'open-ils.auth',
'open-ils.auth.login', {
identifier => 'br1mclark',
password => 'montyc1234',
password => 'demo123',
type => 'staff'
}
);
Expand All @@ -85,7 +85,7 @@ $resp = $U->simplereq(
'open-ils.auth',
'open-ils.auth.login', {
identifier => 'br1mclark',
password => 'montyc1234',
password => 'demo123',
type => 'staff'
}
);
Expand Down Expand Up @@ -149,7 +149,7 @@ my $restored_user = $U->simplereq(
$authtoken,
'99999381970'
);
$restored_user->passwd('montyc1234');
$restored_user->passwd('demo123');
$resp = $U->simplereq(
'open-ils.actor',
'open-ils.actor.patron.update',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ is(
# Login as patron1.
my $patron_auth = $script->authenticate({
username => $patron1->usrname(),
password => 'leona1234',
password => 'demo123',
type => 'opac'
});
ok(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ our $U = "OpenILS::Application::AppUtils";
OpenILS::Utils::TestUtils->new->bootstrap;

my $not_found = { barcode => '99999393000', password => 'nonexistentbarcode' };
my $expired = { barcode => '99999393001', password => 'marges1234' };
my $deleted = { barcode => '99999393002', password => 'homers1234' };
my $barred = { barcode => '99999393003', password => 'barts1234' };
my $valid = { barcode => '99999393004', password => 'lisas1234' };
my $inactive = { barcode => '99999393005', password => 'maggies1234' };
my $external = { barcode => '99999393100', password => 'shelbyvillem1234' };
my $expired = { barcode => '99999393001', password => 'demo123' };
my $deleted = { barcode => '99999393002', password => 'demo123' };
my $barred = { barcode => '99999393003', password => 'demo123' };
my $valid = { barcode => '99999393004', password => 'demo123' };
my $inactive = { barcode => '99999393005', password => 'demo123' };
my $external = { barcode => '99999393100', password => 'demo123' };

# context org is SYS1, test user's home OU is BR1;
# use BR3 (under SYS2) to test external users
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ can_ok( 'OpenILS::WWW::EGCatLoader', 'load_email_record' );

use constant ATEV_ID => '123456789';
use constant PATRON_USERNAME => '99999359616';
use constant PATRON_PASSWORD => 'andreac1234';
use constant PATRON_PASSWORD => 'demo123';

my $script = OpenILS::Utils::TestUtils->new();
$script->bootstrap;
Expand Down
2 changes: 1 addition & 1 deletion Open-ILS/src/perlmods/live_t/36-lp1752334-badcontact.t
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ my %data =(
# We are deliberately NOT using the admin user to check for a perm failure.
my $credentials = {
username => 'br1mtownsend',
password => 'maryt1234',
password => 'demo123',
type => 'staff'
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ diag('LP108016: Pcrud returns a bad error status before complete');
# Login as a staff with limited permissions (just acq permissions in this case)
my $credentials = {
username => 'br1breid',
password => 'barbarar1234',
password => 'demo123',
type => 'staff'
};
my $authtoken = $script->authenticate($credentials);
Expand Down
2 changes: 1 addition & 1 deletion Open-ILS/src/perlmods/live_t/lp1883171-copy-inventory.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use constant {
SYS1_ID => 2,
SYS1_FGROUP => "Sys1 Floating Group",
CIRC_USER => 'br1mtownsend',
CIRC_USER_PWD => 'maryt1234',
CIRC_USER_PWD => 'demo123',
CIRC_WORKSTATION => 'BR1-lp1883171-live_t',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ my $U = 'OpenILS::Application::AppUtils';
use constant {
WORKSTATION => 'LP1923076-Test-Scalar-Return-Type',
USERNAME => 'br1mtownsend',
PASSWORD => 'maryt1234',
PASSWORD => 'demo123',
BR1_ID => 4
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use constant {
# We are deliberately NOT using the admin user to check for a perm failure.
my $credentials = {
username => 'br1mtownsend',
password => 'maryt1234',
password => 'demo123',
type => 'staff'
};

Expand All @@ -45,7 +45,7 @@ ok(

# Login with workstation.
$credentials->{workstation} = WORKSTATION;
$credentials->{password} = 'maryt1234';
$credentials->{password} = 'demo123';
$authtoken = $script->authenticate($credentials);
ok(
$script->authtoken,
Expand Down
4 changes: 2 additions & 2 deletions Open-ILS/src/perlmods/live_t/zz-lp1779467-mark-item-discard.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use constant {
# We are deliberately NOT using the admin user to check for a perm failure.
my $credentials = {
username => 'br1mtownsend',
password => 'maryt1234',
password => 'demo123',
type => 'staff'
};

Expand All @@ -45,7 +45,7 @@ ok(

# Login with workstation.
$credentials->{workstation} = WORKSTATION;
$credentials->{password} = 'maryt1234';
$credentials->{password} = 'demo123';
$authtoken = $script->authenticate($credentials);
ok(
$script->authtoken,
Expand Down
4 changes: 2 additions & 2 deletions Open-ILS/src/sql/Pg/live_t/lp1468422_passwd_storage.pg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SELECT plan(6);

SELECT ok(
(SELECT TRUE AS verify_old_pw FROM actor.usr
WHERE id = (SELECT id FROM actor.usr WHERE usrname = 'br1mclark') AND passwd = MD5('montyc1234')),
WHERE id = (SELECT id FROM actor.usr WHERE usrname = 'br1mclark') AND passwd = MD5('demo123')),
'Legacy password should match'
);

Expand All @@ -35,7 +35,7 @@ SELECT isnt_empty(

SELECT ok(
(SELECT actor.verify_passwd((SELECT id FROM actor.usr WHERE usrname = 'br1mclark'), 'main',
MD5(actor.get_salt((SELECT id FROM actor.usr WHERE usrname = 'br1mclark'), 'main') || MD5('montyc1234')))),
MD5(actor.get_salt((SELECT id FROM actor.usr WHERE usrname = 'br1mclark'), 'main') || MD5('demo123')))),
'verify_passwd should verify migrated password'
);

Expand Down
23 changes: 20 additions & 3 deletions Open-ILS/src/support-scripts/make_concerto_from_evergreen_db.pl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
'config.workstation_setting_type',
'permission.grp_perm_map',
'permission.perm_list',
# all of the passwords are getting set to demo123, no need to compare that table, they are generated upon db restore.
'actor.passwd',
# Waiting for the coded value map in 3.13 to be resolved before we decide what to do for these three tables, skipping them for now.
'config.coded_value_map',
'config.marc_subfield',
'config.record_attr_definition',
);

our @loadOrder = (
Expand Down Expand Up @@ -123,8 +129,20 @@
'comp' => [ 'name', 'label' ]
},
'config.global_flag' => {
'comp' => ['name']
'comp' => [ 'name' ]
},
# Waiting for the coded value map in 3.13 to be resolved before we decide what to do here.
# 'config.coded_value_map' => {
# 'comp' => ['ctype', 'code', 'value'],
# 'load' => ['ctype', 'code', 'value', 'description', 'opac_visible', 'search_label', 'is_simple', 'concept_uri']
# },
# 'config.marc_subfield' => {
# 'comp' => [ 'marc_format', 'marc_record_type', 'tag', 'code' ]
# },
# 'config.record_attr_definition' => {
# 'comp' => [ 'name', 'label' ]
# },

);

our $help = "Usage: ./make_concerto_from_evergreen_db.pl [OPTION]...
Expand Down Expand Up @@ -319,7 +337,7 @@ sub start {
$loadAll .= "SELECT SETVAL('actor.usr_standing_penalty_id_seq', (SELECT MAX(id) FROM actor.usr_standing_penalty));\n\n";
$loadAll .= "SELECT SETVAL('actor.usr_message_id_seq', (SELECT MAX(id) FROM (SELECT MAX(id) \"id\" FROM actor.usr_standing_penalty UNION ALL SELECT MAX(id) \"id\" FROM actor.usr_message) AS a));\n\n";

$loadAll .= "COMMIT;\n";
$loadAll .= "COMMIT;\n\nSELECT actor.change_password(id,'demo123') FROM actor.usr;\n";
$loadAll .= loaderDateCarryForward() . "\n";

print "Writing loader > $outputFolder/load_all.sql\n";
Expand Down Expand Up @@ -572,7 +590,6 @@ BEGIN
PERFORM evergreen.concerto_date_carry_tbl_col('action.survey', 'end_date', datediff);
-- action.survey_response
PERFORM evergreen.concerto_date_carry_tbl_col('action.survey_response', 'answer_date', datediff);
PERFORM evergreen.concerto_date_carry_tbl_col('action.survey_response', 'effective_date', datediff);
-- action.unfulfilled_hold_list
Expand Down
2 changes: 2 additions & 0 deletions Open-ILS/tests/datasets/sql/concerto/load_all.sql
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,5 @@ INSERT INTO biblio.record_entry (marc, last_xact_id)
\i env_destroy.sql

COMMIT;

SELECT actor.change_password(id,'demo123') FROM actor.usr;
12 changes: 6 additions & 6 deletions Open-ILS/tests/datasets/sql/concerto_enhanced/acq.provider.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
COPY acq.provider (id, name, owner, currency_type, code, holding_tag, san, edi_default, active, prepayment_required, url, email, phone, fax_phone, default_copy_count, default_claim_policy, primary_contact) FROM stdin;
1 Ingram 1 USD INGRAM 970 1697978 \N 1 0 \N \N \N \N 0 \N \N
2 Brodart 2 USD BRODART 970 1697684 1 1 0 \N \N \N \N 0 \N \N
3 Baker & Taylor 1 USD BT 970 3349659 \N 1 0 \N \N \N \N 0 \N \N
4 Initech 4 USD IT 970 1001001 2 1 0 \N \N \N \N 0 \N \N
5 Overdrive 105 USD OVERDRIVE \N \N \N 1 0 \N \N \N \N 1 \N \N
COPY acq.provider (id, name, owner, currency_type, code, holding_tag, san, edi_default, active, prepayment_required, url, email, phone, fax_phone, default_copy_count, default_claim_policy, primary_contact, buyer_san) FROM stdin;
1 Ingram 1 USD INGRAM 970 1697978 \N 1 0 \N \N \N \N 0 \N \N \N
2 Brodart 2 USD BRODART 970 1697684 1 1 0 \N \N \N \N 0 \N \N \N
3 Baker & Taylor 1 USD BT 970 3349659 \N 1 0 \N \N \N \N 0 \N \N \N
4 Initech 4 USD IT 970 1001001 2 1 0 \N \N \N \N 0 \N \N \N
5 Overdrive 105 USD OVERDRIVE \N \N \N 1 0 \N \N \N \N 1 \N \N \N
\.

\echo sequence update column: id
Expand Down
Loading

0 comments on commit daf5ad3

Please sign in to comment.