blob: 967d6daf244e3deb830b7d4d50f3bbf160433694 [file] [log] [blame]
sg481nbd890c52017-08-28 12:11:35 -04001//
2// Copyright (c) 2016 AT&T Intellectual Property. All rights reserved.
3//
4USE authz;
5
6// Create Root pass
7INSERT INTO cred (id,ns,type,cred,expires)
8 VALUES ('dgl@openecomp.org','org.openecomp',1,0xab3831f27b39d7a039f9a92aa2bbfe51,'2020-12-31');
9
10// Create 'com' root NS
11INSERT INTO ns (name,scope,description,parent,type)
12 VALUES('com',1,'Root Namespace',null,1);
13
14INSERT INTO role(ns, name, perms, description)
15 VALUES('com','admin',{'com.access|*|*'},'Com Admins');
16
17INSERT INTO role(ns, name, perms, description)
18 VALUES('com','owner',{'com.access|*|read'},'Com Owners');
19
20INSERT INTO perm(ns, type, instance, action, roles, description)
21 VALUES ('com','access','*','read',{'com.owner'},'Com Read Access');
22
23INSERT INTO perm(ns, type, instance, action, roles, description)
24 VALUES ('com','access','*','*',{'com.admin'},'Com Write Access');
25
26INSERT INTO user_role(user,role,expires,ns,rname)
27 VALUES ('dgl@openecomp.org','com.owner','2020-12-31','com','owner');
28
29INSERT INTO user_role(user,role,expires,ns,rname)
30 VALUES ('dgl@openecomp.org','com.admin','2020-12-31','com','admin');
31
32// Create org root NS
33INSERT INTO ns (name,scope,description,parent,type)
34 VALUES('org',1,'Root Namespace Org',null,1);
35
36INSERT INTO role(ns, name, perms, description)
37 VALUES('org','admin',{'org.access|*|*'},'Com Admins');
38
39INSERT INTO role(ns, name, perms, description)
40 VALUES('org','owner',{'org.access|*|read'},'Com Owners');
41
42INSERT INTO perm(ns, type, instance, action, roles, description)
43 VALUES ('org','access','*','read',{'org.owner'},'Com Read Access');
44
45INSERT INTO perm(ns, type, instance, action, roles, description)
46 VALUES ('org','access','*','*',{'org.admin'},'Com Write Access');
47
48INSERT INTO user_role(user,role,expires,ns,rname)
49 VALUES ('dgl@openecomp.org','org.owner','2020-12-31','org','owner');
50
51INSERT INTO user_role(user,role,expires,ns,rname)
52 VALUES ('dgl@openecomp.org','org.admin','2020-12-31','org','admin');
53
54
55// Create com.att
56
57INSERT INTO ns (name,scope,description,parent,type)
58 VALUES('com.att',2,'AT&T Namespace','com',2);
59
60INSERT INTO role(ns, name, perms,description)
61 VALUES('com.att','admin',{'com.att.access|*|*'},'AT&T Admins');
62
63INSERT INTO role(ns, name, perms,description)
64 VALUES('com.att','owner',{'com.att.access|*|read'},'AT&T Owners');
65
66INSERT INTO perm(ns, type, instance, action, roles,description)
67 VALUES ('com.att','access','*','read',{'com.att.owner'},'AT&T Read Access');
68
69INSERT INTO perm(ns, type, instance, action, roles,description)
70 VALUES ('com.att','access','*','*',{'com.att.admin'},'AT&T Write Access');
71
72INSERT INTO user_role(user,role,expires,ns,rname)
73 VALUES ('dgl@openecomp.org','com.att.owner','2020-12-31','com.att','owner');
74
75INSERT INTO user_role(user,role,expires,ns,rname)
76 VALUES ('dgl@openecomp.org','com.att.admin','2020-12-31','com.att','admin');
77
78// Create com.att.aaf
79
80INSERT INTO ns (name,scope,description,parent,type)
81 VALUES('com.att.aaf',3,'Application Authorization Framework','com.att',3);
82
83INSERT INTO role(ns, name, perms, description)
84 VALUES('com.att.aaf','admin',{'com.att.aaf.access|*|*'},'AAF Admins');
85
86INSERT INTO role(ns, name, perms, description)
87 VALUES('com.att.aaf','owner',{'com.att.aaf.access|*|read'},'AAF Owners');
88
89INSERT INTO perm(ns, type, instance, action, roles, description)
90 VALUES ('com.att.aaf','access','*','read',{'com.att.aaf.owner'},'AAF Read Access');
91
92INSERT INTO perm(ns, type, instance, action, roles, description)
93 VALUES ('com.att.aaf','access','*','*',{'com.att.aaf.admin'},'AAF Write Access');
94
95INSERT INTO user_role(user,role,expires,ns,rname)
96 VALUES ('dgl@openecomp.org','com.att.aaf.admin','2020-12-31','com.att.aaf','admin');
97INSERT INTO user_role(user,role,expires,ns,rname)
98 VALUES ('dgl@openecomp.org','com.att.aaf.owner','2020-12-31','com.att.aaf','owner');
99
100
101// Create org.openecomp
102INSERT INTO ns (name,scope,description,parent,type)
103 VALUES('org.openecomp',2,'Open EComp NS','com.att',2);
104
105INSERT INTO role(ns, name, perms, description)
106 VALUES('org.openecomp','admin',{'org.openecomp.access|*|*'},'OpenEcomp Admins');
107
108INSERT INTO role(ns, name, perms, description)
109 VALUES('org.openecomp','owner',{'org.openecomp.access|*|read'},'OpenEcomp Owners');
110
111INSERT INTO perm(ns, type, instance, action, roles, description)
112 VALUES ('org.openecomp','access','*','read',{'org.openecomp.owner'},'OpenEcomp Read Access');
113
114INSERT INTO perm(ns, type, instance, action, roles, description)
115 VALUES ('org.openecomp','access','*','*',{'org.openecomp.admin'},'OpenEcomp Write Access');
116
117INSERT INTO user_role(user,role,expires,ns,rname)
118 VALUES ('dgl@openecomp.org','org.openecomp.admin','2020-12-31','org.openecomp','admin');