Skip to content

[change] OpenWrt: updated WPA enterprise settings #291 - #292

Merged
nemesifier merged 3 commits into
masterfrom
issues/291-wpa-enterprise
Mar 20, 2024
Merged

nemesifier merged 3 commits into
masterfrom
issues/291-wpa-enterprise

Conversation

@pandafy

@pandafy pandafy commented Jan 24, 2024

Copy link
Copy Markdown
Member
  • Generate "auth_sever", "auth_port" and "auth_secret" options from "server", "port" and "key" properties
  • Set "acct_secret" to the value of "key" if it is not configured in NetJSON
  • Add new options: "acct_inverval", "dae_client", "dae_port", "dae_secret"

Closes #291

@pandafy
pandafy force-pushed the issues/291-wpa-enterprise branch from c45cf89 to 0c83f93 Compare January 24, 2024 15:08
@coveralls

coveralls commented Jan 24, 2024 •

Copy link
Copy Markdown

Coverage Status

coverage: 98.723% (-0.005%) from 98.728%
when pulling e0049b6 on issues/291-wpa-enterprise
into 571af14 on master.

- Generate "auth_sever", "auth_port" and "auth_secret" options
  from "server", "port" and "key" properties
- Set "acct_secret" to the value of "key" if it is not configured
  in NetJSON
- Add new options: "acct_inverval", "dae_client", "dae_port", "dae_secret"

Closes #291
@pandafy
pandafy force-pushed the issues/291-wpa-enterprise branch from 0c83f93 to 91d8e8d Compare January 24, 2024 15:21

@nemesifier nemesifier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, I want to get a chance to review the code a bit more before merging.

@nemesifier nemesifier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, see my comment below.

Comment thread tests/openwrt/test_encryption.py Outdated
o = OpenWrt(native=self._wpa3_enterprise_ap_uci)
from pprint import pprint

pprint(dict(o.config))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

seems a leftover

for option in ['server', 'port']:
if f'auth_{option}' in settings:
settings[option] = settings.pop(f'auth_{option}')
if settings.get('acct_port'):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why not if 'acct_port' in settings? Why using get here? Is it on purpose?

uci['auth_secret'] = encryption['key']
if not encryption.get('acct_secret'):
uci['acct_secret'] = encryption['key']
if encryption.get('acct_server_port'):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same here

if option in encryption:
uci[f'auth_{option}'] = encryption[option]
uci['auth_secret'] = encryption['key']
if not encryption.get('acct_secret'):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same here

@nemesifier
nemesifier merged commit 8396e4f into master Mar 20, 2024
@nemesifier
nemesifier deleted the issues/291-wpa-enterprise branch March 20, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[change] OpenWrt: update WPA enterprise settings

3 participants