Git Product home page Git Product logo

Comments (15)

greensmith avatar greensmith commented on June 18, 2024 2

No worries, the docker workaround is suitable for my needs at the moment.
Maybe if I get more time I can look into this in more detail.

from aws-adfs.

rucoetzer avatar rucoetzer commented on June 18, 2024

Any luck with this? I have exactly the same issue on my Win 10 machine.

from aws-adfs.

venth avatar venth commented on June 18, 2024

It looks like the issue is related to native python library sspi and its windows implementation. I try different approaches to find workaround for the issue. In meanwhile I can provide in docker and docker-compose yaml files to authenticate with aws-adfs on Windows manchine with docker container and then use awscli directly in windows. Please let me know, if you’re interested.

from aws-adfs.

connesc avatar connesc commented on June 18, 2024

Same problem here on Windows 7.
Would the Docker approach be able to use SSPI anyway? Prompting for user credentials is not an option in my case.

EDIT: the problem is related to brandond/requests-negotiate-sspi#12. A simple workaround is to downgrade Python to <= 3.6.0.

from aws-adfs.

ndrwtrsk avatar ndrwtrsk commented on June 18, 2024

Hello, with venth's great help I got it working. I'll post Dockerfile and docker-compose.yml that I use aswell as a powershell script to automate/shorten process a bit.

Dockerfile

FROM debian:stretch
 
RUN apt-get update && \
   apt-get install -y curl python && \
   curl -L https://bootstrap.pypa.io/get-pip.py | python && \
   pip install aws-adfs
 
VOLUME /root/.aws

docker-compose.yml - change {your_user} for you actual directory

version: '3'
 
services:
  aws-adfs:
    build:
      context: .
    volumes:
      - C:\Users\{your_user}\.aws:/root/.aws

aws-adfs-login.ps1

docker-compose run --rm aws-adfs aws-adfs login --adfs-host=your-adfs-host.com --no-ssl-verification

Now simply put Dockerfile and docker-compose.yml in one dir and fire off the script above while in this directory.

Voilà! It is done.

from aws-adfs.

venth avatar venth commented on June 18, 2024

Would you like to help me to diagnose the issue? There is a new version of: pypiwin32 library. The stack trace indicates that this library causes the issue. I hope that newest version of the library will solve the issue.
First, please provide results of:
pip freeze command
then please upgrade pypiwin32 library by using the command: pip install --upgrade pypiwin32 and
try to use aws-adfs login ...

from aws-adfs.

ndrwtrsk avatar ndrwtrsk commented on June 18, 2024

I will try it first thing Monday morning when I have access to windows machine.

from aws-adfs.

connesc avatar connesc commented on June 18, 2024

I had already deleted my Python 3 install, so no pip freeze for me.
However, I confirm that aws-adfs login is now working on a fresh Python 3 install! 🎉

from aws-adfs.

greensmith avatar greensmith commented on June 18, 2024

Hi I'm getting the same error running on a Windows 7 machine,

Python 3.6.3, pip 9.0.1, aws-adfs 0.6.1 & aws-cli 1.14.40.

pip is telling me that pypiwin32 is up-to-date.

I'm using the container work around for now.

from aws-adfs.

venth avatar venth commented on June 18, 2024

@greensmith, please, paste the results of pip freeze command.

from aws-adfs.

greensmith avatar greensmith commented on June 18, 2024

asn1crypto==0.24.0
aws-adfs==0.6.1
awscli==1.14.22
boto3==1.5.12
botocore==1.8.26
certifi==2018.1.18
cffi==1.11.4
chardet==3.0.4
click==6.7
colorama==0.3.7
configparser==3.5.0
cryptography==2.1.4
docutils==0.14
idna==2.6
isapi-wsgi==0.4.2
jmespath==0.9.3
lxml==4.1.1
pyasn1==0.4.2
pycparser==2.18
pyOpenSSL==17.5.0
pypiwin32==220
python-dateutil==2.6.1
PyYAML==3.12
requests==2.18.4
requests-negotiate-sspi==0.3.4
rsa==3.4.2
s3transfer==0.1.13
six==1.11.0
urllib3==1.22

from aws-adfs.

venth avatar venth commented on June 18, 2024

@greensmith, please, try to downgrade pypiwin32 by execution command: pip install "pypiwin32==219"

from aws-adfs.

greensmith avatar greensmith commented on June 18, 2024

219 doesn't seem to be compatible with Python 3.6.

Pip will only install 220.

I can download the 222 whl from https://pypi.python.org/pypi/pywin32 and install that - but I still get the same year out of range error.

from aws-adfs.

venth avatar venth commented on June 18, 2024

The direct cause of the issue is pypiwin32 library or changes in Windows SDK wrapped by this library. This library is used by requests-negotiate-sspi. I wonder which version of pypiwin32 works correctly. Unfortunately I don't have access to windows machine to perform necessary research. My hope was that the version 219 will work.

from aws-adfs.

pdecat avatar pdecat commented on June 18, 2024

This is supposed to be fixed since pywin32 b222, see:

https://bugs.python.org/issue29921#msg402486

mhammond/pywin32#748 (comment)

mhammond/pywin32@0720265

https://github.com/mhammond/pywin32/blob/b222/CHANGES.txt#L24-L26

from aws-adfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.