Hi.
If I am understanding you correctly, regarding the table model, you only need to implement the methods to add and remove the
HostAuthentication(s) in the class
OptionsAuthenticationTableModel.
Curiously, I'm about to finish some changes on how multiple related options are managed (which includes the management of the host authentication) and other details regarding the usability of all the options.
Currently there are several ways, which can be grouped in 3 categories, on how those options are managed. All of them have some issues that impair the usability, from minor to greater:
1) The options are added, removed and edited directly in the table (example: "Session properties" > "Exclude from proxy"). The main problems are:
- to remove an option you have to delete the contents of the cell;
- (a special annoying one) when editing the options if the cell doesn't loose the focus and you close the dialogue the option doesn't get updated;
- there's no way to temporarily disable an option (not related to how the management is done, but it's worth remarking it, as most of the multiple related options, if not all, should provide a way to enable/disable them);
- it may happen that the last row is not always shown immediately to allow the addition of a new entry;
2) The options are added, edited and removed with buttons, the fields of those options are shown beneath the table listing the options (example: "Options" > "Applications"). There are minor problems related to how the buttons work and the fields being always editable.
- If by mistake you press the wrong button (pressing "new" again) it will result in a lose of the additions;
- the fields are not updated if the keyboard is used (not related to the management, but it's worth pointing, as this is a usability detail that should be taken in consideration);
3) The options are managed in a text area, this is, by far, the least usable (example: "Options" > "Connections" > "Skip IP addresses (...)" text area). There's no need to say too much about this way (it, almost, speaks for itself), the user has to manually select the correct option to remove it, which can be hard to pinpoint if you have a lot of those and there's no way to disable an entry.
Not all the issues are described, but, more or less, the most relevant to the ways of management, are.
The changes are an attempt to normalise how the management of multiple related options is done throughout ZAP, so, hopefully, the user doesn't have to jump from a way of doing it to another one completely different. It should also allow the user to specify some details of those options, in the case of the "Exclude from proxy", there should be an easy way to specify an URL in plain text without the need to manually "quote" the "regular expression", more over it allows to introduce other conditions not restricted to a specific component of the message like the URL (may be useful if the user wants to exclude files that are greater than a specific size (determined through the "Content-Length" header field)).
Some of the other details regarding the usability of all the options:
- When an option is disabled, other options that depend on the disabled option shouldn't be reset. If the user only wanted to disable temporarily the option, he won't need to fill all the fields again (example: "Options" > "Connections" > "Use an outgoing proxy server" if it is unchecked the "Address", "Port" and "Skip IP addresses (...)" are reset);
- Addition of a button to reset the options to default values.
- The components should resize correctly when the dialogue is resized (example: "Options" > "Connections" > "Skip IP addresses (...)" the text area doesn't resize as most as it should).
I also want to allow the user to maximise the "Options" dialogue.
I was going to commit the changes (when ready) without asking about the changes to the develop group, as there are much more advantages to what is being done now that it seems to me that it's a natural change and that it inevitably would happen (there are some issue(s) about the usability of some options).
But as this subject as been brought here, I've attached a working example on what the management will look like (if everyone agrees with it). If anyone wants to see it and give some feedback, it would be greatly appreciated.
Best regards.