Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
48b6e913
Unverified
Commit
48b6e913
authored
Sep 26, 2012
by
Michal 'vorner' Vaner
Browse files
Merge #2191
parents
2adcf037
bfdb265f
Changes
4
Hide whitespace changes
Inline
Side-by-side
doc/guide/bind10-guide.xml
View file @
48b6e913
...
...
@@ -1486,18 +1486,6 @@ AND_MATCH := "ALL": [ RULE_RAW, RULE_RAW, ... ]
will work in a similar way.
</para>
<note>
<simpara>
The list form is currently rejected due to an
implementation bug. There is a plan to fix it relatively
soon, so the syntax is kept here, but note that it won't
work until the bug is fixed. To keep track of the status
of the issue, see
<ulink
url=
"http://bind10.isc.org/ticket/2191"
>
Trac #2191
</ulink>
.
Until then, the value must be a single string.
</simpara>
</note>
<para>
If that is not enough, you can compose the matching conditions
to logical expressions. They are called "ANY", "ALL" and "NOT".
...
...
src/lib/acl/dns.h
View file @
48b6e913
...
...
@@ -136,10 +136,6 @@ public:
virtual
boost
::
shared_ptr
<
RequestCheck
>
create
(
const
std
::
string
&
name
,
isc
::
data
::
ConstElementPtr
definition
,
const
acl
::
Loader
<
RequestContext
>&
loader
);
/// Until we are sure how the various rules work for this case, we won't
/// allow unexpected special interpretation for list definitions.
virtual
bool
allowListAbbreviation
()
const
{
return
(
false
);
}
};
}
// end of namespace "internal"
...
...
src/lib/acl/tests/dns_test.cc
View file @
48b6e913
...
...
@@ -62,6 +62,18 @@ TEST(DNSACL, getRequestLoader) {
"
\"
from
\"
:
\"
192.0.2.1
\"
}]"
)));
}
// Check we can abbreviate the IP address lists and TSIG keys
TEST
(
DNSACL
,
abbreviated
)
{
dns
::
RequestLoader
*
l
(
&
getRequestLoader
());
EXPECT_NO_THROW
(
l
->
load
(
Element
::
fromJSON
(
"[{
\"
action
\"
:
\"
DROP
\"
,"
"
\"
from
\"
: [
\"
127.0.0.1
\"
,"
"
\"
::1
\"
]}]"
)));
EXPECT_NO_THROW
(
l
->
load
(
Element
::
fromJSON
(
"[{
\"
action
\"
:
\"
DROP
\"
,"
"
\"
key
\"
: [
\"
key.example.
\"
,"
"
\"
other.
\"
]}]"
)));
}
class
RequestCheckCreatorTest
:
public
::
testing
::
Test
{
protected:
dns
::
internal
::
RequestCheckCreator
creator_
;
...
...
@@ -78,7 +90,7 @@ TEST_F(RequestCheckCreatorTest, names) {
}
TEST_F
(
RequestCheckCreatorTest
,
allowListAbbreviation
)
{
EXPECT_
FALS
E
(
creator_
.
allowListAbbreviation
());
EXPECT_
TRU
E
(
creator_
.
allowListAbbreviation
());
}
// The following two tests check the creator for the form of
...
...
src/lib/python/isc/acl/tests/dns_test.py
View file @
48b6e913
...
...
@@ -197,10 +197,6 @@ class RequestACLTest(unittest.TestCase):
'[{"action": "ACCEPT", "from": 4}]'
)
self
.
assertRaises
(
LoaderError
,
REQUEST_LOADER
.
load
,
[{
"action"
:
"ACCEPT"
,
"from"
:
4
}])
self
.
assertRaises
(
LoaderError
,
REQUEST_LOADER
.
load
,
'[{"action": "ACCEPT", "from": []}]'
)
self
.
assertRaises
(
LoaderError
,
REQUEST_LOADER
.
load
,
[{
"action"
:
"ACCEPT"
,
"from"
:
[]}])
self
.
assertRaises
(
LoaderError
,
REQUEST_LOADER
.
load
,
'[{"action": "ACCEPT", "key": 1}]'
)
self
.
assertRaises
(
LoaderError
,
REQUEST_LOADER
.
load
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment