Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

11.2 First mactch don´t win anymore. #6896

Closed
fdurand opened this issue Feb 16, 2022 · 2 comments · Fixed by #6898
Closed

11.2 First mactch don´t win anymore. #6896

fdurand opened this issue Feb 16, 2022 · 2 comments · Fixed by #6898

Comments

@fdurand
Copy link
Member

fdurand commented Feb 16, 2022

Describe the bug
2 authentication rules can match for the same user.

To Reproduce
Create a authentication rule in a ldap source.

The first one with filter sAMAccountName=zammit role=patate access duration = 1 day
A second one catch_all and time_balance = 3 days

Authenticate on the portal, the role patate is set with an access duration of 1 day and a time_balance of 3 days.

Expected behavior
First rule should only match.

@julsemaan
Copy link
Collaborator

It's due to the fact we filter on the action when matching rules, ex:
time_balance_from_source => sub { $_[0]->new_node_info->{time_balance} = pf::util::normalize_time(authentication_match_wrapper($_[0]->source->id, $_[0]->auth_source_params, $Actions::SET_TIME_BALANCE)); }

I'll rewrite this so that the auth actions in the portal don't filter on the action but grab the first unfiltered hit and extract the action from it

@julsemaan
Copy link
Collaborator

This will introduce a change of behavior though so we'll have to consider if we push this to the maintenance or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants