vaibhav_16dec | 59a7e3c | 2018-01-17 12:42:39 +0000 | [diff] [blame] | 1 | USE authz; |
| 2 | |
| 3 | // Create Root pass |
| 4 | INSERT INTO cred (id,ns,type,cred,expires) |
| 5 | VALUES ('dgl@openecomp.org','org.openecomp',1,0xab3831f27b39d7a039f9a92aa2bbfe51,'2020-12-31'); |
| 6 | |
| 7 | INSERT INTO cred (id,ns,type,cred,expires) |
| 8 | VALUES ('m99751@dmaapBC.openecomp.org','org.openecomp.dmaapBC',1,0xab3831f27b39d7a039f9a92aa2bbfe51,'2020-12-31'); |
| 9 | |
| 10 | INSERT INTO cred (id,ns,type,cred,expires) |
| 11 | VALUES ('m99501@dmaapBC.openecomp.org','org.openecomp.dmaapBC',1,0xab3831f27b39d7a039f9a92aa2bbfe51,'2020-12-31'); |
| 12 | |
| 13 | |
| 14 | // Create 'com' root NS |
| 15 | INSERT INTO ns (name,scope,description,parent,type) |
| 16 | VALUES('com',1,'Root Namespace',null,1); |
| 17 | |
| 18 | INSERT INTO role(ns, name, perms, description) |
| 19 | VALUES('com','admin',{'com.access|*|*'},'Com Admins'); |
| 20 | |
| 21 | INSERT INTO role(ns, name, perms, description) |
| 22 | VALUES('com','owner',{'com.access|*|read'},'Com Owners'); |
| 23 | |
| 24 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 25 | VALUES ('com','access','*','read',{'com.owner'},'Com Read Access'); |
| 26 | |
| 27 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 28 | VALUES ('com','access','*','*',{'com.admin'},'Com Write Access'); |
| 29 | |
| 30 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 31 | VALUES ('dgl@openecomp.org','com.owner','2020-12-31','com','owner'); |
| 32 | |
| 33 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 34 | VALUES ('dgl@openecomp.org','com.admin','2020-12-31','com','admin'); |
| 35 | |
| 36 | // Create org root NS |
| 37 | INSERT INTO ns (name,scope,description,parent,type) |
| 38 | VALUES('org',1,'Root Namespace Org',null,1); |
| 39 | |
| 40 | INSERT INTO ns (name,scope,description,parent,type) |
| 41 | VALUES('org.openecomp.dcae',3,'DCAE Namespace Org','org.openecomp',3); |
| 42 | |
| 43 | INSERT INTO ns (name,scope,description,parent,type) |
| 44 | VALUES('org.openecomp.dmaapBC',3,'DMaaP BC Namespace Org','org.openecomp',3); |
| 45 | |
| 46 | INSERT INTO role(ns, name, perms, description) |
| 47 | VALUES('org','admin',{'org.access|*|*'},'Com Admins'); |
| 48 | |
| 49 | INSERT INTO role(ns, name, perms, description) |
| 50 | VALUES('org','owner',{'org.access|*|read'},'Com Owners'); |
| 51 | |
| 52 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 53 | VALUES ('org','access','*','read',{'org.owner'},'Com Read Access'); |
| 54 | |
| 55 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 56 | VALUES ('org','access','*','*',{'org.admin'},'Com Write Access'); |
| 57 | |
| 58 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 59 | VALUES ('dgl@openecomp.org','org.owner','2020-12-31','org','owner'); |
| 60 | |
| 61 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 62 | VALUES ('dgl@openecomp.org','org.admin','2020-12-31','org','admin'); |
| 63 | |
| 64 | |
| 65 | // Create com.att |
| 66 | |
| 67 | INSERT INTO ns (name,scope,description,parent,type) |
| 68 | VALUES('com.att',2,'AT&T Namespace','com',2); |
| 69 | |
| 70 | INSERT INTO role(ns, name, perms,description) |
| 71 | VALUES('com.att','admin',{'com.att.access|*|*'},'AT&T Admins'); |
| 72 | |
| 73 | INSERT INTO role(ns, name, perms,description) |
| 74 | VALUES('com.att','owner',{'com.att.access|*|read'},'AT&T Owners'); |
| 75 | |
| 76 | INSERT INTO perm(ns, type, instance, action, roles,description) |
| 77 | VALUES ('com.att','access','*','read',{'com.att.owner'},'AT&T Read Access'); |
| 78 | |
| 79 | INSERT INTO perm(ns, type, instance, action, roles,description) |
| 80 | VALUES ('com.att','access','*','*',{'com.att.admin'},'AT&T Write Access'); |
| 81 | |
| 82 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 83 | VALUES ('dgl@openecomp.org','com.att.owner','2020-12-31','com.att','owner'); |
| 84 | |
| 85 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 86 | VALUES ('dgl@openecomp.org','com.att.admin','2020-12-31','com.att','admin'); |
| 87 | |
| 88 | // Create com.att.aaf |
| 89 | |
| 90 | INSERT INTO ns (name,scope,description,parent,type) |
| 91 | VALUES('com.att.aaf',3,'Application Authorization Framework','com.att',3); |
| 92 | |
| 93 | INSERT INTO role(ns, name, perms, description) |
| 94 | VALUES('com.att.aaf','admin',{'com.att.aaf.access|*|*'},'AAF Admins'); |
| 95 | |
| 96 | INSERT INTO role(ns, name, perms, description) |
| 97 | VALUES('com.att.aaf','owner',{'com.att.aaf.access|*|read'},'AAF Owners'); |
| 98 | |
| 99 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 100 | VALUES ('com.att.aaf','access','*','read',{'com.att.aaf.owner'},'AAF Read Access'); |
| 101 | |
| 102 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 103 | VALUES ('com.att.aaf','access','*','*',{'com.att.aaf.admin'},'AAF Write Access'); |
| 104 | |
| 105 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 106 | VALUES ('dgl@openecomp.org','com.att.aaf.admin','2020-12-31','com.att.aaf','admin'); |
| 107 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 108 | VALUES ('dgl@openecomp.org','com.att.aaf.owner','2020-12-31','com.att.aaf','owner'); |
| 109 | |
| 110 | |
| 111 | // Create org.openecomp |
| 112 | INSERT INTO ns (name,scope,description,parent,type) |
| 113 | VALUES('org.openecomp',2,'Open EComp NS','com.att',2); |
| 114 | |
| 115 | INSERT INTO role(ns, name, perms, description) |
| 116 | VALUES('org.openecomp','admin',{'org.openecomp.access|*|*'},'OpenEcomp Admins'); |
| 117 | |
| 118 | INSERT INTO role(ns, name, perms, description) |
| 119 | VALUES('org.openecomp','owner',{'org.openecomp.access|*|read'},'OpenEcomp Owners'); |
| 120 | |
| 121 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 122 | VALUES ('org.openecomp','access','*','read',{'org.openecomp.owner'},'OpenEcomp Read Access'); |
| 123 | |
| 124 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 125 | VALUES ('org.openecomp','access','*','*',{'org.openecomp.admin'},'OpenEcomp Write Access'); |
| 126 | |
| 127 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 128 | VALUES ('dgl@openecomp.org','org.openecomp.admin','2020-12-31','org.openecomp','admin'); |
| 129 | |
| 130 | // Create org.openecomp.dmaapBC |
| 131 | |
| 132 | INSERT INTO ns (name,scope,description,parent,type) |
| 133 | VALUES('org.openecomp.dmaapBC',3,'Application Authorization Framework','org.openecomp',3); |
| 134 | |
| 135 | //INSERT INTO role(ns, name, perms, description) |
| 136 | // VALUES('org.openecomp.dmaapBC','admin',{'org.openecomp.dmaapBC.access|*|*'},'AAF Admins'); |
| 137 | |
| 138 | INSERT INTO role(ns, name, perms, description) |
| 139 | VALUES('org.openecomp.dmaapBC','admin',{'org.openecomp.dmaapBC.access|*|*','org.openecomp.dmaapBC.topicFactory|:org.openecomp.dmaapBC.topic:org.openecomp.dmaapBC|create','org.openecomp.dmaapBC.mr.topic|:topic.org.openecomp.dmaapBC.newtopic|sub','org.openecomp.dmaapBC.mr.topic|:topic.org.openecomp.dmaapBC.newtopic|pub'},'AAF Admins'); |
| 140 | |
| 141 | //INSERT INTO role(ns, name, perms, description) |
| 142 | //VALUES('org.openecomp.dmaapBC','admin',{'org.openecomp.dmaapBC.access|*|*','org.openecomp.dmaapBC.mr.topic|:topic.org.openecomp.dmaapBC.newtopic|sub'},'AAF Admins'); |
| 143 | |
| 144 | //INSERT INTO role(ns, name, perms, description) |
| 145 | //VALUES('org.openecomp.dmaapBC','admin',{'org.openecomp.dmaapBC.access|*|*','org.openecomp.dmaapBC.mr.topic|:topic.org.openecomp.dmaapBC.newtopic|pub'},'AAF Admins'); |
| 146 | |
| 147 | |
| 148 | |
| 149 | INSERT INTO role(ns, name, perms, description) |
| 150 | VALUES('org.openecomp.dmaapBC','owner',{'org.openecomp.dmaapBC.access|*|read'},'AAF Owners'); |
| 151 | |
| 152 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 153 | VALUES ('org.openecomp.dmaapBC','access','*','read',{'org.openecomp.dmaapBC.owner'},'AAF Read Access'); |
| 154 | |
| 155 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 156 | VALUES ('org.openecomp.dmaapBC','access','*','*',{'org.openecomp.dmaapBC.admin'},'AAF Write Access'); |
| 157 | |
| 158 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 159 | VALUES ('dgl@openecomp.org','org.openecomp.dmaapBC.admin','2020-12-31','org.openecomp.dmaapBC','admin'); |
| 160 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 161 | VALUES ('dgl@openecomp.org','org.openecomp.dmaapBC.owner','2020-12-31','org.openecomp.dmaapBC','owner'); |
| 162 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 163 | VALUES ('m99751@dmaapBC.openecomp.org','org.openecomp.dmaapBC.admin','2020-12-31','org.openecomp.dmaapBC','admin'); |
| 164 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 165 | VALUES ('m99751@dmaapBC.openecomp.org','org.openecomp.dmaapBC.owner','2020-12-31','org.openecomp.dmaapBC','owner'); |
| 166 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 167 | VALUES ('m99501@dmaapBC.openecomp.org','org.openecomp.dmaapBC.admin','2020-12-31','org.openecomp.dmaapBC','admin'); |
| 168 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 169 | VALUES ('m99501@dmaapBC.openecomp.org','org.openecomp.dmaapBC.owner','2020-12-31','org.openecomp.dmaapBC','owner'); |