Hi George,
Looking at Fortigate code the steps are reasonably straightforward I believe and would be some thing like the following(excuse any errors):
* Add a new optional function input in the UI for the label e.g. bitdefender_firewall_label
* Create a python function similar to 'firewall_configs' and use this to override the default config
configs = firewall_configs(
PACKAGE_NAME,
self.opts,
getattr(fn_inputs, "bitdefender_firewall_label", None))
* Create bitdefender client using the new config.
client = BitdefenderClient(configs, self.rc)
* Add label and new section to app.config
[fn_bitdefender]
bitdefender_base_url=https://cloud.gravityzone.bitdefender.com/api
api_key=<api_key>
# Proxy Settings (for integration servers only)
#https_proxy=https://example.com:3000
# Specify paths to files if client certs are needed to authenticate
#client_auth_cert=<path_to_cert.pem>
#client_auth_key=<path_to_cert_private_key.pem>
[fn_bitdefender:my_label]]
bitdefender_base_url=https://cloud2.gravityzone.bitdefender.com/api
api_key=<api_key>
# Proxy Settings (for integration servers only)
#https_proxy=https://example.com:3000
# Specify paths to files if client certs are needed to authenticate
#client_auth_cert=<path_to_cert.pem>
#client_auth_key=<path_to_cert_private_key.pem>
Regards,
------------------------------
JOHN PRENDERGAST
------------------------------
Original Message:
Sent: Thu October 12, 2023 05:25 AM
From: George Petkakis
Subject: Develop multiple credentials on app.config and seperate them by a label just like it is used on FortiGate App.
Hi. Is there a way to develop on an existing app the same configuration that is used on Fortigate App and allows users to add multiple diferent api credentials?
------------------------------
George Petkakis
------------------------------