Update CDAP authorization to reflect the new authorization model

Activity

Show:

Poorna ChandraAugust 20, 2017 at 5:34 AM

PR to allow access to system datasets - https://github.com/caskdata/cdap/pull/9429

Yaojie FengAugust 16, 2017 at 2:14 AM

Yaojie FengJuly 26, 2017 at 12:36 AM

Changes made:

DefaultNamespaceAdmin
1. create namespace - change from ADMIN on instance:cdap to namespaceId
2. remove the admin enforce on dropAllDatasets in the namespace
3. replace createFilter() and add isVisible() to exists() method
4. enforce on principal for namespace creation

AppLifecycleService
1. Change deployApp - change from WRITE on namespace to ADMIN on the app
2. Replace createFilter with isVisible(updateAppAllowed?)
3. Enforce on principal for deploy app

ArtifactRepository(leave it to last)
1. add artifact - admin on artifact instead of write on namespace
2. replace createFilter with isVisible
3. Others are left, since we have not decided what is the correct model

DatasetInstanceService
1. create dataset - change from WRITE on namespace to ADMIN on dataset
2. replace createFilter with isVisible
3. Enforce on principal for dataset creation

DatasetTypeService
1. create dataset module - change from WRITE on namespace to ADMIN on dataset module
2. deleteAll - change from ADMIN on namespace to ADMIN on all dataset modules
3. replace createFilter with isVisible

DefaultSecureStoreService
1. putSecureData - change from WRITE on namespace to ADMIN on secure key
2. getSecureData - change from any privilege on secure key to READ on secure key
3. replace createFilter with isVisible

FileStreamAdmin
1. dropAllInNamespace - change from admin on namespace to admin on all streams in the namespace
2. create stream - change from WRITE on namespace to ADMIN on streamId, enforce on principal id if impersonation is involved
3. replace createFilter with isVisible

ProgramLifeCycleService
1. change getRuntimeArguements, can have READ, EXECUTE or ADMIN to get
2. replace createFilter with isVisible

Note that artifact changes are not done since we have not decided the correct way to enforce.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Priority

Created July 17, 2017 at 10:17 PM
Updated August 24, 2017 at 10:18 PM
Resolved August 16, 2017 at 2:14 AM