You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (rule.PrincipalType=="certificate"&&query.Certificate==rule.Principal) {
142
141
// Break loop as cert is valid.
142
+
log.Infof("Access Control Policy PERMITS the request '%s' from '%s:%s'", viewAddressString, query.RequestingNetwork, query.Certificate)
143
+
returnnil
144
+
}
145
+
if (rule.PrincipalType=="ca"&&query.RequestingOrg==rule.Principal) {
146
+
// Break loop as cert is valid.
147
+
log.Infof("Access Control Policy PERMITS the request '%s' from '%s:%s'", viewAddressString, query.RequestingNetwork, query.RequestingOrg)
143
148
returnnil
144
149
}
145
150
}
146
151
147
152
}
148
-
errorMessage:=fmt.Sprintf("Access Control Policy DOES NOT PERMIT the following request: %s", viewAddressString)
153
+
varerrorMessagestring
154
+
if (query.Certificate!="") {
155
+
errorMessage=fmt.Sprintf("Access Control Policy DOES NOT PERMIT the request '%s' from '%s:%s'", viewAddressString, query.RequestingNetwork, query.Certificate)
156
+
} elseif (query.RequestingOrg!="") {
157
+
errorMessage=fmt.Sprintf("Access Control Policy DOES NOT PERMIT the request '%s' from '%s:%s'", viewAddressString, query.RequestingNetwork, query.RequestingOrg)
158
+
} else {
159
+
errorMessage=fmt.Sprintf("Access Control Policy DOES NOT PERMIT the request '%s' from a foreign entity", viewAddressString)
require.EqualError(t, err, fmt.Sprintf("Access Control Policy DOES NOT PERMIT the following request: %s", viewAddressString))
184
+
require.EqualError(t, err, fmt.Sprintf("Access Control Policy DOES NOT PERMIT the request '%s' from '%s:%s'", viewAddressString, query.RequestingNetwork, query.Certificate))
require.EqualError(t, err, fmt.Sprintf("Access Control Policy DOES NOT PERMIT the following request: %s", viewAddressString))
198
+
require.EqualError(t, err, fmt.Sprintf("Access Control Policy DOES NOT PERMIT the request '%s' from '%s:%s'", viewAddressString, query.RequestingNetwork, query.Certificate))
require.EqualError(t, err, fmt.Sprintf("Access Control Policy DOES NOT PERMIT the following request: %s", viewAddressString))
212
+
require.EqualError(t, err, fmt.Sprintf("Access Control Policy DOES NOT PERMIT the request '%s' from '%s:%s'", viewAddressString, query.RequestingNetwork, query.Certificate))
require.EqualError(t, err, fmt.Sprintf("Access Control Policy DOES NOT PERMIT the following request: %s", viewAddressString))
225
+
require.EqualError(t, err, fmt.Sprintf("Access Control Policy DOES NOT PERMIT the request '%s' from '%s:%s'", viewAddressString, query.RequestingNetwork, query.Certificate))
0 commit comments