Open layertwo opened 6 years ago
Wow, these are excellent ideas. Let me respond to each individually:
Good idea a. Yes. Same with RADIUS/TACACS support. See credentialing section below b. Agreed c. I like the API (such as with flask-restless) and RBAC. Those were two things I had planned on working on sometime down the road. Excellent ideas.
See credentials section below
Sounds good, but it sounds like it would require the API idea in 1c. to be implemented first?
This is a great idea, and something I toyed with when first starting out on this project. I also played with (as an example) pulling the interface config every X minutes, then when a user logs in, it could show them if there were any changes made, when, etc.
However I went with providing real-time insights into the switch, at the sacrifice of waiting to connect each time you accessed a switch. My justification was it was a similar waiting period when logging into the switch via Putty.
I think this is still a great idea and I'd love to implement it. My ideal solution would be what you mentioned as the default behavior, with a button or something on the "viewspecifichost.html" page to force a full refresh of the data currently on the screen. Thoughts?
Agreed, another excellent idea.
You're right on this. A lot of it was code ported from existing scripts I had, and I never really did a full cleanup of Python code/functions. I've done partial ones here and there, but there's a few things that really need to be done soon, before I add any more new features. See the section at the bottom for my current rough roadmap.
100% agree (see rough roadmap below). If you tell me where you're stuck at, or why, I'll take a look at your branch and try and help out. Thanks for starting this already.
Credentials: I've had this issue for a while now, and I'm very much open to better ways of handling it. The problem I have with using SSH into Cisco networking devices is I have to be able to pass the username and password to the device via SSH, since they don't support SSH keys. Therefore, I have to be able to store the password and be able to decrypt it when accessing the device.
This is why I do not store the credentials any longer than necessary in the app, and I store them server side. I know session variables are stored in an insecure client-side cookie, so I don't like that. I'm not sure how Flask-Login implements this, but I'm open to it if it works.
In short, I'm open to any better way of authenticating to devices securely. I just haven't figured out a better one that works for what I'm trying to do yet.
Current Rough Roadmap: I'm planning on keeping 1.3.1 the last release with new features (excluding bug fixes) for now, and really working on a few foundational items that really need to be done, some you've already mentioned.
For CI testing, the app is growing pretty big and I'm having a much harder time testing everything before pushing a release. I still haven't figured out an easy way to automate tests on this, since it requires a live Cisco switch/router to log into. It's something I've been discussing, but I'm open to ideas on this.
Overall, thanks for these great ideas. I was about to start working on converting to Python 3, but since you've already started that, I'll help in your branch, and start working on general code/function cleanup, and tackling the views.py file.
Thanks for the response!
1c. Is actually easy to implement and I've already done this on a branch I do have.
Re: credentials This is certainly a hard piece to figure out. Flask-Login has the option to hash a password. This can be handled for user accounts created in the app. For situations where the app needs to poll a host, this won't work. Flask-Login is hashing the password and then comparing what the user puts in against its hash. The case where the app needs to poll a host, it could save those credentials in the database encrypted, but they need to be decrypted on the way out. This isn't very strong realistically. I'll do some digging into alternatives, but the first thing that comes to mind would be to Base64 the password (we all know how strong that is).
Re: roadmap Some of the branches I do have a bit experimental have bit-rotted a bit. Personally, I would hold off on porting over to Python3 until existing functions are cleaned up. Some of the work, in my opinion, for cleanup happens when we start moving to local logins and credentials stored in the database. This removes most of the reliance on Redis (we'll bring it back for async). The roadmap I think would probably be best would be this:
Thoughts on this? I'm going to go rebase the branches I do have for logins and credential storage and can provide a PR for that shortly.
@v1tal3, I have a few ideas on some features I'd like to go implement, but I want to run them by you first so we can be on the same page and not accidentally end up implementing similar ideas.
Here's a list of features/items I'd like to work on:
These are some high-level items I'd like to implement. Let me know your thoughts!
Thanks, Lucas