Hi,
the sample configuration snippet below should work. Please git
pull and build first, or apply
https://github.com/MarcJHuber/event-driven-servers/commit/c7f72fce39008c38af4bccdd1a30b8b1735c5bfb
manually. That fixes an issue in the parsing code that will keep the daemon from accepting the "==" or "!=" operators for ACLs.
Cheers,
Marc
acl alu_tl_mbh {
if (nac == 10.27.64.0/21)
permit
deny
}
profile alu_tl_mbh {
script {
if (service == shell) {
if (cmd == "") {
set priv-lvl = 15
permit
}
permit
}
}
}
group region
user = ank {
member = region
}
ruleset {
rule region {
enabled = yes
script {
if (acl == alu_tl_mbh &&
member == region) {
profile = alu_tl_mbh
permit
}
}
}
}
--
You received this message because you are subscribed to the Google Groups "Event-Driven Servers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to event-driven-ser...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/event-driven-servers/7bd69bf4-f67d-42c1-9074-abf39b82724bn%40googlegroups.com.
Hi Petr,
I can't apply 2 or more span (nas nets) for 1 user because rule mbh_spans will deny such users. For 1 span + 1 profile group config works fine.
Does syntax has some directive which exit from current rule and start checking next?
in that case, instead of
if (member == span_mbh &&
nas != mbh) deny
if (member == span_test && nas != test_zone) deny
I'd use
if (!
(
(member == span_mbh && nas == mbh)
|| (member == span_test && nas == test_zone)
)
) deny
(formatting for better readibility only)
Cheers,Marc
Hi,
for user demo2, I'm looking at
if (!
(
(member ==
span_test && nas == test_zone) # not working 1 st
condition is false
|| (member == span_mbh
&& nas == mbh) #
# not working 1 st condition is false
)
) deny
which resolves to
if (!
(
(TRUE
&& nas == test_zone) # not working 1 st condition is
false
|| (TRUE &&
nas == mbh) #
# not working 1 st condition is false
)
) deny
which resolves to
if (! ((nas == test_zone) || (nas == mbh) ) ) deny
which resolves to
if (FALSE) deny
which resolves to
deny
so the end result "deny" seems legit as both networks and group memberships do overlap.
I'd go on with:
if (member == span_test && nas == test_zone){
profile == ...
permit
}
if (member == span_mbh && nas == mbh){
profile = ..
permit
}
deny
Cheers,
Mard
--
You received this message because you are subscribed to the Google Groups "Event-Driven Servers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to event-driven-ser...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/event-driven-servers/0e7634a5-16d8-46c2-8d74-badd7b996507n%40googlegroups.com.
Hi Petr,
please git pull and retry. I didn't pay enough attention to
negated non-trivial expressions, and the latest commit should fix
that issue.
Cheers,
Marc
Hi Petr,
please try calling /usr/local/lib/mavis/mavis_tacplus_ldap.py directly. Are there any error messages, e.g. ModuleNotFound errors?
Regarding mavis_tacplus-ng_ldap.pl: It defaults to
my $LDAP_MEMBEROF_REGEX = "^cn=([^,]+),.*";
and I think you can override that with
setenv LDAP_MEMBEROF_REGEX = "^cn=your_group_prefix([^,]+),.*"
for TACACS_GROUP_PREFIX simulation.
Cheers,
Marc
--
You received this message because you are subscribed to the Google Groups "Event-Driven Servers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to event-driven-ser...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/event-driven-servers/372d6502-29df-4785-b186-1282d4ade8c5n%40googlegroups.com.
Hi Petr,
alas, the error messages aren't detailed enough for
troubleshooting. Does setting the appropriate environment
variables (LDAP_HOSTS et al.) and running
printf "0 TACPLUS\n4 $USER\n8 $PASS\n49 AUTH\n=\n" | whatever-backend-script-you-are-going-to-use
show anything weird?
I couldn't reproduce your issue, at all, and all of the three backend options (mavis_tacplus_ldap.pl, mavis_tacplus-ng_ldap.pl, mavis_tacplus_ldap.py) work just fine for me.
Cheers,
Marc
To view this discussion on the web visit https://groups.google.com/d/msgid/event-driven-servers/53d324ee-843d-401d-b2a3-84caf93d4026n%40googlegroups.com.
Hi Petr,
thanks -- I actually seem to have missed that you're using the "groups" module. I've commited a fix that resolve that issue, please git pull and retry.
Cheers,
Marc
Hi Marc!
I think there is something mistake in /mavis/libmavis_groups.c module , please check it
I have tried to replace code block handling TACMEMBER attribute (rows 345-386)
To:
<snip>