MCPcopy Index your code
hub / github.com/99designs/keyring

github.com/99designs/keyring @v1.2.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.2 ↗ · + Follow
164 symbols 533 edges 22 files 36 documented · 22% 31 cross-repo links updated 2y agov1.2.2 · 2022-12-19★ 65438 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Keyring

Build Status Documentation

Keyring provides a common interface to a range of secure credential storage services. Originally developed as part of AWS Vault, a command line tool for securely managing AWS access from developer workstations.

Currently Keyring supports the following backends * macOS Keychain * Windows Credential Manager * Secret Service (Gnome Keyring, KWallet) * KWallet * Pass * Encrypted file (JWT) * KeyCtl

Usage

The short version of how to use keyring is shown below.

ring, _ := keyring.Open(keyring.Config{
  ServiceName: "example",
})

_ = ring.Set(keyring.Item{
    Key: "foo",
    Data: []byte("secret-bar"),
})

i, _ := ring.Get("foo")

fmt.Printf("%s", i.Data)

For more detail on the API please check the keyring godocs

Testing

Vagrant is used to create linux and windows test environments.

# Start vagrant
vagrant up

# Run go tests on all platforms
./bin/go-test

Contributing

Contributions to the keyring package are most welcome from engineers of all backgrounds and skill levels. In particular the addition of extra backends across popular operating systems would be appreciated.

This project will adhere to the Go Community Code of Conduct in the github provided discussion spaces, with the moderators being the 99designs engineering team.

To make a contribution:

  • Fork the repository
  • Make your changes on the fork
  • Submit a pull request back to this repo with a clear description of the problem you're solving
  • Ensure your PR passes all current (and new) tests
  • Ideally verify that aws-vault works with your changes (optional)

...and we'll do our best to get your work merged in

Extension points exported contracts — how you extend this code

Keyring (Interface)
Keyring provides the uniform interface over the underlying backends. [8 implementers]
keyring.go
PromptFunc (FuncType)
PromptFunc is a function used to prompt the user for a password.
prompt.go

Core symbols most depended-on inside this repo

debugf
called by 23
keyring.go
Open
called by 16
keyring.go
Get
called by 16
keyring.go
Set
called by 16
keyring.go
Remove
called by 15
keyring.go
Keys
called by 11
keyring.go
FixedStringPrompt
called by 10
prompt.go
Get
called by 6
keychain.go

Shape

Function 83
Method 65
Struct 12
FuncType 2
Interface 1
TypeAlias 1

Languages

Go100%

Modules by API surface

keyctl.go19 symbols
kwallet.go16 symbols
keyring.go13 symbols
keyctl_test.go13 symbols
secretservice.go12 symbols
pass_test.go10 symbols
keychain_test.go10 symbols
file.go10 symbols
pass.go9 symbols
keychain.go9 symbols
wincred.go8 symbols
secretservice_test.go8 symbols

For agents

$ claude mcp add keyring \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page