winebarrel / gcredstash

gcredstash manages credentials using AWS Key Management Service (KMS) and DynamoDB.
Apache License 2.0
71 stars 24 forks source link

credstash and gcrestash #9

Open ozbillwang opened 6 years ago

ozbillwang commented 6 years ago

I am curious to test in same dynamodb table with both credstash and gcrestash.

I found, the key create by credstash or gcrestash, credstash can get them all, but gcredstash can't. It can only get the key which is created by itself.

Will it be fine to make it compatible with credstash?

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7776ed]

goroutine 1 [running]:
gcredstash.(*Driver).DecryptMaterial(0xc4200bf5c0, 0xc4201a25e0, 0x4, 0xc420214480, 0xc42011dd40, 0xc420214480, 0x0, 0x0, 0xb93488)
    /tmp/src/src/gcredstash/driver.go:82 +0x47d
gcredstash.(*Driver).GetSecret(0xc4200bf5c0, 0xc4201a25e0, 0x4, 0x0, 0x0, 0x90e679, 0x10, 0xc42011dd40, 0xffffffffffffffff, 0x0, ...)
    /tmp/src/src/gcredstash/driver.go:300 +0xba
gcredstash/command.(*GetallCommand).getCredentials(0xc4200127d0, 0xc420270600, 0x15, 0x20, 0xc42011dd40, 0x0)
    /tmp/src/src/gcredstash/command/getall.go:39 +0xf3
gcredstash/command.(*GetallCommand).RunImpl(0xc4200127d0, 0xc42000a150, 0x0, 0x0, 0x1, 0xc4200e9d10, 0x4685b6, 0x50)
    /tmp/src/src/gcredstash/command/getall.go:64 +0xdf
gcredstash/command.(*GetallCommand).Run(0xc4200127d0, 0xc42000a150, 0x0, 0x0, 0xc420015880)
    /tmp/src/src/gcredstash/command/getall.go:70 +0x67
github.com/mitchellh/cli.(*CLI).Run(0xc4200858c0, 0xc4200858c0, 0xc4200bf5e0, 0xc42011db90)
    /root/.go/src/github.com/mitchellh/cli/cli.go:235 +0x2d1
main.RunCustom(0xc42000a150, 0x1, 0x1, 0xc42011db90, 0x0)
    /tmp/src/cli.go:58 +0x13d
main.Run(0xc42000a150, 0x1, 0x1, 0xc4200001a0)
    /tmp/src/cli.go:46 +0x3d5
main.main()
    /tmp/src/main.go:6 +0x64