I would like to develop a snap that can change firewall settings.
I added the “- firewall-control” plug to the snapcraft.yaml file.
It works fine if i connect the firewall-control plug manually with root user.
Is there any way to enable the snap to connect the firewall-controll plug automatically?
i know " devmode" would be a solution, but i need to use “strict”
(i don’t want to publish it to the snap store, i would avoid manual approval.)
If the snap is installed manually you could equally well ask users to run snap connect themselves.
There is no other automatic way of establishing the connection of a privileged snap, especially for a random snap, that would be a complete violation of trust. However, given that snapd is free software, distributed under GPL3 license, you can patch it to establish your own root of trust and generate applicable assertions which then would be accepted.
If you snap is clearly designed to only manage firewall settings you can surely ask for an automated connection by the store at install time of your snap.
You just have to open a post in the correct store-requests sub-category for this after you uploaded your snap to the store to have it reviewed and judged if the auto connection is suitable for you use case…