blob: e7385ab69dad9ff1929518cba9ac9a88af60eb34 [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
19// Create Root pass
20INSERT INTO cred (id,ns,type,cred,expires)
21 VALUES ('initial@osaaf.org','org.osaaf',1,0x008c5926ca861023c1d2a36653fd88e2,'2099-12-31') using TTL 14400;
22
23INSERT INTO user_role(user,role,expires,ns,rname)
24 VALUES ('initial@osaaf.org','org.admin','2099-12-31','org','admin') using TTL 14400;
25
26
27// Create org.osaaf
28INSERT INTO ns (name,description,parent,scope,type)
29 VALUES('org.osaaf','OSAAF Namespace','org',2,2);
30
31INSERT INTO role(ns, name, perms,description)
32 VALUES('org.osaaf','admin',{'org.osaaf.access|*|*'},'OSAAF Admins');
33
34INSERT INTO perm(ns, type, instance, action, roles,description)
35 VALUES ('org.osaaf','access','*','*',{'org.osaaf.admin'},'OSAAF Write Access');
36
37INSERT INTO role(ns, name, perms,description)
38 VALUES('org.osaaf','owner',{'org.osaaf.access|*|read,approve'},'OSAAF Owners');
39
40INSERT INTO perm(ns, type, instance, action, roles,description)
41 VALUES ('org.osaaf','access','*','read,appove',{'org.osaaf.owner'},'OSAAF Read Access');
42
43// Create org.osaaf.aaf
44INSERT INTO ns (name,description,parent,scope,type)
45 VALUES('org.osaaf.aaf','Application Authorization Framework','org.osaaf',3,3);
46
47INSERT INTO role(ns, name, perms, description)
48 VALUES('org.osaaf.aaf','admin',{'org.osaaf.aaf.access|*|*'},'AAF Admins');
49
50INSERT INTO perm(ns, type, instance, action, roles, description)
51 VALUES ('org.osaaf.aaf','access','*','*',{'org.osaaf.aaf.admin'},'AAF Write Access');
52
53INSERT INTO perm(ns, type, instance, action, roles, description)
54 VALUES ('org.osaaf.aaf','access','*','read,approve',{'org.osaaf.aaf.owner'},'AAF Read Access');
55
56INSERT INTO role(ns, name, perms, description)
57 VALUES('org.osaaf.aaf','owner',{'org.osaaf.aaf.access|*|read,approve'},'AAF Owners');
58
59INSERT INTO user_role(user,role,expires,ns,rname)
60 VALUES ('initial@osaaf.org','org.osaaf.aaf.admin','2099-12-31','org.osaaf.aaf','admin') using TTL 14400;
61
Instrumental22441bf2018-04-30 14:11:34 -050062
63// ONAP Specific Entities
64// ONAP initial env Namespace
65INSERT INTO ns (name,description,parent,scope,type)
66 VALUES('org.onap','ONAP','org',2,2);
67
68INSERT INTO ns (name,description,parent,scope,type)
69 VALUES('org.onap.portal','ONAP Portal','org.onap.portal',3,3);
70
71INSERT INTO perm(ns, type, instance, action, roles, description)
72 VALUES ('org.onap.portal','access','*','read',{
73 'org.onap.portal.owner','org.onap.portal.designer','org.onap.portal.tester','org.onap.portal.ops','org.onap.portal.governor'
74 },'Portal Read Access');
75
76INSERT INTO role(ns, name, perms, description)
77 VALUES('org.onap.portal','owner',{'org.onap.portal.access|*|read'},'Portal Owner');
78
79INSERT INTO perm(ns, type, instance, action, roles, description)
80 VALUES ('org.onap.portal','access','*','*',{'org.onap.portal.admin'},'Portal Write Access');
81
82INSERT INTO role(ns, name, perms, description)
83 VALUES('org.onap.portal','admin',{'org.onap.portal.access|*|*'},'Portal Admins');
84
85// DEMO ID (OPS)
86insert 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);
87INSERT INTO user_role(user,role,expires,ns,rname)
88 VALUES ('demo@people.osaaf.org','org.onap.portal.admin','2018-10-31','org.onap.portal','admin');
89
90// ADMIN
91insert 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);
92INSERT INTO user_role(user,role,expires,ns,rname)
93 VALUES ('jh0003@people.osaaf.org','org.onap.portal.admin','2018-10-31','org.onap.portal','admin');
94
95// DESIGNER
96INSERT 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);
97INSERT INTO role(ns, name, perms, description)
98 VALUES('org.onap.portal','designer',{'org.onap.portal.access|*|read'},'Portal Designer');
99INSERT INTO user_role(user,role,expires,ns,rname)
100 VALUES ('cs0008@people.osaaf.org','org.onap.portal.designer','2018-10-31','org.onap.portal','designer');
101
102// TESTER
103INSERT 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);
104INSERT INTO role(ns, name, perms, description)
105 VALUES('org.onap.portal','tester',{'org.onap.portal.access|*|read'},'Portal Tester');
106INSERT INTO user_role(user,role,expires,ns,rname)
107 VALUES ('jm0007@people.osaaf.org','org.onap.portal.tester','2018-10-31','org.onap.portal','tester');
108
109// OPS
110INSERT 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);
111INSERT INTO role(ns, name, perms, description)
112 VALUES('org.onap.portal','ops',{'org.onap.portal.access|*|read'},'Portal Operations');
113INSERT INTO user_role(user,role,expires,ns,rname)
114 VALUES ('op0001@people.osaaf.org','org.onap.portal.ops','2018-10-31','org.onap.portal','ops');
115
116// GOVERNOR
117INSERT 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);
118INSERT INTO role(ns, name, perms, description)
119 VALUES('org.onap.portal','governor',{'org.onap.portal.access|*|read'},'Portal Governor');
120INSERT INTO user_role(user,role,expires,ns,rname)
121 VALUES ('gv0001@people.osaaf.org','org.onap.portal.governor','2018-10-31','org.onap.portal','governor');
122