From fbfd9ba9110ee01e3963ef9231e75c774d6b4d09 Mon Sep 17 00:00:00 2001 From: inoshperera Date: Tue, 16 Nov 2021 10:37:13 +0530 Subject: [PATCH] ios enrollment fixes Fixes https://gitlab.com/entgra/product-iots/-/issues/1184 --- .../framework/authenticator/CertificateAuthenticator.java | 4 +++- .../templates/repository/conf/cdm-config.xml.j2 | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/CertificateAuthenticator.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/CertificateAuthenticator.java index 5a40a3a951e..4bead3ad4fe 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/CertificateAuthenticator.java +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/CertificateAuthenticator.java @@ -116,7 +116,9 @@ public class CertificateAuthenticator implements WebappAuthenticator { deviceIdentifier.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_IOS); TenantedDeviceWrapper tenantedDeviceWrapper = scepManager.getValidatedDevice(deviceIdentifier); authenticationInfo.setTenantDomain(tenantedDeviceWrapper.getTenantDomain()); - authenticationInfo.setTenantId(tenantedDeviceWrapper.getTenantId()); + // To make sure the tenant flow is not initiated in the valve as the + // tenant flows are initiated at the API level on iOS + authenticationInfo.setTenantId(-1); if (tenantedDeviceWrapper.getDevice() != null && tenantedDeviceWrapper.getDevice().getEnrolmentInfo() != null) { diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2 index 78b0fafd8a4..5a25843f940 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2 +++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2 @@ -44,7 +44,7 @@ org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.XMPPBasedPushNotificationProvider {% if device_mgt_conf.push_notification_conf.push_notification_providers is defined %} {%- for push_notification_provider in device_mgt_conf.push_notification_conf.push_notification_providers -%} - {{push_notification_provider}} + {{push_notification_provider.name}} {% endfor %} {% endif %}