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