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

A new test (dot1x) and a new tool (wpa) which was implemented to test 802.1X availability #1093

Open
wants to merge 21 commits into
base: 4.4.0
Choose a base branch
from

Conversation

krihal
Copy link

@krihal krihal commented Dec 2, 2020

Initial pull request for 802.1X test and tool developed at SUNET Sweden. This was initially developed on the 4.3 branch using Python 2.

A few issues I can see right away:

  • The wpa tool is responsible of both doing authentication with WPA Supplicant and acquire an address using dhclient. We might want to split this into two different tools or rename it.

  • This requires WPA Supplicant to be configured on the host system with D-Bus support enabled since we are using wpa_cli to configure things. I don't know how things like that is handled for other tools.

  • When running this, you really want to run it in a separate network namespace, otherwise dhclient will replace the default route if an address is acquired and you risk loosing connectivity to the machine.

Any suggestions for improvements are very welcome.

/Kristofer - SUNET

@mfeit-internet2
Copy link
Member

I've begun a review; expect a flurry of comments.

@krihal
Copy link
Author

krihal commented Dec 2, 2020

Looking forward to it. :-)

Copy link
Member

@mfeit-internet2 mfeit-internet2 left a comment

Choose a reason for hiding this comment

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

This is headed in the right direction. Pretty much everything I found in the code is minor.

Additionally:

Replace all occurrences of the old test name to the new one. (There are a few stray references to trace.)

Our convention for naming JSON object members is to separate words with hyphens (e.g., foo-bar rather than foo_bar).

Name the test to be more-specific (e.g., 802.1x or ieee802.1x). Further comments on the test to follow in #1093.

If the driver can be determined based on system information about the interface, remove that parameter from the test and let the tool take care of it.

pscheduler-test-dot1x/dot1x/limit-is-valid Outdated Show resolved Hide resolved
pscheduler-test-dot1x/dot1x/limit-passes Outdated Show resolved Hide resolved
pscheduler-test-dot1x/dot1x/result-format Outdated Show resolved Hide resolved
pscheduler-test-dot1x/dot1x/validate.py Outdated Show resolved Hide resolved
pscheduler-test-dot1x/dot1x/validate.py Outdated Show resolved Hide resolved
pscheduler-tool-wpa/wpa/run Outdated Show resolved Hide resolved
pscheduler-tool-wpa/wpa/run Outdated Show resolved Hide resolved
pscheduler-tool-wpa/wpa/run Outdated Show resolved Hide resolved
pscheduler-tool-wpa/wpa/run Outdated Show resolved Hide resolved
pscheduler-tool-wpa/wpa/run Outdated Show resolved Hide resolved
@krihal
Copy link
Author

krihal commented Dec 3, 2020

This is headed in the right direction. Pretty much everything I found in the code is minor.

Additionally:

Replace all occurrences of the old test name to the new one. (There are a few stray references to trace.)

Our convention for naming JSON object members is to separate words with hyphens (e.g., foo-bar rather than foo_bar).

Name the test to be more-specific (e.g., 802.1x or ieee802.1x). Further comments on the test to follow in #1093.

If the driver can be determined based on system information about the interface, remove that parameter from the test and let the tool take care of it.

The test is now renamed to 802.1x. We don't use the driver, so I removed that parameter.

…ol phase1 and phase2 settings for WPA Supplicant.

* Don't pre-populate results we might not need if the test fails.
* Print whether we got an address or not in the debug log.
…assid for example we can be sure that the authenticaion was successful. Same goes for IP addresses.
@epcjr
Copy link
Collaborator

epcjr commented Dec 4, 2020 via email

@krihal
Copy link
Author

krihal commented Dec 4, 2020

I'll try to test this

You guys are probably way past this, but I thought I'd share anyway: https://github.com/perfsonar/pscheduler/tree/master/scripts/PDK There are some MD files there with instructions, as well as the templating scripts. Just FYI. Thanks,

Thanks for sharing, thats very useful. The plugin_dev script could have saved me quite some time.

@krihal
Copy link
Author

krihal commented Dec 4, 2020

Thanks for the feedback, I've tried to fix it and improve thing in general. Also, I'll try to test this thoroughly to make sure everything is still working, there might be some regressions I've missed.

@mfeit-internet2
Copy link
Member

Note for later: 4.4.0 will be making some minor changes to the file layout of packages that will have to be done for this package when it is pulled in.

@mfeit-internet2
Copy link
Member

The UMich interns did work on #947, #1092 and #1167 that should cover most of this.

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.

3 participants