diff --git a/product/modules/distribution/src/assembly/bin.xml b/product/modules/distribution/src/assembly/bin.xml index 4e7879f71..31ad07efd 100644 --- a/product/modules/distribution/src/assembly/bin.xml +++ b/product/modules/distribution/src/assembly/bin.xml @@ -112,7 +112,7 @@ wso2mdm-${project.version}/repository/conf **/api-manager.xml - **/sso-idp-config.xml + **/security/ @@ -126,7 +126,15 @@ **/trusted-idp-config.xml - + + + src/repository/conf/identity/ + + wso2mdm-${project.version}/repository/conf/identity/ + + **/** + + src/repository/conf/datasources wso2mdm-${project.version}/repository/conf/datasources @@ -224,6 +232,16 @@ 755 + + + + ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps + + ${pom.artifactId}-${pom.version}/repository/deployment/server/webapps + + authenticationendpoint.war + + @@ -280,6 +298,7 @@ 755 + <--> ../tools/mdm-android-agent-archetype/target/mdm-android-agent-archetype-${mdm.android.agent.archetype.version}.jar @@ -390,6 +409,7 @@ 644 + @@ -429,6 +449,11 @@ wso2mdm-${project.version}/repository/conf 644 + + src/repository/conf/security/sso-idp-config.xml + wso2mdm-${project.version}/repository/conf/security + 644 + diff --git a/product/modules/distribution/src/repository/conf/identity.xml b/product/modules/distribution/src/repository/conf/identity.xml index 153948061..737af4f6c 100755 --- a/product/modules/distribution/src/repository/conf/identity.xml +++ b/product/modules/distribution/src/repository/conf/identity.xml @@ -198,7 +198,25 @@ + localhost https://localhost:9443/samlsso + 5 + 60000 + false + 36000 + + org.wso2.carbon.identity.sso.saml.attributes.UserAttributeStatementBuilder + http://wso2.org/claims + false + org.wso2.carbon.identity.sso.saml.builders.claims.DefaultClaimsRetriever + org.wso2.carbon.identity.sso.saml.builders.encryption.DefaultSSOEncrypter + org.wso2.carbon.identity.sso.saml.builders.signature.DefaultSSOSigner + org.wso2.carbon.identity.sso.saml.validators.SAML2HTTPRedirectDeflateSignatureValidator + + + + 5 + false diff --git a/product/modules/distribution/src/repository/conf/identity/identity-providers/default.xml b/product/modules/distribution/src/repository/conf/identity/identity-providers/default.xml new file mode 100644 index 000000000..3d1faa529 --- /dev/null +++ b/product/modules/distribution/src/repository/conf/identity/identity-providers/default.xml @@ -0,0 +1,24 @@ + + default + default + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/product/modules/distribution/src/repository/conf/identity/service-providers/default.xml b/product/modules/distribution/src/repository/conf/identity/service-providers/default.xml new file mode 100644 index 000000000..83cb78a0b --- /dev/null +++ b/product/modules/distribution/src/repository/conf/identity/service-providers/default.xml @@ -0,0 +1,49 @@ + + 1 + default + Default Service Provider + + + + default + + + + + + + + + 1 + + + BasicAuthenticator + basicauth + true + + + + true + true + + + + + + + + true + + + diff --git a/product/modules/distribution/src/repository/conf/identity/service-providers/sp_cdm.xml b/product/modules/distribution/src/repository/conf/identity/service-providers/sp_cdm.xml new file mode 100644 index 000000000..e6006ead2 --- /dev/null +++ b/product/modules/distribution/src/repository/conf/identity/service-providers/sp_cdm.xml @@ -0,0 +1,49 @@ + + 2 + wso2_cdm + CDM + + + + cdm + samlsso + + + + + + + + 1 + + + BasicAuthenticator + basicauth + true + + + + true + true + + + + + + + + true + + + diff --git a/product/modules/distribution/src/repository/conf/security/sso-idp-config.xml b/product/modules/distribution/src/repository/conf/security/sso-idp-config.xml new file mode 100755 index 000000000..cb76f1d87 --- /dev/null +++ b/product/modules/distribution/src/repository/conf/security/sso-idp-config.xml @@ -0,0 +1,49 @@ + + + https://stratos-local.wso2.com/carbon/tenant-register/select_domain.jsp + + + + cdm + https://localhost:9443/cdm/acs + true + true + false + false + + http://wso2.org/claims/role + http://wso2.org/claims/emailaddress + + false + + true + + carbonServer + + + + + diff --git a/product/modules/distribution/src/repository/conf/sso-idp-config.xml b/product/modules/distribution/src/repository/conf/sso-idp-config.xml deleted file mode 100755 index 99f61be9e..000000000 --- a/product/modules/distribution/src/repository/conf/sso-idp-config.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - https://stratos-local.wso2.com/carbon/tenant-register/select_domain.jsp - - - store - https://localhost:9443/store/acs - true - /store/login.jag - - - social - https://localhost:9443/social/acs - true - /social/login - - - publisher - https://localhost:9443/publisher/acs - true - /publisher/controllers/login.jag - - - emm - https://localhost:9443/emm/acs - true - /emm/login - - - mam - https://localhost:9443/mam/acs - true - /mam/login - - - diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/api/mobile/device-api.jag b/product/modules/distribution/src/repository/jaggeryapps/cdm/api/mobile/device-api.jag index 298a62d76..3a52f87bd 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/api/mobile/device-api.jag +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/api/mobile/device-api.jag @@ -25,7 +25,6 @@ var deviceModule = require("/modules/device.js"); if (uri != null) { var uriMatcher = new URIMatcher(callPath); - log.info(callPath); if (uriMatcher.match("devices/mobile/{type}/{deviceid}/")) { var deviceId = uriMatcher.elements().deviceid; var type = uriMatcher.elements().type; diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/api/mobile/operation-api.jag b/product/modules/distribution/src/repository/jaggeryapps/cdm/api/mobile/operation-api.jag index b11875d1e..dcb72476a 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/api/mobile/operation-api.jag +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/api/mobile/operation-api.jag @@ -25,16 +25,12 @@ var deviceModule = require("/modules/device.js"); if (uri != null) { var uriMatcher = new URIMatcher(callPath); - //log.info(callPath); - log.info(uriMatcher.match("operation/{type}/{deviceid}/{operation}")); if (uriMatcher.match("operation/{type}/{deviceid}/{operation}")) { var deviceId = uriMatcher.elements().deviceid; var type = uriMatcher.elements().type; var operation = uriMatcher.elements().operation; var result = deviceModule.performOperation(deviceId, operation,[],type); - - } } %> \ No newline at end of file diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/client/img/operations/lock.png b/product/modules/distribution/src/repository/jaggeryapps/cdm/client/img/operations/DEVICE_LOCK.png similarity index 100% rename from product/modules/distribution/src/repository/jaggeryapps/cdm/client/img/operations/lock.png rename to product/modules/distribution/src/repository/jaggeryapps/cdm/client/img/operations/DEVICE_LOCK.png diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/client/javascript/npm.js b/product/modules/distribution/src/repository/jaggeryapps/cdm/client/javascript/npm.js deleted file mode 100644 index bf6aa8060..000000000 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/client/javascript/npm.js +++ /dev/null @@ -1,13 +0,0 @@ -// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. -require('../../js/transition.js') -require('../../js/alert.js') -require('../../js/button.js') -require('../../js/carousel.js') -require('../../js/collapse.js') -require('../../js/dropdown.js') -require('../../js/modal.js') -require('../../js/tooltip.js') -require('../../js/popover.js') -require('../../js/scrollspy.js') -require('../../js/tab.js') -require('../../js/affix.js') \ No newline at end of file diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/config/config.json b/product/modules/distribution/src/repository/jaggeryapps/cdm/config/config.json new file mode 100644 index 000000000..22f5a8d5b --- /dev/null +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/config/config.json @@ -0,0 +1,16 @@ +{ + "APP_CONTEXT" : "/cdm/", + "API_CONTEXT" : "api", + "HTTPS_URL": "%https.ip%", + "HTTP_URL": "%http.ip%", + "ssoConfiguration": { + "enabled": true, + "issuer": "cdm", + "identityProviderURL": "%https.ip%/sso/samlsso.jag", + "keyStorePassword": "wso2carbon", + "identityAlias": "wso2carbon", + "responseSigningEnabled": "true", + "storeAcs": "%https.ip%/emm/acs", + "keyStoreName": "/repository/resources/security/wso2carbon.jks" + } +} diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/controller/acs.jag b/product/modules/distribution/src/repository/jaggeryapps/cdm/controller/acs.jag index ed367512d..731980f3e 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/controller/acs.jag +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/controller/acs.jag @@ -1,76 +1,35 @@ <% -var dataConfi = require('/config/emm.js').config(); +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. 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. + */ +var dataConfig = require('/modules/mdm-props.js').config(); var sso = require("/modules/sso.js").sso; var log = new Log(); var keyStoreParams = { - keyStoreName: dataConfi.ssoConfiguration.keyStoreName, - keyStorePassword: dataConfi.ssoConfiguration.keyStorePassword, - identityAlias: dataConfi.ssoConfiguration.identityAlias + keyStoreName: dataConfig.ssoConfiguration.keyStoreName, + keyStorePassword: dataConfig.ssoConfiguration.keyStorePassword, + identityAlias: dataConfig.ssoConfiguration.identityAlias } -sso.configure(dataConfi.ssoConfiguration.issuer, "emm", keyStoreParams, dataConfi.ssoConfiguration.identityProviderURL); +sso.configure(dataConfig.ssoConfiguration.issuer, "cdm", keyStoreParams, dataConfig.ssoConfiguration.identityProviderURL); sso.acs(function(loggedInUser) { - session.put("LOGGED_IN_USER", loggedInUser); - session.put("Loged", "true"); + session.put("USER", loggedInUser); var username = loggedInUser; - var userModule = require('/modules/user.js').user; - var db = common.getDatabase(); - var user = new userModule(db); - var objUser = user.getUser({ - 'userid': username, - login: true - }); - if (objUser != null) { - var userFeed = {}; - userFeed.tenantId = stringify(objUser["tenantId"]); - userFeed.username = objUser["username"]; - userFeed.email = objUser["email"]; - userFeed.firstName = objUser["firstName"]; - userFeed.lastName = objUser["lastName"]; - userFeed.mobile = objUser["mobile"]; - userFeed.tenantDomain = user.getTenantDomainFromID(stringify(objUser["tenantId"])); - var parsedRoles = parse(objUser["roles"]); - userFeed.roles = parsedRoles; - var isEMMAdmin = false; - var isAdmin = false; - for (var i = 0; i < parsedRoles.length; i++) { - if (parsedRoles[i] == 'Internal/emmadmin') { - isEMMAdmin = true; - break; - } - if (parsedRoles[i] == 'admin') { - isAdmin = true; - isEMMAdmin = true; - break; - } - } - userFeed.isEMMAdmin = isEMMAdmin; - userFeed.isAdmin = isAdmin; - session.put("emmConsoleUserLogin", "true"); - session.put("emmConsoleUser", userFeed); - //var db = common.getDatabase(); - - var startupModule = require('/modules/startup.js').startup; - var startup = new startupModule(db); - startup.onUserLogin(userFeed); - - var groupModule = require('/modules/group.js').group; - var group = new groupModule(db); - - if (!group.roleExists("Internal/emmadmin")) { - var userList = new Array(); - group.addGroup({ - 'name': 'Internal/emmadmin', - 'users': userList - }); - } - var appController = require('/controller/app.js'); - - if (isAdmin || isEMMAdmin) { - response.sendRedirect('console/dashboard'); - } else { - response.sendRedirect(appController.appInfo().server_url + 'users/devices?user=' + userFeed.username); - } - } + log.debug("User logged in: "+username); + response.sendRedirect('/cdm/dashboard'); }, function() { - response.sendRedirect('/emm'); + response.sendRedirect('/cdm'); }); %> \ No newline at end of file diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/controller/login.jag b/product/modules/distribution/src/repository/jaggeryapps/cdm/controller/login.jag index e5b4c7ec1..60099720b 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/controller/login.jag +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/controller/login.jag @@ -1,17 +1,35 @@ <% +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. 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. + */ (function(){ - if (!session.get("emmConsoleUserLogin")) { - var dataConfi = require('/config/emm.js').config(); - var sso = require("/modules/sso.js").sso; - var keyStoreParams = { - keyStoreName : dataConfi.ssoConfiguration.keyStoreName, - keyStorePassword : dataConfi.ssoConfiguration.keyStorePassword, - identityAlias : dataConfi.ssoConfiguration.identityAlias - } - sso.configure(dataConfi.ssoConfiguration.issuer, "emm", keyStoreParams, dataConfi.ssoConfiguration.identityProviderURL); - sso.login(); + if (!session.get("USER")) { + var dataConfig = require('/modules/mdm-props.js').config(); + var sso = require("/modules/sso.js").sso; + + var keyStoreParams = { + keyStoreName : dataConfig.ssoConfiguration.keyStoreName, + keyStorePassword : dataConfig.ssoConfiguration.keyStorePassword, + identityAlias : dataConfig.ssoConfiguration.identityAlias + } + sso.configure(dataConfig.ssoConfiguration.issuer, "cdm", keyStoreParams, dataConfig.ssoConfiguration.identityProviderURL); + sso.login(); }else{ - response.sendRedirect("/emm"); + response.sendRedirect("/cdm"); } }()); %> diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/controller/logout.jag b/product/modules/distribution/src/repository/jaggeryapps/cdm/controller/logout.jag index b11568a17..8f3062eed 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/controller/logout.jag +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/controller/logout.jag @@ -1,15 +1,32 @@ <% -var user = session.get("emmConsoleUser"); +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. 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. + */ +var user = session.get("USER"); if (user === null) { - response.sendRedirect('/emm'); + response.sendRedirect('/cdm/dashboard'); } else { - var dataConfi = require('/config/emm.js').config(); + var dataConfi = require('/modules/mdm-props.js').config(); var sso = require("/modules/sso.js").sso; var keyStoreParams = { keyStoreName: dataConfi.ssoConfiguration.keyStoreName, keyStorePassword: dataConfi.ssoConfiguration.keyStorePassword, identityAlias: dataConfi.ssoConfiguration.identityAlias } - sso.configure(dataConfi.ssoConfiguration.issuer, "emm", keyStoreParams, dataConfi.ssoConfiguration.identityProviderURL); + sso.configure(dataConfi.ssoConfiguration.issuer, "cdm", keyStoreParams, dataConfi.ssoConfiguration.identityProviderURL); sso.logout(user); } %> \ No newline at end of file diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/data3.json b/product/modules/distribution/src/repository/jaggeryapps/cdm/data3.json index 63cc1345f..68ec90c8e 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/data3.json +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/data3.json @@ -1,6 +1,6 @@ [ { "appName": "8d748f0b-5781-4071", - "packageName": "Dulitha's iPhone" + "packageName": "Appzone" } ] \ No newline at end of file diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/auth-header.jag b/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/auth-header.jag index 4da7a8a6c..71bce94b7 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/auth-header.jag +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/auth-header.jag @@ -1,3 +1,23 @@ -<% -// This will have the auth headers +<% +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. 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. + */ +var loggedUser = session.get("USER"); +if(loggedUser==null){ + response.sendRedirect("/cdm/login"); +} %> \ No newline at end of file diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/footer.jag b/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/footer.jag index a62b5cfb8..9fb8c73b3 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/footer.jag +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/footer.jag @@ -1,4 +1,21 @@ -<% +<% +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. 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. + */ // footer includes %> diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/header.jag b/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/header.jag index 72ffa5bca..9101c2e3f 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/header.jag +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/header.jag @@ -1,4 +1,21 @@ -<% +<% +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. 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. + */ // header includes var ui_config = require("/config/ui.json"); %> @@ -18,6 +35,7 @@
  • Dashboard
  • Configuration
  • Management
  • +
  • Logout
  • diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/layout-footer.jag b/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/layout-footer.jag index 866fdbf8a..3cacf4ed2 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/layout-footer.jag +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/layout-footer.jag @@ -1,3 +1,22 @@ +<% +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. 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. + */ +%> diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/layout-header.jag b/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/layout-header.jag index 79fb43eef..c9a221506 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/layout-header.jag +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/includes/layout-header.jag @@ -1,3 +1,22 @@ +<% +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. 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. + */ +%> diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/init.js b/product/modules/distribution/src/repository/jaggeryapps/cdm/init.js index 859dd1037..e712ad73b 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/init.js +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/init.js @@ -17,7 +17,6 @@ */ //Init js to execute var logger = new Log(); -logger.debug("running debug"); var app_TENANT_CONFIGS = 'tenant.configs'; var app_carbon = require('carbon'); var app_configs = { diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/jaggery.conf b/product/modules/distribution/src/repository/jaggeryapps/cdm/jaggery.conf index 92697a30f..f3891e024 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/jaggery.conf +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/jaggery.conf @@ -2,6 +2,18 @@ "welcomeFiles": ["pages/dashboard.jag"], "initScripts": ["/init.js"], "urlMappings": [ + { + "url": "/login", + "path": "/controller/login.jag" + }, + { + "url": "/logout", + "path": "/controller/logout.jag" + }, + { + "url": "/acs", + "path": "/controller/acs.jag" + }, { "url": "/devices/*", "path": "/pages/device.jag" diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/modules/mdm-props.js b/product/modules/distribution/src/repository/jaggeryapps/cdm/modules/mdm-props.js new file mode 100644 index 000000000..5ec5ac76e --- /dev/null +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/modules/mdm-props.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. 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. + */ + +var config = function () { + var conf = application.get("PINCH_CONFIG"); + if (!conf) { + var pinch = require('/modules/pinch.min.js').pinch, + server = require('carbon').server; + config = require('/config/config.json'), + pinch(config, /^/, function (path, key, value) { + if ((typeof value === 'string') && value.indexOf('%https.ip%') > -1) { + return value.replace('%https.ip%', server.address("https")); + } else if ((typeof value === 'string') && value.indexOf('%http.ip%') > -1) { + return value.replace('%http.ip%', server.address("http")); + } + return value; + }); + application.put("PINCH_CONFIG", config); + conf = config; + } + return conf; +}; \ No newline at end of file diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/modules/pinch.min.js b/product/modules/distribution/src/repository/jaggeryapps/cdm/modules/pinch.min.js new file mode 100644 index 000000000..30af3b3e6 --- /dev/null +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/modules/pinch.min.js @@ -0,0 +1,22 @@ +/* + * * + * * Copyright (c) 2005-2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * * + * * Licensed 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. + * + */ + +(function(){var k=function(a,c){return a.length!==c.length?!1:a.every(function(a,b){return c[b]===a})},j=function(a,c,d){var b,e;if("[object Array]"===Object.prototype.toString.call(a)){b=0;for(e=a.length;b

    You are now being redirected to SSO Provider. If the redirection fails, please click on the button below.

    "); } sso.logout = function(user){ diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/pages/dashboard.jag b/product/modules/distribution/src/repository/jaggeryapps/cdm/pages/dashboard.jag index 8bf721890..0e7cd8d05 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/pages/dashboard.jag +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/pages/dashboard.jag @@ -18,6 +18,7 @@ * under the License. */ var title="WSO2 CDM"; +include("/includes/auth-header.jag"); %> <% diff --git a/product/modules/distribution/src/repository/jaggeryapps/cdm/pages/device.jag b/product/modules/distribution/src/repository/jaggeryapps/cdm/pages/device.jag index 17a14734d..4557350b0 100644 --- a/product/modules/distribution/src/repository/jaggeryapps/cdm/pages/device.jag +++ b/product/modules/distribution/src/repository/jaggeryapps/cdm/pages/device.jag @@ -18,6 +18,7 @@ * under the License. */ var title="WSO2 CDM"; +include("/includes/auth-header.jag"); %> <% @@ -49,7 +50,7 @@ var title="WSO2 CDM"; var operation = operations[i] %> <% @@ -76,13 +77,7 @@ var title="WSO2 CDM"; %> -
    -
    -

    Model: GT-I9500

    -

    IMSI : GT-I9500

    -

    IMEI : GT-I9500

    -
    -
    +
    diff --git a/product/modules/p2-profile-gen/pom.xml b/product/modules/p2-profile-gen/pom.xml index f3245f533..edba18878 100644 --- a/product/modules/p2-profile-gen/pom.xml +++ b/product/modules/p2-profile-gen/pom.xml @@ -305,6 +305,9 @@ org.wso2.carbon:org.wso2.carbon.identity.mgt.feature:${carbon.platform.version} + + org.wso2.carbon:org.wso2.carbon.claim.mgt.server.feature:${carbon.platform.version} + @@ -586,7 +589,10 @@ org.wso2.carbon.identity.mgt.feature.group${carbon.platform.version} - + + org.wso2.carbon.claim.mgt.server.feature.group + ${carbon.platform.version} +