blob: 40e79f10b6289a6aa0e87c9a97be5a64b8bdc1d4 [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)
54 VALUES ('osaaf@aaf.osaaf.org','org.admin','2018-10-31','org','admin') using TTL 14400;
55
56INSERT INTO user_role(user,role,expires,ns,rname)
57 VALUES ('osaaf@aaf.osaaf.org','org.osaaf.aaf.admin','2018-10-31','org.osaaf.aaf','admin') using TTL 14400;
58
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
82// DEMO ID (OPS)
83insert 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);
84INSERT INTO user_role(user,role,expires,ns,rname)
85 VALUES ('demo@people.osaaf.org','org.onap.portal.admin','2018-10-31','org.onap.portal','admin');
86
87// ADMIN
88insert 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);
89INSERT INTO user_role(user,role,expires,ns,rname)
90 VALUES ('jh0003@people.osaaf.org','org.onap.portal.admin','2018-10-31','org.onap.portal','admin');
91
92// DESIGNER
93INSERT 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);
94INSERT INTO role(ns, name, perms, description)
95 VALUES('org.onap.portal','designer',{'org.onap.portal.access|*|read'},'Portal Designer');
96INSERT INTO user_role(user,role,expires,ns,rname)
97 VALUES ('cs0008@people.osaaf.org','org.onap.portal.designer','2018-10-31','org.onap.portal','designer');
98
99// TESTER
100INSERT 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);
101INSERT INTO role(ns, name, perms, description)
102 VALUES('org.onap.portal','tester',{'org.onap.portal.access|*|read'},'Portal Tester');
103INSERT INTO user_role(user,role,expires,ns,rname)
104 VALUES ('jm0007@people.osaaf.org','org.onap.portal.tester','2018-10-31','org.onap.portal','tester');
105
106// OPS
107INSERT 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);
108INSERT INTO role(ns, name, perms, description)
109 VALUES('org.onap.portal','ops',{'org.onap.portal.access|*|read'},'Portal Operations');
110INSERT INTO user_role(user,role,expires,ns,rname)
111 VALUES ('op0001@people.osaaf.org','org.onap.portal.ops','2018-10-31','org.onap.portal','ops');
112
113// GOVERNOR
114INSERT 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);
115INSERT INTO role(ns, name, perms, description)
116 VALUES('org.onap.portal','governor',{'org.onap.portal.access|*|read'},'Portal Governor');
117INSERT INTO user_role(user,role,expires,ns,rname)
118 VALUES ('gv0001@people.osaaf.org','org.onap.portal.governor','2018-10-31','org.onap.portal','governor');
119