diff --git a/example_setup/README.rst b/example_setup/README.rst index dd3b067..1c10d42 100644 --- a/example_setup/README.rst +++ b/example_setup/README.rst @@ -22,6 +22,11 @@ In order to do an actual login, you will need to create a user account on the Id docker exec -it djangosaml2idp_idp python manage.py createsuperuser +You can follow the logs via. + + docker-compose logs -f idp + docker-compose logs -f sp + If you don't want to use docker, simply do in a terminal from the idp directory pip install -r requirements.txt @@ -76,4 +81,4 @@ For e.g. the IdP certificate: 3. Copy the newly create files to the idp/certificates folder 4. Copy the public.cert content without the first and last line into the sp/saml2_config/idp_metadata.xml tags `ns2:X509Certificate` (there are 2 of them) -For the SP certificates, the process is the same but the hostname is `sp.localhost.com` and in step 3 & 4 switch idp with sp folder. \ No newline at end of file +For the SP certificates, the process is the same but the hostname is `sp.localhost.com` and in step 3 & 4 switch idp with sp folder. diff --git a/example_setup/idp/Dockerfile b/example_setup/idp/Dockerfile index 60c76a5..3e9687c 100644 --- a/example_setup/idp/Dockerfile +++ b/example_setup/idp/Dockerfile @@ -1,12 +1,22 @@ FROM python:3.8-alpine RUN apk add --update \ - build-base libffi-dev openssl-dev \ - xmlsec xmlsec-dev \ + build-base \ + cargo \ + gcc \ + musl-dev \ + libffi-dev \ + openssl-dev \ + xmlsec \ + xmlsec-dev \ && rm -rf /var/cache/apk/* ADD requirements.txt /tmp -RUN pip install -r /tmp/requirements.txt +RUN python3.8 -m pip install --no-cache-dir --upgrade \ + pip \ + setuptools \ + wheel +RUN pip install --no-cache-dir -r /tmp/requirements.txt EXPOSE 9000 -CMD python manage.py migrate && python manage.py runserver 0.0.0.0:9000 \ No newline at end of file +CMD python manage.py migrate && python manage.py runserver 0.0.0.0:9000 diff --git a/example_setup/sp/Dockerfile b/example_setup/sp/Dockerfile index af8d4a3..f23b166 100644 --- a/example_setup/sp/Dockerfile +++ b/example_setup/sp/Dockerfile @@ -1,12 +1,22 @@ FROM python:3.8-alpine RUN apk add --update \ - build-base libffi-dev openssl-dev \ - xmlsec xmlsec-dev \ + build-base \ + cargo \ + gcc \ + musl-dev \ + libffi-dev \ + openssl-dev \ + xmlsec \ + xmlsec-dev \ && rm -rf /var/cache/apk/* ADD requirements.txt /tmp -RUN pip install -r /tmp/requirements.txt +RUN python3.8 -m pip install --no-cache-dir --upgrade \ + pip \ + setuptools \ + wheel +RUN pip install --no-cache-dir -r /tmp/requirements.txt EXPOSE 8000 -CMD python manage.py migrate && python manage.py runserver 0.0.0.0:8000 \ No newline at end of file +CMD python manage.py migrate && python manage.py runserver 0.0.0.0:8000 diff --git a/example_setup/sp/sp/saml2_config/idp_metadata.xml b/example_setup/sp/sp/saml2_config/idp_metadata.xml index 798cd88..89c72dd 100644 --- a/example_setup/sp/sp/saml2_config/idp_metadata.xml +++ b/example_setup/sp/sp/saml2_config/idp_metadata.xml @@ -1,7 +1,9 @@ - + @@ -12,6 +14,11 @@ + + + + + @@ -20,34 +27,26 @@ - + - -MIIDCzCCAfOgAwIBAgIJALYDB+Awm3SNMA0GCSqGSIb3DQEBCwUAMBwxGjAYBgNV BAMMEWlkcC5sb2NhbGhvc3QuY29tMB4XDTE4MDgwODE4MTcxM1oXDTI4MDgwNTE4 MTcxM1owHDEaMBgGA1UEAwwRaWRwLmxvY2FsaG9zdC5jb20wggEiMA0GCSqGSIb3 DQEBAQUAA4IBDwAwggEKAoIBAQCyL++77fy/kHSy7b14Xx4a084sHBNBRRG4GcPS 1PVp4Ssv4Y74RnZYXNTYO3Fm76UHfv6BAWVc6UQXoScYp/DpDml9GS22bnBS3JQP IIp3tFhElWRd9m+e/FkK29F9L8WZDNzbMMQUhwNd/K/k/L9ycjISbbWlcO4rqHpt aprWoQmpl8yvWPYVCiSDoj494rmjdF2kRVaJvGvb9YLM1ziUMl4iJUc7tjybz2ef rkkERNmWZRiMKp7wPpDf2VJ81GP7Gp15PIVnmUKw4v2R6fFJkociW1TEm0xJJxmV +SiwyyQ/9oVShOBYwoYYZZm0N4fIRKiVaZ1m9eRFFKHrX01ZAgMBAAGjUDBOMB0G A1UdDgQ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BR63/bbGWxz IdeHNSovHUsYaaTZ5jAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCW V6VaNdXRu8OrmYAeZtHL6xwdGbVcih1URRJmjOnwjKhQGJnzLGqEM8ofxibLIXKM xFRho+v1+2C8n6uNbQsvce5xHcygucKSZ56wN8iRtCFqrSWTZRTTs8yMfQpjYHXc 4SBUKfVX0mQeHcBzd5MiUHAgWo2BYF3beEngrDEzCxckxpLspZymTzOOIlqYJwRL 8KOxtTTaqIgX5A2/JNjGnbmgoCY39XG0xmL1X5BEzoGBjvkt4Sl+L0n+cz2WSDrM OxlEpwWZ78hmz2zYRegJOwDP6Tiov87fy6kxtirBD4Elozenqks1AcKFELY8Pi5R bzad2vwjVUMi1Xe2J3b6 - -urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress - - -urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - + urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress + urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - \ No newline at end of file +