abedra / libvault

A C++ library for Hashicorp Vault
MIT License
34 stars 25 forks source link

Vault::AWS access scope issue #80

Closed johnneal3 closed 3 years ago

johnneal3 commented 3 years ago

I ran into a scope issue when attempting to access / construct Vault::AWS::Auth and Vault::AWS:Secrets in VaultClient.h ... while all of the methods for the nested classes (Auth and Secrets) are public, the nested classes themselves are not, and there is no typedef or factory method at the Vault::AWS level to provide a way to instantiate.

I worked around this by adding a "public" scope in Vault::AWS to make the nested classes accessible.

class AWS {
public:    // <== Added this
    class Auth {

Am I overlooking something on usage, or is this a bug?

abedra commented 3 years ago

Hi @johnneal3, there's a chance this is a bug. I'll spend some time adding an example to the collection of examples. That's typically the fastest way to spot and fix things. I haven't had to use the AWS stuff in anger with libvault yet, so I will assume it's a mistake in the implementation for now and examine.

abedra commented 3 years ago

This is fixed in 0.41.0 or in the latest master