From 8083f0350b7f970ccda3bb9b2e997a94c862e292 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Sun, 20 Nov 2016 02:38:05 +0530 Subject: [PATCH 1/3] removed unused components --- .../distribution/src/main/conf/broker.xml | 25 +++++++++++++------ .../core/distribution/src/assembly/bin.xml | 9 ------- .../src/repository/conf/identity/identity.xml | 15 ++++------- 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/modules/broker/distribution/src/main/conf/broker.xml b/modules/broker/distribution/src/main/conf/broker.xml index 0551a2a6..ade1fa3e 100755 --- a/modules/broker/distribution/src/main/conf/broker.xml +++ b/modules/broker/distribution/src/main/conf/broker.xml @@ -117,7 +117,8 @@ This file is ciphertool compliant. Refer PRODUCT_HOME/repository/conf/security/c 32768 @@ -171,13 +172,23 @@ This file is ciphertool compliant. Refer PRODUCT_HOME/repository/conf/security/c inherit from org.dna.mqtt.moquette.server.IAutherizer Note: default implementation authorizes against carbon permission with the topic. --> - + - /permission/admin/device-mgt/user - /permission/admin/device-mgt/admin - mqtt-subscriber - mqtt-subscriber - device-mgt + + + /permission/device-mgt/user/groups/device_events + + /permission/device-mgt/user/groups/device_operation + + admin + admin + https://localhost:9443/oauth2 + + 100 + https://localhost:9443 diff --git a/modules/core/distribution/src/assembly/bin.xml b/modules/core/distribution/src/assembly/bin.xml index b30ac330..0cac429d 100644 --- a/modules/core/distribution/src/assembly/bin.xml +++ b/modules/core/distribution/src/assembly/bin.xml @@ -1176,15 +1176,6 @@ true 644 - - - - ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/device-mgt-scopes.xml - - ${pom.artifactId}-${pom.version}/repository/conf/etc - true - 644 - diff --git a/modules/core/distribution/src/repository/conf/identity/identity.xml b/modules/core/distribution/src/repository/conf/identity/identity.xml index f4930e5a..af9e7900 100644 --- a/modules/core/distribution/src/repository/conf/identity/identity.xml +++ b/modules/core/distribution/src/repository/conf/identity/identity.xml @@ -149,16 +149,11 @@ iwa:ntlm org.wso2.carbon.identity.oauth2.token.handlers.grant.iwa.ntlm.NTLMAuthenticationGrantHandler - - urn:ietf:params:oauth:grant-type:jwt-bearer - org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant.ExtendedDeviceMgtJWTBearerGrantHandler - org.wso2.carbon.device.mgt.oauth.extensions.validators.ExtendedDeviceJWTGrantValidator - - - device-mgt:password - org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant.ExtendedDeviceMgtPasswordGrantHandler - org.wso2.carbon.device.mgt.oauth.extensions.validators.ExtendedDevicePasswordGrantValidator - + + urn:ietf:params:oauth:grant-type:jwt-bearer + org.wso2.carbon.identity.oauth2.grant.jwt.JWTBearerGrantHandler + org.wso2.carbon.identity.oauth2.grant.jwt.JWTGrantValidator + From f13281845907a49e26f11525545f5b71dccc54a4 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Mon, 21 Nov 2016 19:14:48 +0530 Subject: [PATCH 2/3] renamed default idp name --- modules/analytics/distribution/src/assembly/bin.xml | 2 +- .../distribution/src/repository/conf/etc/jwt.properties | 4 ++-- modules/core/distribution/src/assembly/bin.xml | 4 ++-- .../{CDMF_DEFAULT_IDP.xml => iot_default.xml} | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) rename modules/core/distribution/src/repository/conf/identity/identity-providers/{CDMF_DEFAULT_IDP.xml => iot_default.xml} (93%) diff --git a/modules/analytics/distribution/src/assembly/bin.xml b/modules/analytics/distribution/src/assembly/bin.xml index 9e6ee8a9..5191bf41 100644 --- a/modules/analytics/distribution/src/assembly/bin.xml +++ b/modules/analytics/distribution/src/assembly/bin.xml @@ -184,7 +184,7 @@ inputwebsocket.war outputwebsocket.war outputui.war - secured-outputui.war + secured-websocket.war diff --git a/modules/analytics/distribution/src/repository/conf/etc/jwt.properties b/modules/analytics/distribution/src/repository/conf/etc/jwt.properties index 40548373..56870d68 100644 --- a/modules/analytics/distribution/src/repository/conf/etc/jwt.properties +++ b/modules/analytics/distribution/src/repository/conf/etc/jwt.properties @@ -17,13 +17,13 @@ # #issuer of the JWT -iss=CDMF_DEFAULT_IDP +iss=iot_default TokenEndpoint=https://localhost:${iot.core.https.port}/oauth2/token #audience of JWT claim #comma seperated values -aud=JwtIdentityAudience +aud=wso2.org/products/iot #expiration time of JWT (number of minutes from the current time) exp=1000 diff --git a/modules/core/distribution/src/assembly/bin.xml b/modules/core/distribution/src/assembly/bin.xml index 0cac429d..321c76a5 100644 --- a/modules/core/distribution/src/assembly/bin.xml +++ b/modules/core/distribution/src/assembly/bin.xml @@ -839,7 +839,7 @@ - src/repository/conf/identity/identity-providers/CDMF_DEFAULT_IDP.xml + src/repository/conf/identity/identity-providers/iot_default.xml ${pom.artifactId}-${pom.version}/repository/conf/identity/identity-providers true @@ -1153,7 +1153,7 @@ - src/repository/conf/identity/identity-providers/CDMF_DEFAULT_IDP.xml + src/repository/conf/identity/identity-providers/iot_default.xml ${pom.artifactId}-${pom.version}/repository/conf/identity/identity-providers true diff --git a/modules/core/distribution/src/repository/conf/identity/identity-providers/CDMF_DEFAULT_IDP.xml b/modules/core/distribution/src/repository/conf/identity/identity-providers/iot_default.xml similarity index 93% rename from modules/core/distribution/src/repository/conf/identity/identity-providers/CDMF_DEFAULT_IDP.xml rename to modules/core/distribution/src/repository/conf/identity/identity-providers/iot_default.xml index 8109ae92..07b7f035 100644 --- a/modules/core/distribution/src/repository/conf/identity/identity-providers/CDMF_DEFAULT_IDP.xml +++ b/modules/core/distribution/src/repository/conf/identity/identity-providers/iot_default.xml @@ -17,10 +17,10 @@ --> - CDMF_DEFAULT_IDP - CDMF_DEFAULT_IDP + iot_default + iot_default - JwtIdentityAudience + wso2.org/products/iot true From f3f082568f13e2ba8a6002b93ee0cf6f84b4cc8a Mon Sep 17 00:00:00 2001 From: ayyoob Date: Mon, 21 Nov 2016 19:23:55 +0530 Subject: [PATCH 3/3] removed feature listener --- .../core/distribution/src/repository/conf/tomcat/context.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/core/distribution/src/repository/conf/tomcat/context.xml b/modules/core/distribution/src/repository/conf/tomcat/context.xml index 0c4bfa37..512337cd 100644 --- a/modules/core/distribution/src/repository/conf/tomcat/context.xml +++ b/modules/core/distribution/src/repository/conf/tomcat/context.xml @@ -47,9 +47,6 @@ --> - - -