How to use the default keyring using SecretServiceBackend?
- 主要語言
- Go
- 星號
- 657
- 分支
- 155
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Whatever I use for `LibSecretCollectionName` or `ServiceName`, the library attempts to create a new keyring. How can I use the default keyring? In seahorse it is listed as `Default keyring`:

Even if I name the collection the same way, the library will create a new keyring with the same name:
```Go
package main
import (
"github.com/99designs/keyring"
)
func main() {
ring, err := keyring.Open(keyring.Config{
AllowedBackends: []keyring.BackendType{
keyring.SecretServiceBackend,
},
LibSecretCollectionName: "Default keyring",
ServiceName: "myapp",
})
if err != nil {
panic(err)
}
err = ring.Set(keyring.Item{
Key: "foo",
Data: []byte("secret-bar"),
})
if err != nil {
panic(err)
}
}
```

With the https://github.com/zalando/go-keyring library, using their example from the README will write to the default keyring, so it should be possible somehow.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
查看 keyring 函式庫中的 SecretServiceBackend 實作,可能位於類似 secret_service.go 的檔案中。將其與 zalando/go-keyring 函式庫使用預設 keyring 的方式進行比較。目標是修改該函式庫,使其使用現有的 'Default keyring' collection,而不是建立新的 collection。透過執行提供的 Go 程式碼並檢查 keyring UI(如 seahorse)來測試,查看項目建立在哪裡。
由索引模型根據 Issue 內容生成。
評估
- 領域
- cli, security
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100