For the migration of the admin pwd, the logic is as follows:
1. If the admin has a bcrypt password already, use this
2. If not, perform auth via md5, then clear the md5 column
and write a salted bcrypt hash instead.
For dropping the ssl client cert, we simply not store anymore
the client certificate in the DB. As a result, you cannot
download the certs (pem, p12) after creation anymore, so
we immediately download the two certs in a zip file after
creation.
A cost of 13 takes 500ms on an i7-5500U CPU @ 2.40GHz, which
seems to be a reasonable value.
Change-Id: I1ce21321c58d8c57d7ddce1541995f64821b0053
$zip->write("Use the PEM file for programmatical clients like java, perl, php or curl, and the P12 file for browsers like Firefox or Chrome. The password for the P12 import is 'sipwise'. Handle this file with care, as it cannot be downloaded for a second time! Only a new certificate can be generated if the certificate is lost.\n");
@ -449,7 +454,7 @@ sub create_defaults :Path('create_defaults') :Args(0) :Does(ACL) :ACLDetachTo('/
# start_date => $now,
#},
admins=>{
md5pass=>'defaultresellerpassword',
saltedpass=>$saltedpass,
is_active=>1,
show_passwords=>1,
call_data=>1,
@ -517,7 +522,7 @@ sub create_defaults :Path('create_defaults') :Args(0) :Does(ACL) :ACLDetachTo('/
};
NGCP::Panel::Utils::Message::info(
c=>$c,
desc=>$c->loc('Reseller successfully created with login <b>[_1]</b> and password <b>[_2]</b>, please review your settings below',$defaults{admins}->{login},$defaults{admins}->{md5pass}),
desc=>$c->loc('Reseller successfully created with login <b>[_1]</b> and password <b>[_2]</b>, please review your settings below',$defaults{admins}->{login},$default_pass),
html=>'<div class="ngcp-form-desc">X.509 Client Certificate for API Clients (perl, php etc.)</div>',
do_wrapper=>0,
do_label=>0,
);
has_field'p12'=>(
type=>'Compound',
label=>'Download in PKCS12 Format',
do_label=>1,
do_wrapper=>1,
wrapper_class=>[qw(row)],
);
has_field'p12.download'=>(
type=>'Submit',
value=>'Download PKCS12',
element_class=>[qw(btn btn-primary)],
do_wrapper=>0,
do_label=>0,
);
has_field'p12.description'=>(
type=>'Display',
html=>'<div class="ngcp-form-desc">X.509 Client Certificate for Browsers (Firefox, Chrome etc.). The <strong>password</strong> for the browser import is <strong>sipwise</strong>.</div>',