Development
This commit is contained in:
parent
a6031616df
commit
47b0e98e31
9 changed files with 304 additions and 0 deletions
|
|
@ -1,6 +1,9 @@
|
|||
import json
|
||||
import os
|
||||
from config_utils import collect_layout_tokens, CONFIGS_DIR
|
||||
import license
|
||||
|
||||
PRO_LICENSE = license.is_pro()
|
||||
|
||||
RADIUS_LOG_MAX = 50
|
||||
RADIUS_LOG_FILE = '/var/log/freeradius/radius.log'
|
||||
|
|
@ -65,6 +68,13 @@ def collect_tokens(cfg):
|
|||
fr_opts = fr.get('options', {})
|
||||
fr_gen = fr.get('general', {})
|
||||
tokens['RADIUS_MAC_FORMAT'] = fr_opts.get('mac_format', 'aabbccddeeff')
|
||||
tokens['RADIUS_AUTH_MODE'] = fr_opts.get('auth_mode', 'mab')
|
||||
pro_suffix = '' if PRO_LICENSE else ' (PRO REQUIRED)'
|
||||
tokens['RADIUS_AUTH_MODE_OPTIONS'] = json.dumps([
|
||||
{'value': 'mab', 'label': 'MAC Authentication Bypass (MAB)'},
|
||||
{'value': 'eap_password', 'label': f'802.1X - Client Username/Password{pro_suffix}'},
|
||||
{'value': 'eap_credential', 'label': f'802.1X - Client Certificate{pro_suffix}'},
|
||||
])
|
||||
tokens['RADIUS_APPLY_TO'] = fr_opts.get('apply_to', 'all')
|
||||
tokens['RADIUS_AP_IPS'] = json.dumps(fr_opts.get('ap_ips', []))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue