Closed pgelinas closed 3 years ago
I would like to see if I can reproduce it. Is this error happening when you are just running python
command (according to the log you pasted).
Also I see that you are using Ansible, would it be possible to share some details what commands are being executed.
We are writing a custom Ansible filter plugin to integrate Keeper, I would be surprised if this has an impact since I'm testing this outside of Ansbile. To test, I run the python REPL and try to import keepercommander:
# python
> from keepercommander import api
And it prints the error shown.
All of this was tested inside a Docker container with this Dockerfile:
FROM python:3.6.9-slim-buster
ENV vault_version=0.9.5 \
VAULT_ADDR=https://foobar/
# unzip and curl are used in the dockerfile
# gettext is for the envsubst command used in our scripts
# git, openssh-client and openssl are required by Ansible
# gcc is required by some python library for setup
RUN apt-get update \
&& apt-get install --no-upgrade -y unzip curl gettext git openssh-client openssl gcc \
&& rm -rf /var/lib/apt
RUN curl -sS "https://releases.hashicorp.com/vault/${vault_version}/vault_${vault_version}_linux_amd64.zip" > "vault_${vault_version}.zip" \
&& unzip -oq "vault_${vault_version}.zip" \
&& mv "vault" "/bin/" \
&& rm "vault_${vault_version}.zip"
ENV ansible_version=2.9.10
# azure-cli is for azure integration (some ansible tasks are executing Azure commands)
# hvac is for hashicorp vault lookup
# pypsrp, pywinrm and "requests[socks]" are for Windows VM PSRemoting
# boto3 is for AWS integration (S3 download)
# keepercommander is for Keeper SDK.
# CLP-819 Force 4.33 as we know it works and later version seems to have problems
RUN pip install ansible==${ansible_version} azure-cli hvac pypsrp pywinrm "requests[socks]" boto3 keepercommander==4.33
ENV terraform_version=0.13.5
RUN curl -sS "https://releases.hashicorp.com/terraform/${terraform_version}/terraform_${terraform_version}_linux_amd64.zip" > "terraform_${terraform_version}.zip" \
&& unzip -oq "terraform_${terraform_version}.zip" \
&& mv "terraform" "/bin/"
COPY ssh.config.docker /root/.ssh/config
RUN chmod 0600 /root/.ssh/config
Thanks for the details to reproduce this issue. I was able to get the same result that you got. Working on the fix and it should be out in the next few days along with few other minor fixes.
By the way, releases 4.5x and up use new Login V3 API that will require devices to be approved before accessing retrieving encrypted data from Keeper's server. Feel free to reach out to us to help you with setting up your environment.
Thanks for the heads-up. Since this was confirmed working on our side with another version, it will probably be months before I have bandwidth to circle back to this and try out the new Login V3 API, but I'll keep a note.
I'll be happy to help you out with the testing and configuration. If you could give me some ideas on what exactly you are doing I can run tests and make necessary changes if needed. Is it possible to share code of your custom Ansible filter plugin to integrate Keeper (at least the part that talk to Keeper). You can send it to my email mustinov[AT]keepersecurity.com
@pgelinas we have released new version which should resolve this issue.
Fix was released. Feel free to reopen or create a new issue if the solution didn't work for you.
We have just updated to the latest version on PyPi (4.55) and since then I have the following problem issue when importing the API
I forced the version we use to the last minor version that we had that worked as a workaround. I have tested in both 4.33 and 4.51 and it works on them, but 4.55 is broken.