在节点中,我曾经这样做过
const Credstash = require('nodecredstash');
const credstash = new Credstash({
table: <table_name>,
kmsKey: <kms_key>,
});
return credstash.getSecret({
name: <secret_name>,
context: { access: <secret_name> },
})
credstash
我按照以下代码尝试使用 python 包进行相同的操作
import credstash as cd
secret=cd.getSecret(name=<secret_name>,table=<table_name>,context={ 'access': <secrest_name>},kms={ 'key': <kms_key>})
print('GOT', secret)
但是给出错误
AttributeError: 'dict' object has no attribute 'decrypt'