Improve APPM MDM configs

feature/appm-store/pbac
lasanthaDLPDS 5 years ago
parent 198bfc11f6
commit 4c79f3f1a8

@ -0,0 +1,40 @@
/* Copyright (c) 2019, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
*
* Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.carbon.device.application.mgt.common.config;
import javax.xml.bind.annotation.XmlElement;
public class MDMConfig {
private String artifactDownloadProtocol;
private String artifactDownloadEndpoint;
@XmlElement(name = "ArtifactDownloadProtocol", required=true)
public String getArtifactDownloadProtocol() { return artifactDownloadProtocol; }
public void setArtifactDownloadProtocol(String artifactDownloadProtocol) {
this.artifactDownloadProtocol = artifactDownloadProtocol;
}
@XmlElement(name = "ArtifactDownloadEndpoint", required=true)
public String getArtifactDownloadEndpoint() { return artifactDownloadEndpoint; }
public void setArtifactDownloadEndpoint(String artifactDownloadEndpoint) {
this.artifactDownloadEndpoint = artifactDownloadEndpoint;
}
}

@ -18,6 +18,7 @@
*/ */
package org.wso2.carbon.device.application.mgt.core.config; package org.wso2.carbon.device.application.mgt.core.config;
import org.wso2.carbon.device.application.mgt.common.config.MDMConfig;
import org.wso2.carbon.device.application.mgt.common.config.RatingConfiguration; import org.wso2.carbon.device.application.mgt.common.config.RatingConfiguration;
import org.wso2.carbon.device.application.mgt.common.config.UIConfiguration; import org.wso2.carbon.device.application.mgt.common.config.UIConfiguration;
import org.wso2.carbon.device.application.mgt.common.config.LifecycleState; import org.wso2.carbon.device.application.mgt.common.config.LifecycleState;
@ -37,20 +38,16 @@ public class Configuration {
private List<Extension> extensions; private List<Extension> extensions;
private Artifacts artifacts;
private PaginationConfiguration paginationConfiguration;
private List<LifecycleState> lifecycleStates; private List<LifecycleState> lifecycleStates;
private UIConfiguration uiConfiguration; private UIConfiguration uiConfiguration;
private List<String> appCategories; private List<String> appCategories;
private String artifactDownloadEndpoint;
private RatingConfiguration ratingConfiguration; private RatingConfiguration ratingConfiguration;
private MDMConfig mdmConfig;
@XmlElement(name = "DatasourceName", required = true) @XmlElement(name = "DatasourceName", required = true)
public String getDatasourceName() { public String getDatasourceName() {
return datasourceName; return datasourceName;
@ -70,11 +67,6 @@ public class Configuration {
this.extensions = extensions; this.extensions = extensions;
} }
@XmlElement(name = "PaginationConfiguration", required = true)
public PaginationConfiguration getPaginationConfiguration() {
return paginationConfiguration;
}
@XmlElementWrapper(name = "LifecycleStates") @XmlElementWrapper(name = "LifecycleStates")
@XmlElement(name = "LifecycleState") @XmlElement(name = "LifecycleState")
public List<LifecycleState> getLifecycleStates() { public List<LifecycleState> getLifecycleStates() {
@ -100,15 +92,6 @@ public class Configuration {
public void setRatingConfiguration( public void setRatingConfiguration(
RatingConfiguration ratingConfiguration) { this.ratingConfiguration = ratingConfiguration; } RatingConfiguration ratingConfiguration) { this.ratingConfiguration = ratingConfiguration; }
@XmlElement(name = "ArtifactDownloadEndpoint", required = true)
public String getArtifactDownloadEndpoint() {
return artifactDownloadEndpoint;
}
public void setArtifactDownloadEndpoint(String artifactDownloadEndpoint) {
this.artifactDownloadEndpoint = artifactDownloadEndpoint;
}
@XmlElementWrapper(name = "AppCategories") @XmlElementWrapper(name = "AppCategories")
@XmlElement(name = "Category") @XmlElement(name = "Category")
public List<String> getAppCategories() { public List<String> getAppCategories() {
@ -118,5 +101,12 @@ public class Configuration {
public void setAppCategories(List<String> appCategories) { public void setAppCategories(List<String> appCategories) {
this.appCategories = appCategories; this.appCategories = appCategories;
} }
@XmlElement(name = "MDMConfig", required = true)
public MDMConfig getMdmConfig() { return mdmConfig; }
public void setMdmConfig(MDMConfig mdmConfig) {
this.mdmConfig = mdmConfig;
}
} }

@ -32,6 +32,7 @@ import org.wso2.carbon.device.application.mgt.common.ApplicationInstaller;
import org.wso2.carbon.device.application.mgt.common.DeviceTypes; import org.wso2.carbon.device.application.mgt.common.DeviceTypes;
import org.wso2.carbon.device.application.mgt.common.LifecycleChanger; import org.wso2.carbon.device.application.mgt.common.LifecycleChanger;
import org.wso2.carbon.device.application.mgt.common.Pagination; import org.wso2.carbon.device.application.mgt.common.Pagination;
import org.wso2.carbon.device.application.mgt.common.config.MDMConfig;
import org.wso2.carbon.device.application.mgt.common.config.RatingConfiguration; import org.wso2.carbon.device.application.mgt.common.config.RatingConfiguration;
import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO; import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
import org.wso2.carbon.device.application.mgt.common.ApplicationList; import org.wso2.carbon.device.application.mgt.common.ApplicationList;
@ -2868,14 +2869,8 @@ public class ApplicationManagerImpl implements ApplicationManager {
throw new NotFoundException(msg); throw new NotFoundException(msg);
} }
ApplicationReleaseDTO applicationReleaseDTO = applicationDTO.getApplicationReleaseDTOs().get(0); ApplicationReleaseDTO applicationReleaseDTO = applicationDTO.getApplicationReleaseDTOs().get(0);
String host = System.getProperty(Constants.IOT_HOST_PROPERTY); String artifactDownloadURL = APIUtil.getArtifactDownloadBaseURL() + applicationReleaseDTO.getUuid()
String port = System.getProperty(Constants.IOT_PORT_PROPERTY); + Constants.FORWARD_SLASH + applicationReleaseDTO.getInstallerName();
String artifactDownloadEndpoint = ConfigurationManager.getInstance().getConfiguration()
.getArtifactDownloadEndpoint();
String artifactDownloadURL =
Constants.ARTIFACT_DOWNLOAD_PROTOCOL + "://" + host + ":" + port + artifactDownloadEndpoint
+ Constants.FORWARD_SLASH + applicationReleaseDTO.getUuid() + Constants.FORWARD_SLASH
+ applicationReleaseDTO.getInstallerName();
String plistContent = "&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTDPLIST1.0//EN&quot; &quot;" + String plistContent = "&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTDPLIST1.0//EN&quot; &quot;" +
"http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;&lt;plist version=&quot;" + "http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;&lt;plist version=&quot;" +
"1.0&quot;&gt;&lt;dict&gt;&lt;key&gt;items&lt;/key&gt;&lt;array&gt;&lt;dict&gt;&lt;" + "1.0&quot;&gt;&lt;dict&gt;&lt;key&gt;items&lt;/key&gt;&lt;array&gt;&lt;dict&gt;&lt;" +

@ -27,6 +27,7 @@ import org.wso2.carbon.device.application.mgt.common.DeviceTypes;
import org.wso2.carbon.device.application.mgt.common.SubAction; import org.wso2.carbon.device.application.mgt.common.SubAction;
import org.wso2.carbon.device.application.mgt.common.SubsciptionType; import org.wso2.carbon.device.application.mgt.common.SubsciptionType;
import org.wso2.carbon.device.application.mgt.common.SubscribingDeviceIdHolder; import org.wso2.carbon.device.application.mgt.common.SubscribingDeviceIdHolder;
import org.wso2.carbon.device.application.mgt.common.config.MDMConfig;
import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO; import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
import org.wso2.carbon.device.application.mgt.common.dto.DeviceSubscriptionDTO; import org.wso2.carbon.device.application.mgt.common.dto.DeviceSubscriptionDTO;
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException; import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
@ -480,14 +481,9 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
} }
} else if (DeviceTypes.IOS.toString().equalsIgnoreCase(deviceType)) { } else if (DeviceTypes.IOS.toString().equalsIgnoreCase(deviceType)) {
if (SubAction.INSTALL.toString().equalsIgnoreCase(action)) { if (SubAction.INSTALL.toString().equalsIgnoreCase(action)) {
String host = System.getProperty(Constants.IOT_HOST_PROPERTY); String plistDownloadEndpoint = APIUtil.getArtifactDownloadBaseURL()
String port = System.getProperty(Constants.IOT_PORT_PROPERTY); + MDMAppConstants.IOSConstants.PLIST + Constants.FORWARD_SLASH
String artifactDownloadEndpoint = ConfigurationManager.getInstance().getConfiguration() + application.getApplicationReleases().get(0).getUuid();
.getArtifactDownloadEndpoint();
String plistDownloadEndpoint =
Constants.ARTIFACT_DOWNLOAD_PROTOCOL + "://" + host + ":" + port + artifactDownloadEndpoint
+ Constants.FORWARD_SLASH + MDMAppConstants.IOSConstants.PLIST
+ Constants.FORWARD_SLASH + application.getApplicationReleases().get(0).getUuid();
mobileApp.setType(mobileAppType); mobileApp.setType(mobileAppType);
mobileApp.setLocation(plistDownloadEndpoint); mobileApp.setLocation(plistDownloadEndpoint);
Properties properties = new Properties(); Properties properties = new Properties();

@ -24,8 +24,10 @@ import org.apache.commons.logging.LogFactory;
import org.apache.commons.validator.routines.UrlValidator; import org.apache.commons.validator.routines.UrlValidator;
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.application.mgt.common.ApplicationType; import org.wso2.carbon.device.application.mgt.common.ApplicationType;
import org.wso2.carbon.device.application.mgt.common.config.MDMConfig;
import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO; import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO; import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
import org.wso2.carbon.device.application.mgt.common.response.Application; import org.wso2.carbon.device.application.mgt.common.response.Application;
import org.wso2.carbon.device.application.mgt.common.response.ApplicationRelease; import org.wso2.carbon.device.application.mgt.common.response.ApplicationRelease;
import org.wso2.carbon.device.application.mgt.common.services.*; import org.wso2.carbon.device.application.mgt.common.services.*;
@ -306,8 +308,7 @@ public class APIUtil {
return applicationReleaseDTO; return applicationReleaseDTO;
} }
public static Application appDtoToAppResponse(ApplicationDTO applicationDTO) public static Application appDtoToAppResponse(ApplicationDTO applicationDTO) throws ApplicationManagementException {
throws BadRequestException, UnexpectedServerErrorException {
Application application = new Application(); Application application = new Application();
if (!ApplicationType.WEB_CLIP.toString().equals(applicationDTO.getType())) { if (!ApplicationType.WEB_CLIP.toString().equals(applicationDTO.getType())) {
@ -326,19 +327,19 @@ public class APIUtil {
application.setTags(applicationDTO.getTags()); application.setTags(applicationDTO.getTags());
application.setUnrestrictedRoles(applicationDTO.getUnrestrictedRoles()); application.setUnrestrictedRoles(applicationDTO.getUnrestrictedRoles());
application.setRating(applicationDTO.getAppRating()); application.setRating(applicationDTO.getAppRating());
List<ApplicationRelease> applicationReleases = applicationDTO.getApplicationReleaseDTOs() List<ApplicationRelease> applicationReleases = new ArrayList<>();
.stream().map(APIUtil::releaseDtoToRelease).collect(Collectors.toList()); for (ApplicationReleaseDTO applicationReleaseDTO : applicationDTO.getApplicationReleaseDTOs()) {
ApplicationRelease applicationRelease = releaseDtoToRelease(applicationReleaseDTO);
applicationReleases.add(applicationRelease);
}
application.setApplicationReleases(applicationReleases); application.setApplicationReleases(applicationReleases);
return application; return application;
} }
public static ApplicationRelease releaseDtoToRelease(ApplicationReleaseDTO applicationReleaseDTO){ public static ApplicationRelease releaseDtoToRelease(ApplicationReleaseDTO applicationReleaseDTO)
String host = System.getProperty(Constants.IOT_HOST_PROPERTY); throws ApplicationManagementException {
String port = System.getProperty(Constants.IOT_PORT_PROPERTY); String basePath = getArtifactDownloadBaseURL() + applicationReleaseDTO.getUuid()
String artifactDownloadEndpoint = ConfigurationManager.getInstance().getConfiguration() + Constants.FORWARD_SLASH;
.getArtifactDownloadEndpoint();
String basePath = Constants.ARTIFACT_DOWNLOAD_PROTOCOL + "://" + host + ":" + port + artifactDownloadEndpoint
+ Constants.FORWARD_SLASH + applicationReleaseDTO.getUuid() + Constants.FORWARD_SLASH;
List<String> screenshotPaths = new ArrayList<>(); List<String> screenshotPaths = new ArrayList<>();
ApplicationRelease applicationRelease = new ApplicationRelease(); ApplicationRelease applicationRelease = new ApplicationRelease();
@ -391,4 +392,22 @@ public class APIUtil {
return applicationRelease; return applicationRelease;
} }
public static String getArtifactDownloadBaseURL() throws ApplicationManagementException {
String host = System.getProperty(Constants.IOT_HOST_PROPERTY);
MDMConfig mdmConfig = ConfigurationManager.getInstance().getConfiguration().getMdmConfig();
String port;
if (Constants.HTTP_PROTOCOL.equals(mdmConfig.getArtifactDownloadProtocol())){
port = System.getProperty(Constants.IOT_HTTP_PORT_PROPERTY);
} else if( Constants.HTTPS_PROTOCOL.equals(mdmConfig.getArtifactDownloadProtocol())){
port = System.getProperty(Constants.IOT_HTTPS_PORT_PROPERTY);
} else {
String msg = "In order to download application artifacts invalid protocols are defined.";
log.error(msg);
throw new ApplicationManagementException(msg);
}
String artifactDownloadEndpoint = mdmConfig.getArtifactDownloadEndpoint();
return mdmConfig.getArtifactDownloadProtocol() + "://" + host + ":" + port
+ artifactDownloadEndpoint + Constants.FORWARD_SLASH;
}
} }

@ -37,8 +37,10 @@ public class Constants {
public static final String CF_BUNDLE_VERSION = "CFBundleVersion"; public static final String CF_BUNDLE_VERSION = "CFBundleVersion";
public static final String APP_EXTENSION = ".app"; public static final String APP_EXTENSION = ".app";
public static final String IOT_HOST_PROPERTY = "iot.core.host"; public static final String IOT_HOST_PROPERTY = "iot.core.host";
public static final String IOT_PORT_PROPERTY = "iot.core.http.port"; public static final String IOT_HTTP_PORT_PROPERTY = "iot.core.http.port";
public static final String ARTIFACT_DOWNLOAD_PROTOCOL = "http"; public static final String IOT_HTTPS_PORT_PROPERTY = "iot.core.https.port";
public static final String HTTPS_PROTOCOL = "https";
public static final String HTTP_PROTOCOL = "http";
public static final String FORWARD_SLASH = "/"; public static final String FORWARD_SLASH = "/";
public static final String ANY = "ANY"; public static final String ANY = "ANY";

@ -23,17 +23,13 @@ import org.apache.commons.logging.LogFactory;
import org.json.JSONException; import org.json.JSONException;
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO; import org.wso2.carbon.device.application.mgt.common.dto.ApplicationDTO;
import org.wso2.carbon.device.application.mgt.common.PaginationRequest;
import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO; import org.wso2.carbon.device.application.mgt.common.dto.ApplicationReleaseDTO;
import org.wso2.carbon.device.application.mgt.common.dto.DeviceSubscriptionDTO; import org.wso2.carbon.device.application.mgt.common.dto.DeviceSubscriptionDTO;
import org.wso2.carbon.device.application.mgt.common.dto.ReviewDTO; import org.wso2.carbon.device.application.mgt.common.dto.ReviewDTO;
import org.wso2.carbon.device.application.mgt.common.exception.ReviewManagementException;
import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager; import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
import org.wso2.carbon.device.application.mgt.common.services.ApplicationStorageManager; import org.wso2.carbon.device.application.mgt.common.services.ApplicationStorageManager;
import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager; import org.wso2.carbon.device.application.mgt.common.services.SubscriptionManager;
import org.wso2.carbon.device.application.mgt.core.config.Configuration;
import org.wso2.carbon.device.application.mgt.core.config.ConfigurationManager;
import org.wso2.carbon.device.application.mgt.core.exception.UnexpectedServerErrorException; import org.wso2.carbon.device.application.mgt.core.exception.UnexpectedServerErrorException;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceImpl; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceImpl;
@ -264,21 +260,6 @@ public class DAOUtil {
} }
} }
public static PaginationRequest validateCommentListPageSize(PaginationRequest paginationRequest) throws
ReviewManagementException {
if (paginationRequest.getLimit() == 0) {
Configuration commentManagementConfig = ConfigurationManager.getInstance().getConfiguration();
if (commentManagementConfig != null) {
paginationRequest.setLimit(
commentManagementConfig.getPaginationConfiguration().getCommentListPageSize());
} else {
throw new ReviewManagementException(
"ApplicationDTO Management configuration has not initialized. Please check the application-mgt.xml file.");
}
}
return paginationRequest;
}
private static ApplicationManager applicationManager; private static ApplicationManager applicationManager;
private static ApplicationStorageManager applicationStorageManager; private static ApplicationStorageManager applicationStorageManager;
private static SubscriptionManager subscriptionManager; private static SubscriptionManager subscriptionManager;

@ -6,6 +6,7 @@ import org.apache.commons.logging.LogFactory;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import org.wso2.carbon.device.application.mgt.core.BaseTestCase; import org.wso2.carbon.device.application.mgt.core.BaseTestCase;
import org.wso2.carbon.device.application.mgt.core.config.ConfigurationManager;
import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory; import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
import org.wso2.carbon.device.application.mgt.core.dto.ApplicationsDTO; import org.wso2.carbon.device.application.mgt.core.dto.ApplicationsDTO;
import org.wso2.carbon.device.application.mgt.core.dto.DeviceTypeCreator; import org.wso2.carbon.device.application.mgt.core.dto.DeviceTypeCreator;
@ -22,12 +23,12 @@ public class ApplicationManagementDAOTest extends BaseTestCase {
@BeforeClass @BeforeClass
public void initialize() throws Exception { public void initialize() throws Exception {
log.info("Initializing ApplicationManagementDAOTest tests"); log.info("Initializing ApplicationManagementDAOTest tests");
ConfigurationManager configurationManager = ConfigurationManager.getInstance();
// super.initializeServices(); // super.initializeServices();
} }
@Test @Test
public void testAddApplication() throws Exception { public void testAddApplication() throws Exception {
ApplicationDAO applicationDAO = ApplicationManagementDAOFactory.getApplicationDAO(); ApplicationDAO applicationDAO = ApplicationManagementDAOFactory.getApplicationDAO();
ConnectionManagerUtil.beginDBTransaction(); ConnectionManagerUtil.beginDBTransaction();
applicationDAO.createApplication(ApplicationsDTO.getApp1(), -1234); applicationDAO.createApplication(ApplicationsDTO.getApp1(), -1234);
@ -52,6 +53,4 @@ public class ApplicationManagementDAOTest extends BaseTestCase {
DeviceManagementDAOFactory.closeConnection(); DeviceManagementDAOFactory.closeConnection();
} }
} }
} }

@ -18,7 +18,7 @@
--> -->
<ApplicationManagementConfiguration> <ApplicationManagementConfiguration>
<!-- ApplicationDTO Mgt DB schema --> <!-- Application Mgt DB schema -->
<DatasourceName>jdbc/APPM_DS</DatasourceName> <DatasourceName>jdbc/APPM_DS</DatasourceName>
<Extensions> <Extensions>
@ -135,7 +135,6 @@
<UIConfigs> <UIConfigs>
<EnableOAuth>true</EnableOAuth> <EnableOAuth>true</EnableOAuth>
<EnableSSO>false</EnableSSO> <EnableSSO>false</EnableSSO>
<EnableSSO>false</EnableSSO>
<AppRegistration> <AppRegistration>
<Tags> <Tags>
<Tag>application_management</Tag> <Tag>application_management</Tag>
@ -150,23 +149,42 @@
<Scope>perm:app:review:update</Scope> <Scope>perm:app:review:update</Scope>
<Scope>perm:app:publisher:view</Scope> <Scope>perm:app:publisher:view</Scope>
<Scope>perm:app:publisher:update</Scope> <Scope>perm:app:publisher:update</Scope>
<Scope>perm:app:store:view</Scope>
<Scope>perm:app:subscription:install</Scope>
<Scope>perm:app:subscription:uninstall</Scope>
<Scope>perm:admin:app:review:update</Scope>
<Scope>perm:admin:app:review:view</Scope>
<Scope>perm:admin:app:publisher:update</Scope>
<Scope>perm:admin:app:review:update</Scope>
</Scopes> </Scopes>
<SSOConfiguration> <SSOConfiguration>
<Issuer>app-mgt</Issuer> <Issuer>app-mgt</Issuer>
</SSOConfiguration> </SSOConfiguration>
<LoginResponse> <ErrorCallback>
<SuccessCallback>/application-mgt</SuccessCallback> <BadRequest>/pages/error/client-errors/400</BadRequest>
<FailureCallback> <Unauthorized>/pages/error/client-errors/401</Unauthorized>
<BadRequest>/pages/error/client-errors/400</BadRequest> <Forbidden>/pages/error/client-errors/403</Forbidden>
<Unauthorized>/pages/error/client-errors/401</Unauthorized> <NotFound>/pages/error/client-errors/404</NotFound>
<Forbidden>/pages/error/client-errors/403</Forbidden> <MethodNotAllowed>/pages/error/client-errors/405</MethodNotAllowed>
<NotFound>/pages/error/client-errors/404</NotFound> <NotAcceptable>/pages/error/client-errors/406</NotAcceptable>
<MethodNotAllowed>/pages/error/client-errors/405</MethodNotAllowed> <UnsupportedMediaType>/pages/error/client-errors/415</UnsupportedMediaType>
<NotAcceptable>/pages/error/client-errors/406</NotAcceptable> <InternalServerError>/pages/error/server-errors/500</InternalServerError>
<UnsupportedMediaType>/pages/error/client-errors/415</UnsupportedMediaType> <DefaultPage>/pages/error/default</DefaultPage>
<InternalServerError>/pages/error/server-errors/500</InternalServerError> </ErrorCallback>
<DefaultPage>/pages/error/default</DefaultPage>
</FailureCallback>
</LoginResponse>
</UIConfigs> </UIConfigs>
<AppCategories>
<Category>EMM</Category>
<Category>IoT</Category>
</AppCategories>
<RatingConfig>
<MinRatingValue>1</MinRatingValue>
<MaxRatingValue>10</MaxRatingValue>
</RatingConfig>
<MDMConfig>
<ArtifactDownloadProtocol>https</ArtifactDownloadProtocol>
<ArtifactDownloadEndpoint>/api/application-mgt/v1.0/artifact</ArtifactDownloadEndpoint>
</MDMConfig>
</ApplicationManagementConfiguration> </ApplicationManagementConfiguration>

@ -37,7 +37,7 @@
<Extension name="ApplicationStorageManager"> <Extension name="ApplicationStorageManager">
<ClassName>org.wso2.carbon.device.application.mgt.core.impl.ApplicationStorageManagerImpl</ClassName> <ClassName>org.wso2.carbon.device.application.mgt.core.impl.ApplicationStorageManagerImpl</ClassName>
<Parameters> <Parameters>
<Parameter name="StoragePath">/tmp/apps/</Parameter> <Parameter name="StoragePath">repository/resources/apps/</Parameter>
<Parameter name="MaxScreenShotCount">6</Parameter> <Parameter name="MaxScreenShotCount">6</Parameter>
</Parameters> </Parameters>
</Extension> </Extension>
@ -135,7 +135,6 @@
<UIConfigs> <UIConfigs>
<EnableOAuth>true</EnableOAuth> <EnableOAuth>true</EnableOAuth>
<EnableSSO>false</EnableSSO> <EnableSSO>false</EnableSSO>
<EnableSSO>false</EnableSSO>
<AppRegistration> <AppRegistration>
<Tags> <Tags>
<Tag>application_management</Tag> <Tag>application_management</Tag>
@ -151,27 +150,29 @@
<Scope>perm:app:publisher:view</Scope> <Scope>perm:app:publisher:view</Scope>
<Scope>perm:app:publisher:update</Scope> <Scope>perm:app:publisher:update</Scope>
<Scope>perm:app:store:view</Scope> <Scope>perm:app:store:view</Scope>
<Scope>perm:app:subscription:install</Scope>
<Scope>perm:app:subscription:uninstall</Scope>
<Scope>perm:admin:app:review:update</Scope>
<Scope>perm:admin:app:review:view</Scope>
<Scope>perm:admin:app:publisher:update</Scope>
<Scope>perm:admin:app:review:update</Scope>
</Scopes> </Scopes>
<SSOConfiguration> <SSOConfiguration>
<Issuer>app-mgt</Issuer> <Issuer>app-mgt</Issuer>
</SSOConfiguration> </SSOConfiguration>
<LoginResponse> <ErrorCallback>
<SuccessCallback>/apps</SuccessCallback> <BadRequest>/pages/error/client-errors/400</BadRequest>
<FailureCallback> <Unauthorized>/pages/error/client-errors/401</Unauthorized>
<BadRequest>/pages/error/client-errors/400</BadRequest> <Forbidden>/pages/error/client-errors/403</Forbidden>
<Unauthorized>/pages/error/client-errors/401</Unauthorized> <NotFound>/pages/error/client-errors/404</NotFound>
<Forbidden>/pages/error/client-errors/403</Forbidden> <MethodNotAllowed>/pages/error/client-errors/405</MethodNotAllowed>
<NotFound>/pages/error/client-errors/404</NotFound> <NotAcceptable>/pages/error/client-errors/406</NotAcceptable>
<MethodNotAllowed>/pages/error/client-errors/405</MethodNotAllowed> <UnsupportedMediaType>/pages/error/client-errors/415</UnsupportedMediaType>
<NotAcceptable>/pages/error/client-errors/406</NotAcceptable> <InternalServerError>/pages/error/server-errors/500</InternalServerError>
<UnsupportedMediaType>/pages/error/client-errors/415</UnsupportedMediaType> <DefaultPage>/pages/error/default</DefaultPage>
<InternalServerError>/pages/error/server-errors/500</InternalServerError> </ErrorCallback>
<DefaultPage>/pages/error/default</DefaultPage>
</FailureCallback>
</LoginResponse>
</UIConfigs> </UIConfigs>
<ArtifactDownloadEndpoint>https://localhost:9443/api/application-mgt/v1.0/artifact</ArtifactDownloadEndpoint>
<AppCategories> <AppCategories>
<Category>EMM</Category> <Category>EMM</Category>
<Category>IoT</Category> <Category>IoT</Category>
@ -181,4 +182,9 @@
<MinRatingValue>1</MinRatingValue> <MinRatingValue>1</MinRatingValue>
<MaxRatingValue>10</MaxRatingValue> <MaxRatingValue>10</MaxRatingValue>
</RatingConfig> </RatingConfig>
<MDMConfig>
<ArtifactDownloadProtocol>https</ArtifactDownloadProtocol>
<ArtifactDownloadEndpoint>/api/application-mgt/v1.0/artifact</ArtifactDownloadEndpoint>
</MDMConfig>
</ApplicationManagementConfiguration> </ApplicationManagementConfiguration>

@ -173,7 +173,6 @@
</ErrorCallback> </ErrorCallback>
</UIConfigs> </UIConfigs>
<ArtifactDownloadEndpoint>/api/application-mgt/v1.0/artifact</ArtifactDownloadEndpoint>
<AppCategories> <AppCategories>
<Category>EMM</Category> <Category>EMM</Category>
<Category>IoT</Category> <Category>IoT</Category>
@ -185,6 +184,7 @@
</RatingConfig> </RatingConfig>
<MDMConfig> <MDMConfig>
<Config name="AppDownloadURLHost">https</Config> <ArtifactDownloadProtocol>https</ArtifactDownloadProtocol>
<ArtifactDownloadEndpoint>/api/application-mgt/v1.0/artifact</ArtifactDownloadEndpoint>
</MDMConfig> </MDMConfig>
</ApplicationManagementConfiguration> </ApplicationManagementConfiguration>

Loading…
Cancel
Save