Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: third_party/gsutil/gslib/no_op_auth_plugin.py

Issue 1377933002: [catapult] - Copy Telemetry's gsutilz over to third_party. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Rename to gsutil. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/gsutil/gslib/name_expansion.py ('k') | third_party/gsutil/gslib/no_op_credentials.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/gsutil/gslib/no_op_auth_plugin.py
diff --git a/third_party/pipeline/pipeline/handlers.py b/third_party/gsutil/gslib/no_op_auth_plugin.py
old mode 100755
new mode 100644
similarity index 51%
copy from third_party/pipeline/pipeline/handlers.py
copy to third_party/gsutil/gslib/no_op_auth_plugin.py
index dfa248cfb90eea106045f133d61cf81e39cb4c3e..d79f67a2c47cf5e68baed4ed8c255f32f95e319d
--- a/third_party/pipeline/pipeline/handlers.py
+++ b/third_party/gsutil/gslib/no_op_auth_plugin.py
@@ -1,6 +1,5 @@
-#!/usr/bin/env python
-#
-# Copyright 2010 Google Inc.
+# -*- coding: utf-8 -*-
+# Copyright 2011 Google Inc. 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.
@@ -13,24 +12,24 @@
# 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.
+"""No-op authorization plugin allowing boto anonymous access.
-"""Web request dispatcher for the Google App Engine Pipeline API.
-
-In a separate file from the core pipeline module to break circular dependencies.
+This allows users to use gsutil for accessing publicly readable buckets and
+objects without first signing up for an account.
"""
-from google.appengine.ext import webapp
-from google.appengine.ext.webapp import util as webapp_util
-
-import pipeline
+from __future__ import absolute_import
+from boto.auth_handler import AuthHandler
-_APP = webapp.WSGIApplication(pipeline.create_handlers_map(), debug=True)
+class NoOpAuth(AuthHandler):
+ """No-op authorization plugin class."""
-def _main():
- webapp_util.run_wsgi_app(_APP)
+ capability = ['s3']
+ def __init__(self, path, config, provider):
+ pass
-if __name__ == '__main__':
- _main()
+ def add_auth(self, http_request):
+ pass
« no previous file with comments | « third_party/gsutil/gslib/name_expansion.py ('k') | third_party/gsutil/gslib/no_op_credentials.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698