-
Notifications
You must be signed in to change notification settings - Fork 952
configurable radius max retries and cascade-on-timeout suppression #10271
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
Closed
fmotzet
wants to merge
1
commit into
opnsense:master
from
fmotzet:auth-radius-mfa-retries-and-cascade
+56
−0
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -99,6 +99,7 @@ | |
| $pconfig['radius_acct_port'] = $a_server[$id]['radius_acct_port'] ?? ''; | ||
| $pconfig['radius_secret'] = $a_server[$id]['radius_secret'] ?? ''; | ||
| $pconfig['radius_timeout'] = $a_server[$id]['radius_timeout'] ?? ''; | ||
| $pconfig['radius_max_retries'] = $a_server[$id]['radius_max_retries'] ?? ''; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we better move these to the Radius class, same as 95483e5 |
||
| $pconfig['radius_stationid'] = $a_server[$id]['radius_stationid'] ?? ''; | ||
|
|
||
| if (!empty($pconfig['radius_auth_port']) && | ||
|
|
@@ -217,6 +218,9 @@ | |
| if (($pconfig['type'] == "radius") && isset($pconfig['radius_timeout']) && !empty($pconfig['radius_timeout']) && (!is_numeric($pconfig['radius_timeout']) || (is_numeric($pconfig['radius_timeout']) && ($pconfig['radius_timeout'] <= 0)))) { | ||
| $input_errors[] = gettext("RADIUS Timeout value must be numeric and positive."); | ||
| } | ||
| if (($pconfig['type'] == "radius") && isset($pconfig['radius_max_retries']) && !empty($pconfig['radius_max_retries']) && (!is_numeric($pconfig['radius_max_retries']) || (is_numeric($pconfig['radius_max_retries']) && ($pconfig['radius_max_retries'] <= 0)))) { | ||
| $input_errors[] = gettext("RADIUS Max Retries value must be numeric and positive."); | ||
| } | ||
| if (empty($pconfig['name'])) { | ||
| $input_errors[] = gettext('A server name must be provided.'); | ||
| } elseif (strpos($pconfig['name'], ',') !== false) { | ||
|
|
@@ -278,6 +282,12 @@ | |
| $server['radius_timeout'] = 5; | ||
| } | ||
|
|
||
| if (!empty($pconfig['radius_max_retries'])) { | ||
| $server['radius_max_retries'] = $pconfig['radius_max_retries']; | ||
| } else { | ||
| unset($server['radius_max_retries']); | ||
| } | ||
|
|
||
| if (!empty($pconfig['radius_stationid'])) { | ||
| $server['radius_stationid'] = $pconfig['radius_stationid']; | ||
| } else { | ||
|
|
@@ -368,6 +378,7 @@ | |
| 'radius_secret', | ||
| 'radius_srvcs', | ||
| 'radius_timeout', | ||
| 'radius_max_retries', | ||
| 'radius_stationid', | ||
| 'sync_create_local_users', | ||
| 'sync_memberof', | ||
|
|
@@ -864,6 +875,17 @@ | |
| </div> | ||
| </td> | ||
| </tr> | ||
| <tr class="auth_radius auth_options hidden"> | ||
| <td><a id="help_for_radius_max_retries" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Max Retries");?></td> | ||
| <td> | ||
| <input name="radius_max_retries" type="text" id="radius_max_retries" size="20" value="<?=$pconfig['radius_max_retries'];?>"/> | ||
| <div class="hidden" data-for="help_for_radius_max_retries"> | ||
| <br /><?= gettext("Maximum number of request attempts to send to the RADIUS server before giving up.") ?> | ||
| <br /><?= gettext("If left blank, the default value is 3.") ?> | ||
| <br /><br /><?= gettext("NOTE: If you are using an interactive two-factor authentication system, raise this value (and/or Authentication Timeout) to extend the approval window the user has to acknowledge the prompt.") ?> | ||
| </div> | ||
| </td> | ||
| </tr> | ||
| <tr class="auth_radius auth_options hidden"> | ||
| <td><a id="help_for_radius_stationid" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Called Station ID");?></td> | ||
| <td> | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's focus on retries and don't try to complicate the flow further than needed, if you only need a single upstream authenticator, just configure a single one.