# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: Auth.py,v 1.10 2007/01/04 16:01:28 mlhuang Exp $
+# $Id: Auth.py,v 1.12 2007/01/30 23:08:58 mlhuang Exp $
#
import crypt
from PLC.Nodes import Node, Nodes
from PLC.Sessions import Session, Sessions
from PLC.Peers import Peer, Peers
+from PLC.Boot import notify_owners
class Auth(Parameter):
"""
raise PLCAuthenticationFailure, "Cannot determine IP address of requestor"
if nodenetwork['ip'] != method.source[0]:
- raise PLCAuthenticationFailure, "Requestor IP %s does not mach node IP %s" % \
+ raise PLCAuthenticationFailure, "Requestor IP %s does not match node IP %s" % \
(method.source[0], nodenetwork['ip'])
else:
raise PLCAuthenticationFailure, "No node key or boot nonce"
method.caller = node
except PLCAuthenticationFailure, fault:
- # XXX Send e-mail
+ if nodes:
+ notify_owners(method, node, 'authfail', include_pis = True, include_techs = True, fault = fault)
raise fault
class AnonymousAuth(Auth):