diff --git a/e2e/setup.sh b/e2e/setup.sh index a0f0d67ad..99c795e1f 100755 --- a/e2e/setup.sh +++ b/e2e/setup.sh @@ -1,21 +1,16 @@ #!/bin/bash -x -sudo apt update -# Setup python -sudo apt install -y python3.8 python3-pip apt-transport-https ca-certificates curl gnupg-agent software-properties-common +# Setup docker & compose +curl -fsSL https://get.docker.com | bash +sudo usermod -a -G docker ubuntu +sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +sudo chmod +x /usr/local/bin/docker-compose # Setup nodejs curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt-get install -y nodejs sudo npm install -g yarn +# Setup python +sudo apt install -y python3.8 python3-pip # Setup docker -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - -sudo add-apt-repository \ - "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ - $(lsb_release -cs) \ - stable" -sudo apt-get install -y docker-ce docker-ce-cli containerd.io -sudo usermod -a -G docker ubuntu -sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose -sudo chmod +x /usr/local/bin/docker-compose sudo pip3 install pipenv cd e2e diff --git a/passbook/sources/saml/processors/base.py b/passbook/sources/saml/processors/base.py index a64539cd6..996d1d7c5 100644 --- a/passbook/sources/saml/processors/base.py +++ b/passbook/sources/saml/processors/base.py @@ -146,7 +146,7 @@ class Processor: return self._flow_response( request, self._source.enrollment_flow, - **{PLAN_CONTEXT_PROMPT: name_id_filter,}, + **{PLAN_CONTEXT_PROMPT: name_id_filter}, ) def _flow_response( diff --git a/passbook/sources/saml/tasks.py b/passbook/sources/saml/tasks.py index 1a8ed4619..caad70dab 100644 --- a/passbook/sources/saml/tasks.py +++ b/passbook/sources/saml/tasks.py @@ -28,4 +28,5 @@ def clean_temporary_users(): LOGGER.debug( "User is expired and will be deleted.", user=user, delta=source_delta ) + # TODO: Check if user is signed in anywhere? user.delete() diff --git a/passbook/sources/saml/views.py b/passbook/sources/saml/views.py index f4186bd07..7a4ca66b2 100644 --- a/passbook/sources/saml/views.py +++ b/passbook/sources/saml/views.py @@ -97,7 +97,7 @@ class SLOView(LoginRequiredMixin, View): return render( request, "saml/sp/sso_single_logout.html", - {"idp_logout_url": source.slo_url,}, + {"idp_logout_url": source.slo_url}, )