1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
\prompt 'domain name: ' domain
\prompt 'bind to socket: ' bind
\qecho 'by default, parsav tracks rights on its own. you can override this later by replacing the rights table with a view, but you''ll then need to set appropriate rules on the view to allow administrators to modify rights from the web UI, or set the rights-readonly flag in the config table to true. for now, enter the name of an actor who will be granted full rights when she logs in.'
\prompt 'admin actor: ' admin
\qecho 'you will need to create an authentication view mapping your user database to something parsav can understand; see auth.sql for an example. enter the name of the view to use.'
\prompt 'auth view: ' auth
begin;
drop table if exists parsav_config;
create table if not exists parsav_config (
key text primary key,
value text
);
insert into parsav_config (key,value) values
('bind',:'bind'),
('domain',:'domain'),
('auth-source',:'auth'),
('administrator',:'admin'),
('server-secret', encode(
digest(int8send((2^63 * (random()*2 - 1))::bigint),
'sha512'), 'base64'));
-- note that valid ids should always > 0, as 0 is reserved for null
-- on the client side, vastly simplifying code
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
\prompt 'domain name: ' domain
\prompt 'instance name: ' inst
\prompt 'bind to socket: ' bind
\qecho 'by default, parsav tracks rights on its own. you can override this later by replacing the rights table with a view, but you''ll then need to set appropriate rules on the view to allow administrators to modify rights from the web UI, or set the rights-readonly flag in the config table to true. for now, enter the name of an actor who will be granted full rights when she logs in.'
\prompt 'admin actor: ' admin
\qecho 'you will need to create an authentication view named parsav_auth mapping your user database to something parsav can understand; see auth.sql for an example.'
begin;
drop table if exists parsav_config;
create table if not exists parsav_config (
key text primary key,
value text
);
insert into parsav_config (key,value) values
('bind',:'bind'),
('domain',:'domain'),
('instance-name',:'inst'),
('administrator',:'admin'),
('server-secret', encode(
digest(int8send((2^63 * (random()*2 - 1))::bigint),
'sha512'), 'base64'));
-- note that valid ids should always > 0, as 0 is reserved for null
-- on the client side, vastly simplifying code
|