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 2013/01/12 03:44:30 UTC
[11/11] git commit: ApiServer: Debug messages, don't spam with info,
remove identity helper in ResponseGenerator
Updated Branches:
refs/heads/master 1033200b0 -> 0dca44efe
ApiServer: Debug messages, don't spam with info, remove identity helper in ResponseGenerator
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/0dca44ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/0dca44ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/0dca44ef
Branch: refs/heads/master
Commit: 0dca44efe8f3adee3f18127791edac7b0e5c1f81
Parents: 4077997
Author: Rohit Yadav <bh...@apache.org>
Authored: Fri Jan 11 18:43:26 2013 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Fri Jan 11 18:44:20 2013 -0800
----------------------------------------------------------------------
.../apache/cloudstack/api/ResponseGenerator.java | 7 -------
server/src/com/cloud/api/ApiServer.java | 13 ++++++-------
2 files changed, 6 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0dca44ef/api/src/org/apache/cloudstack/api/ResponseGenerator.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ResponseGenerator.java b/api/src/org/apache/cloudstack/api/ResponseGenerator.java
index e9f988a..63df4dc 100644
--- a/api/src/org/apache/cloudstack/api/ResponseGenerator.java
+++ b/api/src/org/apache/cloudstack/api/ResponseGenerator.java
@@ -315,13 +315,6 @@ public interface ResponseGenerator {
StorageNetworkIpRangeResponse createStorageNetworkIpRangeResponse(StorageNetworkIpRange result);
/**
- * @param tableName TODO
- * @param token
- * @return
- */
- Long getIdentiyId(String tableName, String token);
-
- /**
* @param resourceTag
* @param keyValueOnly TODO
* @return
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0dca44ef/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index d34af67..52f2aef 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -601,30 +601,29 @@ public class ApiServer implements HttpRequestHandler {
// if api/secret key are passed to the parameters
if ((signature == null) || (apiKey == null)) {
- if (s_logger.isDebugEnabled()) {
- s_logger.info("expired session, missing signature, or missing apiKey -- ignoring request...sig: " + signature + ", apiKey: " + apiKey);
- }
+ s_logger.debug("Expired session, missing signature, or missing apiKey -- ignoring request. Signature: " + signature + ", apiKey: " + apiKey);
return false; // no signature, bad request
}
Date expiresTS = null;
+ // FIXME: Hard coded signature, why not have an enum
if ("3".equals(signatureVersion)) {
// New signature authentication. Check for expire parameter and its validity
if (expires == null) {
- s_logger.info("missing Expires parameter -- ignoring request...sig: " + signature + ", apiKey: " + apiKey);
+ s_logger.debug("Missing Expires parameter -- ignoring request. Signature: " + signature + ", apiKey: " + apiKey);
return false;
}
synchronized (_dateFormat) {
try {
expiresTS = _dateFormat.parse(expires);
} catch (ParseException pe) {
- s_logger.info("Incorrect date format for Expires parameter", pe);
+ s_logger.debug("Incorrect date format for Expires parameter", pe);
return false;
}
}
Date now = new Date(System.currentTimeMillis());
if (expiresTS.before(now)) {
- s_logger.info("Request expired -- ignoring ...sig: " + signature + ", apiKey: " + apiKey);
+ s_logger.debug("Request expired -- ignoring ...sig: " + signature + ", apiKey: " + apiKey);
return false;
}
}
@@ -635,7 +634,7 @@ public class ApiServer implements HttpRequestHandler {
// verify there is a user with this api key
Pair<User, Account> userAcctPair = _accountMgr.findUserByApiKey(apiKey);
if (userAcctPair == null) {
- s_logger.info("apiKey does not map to a valid user -- ignoring request, apiKey: " + apiKey);
+ s_logger.debug("apiKey does not map to a valid user -- ignoring request, apiKey: " + apiKey);
return false;
}