You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/08/18 04:22:15 UTC
[1/3] git commit: updated refs/heads/saml2 to ea510d1
Repository: cloudstack
Updated Branches:
refs/heads/saml2 66129c3f4 -> ea510d111
ApiServlet: Fix NPE while inserting to auditTrail
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ee908e02
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ee908e02
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ee908e02
Branch: refs/heads/saml2
Commit: ee908e02785146d3012d54d8402508d05669d6c3
Parents: 66129c3
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Mon Aug 18 03:50:18 2014 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Aug 18 03:50:18 2014 +0200
----------------------------------------------------------------------
server/src/com/cloud/api/ApiServlet.java | 3 ---
1 file changed, 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ee908e02/server/src/com/cloud/api/ApiServlet.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServlet.java b/server/src/com/cloud/api/ApiServlet.java
index 5484b1e..8dff6eb 100644
--- a/server/src/com/cloud/api/ApiServlet.java
+++ b/server/src/com/cloud/api/ApiServlet.java
@@ -201,9 +201,6 @@ public class ApiServlet extends HttpServlet {
} catch (final IllegalStateException ignored) {
}
}
- } else {
- auditTrailSb.insert(0, "(userId=" + session.getAttribute("userid") + " accountId=" + ((Account) session.getAttribute("accountobj")).getId() +
- " sessionId=" + session.getId() + ")");
}
HttpUtils.writeHttpResponse(resp, responseString, httpResponseCode, responseType);
return;
[3/3] git commit: updated refs/heads/saml2 to ea510d1
Posted by bh...@apache.org.
SAML2LoginAPIAuthenticatorCmd: Set all necessary cookies and redirect to UI
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ea510d11
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ea510d11
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ea510d11
Branch: refs/heads/saml2
Commit: ea510d111e3e2541d3343d55d81525916096f151
Parents: 9cf1e41
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Mon Aug 18 04:20:54 2014 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Aug 18 04:21:50 2014 +0200
----------------------------------------------------------------------
server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ea510d11/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java b/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java
index 4e17d3d..1f88c1c 100644
--- a/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java
+++ b/server/src/com/cloud/api/auth/SAML2LoginAPIAuthenticatorCmd.java
@@ -324,7 +324,9 @@ public class SAML2LoginAPIAuthenticatorCmd extends BaseCmd implements APIAuthent
resp.addCookie(new Cookie("username", URLEncoder.encode(loginResponse.getUsername(), HttpUtils.UTF_8)));
resp.addCookie(new Cookie("sessionKey", URLEncoder.encode(loginResponse.getSessionKey(), HttpUtils.UTF_8)));
resp.addCookie(new Cookie("account", URLEncoder.encode(loginResponse.getAccount(), HttpUtils.UTF_8)));
- //resp.sendRedirect("http://localhost:8080/client");
+ resp.addCookie(new Cookie("timezone", URLEncoder.encode(loginResponse.getTimeZone(), HttpUtils.UTF_8)));
+ resp.addCookie(new Cookie("userfullname", URLEncoder.encode(loginResponse.getFirstName() + " " + loginResponse.getLastName(), HttpUtils.UTF_8)));
+ resp.sendRedirect("http://localhost:8080/client");
return ApiResponseSerializer.toSerializedString(loginResponse, responseType);
}
[2/3] git commit: updated refs/heads/saml2 to ea510d1
Posted by bh...@apache.org.
ui: Unbox extra quotes from sessionKey cookie value
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9cf1e41f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9cf1e41f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9cf1e41f
Branch: refs/heads/saml2
Commit: 9cf1e41f839d31bba4dff84dc92e77ffa08b242c
Parents: ee908e0
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Mon Aug 18 04:20:03 2014 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Aug 18 04:20:03 2014 +0200
----------------------------------------------------------------------
ui/scripts/cloudStack.js | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9cf1e41f/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index b6dd559..420c137 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -131,6 +131,13 @@
*/
g_mySession = $.cookie('JSESSIONID');
g_sessionKey = $.cookie('sessionKey');
+ // Unbox quotes from sessionKey cookie value
+ if (g_sessionKey[0] === '"' && g_sessionKey[g_sessionKey.length-1] === '"') {
+ g_sessionKey = g_sessionKey.slice(1, g_sessionKey.length-1);
+ $.cookie('sessionKey', g_sessionKey, {
+ expires: 1
+ });
+ }
g_role = $.cookie('role');
g_username = $.cookie('username');
g_userid = $.cookie('userid');