Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 1 | USE authz; |
| 2 | |
| 3 | // Create 'org' root NS |
| 4 | INSERT INTO ns (name,description,parent,scope,type) |
| 5 | VALUES('org','Root Namespace','.',1,1); |
| 6 | |
| 7 | INSERT INTO role(ns, name, perms, description) |
| 8 | VALUES('org','admin',{'org.access|*|*'},'Org Admins'); |
| 9 | |
| 10 | INSERT INTO role(ns, name, perms, description) |
| 11 | VALUES('org','owner',{'org.access|*|read,approve'},'Org Owners'); |
| 12 | |
| 13 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 14 | VALUES ('org','access','*','read,approve',{'org.owner'},'Org Read Access'); |
| 15 | |
| 16 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 17 | VALUES ('org','access','*','*',{'org.admin'},'Org Write Access'); |
| 18 | |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 19 | |
| 20 | // Create org.osaaf |
| 21 | INSERT INTO ns (name,description,parent,scope,type) |
| 22 | VALUES('org.osaaf','OSAAF Namespace','org',2,2); |
| 23 | |
| 24 | INSERT INTO role(ns, name, perms,description) |
| 25 | VALUES('org.osaaf','admin',{'org.osaaf.access|*|*'},'OSAAF Admins'); |
| 26 | |
| 27 | INSERT INTO perm(ns, type, instance, action, roles,description) |
| 28 | VALUES ('org.osaaf','access','*','*',{'org.osaaf.admin'},'OSAAF Write Access'); |
| 29 | |
| 30 | INSERT INTO role(ns, name, perms,description) |
| 31 | VALUES('org.osaaf','owner',{'org.osaaf.access|*|read,approve'},'OSAAF Owners'); |
| 32 | |
| 33 | INSERT 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 |
| 37 | INSERT INTO ns (name,description,parent,scope,type) |
| 38 | VALUES('org.osaaf.aaf','Application Authorization Framework','org.osaaf',3,3); |
| 39 | |
| 40 | INSERT INTO role(ns, name, perms, description) |
| 41 | VALUES('org.osaaf.aaf','admin',{'org.osaaf.aaf.access|*|*'},'AAF Admins'); |
| 42 | |
| 43 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 44 | VALUES ('org.osaaf.aaf','access','*','*',{'org.osaaf.aaf.admin'},'AAF Write Access'); |
| 45 | |
| 46 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 47 | VALUES ('org.osaaf.aaf','access','*','read,approve',{'org.osaaf.aaf.owner'},'AAF Read Access'); |
| 48 | |
| 49 | INSERT INTO role(ns, name, perms, description) |
| 50 | VALUES('org.osaaf.aaf','owner',{'org.osaaf.aaf.access|*|read,approve'},'AAF Owners'); |
| 51 | |
Instrumental | 22441bf | 2018-04-30 14:11:34 -0500 | [diff] [blame] | 52 | // ONAP Specific Entities |
| 53 | // ONAP initial env Namespace |
| 54 | INSERT INTO ns (name,description,parent,scope,type) |
| 55 | VALUES('org.onap','ONAP','org',2,2); |
| 56 | |
| 57 | INSERT INTO ns (name,description,parent,scope,type) |
| 58 | VALUES('org.onap.portal','ONAP Portal','org.onap.portal',3,3); |
| 59 | |
| 60 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 61 | VALUES ('org.onap.portal','access','*','read',{ |
| 62 | 'org.onap.portal.owner','org.onap.portal.designer','org.onap.portal.tester','org.onap.portal.ops','org.onap.portal.governor' |
| 63 | },'Portal Read Access'); |
| 64 | |
| 65 | INSERT INTO role(ns, name, perms, description) |
| 66 | VALUES('org.onap.portal','owner',{'org.onap.portal.access|*|read'},'Portal Owner'); |
| 67 | |
| 68 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 69 | VALUES ('org.onap.portal','access','*','*',{'org.onap.portal.admin'},'Portal Write Access'); |
| 70 | |
| 71 | INSERT INTO role(ns, name, perms, description) |
| 72 | VALUES('org.onap.portal','admin',{'org.onap.portal.access|*|*'},'Portal Admins'); |
| 73 | |
| 74 | // DEMO ID (OPS) |
| 75 | insert 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); |
| 76 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 77 | VALUES ('demo@people.osaaf.org','org.onap.portal.admin','2018-10-31','org.onap.portal','admin'); |
| 78 | |
| 79 | // ADMIN |
| 80 | insert 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); |
| 81 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 82 | VALUES ('jh0003@people.osaaf.org','org.onap.portal.admin','2018-10-31','org.onap.portal','admin'); |
| 83 | |
| 84 | // DESIGNER |
| 85 | INSERT 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); |
| 86 | INSERT INTO role(ns, name, perms, description) |
| 87 | VALUES('org.onap.portal','designer',{'org.onap.portal.access|*|read'},'Portal Designer'); |
| 88 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 89 | VALUES ('cs0008@people.osaaf.org','org.onap.portal.designer','2018-10-31','org.onap.portal','designer'); |
| 90 | |
| 91 | // TESTER |
| 92 | INSERT 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); |
| 93 | INSERT INTO role(ns, name, perms, description) |
| 94 | VALUES('org.onap.portal','tester',{'org.onap.portal.access|*|read'},'Portal Tester'); |
| 95 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 96 | VALUES ('jm0007@people.osaaf.org','org.onap.portal.tester','2018-10-31','org.onap.portal','tester'); |
| 97 | |
| 98 | // OPS |
| 99 | INSERT 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); |
| 100 | INSERT INTO role(ns, name, perms, description) |
| 101 | VALUES('org.onap.portal','ops',{'org.onap.portal.access|*|read'},'Portal Operations'); |
| 102 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 103 | VALUES ('op0001@people.osaaf.org','org.onap.portal.ops','2018-10-31','org.onap.portal','ops'); |
| 104 | |
| 105 | // GOVERNOR |
| 106 | INSERT 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); |
| 107 | INSERT INTO role(ns, name, perms, description) |
| 108 | VALUES('org.onap.portal','governor',{'org.onap.portal.access|*|read'},'Portal Governor'); |
| 109 | INSERT INTO user_role(user,role,expires,ns,rname) |
| 110 | VALUES ('gv0001@people.osaaf.org','org.onap.portal.governor','2018-10-31','org.onap.portal','governor'); |
| 111 | |