Modify scope keys

sync-branches
Viranga Gunarathna 1 year ago committed by pasindu
parent b07001d721
commit 96b32936d8

@ -53,7 +53,7 @@ import javax.ws.rs.core.Response;
@Scope( @Scope(
name = "Enroll device", name = "Enroll device",
description = "", description = "",
key = "perm:firealarm:enroll", key = "dm:firealarm:enroll",
permissions = {"/device-mgt/devices/enroll/firealarm"}, permissions = {"/device-mgt/devices/enroll/firealarm"},
roles = {"Internal/devicemgt-user"} roles = {"Internal/devicemgt-user"}
) )
@ -83,7 +83,7 @@ public interface VirtualFireAlarmService {
tags = "virtual_firealarm", tags = "virtual_firealarm",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:firealarm:enroll") @ExtensionProperty(name = SCOPE, value = "dm:firealarm:enroll")
}) })
} }
) )
@ -104,7 +104,7 @@ public interface VirtualFireAlarmService {
tags = "virtual_firealarm", tags = "virtual_firealarm",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:firealarm:enroll") @ExtensionProperty(name = SCOPE, value = "dm:firealarm:enroll")
}) })
} }
) )
@ -125,7 +125,7 @@ public interface VirtualFireAlarmService {
tags = "virtual_firealarm", tags = "virtual_firealarm",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = SCOPE, value = "perm:firealarm:enroll") @ExtensionProperty(name = SCOPE, value = "dm:firealarm:enroll")
}) })
} }
) )

@ -62,7 +62,7 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
private static final String APPLICATION_NAME = "websocket-app"; private static final String APPLICATION_NAME = "websocket-app";
private static final String PASSWORD_GRANT_TYPE = "password"; private static final String PASSWORD_GRANT_TYPE = "password";
private static final String REFRESH_GRANT_TYPE = "refresh_token"; private static final String REFRESH_GRANT_TYPE = "refresh_token";
private static final String REQUIRED_SCOPE = "perm:authorization:verify"; private static final String REQUIRED_SCOPE = "dm:authorization:verify";
private ApiApplicationRegistrationService apiApplicationRegistrationService; private ApiApplicationRegistrationService apiApplicationRegistrationService;
private TokenIssuerService tokenIssuerService; private TokenIssuerService tokenIssuerService;

@ -74,7 +74,7 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
private static final String APPLICATION_NAME = "websocket-app"; private static final String APPLICATION_NAME = "websocket-app";
private static final String PASSWORD_GRANT_TYPE = "password"; private static final String PASSWORD_GRANT_TYPE = "password";
private static final String REFRESH_GRANT_TYPE = "refresh_token"; private static final String REFRESH_GRANT_TYPE = "refresh_token";
private static final String REQUIRED_SCOPE = "perm:authorization:verify"; private static final String REQUIRED_SCOPE = "dm:authorization:verify";
private ApiApplicationRegistrationService apiApplicationRegistrationService; private ApiApplicationRegistrationService apiApplicationRegistrationService;
private TokenIssuerService tokenIssuerService; private TokenIssuerService tokenIssuerService;
private ApiApplicationKey apiApplicationKey; private ApiApplicationKey apiApplicationKey;

@ -64,7 +64,7 @@ import javax.ws.rs.core.Response;
@Scope( @Scope(
name = "Getting Details of Topics", name = "Getting Details of Topics",
description = "Getting Details of Topics", description = "Getting Details of Topics",
key = "perm:admin:topics:view", key = "dm:admin:topics:view",
permissions = {"/device-mgt/topics/view"} permissions = {"/device-mgt/topics/view"}
) )
} }
@ -82,7 +82,7 @@ public interface MQTTManagementAdminService {
tags = "MQTT Management Administrative Service", tags = "MQTT Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:admin:topics:view") @ExtensionProperty(name = Constants.SCOPE, value = "dm:admin:topics:view")
}) })
} }
) )

@ -58,7 +58,7 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
private static final String APPLICATION_NAME = "mqtt_broker"; private static final String APPLICATION_NAME = "mqtt_broker";
private static final String PASSWORD_GRANT_TYPE = "password"; private static final String PASSWORD_GRANT_TYPE = "password";
private static final String REFRESH_GRANT_TYPE = "refresh_token"; private static final String REFRESH_GRANT_TYPE = "refresh_token";
private static final String REQUIRED_SCOPE = "perm:authorization:verify"; private static final String REQUIRED_SCOPE = "dm:authorization:verify";
private ApiApplicationRegistrationService apiApplicationRegistrationService; private ApiApplicationRegistrationService apiApplicationRegistrationService;
private TokenIssuerService tokenIssuerService; private TokenIssuerService tokenIssuerService;
private static Log log = LogFactory.getLog(OAuthRequestInterceptor.class); private static Log log = LogFactory.getLog(OAuthRequestInterceptor.class);

@ -50,7 +50,7 @@ import io.entgra.device.mgt.plugins.extension.siddhi.device.utils.DeviceUtils;
public class OAuthRequestInterceptor implements RequestInterceptor { public class OAuthRequestInterceptor implements RequestInterceptor {
private static final String APPLICATION_NAME = "siddhi_extension_client"; private static final String APPLICATION_NAME = "siddhi_extension_client";
private static final String REQUIRED_SCOPES = "perm:devices:operations"; private static final String REQUIRED_SCOPES = "dm:devices:ops:view";
private static final String[] API_TAGS = {"device_management"}; private static final String[] API_TAGS = {"device_management"};
private DCRService dcrService; private DCRService dcrService;
private static OAuthApplication oAuthApplication; private static OAuthApplication oAuthApplication;

@ -70,182 +70,182 @@ import java.util.List;
@Scope( @Scope(
name = "Lock Device", name = "Lock Device",
description = "Hard lock own device", description = "Hard lock own device",
key = "perm:android:lock-devices", key = "and:ops:lock-devices",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/lock"} permissions = {"/device-mgt/devices/owning-device/operations/android/lock"}
), ),
@Scope( @Scope(
name = "Unlock Device", name = "Unlock Device",
description = "Unlock permanently locked device", description = "Unlock permanently locked device",
key = "perm:android:unlock-devices", key = "and:ops:unlock-devices",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/unlock"} permissions = {"/device-mgt/devices/owning-device/operations/android/unlock"}
), ),
@Scope( @Scope(
name = "Get Location", name = "Get Location",
description = "Request device location coordinates", description = "Request device location coordinates",
key = "perm:android:location", key = "and:ops:location",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/location"} permissions = {"/device-mgt/devices/owning-device/operations/android/location"}
), ),
@Scope( @Scope(
name = "Clear Password", name = "Clear Password",
description = "Clear the password on Android devices", description = "Clear the password on Android devices",
key = "perm:android:clear-password", key = "and:ops:clear-password",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/clear-password"} permissions = {"/device-mgt/devices/owning-device/operations/android/clear-password"}
), ),
@Scope( @Scope(
name = "Control Camera", name = "Control Camera",
description = "Enabling or Disabling the Camera on Android Devices", description = "Enabling or Disabling the Camera on Android Devices",
key = "perm:android:control-camera", key = "and:ops:control-camera",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/camera"} permissions = {"/device-mgt/devices/owning-device/operations/android/camera"}
), ),
@Scope( @Scope(
name = "Get Info", name = "Get Info",
description = "Requesting device information from Android Devices", description = "Requesting device information from Android Devices",
key = "perm:android:info", key = "and:ops:device-info",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/info"} permissions = {"/device-mgt/devices/owning-device/operations/android/info"}
), ),
@Scope( @Scope(
name = "Get Logs", name = "Get Logs",
description = "Requesting Logcat Details from Android Devices", description = "Requesting Logcat Details from Android Devices",
key = "perm:android:logcat", key = "and:ops:logcat",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/logcat"} permissions = {"/device-mgt/devices/owning-device/operations/android/logcat"}
), ),
@Scope( @Scope(
name = "Enterprise Wipe", name = "Enterprise Wipe",
description = "Enterprise Wiping Android Devices", description = "Enterprise Wiping Android Devices",
key = "perm:android:enterprise-wipe", key = "and:ops:enterprise-wipe",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/enterprise-wipe"} permissions = {"/device-mgt/devices/owning-device/operations/android/enterprise-wipe"}
), ),
@Scope( @Scope(
name = "Factory Reset", name = "Factory Reset",
description = "Factory Resetting Android Devices", description = "Factory Resetting Android Devices",
key = "perm:android:wipe", key = "and:ops:wipe",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/wipe"} permissions = {"/device-mgt/devices/owning-device/operations/android/wipe"}
), ),
@Scope( @Scope(
name = "Get Installed Applications", name = "Get Installed Applications",
description = "Get list of installed applications", description = "Get list of installed applications",
key = "perm:android:applications", key = "and:ops:app-list",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/applications"} permissions = {"/device-mgt/devices/owning-device/operations/android/applications"}
), ),
@Scope( @Scope(
name = "Ring Device", name = "Ring Device",
description = "Ring Android devices", description = "Ring Android devices",
key = "perm:android:ring", key = "and:ops:ring",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/ring"} permissions = {"/device-mgt/devices/owning-device/operations/android/ring"}
), ),
@Scope( @Scope(
name = "Reboot Device", name = "Reboot Device",
description = "Reboot Android devices", description = "Reboot Android devices",
key = "perm:android:reboot", key = "and:ops:reboot",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/reboot"} permissions = {"/device-mgt/devices/owning-device/operations/android/reboot"}
), ),
@Scope( @Scope(
name = "Mute Device", name = "Mute Device",
description = "Mute Android devices", description = "Mute Android devices",
key = "perm:android:mute", key = "and:ops:mute",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/mute"} permissions = {"/device-mgt/devices/owning-device/operations/android/mute"}
), ),
@Scope( @Scope(
name = "Install Applications", name = "Install Applications",
description = "Installing an Application on Android Devices", description = "Installing an Application on Android Devices",
key = "perm:android:install-application", key = "and:ops:install-app",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/install-app"} permissions = {"/device-mgt/devices/owning-device/operations/android/install-app"}
), ),
@Scope( @Scope(
name = "Update Applications", name = "Update Applications",
description = "Updating an Application on Android Devices", description = "Updating an Application on Android Devices",
key = "perm:android:update-application", key = "and:ops:update-app",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/update-app"} permissions = {"/device-mgt/devices/owning-device/operations/android/update-app"}
), ),
@Scope( @Scope(
name = "Uninstall Applications", name = "Uninstall Applications",
description = "Uninstalling an Application on Android Devices", description = "Uninstalling an Application on Android Devices",
key = "perm:android:uninstall-application", key = "and:ops:uninstall-app",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/uninstall-app"} permissions = {"/device-mgt/devices/owning-device/operations/android/uninstall-app"}
), ),
@Scope( @Scope(
name = "Blacklist Applications", name = "Blacklist Applications",
description = "Blacklisting applications on Android Devices", description = "Blacklisting applications on Android Devices",
key = "perm:android:blacklist-applications", key = "and:ops:blacklist-app",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/blacklist-app"} permissions = {"/device-mgt/devices/owning-device/operations/android/blacklist-app"}
), ),
@Scope( @Scope(
name = "Upgrade Firmware", name = "Upgrade Firmware",
description = "Upgrading Firmware of Android Devices", description = "Upgrading Firmware of Android Devices",
key = "perm:android:upgrade-firmware", key = "and:ops:upgrade-firmware",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/upgrade"} permissions = {"/device-mgt/devices/owning-device/operations/android/upgrade"}
), ),
@Scope( @Scope(
name = "Configure VPN", name = "Configure VPN",
description = "Configure VPN on Android Device", description = "Configure VPN on Android Device",
key = "perm:android:configure-vpn", key = "and:ops:configure-vpn",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/vpn"} permissions = {"/device-mgt/devices/owning-device/operations/android/vpn"}
), ),
@Scope( @Scope(
name = "Send Notification", name = "Send Notification",
description = "Sending a notification to Android Device", description = "Sending a notification to Android Device",
key = "perm:android:send-notification", key = "and:ops:send-notif",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/send-notification"} permissions = {"/device-mgt/devices/owning-device/operations/android/send-notification"}
), ),
@Scope( @Scope(
name = "Configure Wi-Fi", name = "Configure Wi-Fi",
description = "Configure Wi-Fi on Android Device", description = "Configure Wi-Fi on Android Device",
key = "perm:android:configure-wifi", key = "and:ops:configure-wifi",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/wifi"} permissions = {"/device-mgt/devices/owning-device/operations/android/wifi"}
), ),
@Scope( @Scope(
name = "Encrypt Storage", name = "Encrypt Storage",
description = "Encrypting storage on Android Device", description = "Encrypting storage on Android Device",
key = "perm:android:encrypt-storage", key = "and:ops:encrypt-storage",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/encrypt"} permissions = {"/device-mgt/devices/owning-device/operations/android/encrypt"}
), ),
@Scope( @Scope(
name = "Change Password", name = "Change Password",
description = "Changing the lock code of an Android Device", description = "Changing the lock code of an Android Device",
key = "perm:android:change-lock-code", key = "and:ops:change-lock-code",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/change-lock-code"} permissions = {"/device-mgt/devices/owning-device/operations/android/change-lock-code"}
), ),
@Scope( @Scope(
name = "Password Policy", name = "Password Policy",
description = "Set password policy of an Android Device", description = "Set password policy of an Android Device",
key = "perm:android:set-password-policy", key = "and:ops:password-policy",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/password-policy"} permissions = {"/device-mgt/devices/owning-device/operations/android/password-policy"}
), ),
@Scope( @Scope(
name = "Add Web clip", name = "Add Web clip",
description = "Setting a Web Clip on Android Devices", description = "Setting a Web Clip on Android Devices",
key = "perm:android:set-webclip", key = "and:ops:set-webclip",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/webclip"} permissions = {"/device-mgt/devices/owning-device/operations/android/webclip"}
), ),
@Scope( @Scope(
name = "File Transfer", name = "File Transfer",
description = "Transferring a file to android devices", description = "Transferring a file to android devices",
key = "perm:android:file-transfer", key = "and:ops:file-transfer",
roles = {"Internal/devicemgt-admin"}, roles = {"Internal/devicemgt-admin"},
permissions = {"/device-mgt/devices/owning-device/operations/android/file-transfer"} permissions = {"/device-mgt/devices/owning-device/operations/android/file-transfer"}
) )
@ -265,7 +265,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:file-transfer") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:file-transfer")
}) })
} }
) )
@ -326,7 +326,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:lock-devices") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:lock-devices")
}) })
} }
) )
@ -389,7 +389,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:unlock-devices") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:unlock-devices")
}) })
} }
) )
@ -452,7 +452,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:location") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:location")
}) })
} }
) )
@ -511,7 +511,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:clear-password") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:clear-password")
}) })
} }
) )
@ -569,7 +569,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:control-camera") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:control-camera")
}) })
}) })
@ApiResponses(value = { @ApiResponses(value = {
@ -634,7 +634,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:info") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:device-info")
}) })
} }
) )
@ -697,7 +697,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:logcat") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:logcat")
}) })
} }
) )
@ -759,7 +759,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enterprise-wipe") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:enterprise-wipe")
}) })
} }
) )
@ -819,7 +819,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:wipe") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:wipe")
}) })
} }
) )
@ -883,7 +883,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:applications") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:app-list")
}) })
} }
) )
@ -943,7 +943,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:ring") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:ring")
}) })
} }
) )
@ -1003,7 +1003,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:reboot") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:reboot")
}) })
} }
) )
@ -1063,7 +1063,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:mute") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:mute")
}) })
} }
) )
@ -1125,7 +1125,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:install-application") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:install-app")
}) })
} }
) )
@ -1190,7 +1190,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:update-application") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:update-app")
}) })
} }
) )
@ -1252,7 +1252,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:uninstall-application") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:uninstall-app")
}) })
} }
) )
@ -1318,7 +1318,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:blacklist-applications") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:blacklist-app")
}) })
} }
) )
@ -1380,7 +1380,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:upgrade-firmware") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:upgrade-firmware")
}) })
} }
) )
@ -1444,7 +1444,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:configure-vpn") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:configure-vpn")
}) })
} }
) )
@ -1504,7 +1504,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:send-notification") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:send-notif")
}) })
} }
) )
@ -1565,7 +1565,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:configure-wifi") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:configure-wifi")
}) })
} }
) )
@ -1627,7 +1627,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:encrypt-storage") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:encrypt-storage")
}) })
} }
) )
@ -1689,7 +1689,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:change-lock-code") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:change-lock-code")
}) })
} }
) )
@ -1751,7 +1751,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:set-password-policy") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:password-policy")
}) })
} }
) )
@ -1811,7 +1811,7 @@ public interface DeviceManagementAdminService {
tags = "Android Device Management Administrative Service", tags = "Android Device Management Administrative Service",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:set-webclip") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:ops:set-webclip")
}) })
} }
) )

@ -69,14 +69,14 @@ import java.util.List;
@Scope( @Scope(
name = "Enroll Device", name = "Enroll Device",
description = "Register an Android device", description = "Register an Android device",
key = "perm:android:enroll", key = "and:devices:enroll",
roles = {"Internal/devicemgt-user"}, roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/enroll/android"} permissions = {"/device-mgt/devices/enroll/android"}
), ),
@Scope( @Scope(
name = "Un-enroll Device", name = "Un-enroll Device",
description = "Unregister an Android device", description = "Unregister an Android device",
key = "perm:android:disenroll", key = "and:devices:disenroll",
roles = {"Internal/devicemgt-user"}, roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/disenroll/android"} permissions = {"/device-mgt/devices/disenroll/android"}
) )
@ -95,7 +95,7 @@ public interface DeviceManagementService {
tags = "Android Device Management", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:devices:enroll")
}) })
} }
) )
@ -160,7 +160,7 @@ public interface DeviceManagementService {
tags = "Android Device Management", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:devices:enroll")
}) })
} }
) )
@ -221,7 +221,7 @@ public interface DeviceManagementService {
tags = "Android Device Management", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:devices:enroll")
}) })
} }
) )
@ -283,7 +283,7 @@ public interface DeviceManagementService {
tags = "Android Device Management", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:devices:enroll")
}) })
} }
) )
@ -338,7 +338,7 @@ public interface DeviceManagementService {
tags = "Android Device Management", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:devices:enroll")
}) })
} }
) )
@ -391,7 +391,7 @@ public interface DeviceManagementService {
tags = "Android Device Management", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:devices:enroll")
}) })
} }
) )
@ -447,7 +447,7 @@ public interface DeviceManagementService {
tags = "Android Device Management", tags = "Android Device Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:disenroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:devices:disenroll")
}) })
} }
) )

@ -66,21 +66,21 @@ import javax.ws.rs.core.Response;
@Scope( @Scope(
name = "Enroll Device", name = "Enroll Device",
description = "Register an Android device", description = "Register an Android device",
key = "perm:android:enroll", key = "and:conf:devices:enroll",
roles = {"Internal/devicemgt-user"}, roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/enroll/android"} permissions = {"/device-mgt/devices/enroll/android"}
), ),
@Scope( @Scope(
name = "View Configurations", name = "View Configurations",
description = "Getting Android Platform Configurations", description = "Getting Android Platform Configurations",
key = "perm:android:view-configuration", key = "and:conf:view",
roles = {"Internal/devicemgt-user"}, roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/enroll/android"} permissions = {"/device-mgt/devices/enroll/android"}
), ),
@Scope( @Scope(
name = "Manage Configurations", name = "Manage Configurations",
description = "Updating Android Platform Configurations", description = "Updating Android Platform Configurations",
key = "perm:android:manage-configuration", key = "and:conf:manage",
roles = {"Internal/devicemgt-user"}, roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/platform-configurations/manage"} permissions = {"/device-mgt/platform-configurations/manage"}
) )
@ -98,7 +98,7 @@ public interface DeviceTypeConfigurationService {
tags = "Android Configuration Management", tags = "Android Configuration Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:view-configuration") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:conf:view")
}) })
} }
) )
@ -152,7 +152,7 @@ public interface DeviceTypeConfigurationService {
tags = "Android Configuration Management", tags = "Android Configuration Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:manage-configuration") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:conf:manage")
}) })
} }
) )
@ -207,7 +207,7 @@ public interface DeviceTypeConfigurationService {
tags = "Android Configuration Management", tags = "Android Configuration Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:conf:devices:enroll")
}) })
} }
) )

@ -66,7 +66,7 @@ import javax.ws.rs.core.Response;
@Scope( @Scope(
name = "Enroll Device", name = "Enroll Device",
description = "Register an Android device", description = "Register an Android device",
key = "perm:android:enroll", key = "and:event:devices:enroll",
roles = {"Internal/devicemgt-user"}, roles = {"Internal/devicemgt-user"},
permissions = {"/device-mgt/devices/enroll/android"} permissions = {"/device-mgt/devices/enroll/android"}
) )
@ -85,7 +85,7 @@ public interface EventReceiverService {
tags = "Event Receiver", tags = "Event Receiver",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:event:devices:enroll")
}) })
} }
) )
@ -148,7 +148,7 @@ public interface EventReceiverService {
tags = "Event Receiver", tags = "Event Receiver",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = AndroidConstants.SCOPE, value = "perm:android:enroll") @ExtensionProperty(name = AndroidConstants.SCOPE, value = "and:event:devices:enroll")
}) })
} }
) )

@ -6,36 +6,37 @@
"analyticsEnabled": "false", "analyticsEnabled": "false",
"groupingEnabled": "true", "groupingEnabled": "true",
"scopes" : [ "scopes" : [
"perm:android:file-transfer", "and:ops:file-transfer",
"perm:android:enroll", "and:devices:enroll",
"perm:android:wipe", "and:ops:wipe",
"perm:android:ring", "and:ops:ring",
"perm:android:lock-devices", "and:ops:lock-devices",
"perm:android:configure-vpn", "and:ops:configure-vpn",
"perm:android:configure-wifi", "and:ops:configure-wifi",
"perm:android:enroll", "and:conf:devices:enroll",
"perm:android:uninstall-application", "and:event:devices:enroll",
"perm:android:manage-configuration", "and:ops:uninstall-app",
"perm:android:location", "and:conf:manage",
"perm:android:install-application", "and:ops:location",
"perm:android:mute", "and:ops:install-app",
"perm:android:change-lock-code", "and:ops:mute",
"perm:android:blacklist-applications", "and:ops:change-lock-code",
"perm:android:set-password-policy", "and:ops:blacklist-app",
"perm:android:encrypt-storage", "and:ops:password-policy",
"perm:android:clear-password", "and:ops:encrypt-storage",
"perm:android:enterprise-wipe", "and:ops:clear-password",
"perm:android:info", "and:ops:enterprise-wipe",
"perm:android:view-configuration", "and:ops:device-info",
"perm:android:upgrade-firmware", "and:conf:view",
"perm:android:set-webclip", "and:ops:upgrade-firmware",
"perm:android:send-notification", "and:ops:set-webclip",
"perm:android:disenroll", "and:ops:send-notif",
"perm:android:update-application", "and:devices:disenroll",
"perm:android:unlock-devices", "and:ops:update-app",
"perm:android:control-camera", "and:ops:unlock-devices",
"perm:android:reboot", "and:ops:control-camera",
"perm:android:logcat" "and:ops:reboot",
"and:ops:logcat"
], ],
"features": { "features": {
"DEVICE_RING": { "DEVICE_RING": {

Loading…
Cancel
Save