From 1f538847229b61c32828540096925c3b4749e96e Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Fri, 27 Mar 2015 17:57:46 +0100 Subject: [PATCH] Remove metrics for authorizedBy* --- docs/metrics.md | 2 -- lib/cartodb/server_options.js | 11 ----------- 2 files changed, 13 deletions(-) diff --git a/docs/metrics.md b/docs/metrics.md index ba356a48..0d641ac6 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -25,9 +25,7 @@ Again, each inner timer may have several inner timers. - **TemplateMaps_instance**: time to retrieve a map template instance, see *getTemplate* and *authorizedByCert* - **affectedTables**: time to check what are the affected tables for adding the cache channel, see *addCacheChannel* - **authorize**: time to authorize a request, see *authorizedByAPIKey*, *authorizedByCert*, *authorizedBySigner* -- **authorizedByAPIKey**: time to authorize using an API KEY - **authorizedByCert**: time to authorize a template instantiation -- **authorizedBySigner**: time to authorize a request with auth_token - **findLastUpdated**: time to retrieve the last update time for a list of tables, see *affectedTables* - **generateCacheChannel**: time to generate the headers for the cache channel based on the request, see *addCacheChannel* - **getSignerMapKey**: time to retrieve from redis the authorized user for a template map diff --git a/lib/cartodb/server_options.js b/lib/cartodb/server_options.js index e595d26b..e1957fbb 100644 --- a/lib/cartodb/server_options.js +++ b/lib/cartodb/server_options.js @@ -424,8 +424,6 @@ module.exports = function(redisPool) { return; } - _.extend(req.params, { _authorizedByApiKey: true }); - // authorized by api key, login as the given username and stop pgConnection.setDBAuth(user, req.params, function(err) { callback(err, true); // authorized (or error) @@ -433,13 +431,6 @@ module.exports = function(redisPool) { }, function checkSignAuthorized(err, signed_by){ assert.ifError(err); - if (req.profiler) { - if ( req.params._authorizedByApiKey ) { - req.profiler.done('setDBAuth'); - } else { - req.profiler.done('authorizedBySigner'); - } - } if ( ! signed_by ) { // request not authorized by signer. @@ -457,8 +448,6 @@ module.exports = function(redisPool) { return; } - // Authorized by "signed_by" ! - _.extend(req.params, { _authorizedBySigner: signed_by }); pgConnection.setDBAuth(signed_by, req.params, function(err) { if (req.profiler) { req.profiler.done('setDBAuth');