blob: 51e6b90871d3ea4b905d6c9d8d04cb6473897b9f [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
Instrumental9ec28952018-07-12 11:14:10 -050052// OSAAF Root
53INSERT INTO user_role(user,role,expires,ns,rname)
Instrumental32cdd552018-07-19 13:29:32 -050054 VALUES ('aaf@aaf.osaaf.org','org.admin','2018-10-31','org','admin');
Instrumental9ec28952018-07-12 11:14:10 -050055
56INSERT INTO user_role(user,role,expires,ns,rname)
Instrumental32cdd552018-07-19 13:29:32 -050057 VALUES ('aaf@aaf.osaaf.org','org.osaaf.aaf.admin','2018-10-31','org.osaaf.aaf','admin');
Instrumental9ec28952018-07-12 11:14:10 -050058
59
Instrumental22441bf2018-04-30 14:11:34 -050060// ONAP Specific Entities
61// ONAP initial env Namespace
62INSERT INTO ns (name,description,parent,scope,type)
63 VALUES('org.onap','ONAP','org',2,2);
64
65INSERT INTO ns (name,description,parent,scope,type)
66 VALUES('org.onap.portal','ONAP Portal','org.onap.portal',3,3);
67
68INSERT INTO perm(ns, type, instance, action, roles, description)
69 VALUES ('org.onap.portal','access','*','read',{
70 'org.onap.portal.owner','org.onap.portal.designer','org.onap.portal.tester','org.onap.portal.ops','org.onap.portal.governor'
71 },'Portal Read Access');
72
73INSERT INTO role(ns, name, perms, description)
74 VALUES('org.onap.portal','owner',{'org.onap.portal.access|*|read'},'Portal Owner');
75
76INSERT INTO perm(ns, type, instance, action, roles, description)
77 VALUES ('org.onap.portal','access','*','*',{'org.onap.portal.admin'},'Portal Write Access');
78
79INSERT INTO role(ns, name, perms, description)
80 VALUES('org.onap.portal','admin',{'org.onap.portal.access|*|*'},'Portal Admins');
81
Instrumental32cdd552018-07-19 13:29:32 -050082// AAF Admin
83insert into cred (id,type,expires,cred,notes,ns,other) values('aaf_admin@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344);
84INSERT INTO user_role(user,role,expires,ns,rname)
85 VALUES ('aaf_admin@people.osaaf.org','org.osaaf.aaf.admin','2018-10-31','org.osaaf.aaf','admin');
86
87// A Deployer
88insert into cred (id,type,expires,cred,notes,ns,other) values('deployer@people.osaaf.org',2,'2019-05-01',0xd993c5617486296f1b99d04de31633332b8ba1a550038e23860f9dbf0b2fcf95,'Initial ID','org.osaaf.people',53344);
89INSERT INTO role(ns, name, perms, description)
90 VALUES('org.osaaf.aaf','deploy',{},'ONAP Deployment Role');
91INSERT INTO user_role(user,role,expires,ns,rname)
92 VALUES ('deployer@people.osaaf.org','org.osaaf.aaf.deploy','2018-10-31','org.osaaf.aaf','deploy');
93
94
Instrumental22441bf2018-04-30 14:11:34 -050095// DEMO ID (OPS)
96insert 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);
97INSERT INTO user_role(user,role,expires,ns,rname)
98 VALUES ('demo@people.osaaf.org','org.onap.portal.admin','2018-10-31','org.onap.portal','admin');
99
100// ADMIN
101insert 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);
102INSERT INTO user_role(user,role,expires,ns,rname)
103 VALUES ('jh0003@people.osaaf.org','org.onap.portal.admin','2018-10-31','org.onap.portal','admin');
104
105// DESIGNER
106INSERT 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);
107INSERT INTO role(ns, name, perms, description)
108 VALUES('org.onap.portal','designer',{'org.onap.portal.access|*|read'},'Portal Designer');
109INSERT INTO user_role(user,role,expires,ns,rname)
110 VALUES ('cs0008@people.osaaf.org','org.onap.portal.designer','2018-10-31','org.onap.portal','designer');
111
112// TESTER
113INSERT 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);
114INSERT INTO role(ns, name, perms, description)
115 VALUES('org.onap.portal','tester',{'org.onap.portal.access|*|read'},'Portal Tester');
116INSERT INTO user_role(user,role,expires,ns,rname)
117 VALUES ('jm0007@people.osaaf.org','org.onap.portal.tester','2018-10-31','org.onap.portal','tester');
118
119// OPS
120INSERT 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);
121INSERT INTO role(ns, name, perms, description)
122 VALUES('org.onap.portal','ops',{'org.onap.portal.access|*|read'},'Portal Operations');
123INSERT INTO user_role(user,role,expires,ns,rname)
124 VALUES ('op0001@people.osaaf.org','org.onap.portal.ops','2018-10-31','org.onap.portal','ops');
125
126// GOVERNOR
127INSERT 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);
128INSERT INTO role(ns, name, perms, description)
129 VALUES('org.onap.portal','governor',{'org.onap.portal.access|*|read'},'Portal Governor');
130INSERT INTO user_role(user,role,expires,ns,rname)
131 VALUES ('gv0001@people.osaaf.org','org.onap.portal.governor','2018-10-31','org.onap.portal','governor');
132