-
Notifications
You must be signed in to change notification settings - Fork 9
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
Mpsk devices #749
Mpsk devices #749
Conversation
5f55f51
to
6b16064
Compare
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.
Overall, these are some high-quality changes! I've found a few details here and there, and some things you could not have known about.
Please add a certain limit for the number of MPSK devices per user. (e.g. 50) |
I will set it to 10 dont think this should be exceeded by anyone |
If you choose a limit this low, there may be situations where it is not enough for a user with many devices. |
Generally in favor, but is there any technical limit we should care about? or do the controllers allow arbitrarily many devices? |
Besides the subnet size, there shouldn't be a limit AFAIK. |
but we dont preserve a IP for them so yeah when he has that many devices we have a problem but when he adds so much devices. Or am I missing something? |
Anyway I added now the limit of 10 devices we could set it down. |
Looks pretty good to me. Do we want to add a note in Pycroft if the user has a legacy wifi password? That could simplify debugging, but in the end it affects only very few users. |
d81dede
to
9dca68e
Compare
@agmes4 I've rebased on top of |
I'm setting up the API tests. In the meantime, I found a few things to fix. |
The API tests have been prepped; @agmes4 continues work and adds an endpoint for the devices. An important feature has been suggested by @mabezi: when a user has no wifi password or a legacy password, instead of the mpsk table we should add a warning alert "user has no wifi password or a legacy password, and needs a new cleartext password to use MPSK clients". This is only relevant for edge cases like active members or other folk with |
Ah, also, please add |
0ecb598
to
05cf3ea
Compare
added a new Subsection for MPSK Clients for the creating of them #744
added the database model for storing added the needed functions as well as the relation to the user and back Signed-off-by: Alex <[email protected]> #744
changed the name Signed-off-by: Alex <[email protected]>
changed the creat mpsks so that it now validates for the length of added clients Signed-off-by: Alex <[email protected]> #744
the api is now able to add more clients Signed-off-by: Alex <[email protected]> #744
Co-authored-by: Lukas Juhrich <[email protected]>
Signed-off-by: Alex <[email protected]> #744
added the db session now as parameter removed kargs for determining api calls moved check for number of mpsks clients to api Signed-off-by: Alex <[email protected]> #744
added the type hint for Session
fixed api wrong type
Since the amount check moved from lib to API, this is not raised anymore.
This uses the data attached by the webargs handler, which is responsible for throwing 422 unprocessable entity. See https://webargs.readthedocs.io/en/latest/framework_support.html#error-handling Also, note that pallets/flask#593 is now closed, making the workaround superfluous.
This fixes a subtle parameter swap in the API call.
In that case, it returns `None` just as if the password weren't set
added same mac test, invalid password, exceeds the max clients added delete mpsk; test not found, unauthed, successful delete Signed-off-by: Alex <[email protected]> #744
refactored code renamed some error codes for better readability Signed-off-by: Alex <[email protected]> #744
added get mpsks clients tests Signed-off-by: Alex <[email protected]> #744
added api route for getting all the mpsks clients of a user Signed-off-by: Alex <[email protected]> #744
added test for changing the mpsk clients Signed-off-by: Alex <[email protected]> #744
changed the error codes for changing mpsk client so they match the ones in adding Signed-off-by: Alex <[email protected]> #744
Signed-off-by: Alex <[email protected]> #744
added karg parameter Signed-off-by: Alex <[email protected]> #744
imported the pycroft.lib.mpsk_client to strict typechecking
05cf3ea
to
7534a7d
Compare
The tablet icon was hard to idenfity.
tests (& migration) went through locally, and |
Added
Resolves #744