Re: Implementing a SecretAgent



On Fri, Nov 30, 2018 at 09:08:41AM +0100, Damien Cassou wrote:
Hi,

I would like to implement a secret agent. The first thing I'm trying is
to start a `nmcli agent secret` process and watch for its output
stream. When `nmcli agent` gets a request for a password, it prints

    password (vpn.secrets.password):

on stdout. How do I know which VPN connection requires a password?
Is this information available through D-Bus or something else?

Hi,

as you can see in the nmcli/nmtui secret agent implementation at [1],
the secret agent must look into the connection and have some logic to
decide which secrets are needed. In my opinion this is far from
optimal as it requires secret agents to reimplement similar duplicated
code, so I think it is an aspect that will need to be improved in
future versions of NM.

Beniamino

[1] 
https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/clients/common/nm-secret-agent-simple.c?h=nm-1-14#n447

Attachment: signature.asc
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]