-
-
Notifications
You must be signed in to change notification settings - Fork 206
[feature] Added Called/Calling-Station-Id to authorize API to fix Simultaneous-Use #649
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
base: master
Are you sure you want to change the base?
Conversation
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.
It's "called_station_id", not "calling_station_id". I double checked the issue, the title was correct, but the description was incorrect.
After thinking about it again, I believe we should use both called/calling-station-id, I updated the issue description
We need a test for this, here's the scenario:
- user has an open radius accounting
- it tries to re-authenticate from the same client to the same NAS (same calling-station-id and called-station-id)
- authorize succeeds
@nemesifier I have updated the changes by accepting called_station_id, about the tests, when same device and same NAS reauth is allowed, it returns 200 Accept as expected and when Simultaneous-Use = 1 with 3 cases:
I wasn’t getting the 401 earlier, hadn’t linked the user to the org in the admin panel. can you test it and confirm if everything’s working as expected? |
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.
@jevinjojo tests and QA checks are failing, the developer docs of OpenWISP RADIUS explain how to run tests and QA checks.
Please read about our Coding Style Conventions, it explains how to fix formatting issues easily.
@nemesifier there was a flake8 warning in the test file. can we re-run the workflow. |
@jevinjojo the CI build will fail due to conventions for commit messages not being followed, it's not a big deal, but my understanding is that you'd like to contribute more to @openwisp, so I recommend following all the contributing best practices explained in our guidelines. |
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.
It looks good @jevinjojo but there's a few failing tests though so not ready yet ❌, see my comments below for some adjustments.
) | ||
|
||
open_sessions = open_sessions.count() | ||
|
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.
Please remove all these blank lines because they provide no value.
openwisp_radius/tests/mixins.py
Outdated
payload["called_station_id"] = called_station_id | ||
if calling_station_id is not None: | ||
payload["calling_station_id"] = calling_station_id | ||
|
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.
Please remove this blank line.
Checklist
Reference to Existing Issue
Description of Changes