Add CredentialManager absctract class #71
Conversation
984f30a to
a91b6fb
Compare
|
@sduenas Changes for dealing with credentials with same format of perceval are up. |
sduenas
left a comment
There was a problem hiding this comment.
I think it would make more sense if this code is part of the credentials manager of each provider/service. I think how to access to the credentials/fields should be encapsulated on each provider's class. The behavior is different for each manager, so I think the access should be transparent for the client.
You can create an abstract class that BitwardenManager and HashicorpManager need to implement, now that we know what similarities they have. The resolve_credentials function duplicates code for both managers. I think you can make it more generic if needed, by including the specific code of each manager in a method classes have to implement, and that resolve_credentials will call.
Also, I don't think we need a factory because we only have two different classes.
a91b6fb to
1bbb0bf
Compare
|
Hi. I say I've tried cause not sure if it's what you meant. It does work by itself, tests pass and it works with perceval. Also works as standalone library and does not need cli to work. Removed the factory, left the ABC CredentialManager. Tell me your thoughts! Also, i added a temp file creation by bw_manager and modified the logout cause sometimes the previous stale session would give problems, so solved it with this using info from the docs of Bitwarden CLI on how to run parallel sessions of the tool. |
01c9bc6 to
2a6db40
Compare
2a6db40 to
ba740be
Compare
sduenas
left a comment
There was a problem hiding this comment.
You forgot to update the commit message. There are references to ABC. Also KingArthur is not used anymore.
jjmerchante
left a comment
There was a problem hiding this comment.
LGTM. Just a small change
d12caf6 to
557819d
Compare
557819d to
d942e5e
Compare
This hasn't been updated on the commit message. |
d942e5e to
0a66690
Compare
|
Sorry changed the commit message! |
I think you wrote the commit message twice |
0a66690 to
f9c0521
Compare
Woops, sorry. I think it's fixed! |
Add CredentialManager base class that orchestrates login, secret fetching, field extraction, and logout in a single call. This allows any caller (BackendCommand, Perceval, scripts) to resolve secrets without depending on Perceval's CLI layer. Signed-off-by: Alberto Ferrer Sánchez <alberefe@gmail.com>
f9c0521 to
0584e68
Compare
|
Merged. Thanks for your contribution. |
Add CredentialManager base class that orchestrates login, secret fetching, field extraction, and logout
in a single call. This allows any caller (BackendCommand, Perceval, scripts) to resolve secrets without depending on Perceval's CLI layer.
lifecycle management