When running in strict snap confinement snap client binary is not
accessible. Additionally output format of snap client binary is
not guaranteed not to change. snapd REST API should be used instead.
Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>
In strict snap confinement, sshd config or host keys are not accessible.
If strict confinement is detected, instead allow reuse of
the host keys fingerprints already prepared by invoking process.
Prepared fingerprints are stored in: /run/console-conf/host-fingerprints.txt
Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>
Since we set a project name centrally, it implies a specific path to the state
directory. Instead of hardcoding the same value directly again in the controller
code, use the application level state directory.
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
Make sure that console-conf related apps use the same value for project, which
results in using the same shared state directory.
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
'project' value is used to construct /run/<project> path
Other parts are already using 'console-conf', prefer this syntax.
In the future we might consider using SNAP_NAME, and this '_' are
not permitted as part of the snap name.
Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>
In preparation for running console-conf as a strictly confined snaps, review of
the existing code has shown that user's key fingerprints are not being used or
displayed anywhere. Since we would not be able to read those public keys anyway,
we may as well drop the code which attempts to device the key fingerprints.
Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
I implemented these a long time ago to help working on parts of the ui
by allowing a way to script moving past some screens. I haven't used
them in ages, it's pretty bad code and probably a fragmentary answers
file is a better solution to the same problem. What do you think?
setuptools declares a certain number of entry points that use the main
function of the associated component. That said, now that main is an
async function, it does not work. There seems to be no way to tell
setuptools to wrap the call to the entry point with asyncio.run so we
need to revert to a synchronous main function.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Move mock_app to common location.
Move run_coro to subiquitycore so that subiquitycore doesn't have to
reference things in subiquity, even for test.
Move task tracking things from mirror to geoip.
Server app owns the geoip instance.
Create EventCallback as an alternative to MessageHub that should
hopefully express clearer intermodule dependencies.
Looking at this code thinking about the coming client / server split
made me realise that we could start by at least moving this
functionality to a more encapsulated place.