Updated Branches: refs/heads/master 23e8bb2e8 -> c00cea338
minor changes Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/c00cea33 Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/c00cea33 Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/c00cea33 Branch: refs/heads/master Commit: c00cea338af91dd9cb1bc275402956457c0040c1 Parents: 23e8bb2 Author: Pradeep Fernando <[email protected]> Authored: Thu Jan 2 12:41:30 2014 +0530 Committer: Pradeep Fernando <[email protected]> Committed: Thu Jan 2 12:41:30 2014 +0530 ---------------------------------------------------------------------- .../config/console.js | 8 ++ .../controllers/acs.jag | 23 +++-- .../controllers/login.jag | 10 +-- .../data/mycartridges.json | 88 +++++++------------- 4 files changed, 56 insertions(+), 73 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/c00cea33/components/org.apache.stratos.manager.console/config/console.js ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/config/console.js b/components/org.apache.stratos.manager.console/config/console.js index e69de29..7f72b0a 100644 --- a/components/org.apache.stratos.manager.console/config/console.js +++ b/components/org.apache.stratos.manager.console/config/console.js @@ -0,0 +1,8 @@ +var config; +(function () { + config = function () { + var config = require('/config/console.json'), + process = require('process'); + return config; + }; +})(); http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/c00cea33/components/org.apache.stratos.manager.console/controllers/acs.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/controllers/acs.jag b/components/org.apache.stratos.manager.console/controllers/acs.jag index ea3b1bc..fb1b101 100644 --- a/components/org.apache.stratos.manager.console/controllers/acs.jag +++ b/components/org.apache.stratos.manager.console/controllers/acs.jag @@ -1,7 +1,9 @@ <% (function () { - var log = new Log(), - configs = require('/config/publisher.js').config(), + var log = new Log(); + log.info("console ACS page...."); + var configs = require('/config/console.js').config(), + process = require("process"), samlResponse = request.getParameter('SAMLResponse'), sessionId = session.getId(), samlRequest = request.getParameter('SAMLRequest'), @@ -14,6 +16,8 @@ IDP_ALIAS: configs.ssoConfiguration.identityAlias }, sso_sessions = application.get('sso_sessions'); + log.info("SAML request :"+ samlRequest); + log.info("SAML response : "+ samlResponse); if (!sso_sessions) { application.put('sso_sessions', {}); @@ -22,6 +26,7 @@ if (samlResponse != null) { samlRespObj = sso.client.getSamlObject(samlResponse); + log.info("SAML response object :" + samlRespObj); if (!sso.client.isLogoutResponse(samlRespObj)) { // validating the signature @@ -32,7 +37,7 @@ if (sessionObj.sessionIndex != null || sessionObj.sessionIndex != 'undefined') { session.put("LOGGED_IN_USER", sessionObj.loggedInUser); - session.put("Loged", "true"); + session.put("Logged", "true"); //sso_sessions[sessionObj.sessionIndex] = sessionObj.sessionId; @@ -45,13 +50,13 @@ //sso_sessions[sso_sessions[sessionObj.sessionIndex] = sessionObj.sessionId] = sessionObj.sessionIndex; sso_sessions[sessionObj.sessionId] = sessionObj.sessionIndex; + response.sendRedirect('/console'); + //var user = require('store').user; - var user = require('store').user; - - if (user.loginWithSAML(sessionObj.loggedInUser)) { - log.debug('user is set :::' + sessionObj.loggedInUser); - response.sendRedirect('/publisher'); - } + //if (user.loginWithSAML(sessionObj.loggedInUser)) { + // log.debug('user is set :::' + sessionObj.loggedInUser); + // response.sendRedirect('/publisher'); + //} } } http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/c00cea33/components/org.apache.stratos.manager.console/controllers/login.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/controllers/login.jag b/components/org.apache.stratos.manager.console/controllers/login.jag index 4c700c0..828c874 100644 --- a/components/org.apache.stratos.manager.console/controllers/login.jag +++ b/components/org.apache.stratos.manager.console/controllers/login.jag @@ -1,15 +1,15 @@ <% (function(){ - var dataConfig = require('/config/console.js').config(), + var dataConfig = require('/config/console.json'), sso = require("sso"), process = require("process"), sessionId = session.getId(), requestURI, requestedPage = request.getParameter("requestedPage"), - relayState = '/publisher', - encodedSAMLAuthRequest = sso.client.getEncodedSAMLAuthRequest(dataConfig.ssoConfiguration.issuer), - log = new Log(), - postUrl = "https://" + process.getProperty('carbon.local.ip') + ":" + process.getProperty('https.port'); + relayState = '/console',log = new Log(); + log.info(dataConfig.ssoConfiguration.issuer); + var encodedSAMLAuthRequest = sso.client.getEncodedSAMLAuthRequest(dataConfig.ssoConfiguration.issuer); + postUrl = "https://" + process.getProperty('carbon.local.ip') + ":" + process.getProperty('https.port'); if (!session.get("Loged")) { http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/c00cea33/components/org.apache.stratos.manager.console/data/mycartridges.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/data/mycartridges.json b/components/org.apache.stratos.manager.console/data/mycartridges.json index 3c2ab3a..b49a04c 100644 --- a/components/org.apache.stratos.manager.console/data/mycartridges.json +++ b/components/org.apache.stratos.manager.console/data/mycartridges.json @@ -1,65 +1,35 @@ -[ +{"cartridge": [ { - kind: "service", - cartridges: [ - { - name: "MyPHP-lakmal", - type: "php", - version: "PHP 5.4", - lb_ip: "192.168.1.1, 192.168.1.2", - access_url: "myweb-lakmal.php.stratos.com", - state: "active" - }, - { - name: "MyPython-lakmal", - type: "python", - version: "Python 2.6", - lb_ip: "192.168.1.1, 192.168.1.2", - access_url: "mypython-lakmal.python.stratos.com", - state: "active" - }, - { - name: "MyRuby-lakmal", - type: "ruby", - version: "Ruby 1.9", - lb_ip: "192.168.1.1, 192.168.1.2", - access_url: "myruby-lakmal.ruby.stratos.com", - state:"inactive" - }, - { - name: "CakePHP-lakmal", - type: "cakephp", - version: "CakePHP 1.9", - lb_ip: "192.168.1.1, 192.168.1.2", - access_url: "cakephp-lakmal.cakephp.stratos.com", - state:"active" - } - ] + "activeInstances": 0, + "cartridgeAlias": "-", + "cartridgeType": "lb", + "description": "LB Cartridge", + "displayName": "load balancer", + "multiTenant": false, + "provider": "apache", + "status": "NOT-SUBSCRIBED", + "version": 4 }, { - kind: "data", - cartridges: [ - { - name: "MyMySQL-lakmal", - type: "mysql", - version: "MySQL 5.1", - lb_ip: "192.168.1.1, 192.168.1.2", - access_url: "mymysql-lakmal.mysql.stratos.com", - state: "active" - } - ] + "activeInstances": 0, + "cartridgeAlias": "-", + "cartridgeType": "php", + "description": "Apache Stratos PHP Cartridge", + "displayName": "Apache Stratos PHP Cartridge", + "multiTenant": false, + "provider": "Apache Stratos", + "status": "NOT-SUBSCRIBED", + "version": 1 }, { - kind: "application", - cartridges: [ - { - name: "MyDrupal-lakmal", - type: "drupal", - version: "Drupal 7", - lb_ip: "192.168.1.1, 192.168.1.2", - access_url: "mydrupal-lakmal.dupal.stratos.com", - state: "active" - } - ] + "activeInstances": 0, + "cartridgeAlias": "-", + "cartridgeType": "stratos-lb", + "description": "Apache Stratos Load Balancer Cartridge", + "displayName": "Apache Stratos Load Balancer Cartridge", + "multiTenant": false, + "provider": "apache", + "status": "NOT-SUBSCRIBED", + "version": 4 } -] \ No newline at end of file +]} \ No newline at end of file
