veyron2/security, veyron/security: Move ACL authorizer to veyron/security.
ACL authorizer is the default implementation of Authorizer, and is
intended to be used by both the Veyron runtime and applications.
Change-Id: Ib17097ccb94ccc2cd629a851b9a1c9fa29ef3d27
diff --git a/services/identity/identityd/main.go b/services/identity/identityd/main.go
index 9c592b8..fd91182 100644
--- a/services/identity/identityd/main.go
+++ b/services/identity/identityd/main.go
@@ -12,9 +12,11 @@
"time"
"veyron/lib/signals"
+ vsecurity "veyron/security"
"veyron/services/identity/blesser"
"veyron/services/identity/googleoauth"
"veyron/services/identity/handlers"
+
"veyron2"
"veyron2/ipc"
"veyron2/rt"
@@ -121,7 +123,7 @@
}
allowEveryoneACL := security.ACL{security.AllPrincipals: security.AllLabels}
objectname := fmt.Sprintf("identity/%s/google", r.Identity().PublicID().Names()[0])
- if err := server.Serve(objectname, ipc.SoloDispatcher(blesser.NewGoogleOAuthBlesserServer(params), security.NewACLAuthorizer(allowEveryoneACL))); err != nil {
+ if err := server.Serve(objectname, ipc.SoloDispatcher(blesser.NewGoogleOAuthBlesserServer(params), vsecurity.NewACLAuthorizer(allowEveryoneACL))); err != nil {
return nil, fmt.Errorf("failed to start Veyron service: %v", err)
}
vlog.Infof("Google blessing service enabled at endpoint %v and name %q", ep, objectname)
diff --git a/services/mounttable/lib/mounttable.go b/services/mounttable/lib/mounttable.go
index bfb4f56..866df60 100644
--- a/services/mounttable/lib/mounttable.go
+++ b/services/mounttable/lib/mounttable.go
@@ -10,6 +10,7 @@
"time"
"veyron/lib/glob"
+ vsecurity "veyron/security"
"veyron2/ipc"
"veyron2/naming"
@@ -81,7 +82,7 @@
}
result := make(map[string]security.Authorizer)
for name, acl := range acls {
- result[name] = security.NewACLAuthorizer(acl)
+ result[name] = vsecurity.NewACLAuthorizer(acl)
}
if result["/"] == nil {
return nil, fmt.Errorf("No acl for / in %s", path)
diff --git a/services/security/dischargerd/main.go b/services/security/dischargerd/main.go
index cde9103..fb44bb7 100644
--- a/services/security/dischargerd/main.go
+++ b/services/security/dischargerd/main.go
@@ -4,7 +4,9 @@
"flag"
"veyron/lib/signals"
+ vsecurity "veyron/security"
"veyron/services/security/discharger"
+
"veyron2/ipc"
"veyron2/rt"
"veyron2/security"
@@ -25,9 +27,9 @@
func authorizer(file string) security.Authorizer {
if file == "" {
- return security.NewACLAuthorizer(security.ACL{security.AllPrincipals: security.AllLabels})
+ return vsecurity.NewACLAuthorizer(security.ACL{security.AllPrincipals: security.AllLabels})
}
- return security.NewFileACLAuthorizer(file)
+ return vsecurity.NewFileACLAuthorizer(file)
}
func main() {
diff --git a/services/wsprd/ipc/server/server.go b/services/wsprd/ipc/server/server.go
index 8b79b15..b8e7cab 100644
--- a/services/wsprd/ipc/server/server.go
+++ b/services/wsprd/ipc/server/server.go
@@ -8,9 +8,11 @@
"fmt"
"sync"
+ vsecurity "veyron/security"
"veyron/services/wsprd/ipc/stream"
"veyron/services/wsprd/lib"
"veyron/services/wsprd/signature"
+
"veyron2"
"veyron2/ipc"
"veyron2/security"
@@ -166,7 +168,7 @@
}
if s.dispatcher == nil {
- s.dispatcher = newDispatcher(invoker, security.NewACLAuthorizer(
+ s.dispatcher = newDispatcher(invoker, vsecurity.NewACLAuthorizer(
security.ACL{security.AllPrincipals: security.AllLabels},
))
}