FdoSecrets: reject setting refs via the API (#7043)

* FdoSecrets: add TOTP as a readonly attribute

* FdoSecrets: reject setting fields containing refs, fixes #6802

It is still possible to set refs using KPXC UI.
This commit is contained in:
Aetf
2021-10-24 10:22:50 -04:00
committed by GitHub
parent c8f135aaed
commit 2a9d92faeb
5 changed files with 144 additions and 53 deletions

View File

@@ -89,6 +89,7 @@ private slots:
void testItemSecret();
void testItemDelete();
void testItemLockState();
void testItemRejectSetReferenceFields();
void testAlias();
void testDefaultAliasAlwaysPresent();
@@ -120,6 +121,8 @@ private:
const FdoSecrets::wire::StringStringMap& attr,
bool replace,
bool expectPrompt = false);
FdoSecrets::wire::Secret
encryptPassword(QByteArray value, QString contentType, const QSharedPointer<SessionProxy>& sess);
template <typename Proxy> QSharedPointer<Proxy> getProxy(const QDBusObjectPath& path) const
{
auto ret = QSharedPointer<Proxy>{