-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add a few improvements for Bitwarden Access Manager #13
Conversation
Closes #11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvements.
I agree with removing You can merge this branch and I will drop |
Let’s make a separate pull request, this one is getting big enough already 😅 Actually, can you merge #10? I will rebase this on top of the merge commit and then merge it. |
We can do the initial authentication request just fine using the standard library.
Sorting does not work because GroupAccess does not implement __lt__, we can sidestep the issue by providing a comparison key and sorting only by name.
Members on Bitwarden don't necessarily have a name. Maybe we should omit it entirely from the config, because it's not how we identify users anyway.
As it turns out, members do not always have a name, sometimes it's null. We can use the email instead.
It is not needed, and sometimes not present.
It is optional in Bitwarden, so it needs to be optional here. Also print progress when fetching collections.
I ran it against our actual Bitwarden organization, and ran into a few issues. I fixed them all and now it runs smoothly.
requests
for initial authentication, we already usehttp.client
.Group.access_all
, it should be a boolean, not a string.Member.name
optional, it is not always present.Collection.external_id
optional, it can benull
in Bitwarden (which is different from empty string!).Open questions
Should we drop
Member.name
entirely? It is not always there, and people can put nonsense names in there. We can already identify members by email address, so we could just omit the name.