Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Secret, base class of Secret<T> #310

Closed
giggio opened this issue Mar 8, 2023 · 4 comments
Closed

Create Secret, base class of Secret<T> #310

giggio opened this issue Mar 8, 2023 · 4 comments
Assignees

Comments

@giggio
Copy link

giggio commented Mar 8, 2023

Describe the feature request or question
Create Secret, base class of Secret<T> (it could also be an interface). It would contain everything Secret<T> has, but the public TData Data { get; set; } property.

Link to the Vault API Docs that support this feature
N/A

Additional context
There is currently no way to abstract over different Secret<T>s. For example, when one creates a credential, you get a Secret<UsernamePasswordCredentials>, when you renew it, you get a Secret<RenewedLease>, and we need to create different references, with no way to abstract over them. With an abstract base classe of Secret we could do that.

@giggio
Copy link
Author

giggio commented Mar 8, 2023

I could send a PR if that would help.

@rajanadar rajanadar self-assigned this Mar 27, 2023
@rajanadar
Copy link
Owner

Can you please explain why you need abstractions over that class? The library gives you whatever instances/types you need. What references are you creating?

@giggio
Copy link
Author

giggio commented Mar 27, 2023

@rajanadar
Copy link
Owner

@giggio the intent is to not have a untyped abstraction. It is error prone. Cast Exception etc.
Let me know, if you are missing anything concrete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants