Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/120243

Change subject: Tools: Adapt proxylistener to eqiad naming scheme
......................................................................

Tools: Adapt proxylistener to eqiad naming scheme

In eqiad, tool accounts are now named "tools.TOOL", and there are
precautions in place that user accounts cannot be named in this way.

Bug: 62961
Change-Id: Iaa44f442a10ad1c65bf4e33255ce2093f98cb12a
---
M modules/toollabs/files/proxylistener.py
1 file changed, 2 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/120243/1

diff --git a/modules/toollabs/files/proxylistener.py 
b/modules/toollabs/files/proxylistener.py
index 97c2e5b..5d13368 100644
--- a/modules/toollabs/files/proxylistener.py
+++ b/modules/toollabs/files/proxylistener.py
@@ -81,15 +81,12 @@
             return
 
         # Only tool accounts are allowed to ask for routes
-        # Assume that *only* tool accounts will have local- prefix
-        # Since user accounts need to be approved, and I doubt anything with 
local-
-        # will make it.
-        if not user.startswith('local-'):
+        if not user.startswith('tools.'):
             self.request.send("This service available only to tool accounts")
             self.request.close()
             return
 
-        toolname = user.replace("local-", "")
+        toolname = user.replace("tools.", "")
 
         redis_key = "prefix:%s" % toolname
 

-- 
To view, visit https://gerrit.wikimedia.org/r/120243
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa44f442a10ad1c65bf4e33255ce2093f98cb12a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt <t...@tim-landscheidt.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to