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

Feature/registration role violation #1929

Merged
merged 3 commits into from
Jan 4, 2017

Conversation

julsemaan
Copy link
Collaborator

Description

Allow to define the 'registration' role in violation whitelistable roles so it matches unregistered devices
Also prevents user from selecting whitelistable roles that can never match (macDetection,voice,inline,isolation)

Impacts

Violation role whitelisting

Issue

fixes #1278

Delete branch after merge

YES

NEWS file entries

Enhancements

  • Allow to whitelist unregistered devices from violations

UPGRADE file entries

When whitelisting roles in a violation, the registration role will now match unregistered devices where before it would never match. Make sure to go through violations that may include this role to make sure it is relevant.

my $node_role = $node_info->{category};
# matching registration role for unregistered devices
if($node_info->{status} eq $pf::node::STATUS_UNREGISTERED) {
$node_role = "registration";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use constant $REGISTRATION_ROLE

# NOTE: options_roles is a method on form but that receives the field as the first argument
my %roles = options_roles($self);
# Roles that aren't technically roles (non-db), except for registration which matches unregistered devices
my %skip_roles = (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use constants

@julsemaan
Copy link
Collaborator Author

fixaide

@fdurand
Copy link
Member

fdurand commented Jan 4, 2017

sank iou

@fdurand fdurand merged commit b071bfd into devel Jan 4, 2017
@jrouzierinverse jrouzierinverse deleted the feature/registration-role-violation branch February 9, 2018 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow to whitelist unregistered devices from violations
3 participants