blob: 67107cb04a7eef89b1c6ec1f8f83a1609a798a16 [file] [log] [blame]
Instrumental71037c32018-03-26 13:51:48 -07001USE authz;
2
3// Create 'org' root NS
4INSERT INTO ns (name,description,parent,scope,type)
5 VALUES('org','Root Namespace','.',1,1);
6
7INSERT INTO role(ns, name, perms, description)
8 VALUES('org','admin',{'org.access|*|*'},'Org Admins');
9
10INSERT INTO role(ns, name, perms, description)
11 VALUES('org','owner',{'org.access|*|read,approve'},'Org Owners');
12
13INSERT INTO perm(ns, type, instance, action, roles, description)
14 VALUES ('org','access','*','read,approve',{'org.owner'},'Org Read Access');
15
16INSERT INTO perm(ns, type, instance, action, roles, description)
17 VALUES ('org','access','*','*',{'org.admin'},'Org Write Access');
18
Instrumental71037c32018-03-26 13:51:48 -070019
20// Create org.osaaf
21INSERT INTO ns (name,description,parent,scope,type)
22 VALUES('org.osaaf','OSAAF Namespace','org',2,2);
23
24INSERT INTO role(ns, name, perms,description)
25 VALUES('org.osaaf','admin',{'org.osaaf.access|*|*'},'OSAAF Admins');
26
27INSERT INTO perm(ns, type, instance, action, roles,description)
28 VALUES ('org.osaaf','access','*','*',{'org.osaaf.admin'},'OSAAF Write Access');
29
30INSERT INTO role(ns, name, perms,description)
31 VALUES('org.osaaf','owner',{'org.osaaf.access|*|read,approve'},'OSAAF Owners');
32
33INSERT INTO perm(ns, type, instance, action, roles,description)
34 VALUES ('org.osaaf','access','*','read,appove',{'org.osaaf.owner'},'OSAAF Read Access');
35
36// Create org.osaaf.aaf
37INSERT INTO ns (name,description,parent,scope,type)
38 VALUES('org.osaaf.aaf','Application Authorization Framework','org.osaaf',3,3);
39
40INSERT INTO role(ns, name, perms, description)
41 VALUES('org.osaaf.aaf','admin',{'org.osaaf.aaf.access|*|*'},'AAF Admins');
42
43INSERT INTO perm(ns, type, instance, action, roles, description)
44 VALUES ('org.osaaf.aaf','access','*','*',{'org.osaaf.aaf.admin'},'AAF Write Access');
45
46INSERT INTO perm(ns, type, instance, action, roles, description)
47 VALUES ('org.osaaf.aaf','access','*','read,approve',{'org.osaaf.aaf.owner'},'AAF Read Access');
48
49INSERT INTO role(ns, name, perms, description)
50 VALUES('org.osaaf.aaf','owner',{'org.osaaf.aaf.access|*|read,approve'},'AAF Owners');
51
Instrumental22441bf2018-04-30 14:11:34 -050052// ONAP Specific Entities
53// ONAP initial env Namespace
54INSERT INTO ns (name,description,parent,scope,type)
55 VALUES('org.onap','ONAP','org',2,2);
56
57INSERT INTO ns (name,description,parent,scope,type)
58 VALUES('org.onap.portal','ONAP Portal','org.onap.portal',3,3);
59
60INSERT INTO perm(ns, type, instance, action, roles, description)
61 VALUES ('org.onap.portal','access','*','read',{
62 'org.onap.portal.owner','org.onap.portal.designer','org.onap.portal.tester','org.onap.portal.ops','org.onap.portal.governor'
63 },'Portal Read Access');
64
65INSERT INTO role(ns, name, perms, description)
66 VALUES('org.onap.portal','owner',{'org.onap.portal.access|*|read'},'Portal Owner');
67
68INSERT INTO perm(ns, type, instance, action, roles, description)
69 VALUES ('org.onap.portal','access','*','*',{'org.onap.portal.admin'},'Portal Write Access');
70
71INSERT INTO role(ns, name, perms, description)
72 VALUES('org.onap.portal','admin',{'org.onap.portal.access|*|*'},'Portal Admins');
73
74// DEMO ID (OPS)
75insert into cred (id,type,expires,cred,notes,ns,other) values('demo@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344);
76INSERT INTO user_role(user,role,expires,ns,rname)
77 VALUES ('demo@people.osaaf.org','org.onap.portal.admin','2018-10-31','org.onap.portal','admin');
78
79// ADMIN
80insert into cred (id,type,expires,cred,notes,ns,other) values('jh0003@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344);
81INSERT INTO user_role(user,role,expires,ns,rname)
82 VALUES ('jh0003@people.osaaf.org','org.onap.portal.admin','2018-10-31','org.onap.portal','admin');
83
84// DESIGNER
85INSERT INTO cred (id,type,expires,cred,notes,ns,other) values('cs0008@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344);
86INSERT INTO role(ns, name, perms, description)
87 VALUES('org.onap.portal','designer',{'org.onap.portal.access|*|read'},'Portal Designer');
88INSERT INTO user_role(user,role,expires,ns,rname)
89 VALUES ('cs0008@people.osaaf.org','org.onap.portal.designer','2018-10-31','org.onap.portal','designer');
90
91// TESTER
92INSERT INTO cred (id,type,expires,cred,notes,ns,other) values('jm0007@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344);
93INSERT INTO role(ns, name, perms, description)
94 VALUES('org.onap.portal','tester',{'org.onap.portal.access|*|read'},'Portal Tester');
95INSERT INTO user_role(user,role,expires,ns,rname)
96 VALUES ('jm0007@people.osaaf.org','org.onap.portal.tester','2018-10-31','org.onap.portal','tester');
97
98// OPS
99INSERT INTO cred (id,type,expires,cred,notes,ns,other) values('op0001@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344);
100INSERT INTO role(ns, name, perms, description)
101 VALUES('org.onap.portal','ops',{'org.onap.portal.access|*|read'},'Portal Operations');
102INSERT INTO user_role(user,role,expires,ns,rname)
103 VALUES ('op0001@people.osaaf.org','org.onap.portal.ops','2018-10-31','org.onap.portal','ops');
104
105// GOVERNOR
106INSERT INTO cred (id,type,expires,cred,notes,ns,other) values('gv0001@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344);
107INSERT INTO role(ns, name, perms, description)
108 VALUES('org.onap.portal','governor',{'org.onap.portal.access|*|read'},'Portal Governor');
109INSERT INTO user_role(user,role,expires,ns,rname)
110 VALUES ('gv0001@people.osaaf.org','org.onap.portal.governor','2018-10-31','org.onap.portal','governor');
111