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 | 9ec2895 | 2018-07-12 11:14:10 -0500 | [diff] [blame^] | 52 | // OSAAF Root |
| 53 | INSERT 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 | |
| 56 | INSERT 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 | |
Instrumental | 22441bf | 2018-04-30 14:11:34 -0500 | [diff] [blame] | 60 | // ONAP Specific Entities |
| 61 | // ONAP initial env Namespace |
| 62 | INSERT INTO ns (name,description,parent,scope,type) |
| 63 | VALUES('org.onap','ONAP','org',2,2); |
| 64 | |
| 65 | INSERT INTO ns (name,description,parent,scope,type) |
| 66 | VALUES('org.onap.portal','ONAP Portal','org.onap.portal',3,3); |
| 67 | |
| 68 | INSERT 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 | |
| 73 | INSERT INTO role(ns, name, perms, description) |
| 74 | VALUES('org.onap.portal','owner',{'org.onap.portal.access|*|read'},'Portal Owner'); |
| 75 | |
| 76 | INSERT INTO perm(ns, type, instance, action, roles, description) |
| 77 | VALUES ('org.onap.portal','access','*','*',{'org.onap.portal.admin'},'Portal Write Access'); |
| 78 | |
| 79 | INSERT INTO role(ns, name, perms, description) |
| 80 | VALUES('org.onap.portal','admin',{'org.onap.portal.access|*|*'},'Portal Admins'); |
| 81 | |
| 82 | // DEMO ID (OPS) |
| 83 | 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); |
| 84 | INSERT 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 |
| 88 | 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); |
| 89 | INSERT 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 |
| 93 | 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); |
| 94 | INSERT INTO role(ns, name, perms, description) |
| 95 | VALUES('org.onap.portal','designer',{'org.onap.portal.access|*|read'},'Portal Designer'); |
| 96 | INSERT 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 |
| 100 | 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); |
| 101 | INSERT INTO role(ns, name, perms, description) |
| 102 | VALUES('org.onap.portal','tester',{'org.onap.portal.access|*|read'},'Portal Tester'); |
| 103 | INSERT 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 |
| 107 | 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); |
| 108 | INSERT INTO role(ns, name, perms, description) |
| 109 | VALUES('org.onap.portal','ops',{'org.onap.portal.access|*|read'},'Portal Operations'); |
| 110 | INSERT 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 |
| 114 | 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); |
| 115 | INSERT INTO role(ns, name, perms, description) |
| 116 | VALUES('org.onap.portal','governor',{'org.onap.portal.access|*|read'},'Portal Governor'); |
| 117 | INSERT 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 | |