-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add initial VNC specific password functionality #25
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.
I'm staring at this, and at the mess I've made of my code previously (it's been a while since I had all this in my head). I think I have some ideas about this to get it into the db and enable from there. Let me give it a shot and see what you think.
@@ -61,6 +63,11 @@ def parse_args_rm(): | |||
help='') | |||
return parser.parse_args() | |||
|
|||
def check_valid_vnc_password(passwd): | |||
if re.search(r'^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8}\b$', passwd): |
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.
I'd rather break this up into separate conditionals just to make it easier to understand later. I can do that post merge.
Ok. First, I apologize a lot for not getting to this patch over the holidays. You patience is really welcomed. In trying to figure out how to get this added more as an argument, I ended up adding a new optional -V to the amtctrl set command to handle VNC password differently from regular password. It is still missing validation and better error handling, but at least this creates the structure to get this in and use that value instead of the main password. Can you take upstream master and see if it's working for you? And then feel free to enhance with the better validation you had in this patch. Thanks much for bringing up the issue and taking a first stab here, sorry again for this taking so long, and me having to do some structural changes out from under you to get the code ready for this. |
No need to apologize! I tried upstream but was getting some I think the addition of
|
Ah, good catch. Man do I need more real testing in this code.... :) The way this really should be corrected is by changing how the Client is constructed. Adding the vncpasswd parameter where I did was intentional, because it means the API is backwards compatible. We just need to add kwarg calling for the new parameter when the client is constructed. |
Ok I think this is fixed in master now. |
Without making changes to the existing argparse config, I wasn't sure of the best way to add a "prompt" flag for the vnc enable command.
This current PR will detect if the AMT password can't be used as a VNC password, and if so, will prompt the user for a VNC specific password.
@sdague lemme know your thoughts on this. I'm not really sold on ^this^ idea but I figured it would be a starting point at least.
Ref #24
This change is