Open mmariuzzo opened 2 years ago
The SpringBoot example doesn't work running the project through docker (I have a Mac with Apple Silicon). This is the error that I got:
$ docker compose up -d
WARN[0000] ************************/spid-cie-oidc-java/examples/relying-party-spring-boot/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Building 13.1s (16/21) docker:desktop-linux
=> [cie-provider.org internal] load build definition from Dockerfile-cie.django 0.0s
=> => transferring dockerfile: 689B 0.0s
=> [relying-party.org internal] load build definition from Dockerfile.java-rp 0.0s
=> => transferring dockerfile: 822B 0.0s
=> [trust-anchor.org internal] load build definition from Dockerfile.django 0.0s
=> => transferring dockerfile: 710B 0.0s
=> [cie-provider.org internal] load metadata for docker.io/library/python:3.11-slim 0.5s
=> [relying-party.org internal] load metadata for docker.io/adoptopenjdk/openjdk11:x86_64-alpine-jdk-11.0.14.1_1 1.1s
=> [cie-provider.org internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [trust-anchor.org internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [trust-anchor.org 1/5] FROM docker.io/library/python:3.11-slim@sha256:e8381c802593deb0c4d25bd3f4e05e94382f6bf33090de22679fc7488cd68bbb 0.0s
=> [cie-provider.org internal] load build context 0.0s
=> => transferring context: 112B 0.0s
=> CACHED [cie-provider.org 2/5] RUN apt update && apt -y install git 0.0s
=> ERROR [cie-provider.org 3/5] RUN git clone --depth=1 --branch v1.4.0 https://github.com/italia/spid-cie-oidc-django && cd spid-cie-oidc-django && pip install --up 12.4s
=> [trust-anchor.org internal] load build context 0.0s
=> => transferring context: 112B 0.0s
=> [relying-party.org internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [relying-party.org 1/4] FROM docker.io/adoptopenjdk/openjdk11:x86_64-alpine-jdk-11.0.14.1_1@sha256:f7b5034371343dc41e7376e107059d1dbcb350a70174053b0e1c78a93d75a3e9 0.0s
=> CACHED [relying-party.org 2/4] RUN apk update && apk add git 0.0s
=> CANCELED [relying-party.org 3/4] RUN git clone --depth=1 https://github.com/italia/spid-cie-oidc-java && cd spid-cie-oidc-java && ./mvnw clean install 12.0s
------
> [cie-provider.org 3/5] RUN git clone --depth=1 --branch v1.4.0 https://github.com/italia/spid-cie-oidc-django && cd spid-cie-oidc-django && pip install --upgrade pip && pip install -e . && pip install design-django-theme==1.4.8 && pip install tzdata:
0.131 Cloning into 'spid-cie-oidc-django'...
3.419 Note: switching to '54f8e88849bf64a58c173608ebbf18586bff6d61'.
3.419
3.419 You are in 'detached HEAD' state. You can look around, make experimental
3.419 changes and commit them, and you can discard any commits you make in this
3.419 state without impacting any branches by switching back to a branch.
3.419
3.419 If you want to create a new branch to retain commits you create, you may
3.419 do so (now or later) by using -c with the switch command. Example:
3.419
3.419 git switch -c <new-branch-name>
3.419
3.419 Or undo this operation with:
3.419
3.419 git switch -
3.419
3.419 Turn off this advice by setting config variable advice.detachedHead to false
3.419
4.190 Requirement already satisfied: pip in /usr/local/lib/python3.11/site-packages (24.0)
4.303 Collecting pip
4.396 Downloading pip-24.3.1-py3-none-any.whl.metadata (3.7 kB)
4.424 Downloading pip-24.3.1-py3-none-any.whl (1.8 MB)
4.534 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 17.1 MB/s eta 0:00:00
4.552 Installing collected packages: pip
4.552 Attempting uninstall: pip
4.553 Found existing installation: pip 24.0
4.568 Uninstalling pip-24.0:
4.621 Successfully uninstalled pip-24.0
4.995 Successfully installed pip-24.3.1
4.995 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
5.271 Obtaining file:///spid-cie-oidc-django
5.271 Preparing metadata (setup.py): started
5.484 Preparing metadata (setup.py): finished with status 'done'
5.628 Collecting Django<5.0,>=4.0 (from spid-cie-oidc==1.4.0)
5.701 Downloading Django-4.2.16-py3-none-any.whl.metadata (4.1 kB)
5.732 Collecting cryptojwt>=1.8.2 (from spid-cie-oidc==1.4.0)
5.756 Downloading cryptojwt-1.9.2-py3-none-any.whl.metadata (1.4 kB)
5.846 Collecting pydantic<2.0,>=1.8.2 (from spid-cie-oidc==1.4.0)
5.866 Downloading pydantic-1.10.19-py3-none-any.whl.metadata (152 kB)
5.954 Collecting pytz>=2021.3 (from spid-cie-oidc==1.4.0)
5.976 Downloading pytz-2024.2-py2.py3-none-any.whl.metadata (22 kB)
6.173 Collecting aiohttp<3.10,>3.9 (from spid-cie-oidc==1.4.0)
6.194 Downloading aiohttp-3.9.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (7.5 kB)
6.231 Collecting requests<3.0,>=2.20 (from spid-cie-oidc==1.4.0)
6.250 Downloading requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
6.278 Collecting djagger (from spid-cie-oidc==1.4.0)
6.300 Downloading djagger-1.1.4.tar.gz (3.0 MB)
6.383 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 46.0 MB/s eta 0:00:00
6.418 Preparing metadata (setup.py): started
6.516 Preparing metadata (setup.py): finished with status 'done'
6.541 Collecting aiosignal>=1.1.2 (from aiohttp<3.10,>3.9->spid-cie-oidc==1.4.0)
6.562 Downloading aiosignal-1.3.1-py3-none-any.whl.metadata (4.0 kB)
6.592 Collecting attrs>=17.3.0 (from aiohttp<3.10,>3.9->spid-cie-oidc==1.4.0)
6.613 Downloading attrs-24.2.0-py3-none-any.whl.metadata (11 kB)
6.663 Collecting frozenlist>=1.1.1 (from aiohttp<3.10,>3.9->spid-cie-oidc==1.4.0)
6.683 Downloading frozenlist-1.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (13 kB)
6.768 Collecting multidict<7.0,>=4.5 (from aiohttp<3.10,>3.9->spid-cie-oidc==1.4.0)
6.789 Downloading multidict-6.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (5.0 kB)
6.928 Collecting yarl<2.0,>=1.0 (from aiohttp<3.10,>3.9->spid-cie-oidc==1.4.0)
6.948 Downloading yarl-1.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (67 kB)
7.045 Collecting cryptography>=3.4.6 (from cryptojwt>=1.8.2->spid-cie-oidc==1.4.0)
7.065 Downloading cryptography-43.0.3-cp39-abi3-manylinux_2_28_aarch64.whl.metadata (5.4 kB)
7.107 Collecting asgiref<4,>=3.6.0 (from Django<5.0,>=4.0->spid-cie-oidc==1.4.0)
7.132 Downloading asgiref-3.8.1-py3-none-any.whl.metadata (9.3 kB)
7.162 Collecting sqlparse>=0.3.1 (from Django<5.0,>=4.0->spid-cie-oidc==1.4.0)
7.183 Downloading sqlparse-0.5.2-py3-none-any.whl.metadata (3.9 kB)
7.327 Collecting typing-extensions>=4.2.0 (from pydantic<2.0,>=1.8.2->spid-cie-oidc==1.4.0)
7.347 Downloading typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
7.403 Collecting charset-normalizer<4,>=2 (from requests<3.0,>=2.20->spid-cie-oidc==1.4.0)
7.424 Downloading charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (34 kB)
7.453 Collecting idna<4,>=2.5 (from requests<3.0,>=2.20->spid-cie-oidc==1.4.0)
7.473 Downloading idna-3.10-py3-none-any.whl.metadata (10 kB)
7.516 Collecting urllib3<3,>=1.21.1 (from requests<3.0,>=2.20->spid-cie-oidc==1.4.0)
7.537 Downloading urllib3-2.2.3-py3-none-any.whl.metadata (6.5 kB)
7.568 Collecting certifi>=2017.4.17 (from requests<3.0,>=2.20->spid-cie-oidc==1.4.0)
7.585 Downloading certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB)
7.635 Collecting djangorestframework>=3.10 (from djagger->spid-cie-oidc==1.4.0)
7.657 Downloading djangorestframework-3.15.2-py3-none-any.whl.metadata (10 kB)
7.689 Collecting email-validator>=1.0.3 (from pydantic[email]->spid-cie-oidc==1.4.0)
7.710 Downloading email_validator-2.2.0-py3-none-any.whl.metadata (25 kB)
7.778 Collecting cffi>=1.12 (from cryptography>=3.4.6->cryptojwt>=1.8.2->spid-cie-oidc==1.4.0)
7.801 Downloading cffi-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (1.5 kB)
7.839 Collecting dnspython>=2.0.0 (from email-validator>=1.0.3->pydantic[email]->spid-cie-oidc==1.4.0)
7.861 Downloading dnspython-2.7.0-py3-none-any.whl.metadata (5.8 kB)
7.898 Collecting propcache>=0.2.0 (from yarl<2.0,>=1.0->aiohttp<3.10,>3.9->spid-cie-oidc==1.4.0)
7.919 Downloading propcache-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (7.7 kB)
7.945 Collecting pycparser (from cffi>=1.12->cryptography>=3.4.6->cryptojwt>=1.8.2->spid-cie-oidc==1.4.0)
7.966 Downloading pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
7.989 Downloading aiohttp-3.9.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.3 MB)
8.006 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 106.9 MB/s eta 0:00:00
8.050 Downloading cryptojwt-1.9.2-py3-none-any.whl (90 kB)
8.076 Downloading Django-4.2.16-py3-none-any.whl (8.0 MB)
8.152 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.0/8.0 MB 105.7 MB/s eta 0:00:00
8.171 Downloading pydantic-1.10.19-py3-none-any.whl (165 kB)
8.198 Downloading pytz-2024.2-py2.py3-none-any.whl (508 kB)
8.225 Downloading requests-2.32.3-py3-none-any.whl (64 kB)
8.249 Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
8.275 Downloading asgiref-3.8.1-py3-none-any.whl (23 kB)
8.297 Downloading attrs-24.2.0-py3-none-any.whl (63 kB)
8.319 Downloading certifi-2024.8.30-py3-none-any.whl (167 kB)
8.347 Downloading charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (138 kB)
8.377 Downloading cryptography-43.0.3-cp39-abi3-manylinux_2_28_aarch64.whl (3.7 MB)
8.411 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.7/3.7 MB 110.0 MB/s eta 0:00:00
8.464 Downloading djangorestframework-3.15.2-py3-none-any.whl (1.1 MB)
8.478 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 82.9 MB/s eta 0:00:00
8.498 Downloading email_validator-2.2.0-py3-none-any.whl (33 kB)
8.528 Downloading frozenlist-1.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (276 kB)
8.550 Downloading idna-3.10-py3-none-any.whl (70 kB)
8.572 Downloading multidict-6.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (131 kB)
8.594 Downloading sqlparse-0.5.2-py3-none-any.whl (44 kB)
8.616 Downloading typing_extensions-4.12.2-py3-none-any.whl (37 kB)
8.637 Downloading urllib3-2.2.3-py3-none-any.whl (126 kB)
8.660 Downloading yarl-1.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (340 kB)
8.684 Downloading cffi-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (469 kB)
8.711 Downloading dnspython-2.7.0-py3-none-any.whl (313 kB)
8.737 Downloading propcache-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (236 kB)
8.761 Downloading pycparser-2.22-py3-none-any.whl (117 kB)
8.791 Building wheels for collected packages: djagger
8.791 Building wheel for djagger (setup.py): started
8.962 Building wheel for djagger (setup.py): finished with status 'done'
8.962 Created wheel for djagger: filename=djagger-1.1.4-py3-none-any.whl size=29907 sha256=28f149dda1cb161e8b918bc31ac8f0881dd47a931eba1b853778fbd558629584
8.962 Stored in directory: /root/.cache/pip/wheels/2a/5d/86/0a178855141a72f8ac1c6e8be799b92f04fcf9f9e8930aa9ea
8.963 Successfully built djagger
9.015 Installing collected packages: pytz, urllib3, typing-extensions, sqlparse, pycparser, propcache, multidict, idna, frozenlist, dnspython, charset-normalizer, certifi, attrs, asgiref, yarl, requests, pydantic, email-validator, Django, cffi, aiosignal, djangorestframework, cryptography, aiohttp, djagger, cryptojwt, spid-cie-oidc
10.26 DEPRECATION: Legacy editable install of spid-cie-oidc==1.4.0 from file:///spid-cie-oidc-django (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457
10.26 Running setup.py develop for spid-cie-oidc
10.37 Successfully installed Django-4.2.16 aiohttp-3.9.5 aiosignal-1.3.1 asgiref-3.8.1 attrs-24.2.0 certifi-2024.8.30 cffi-1.17.1 charset-normalizer-3.4.0 cryptography-43.0.3 cryptojwt-1.9.2 djagger-1.1.4 djangorestframework-3.15.2 dnspython-2.7.0 email-validator-2.2.0 frozenlist-1.5.0 idna-3.10 multidict-6.1.0 propcache-0.2.0 pycparser-2.22 pydantic-1.10.19 pytz-2024.2 requests-2.32.3 spid-cie-oidc-1.4.0 sqlparse-0.5.2 typing-extensions-4.12.2 urllib3-2.2.3 yarl-1.18.0
10.37 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
10.77 Collecting design-django-theme==1.4.8
10.85 Downloading design-django-theme-1.4.8.tar.gz (2.4 MB)
10.97 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.4/2.4 MB 31.0 MB/s eta 0:00:00
11.03 Preparing metadata (setup.py): started
11.11 Preparing metadata (setup.py): finished with status 'done'
11.11 Requirement already satisfied: django in /usr/local/lib/python3.11/site-packages (from design-django-theme==1.4.8) (4.2.16)
11.18 Collecting libsass>=0.19.4 (from design-django-theme==1.4.8)
11.20 Downloading libsass-0.23.0.tar.gz (316 kB)
11.24 Preparing metadata (setup.py): started
11.34 Preparing metadata (setup.py): finished with status 'done'
11.37 Collecting django-sass-processor>=0.8 (from design-django-theme==1.4.8)
11.39 Downloading django_sass_processor-1.4.1-py3-none-any.whl.metadata (18 kB)
11.42 Collecting django_compressor>=2.4 (from design-django-theme==1.4.8)
11.44 Downloading django_compressor-4.5.1-py2.py3-none-any.whl.metadata (5.0 kB)
11.48 Collecting django-appconf>=1.0.3 (from django_compressor>=2.4->design-django-theme==1.4.8)
11.50 Downloading django_appconf-1.0.6-py3-none-any.whl.metadata (5.4 kB)
11.54 Collecting rcssmin==1.1.2 (from django_compressor>=2.4->design-django-theme==1.4.8)
11.56 Downloading rcssmin-1.1.2-cp311-cp311-manylinux2014_aarch64.whl.metadata (4.5 kB)
11.59 Collecting rjsmin==1.2.2 (from django_compressor>=2.4->design-django-theme==1.4.8)
11.61 Downloading rjsmin-1.2.2-cp311-cp311-manylinux2014_aarch64.whl.metadata (4.4 kB)
11.62 Requirement already satisfied: asgiref<4,>=3.6.0 in /usr/local/lib/python3.11/site-packages (from django->design-django-theme==1.4.8) (3.8.1)
11.62 Requirement already satisfied: sqlparse>=0.3.1 in /usr/local/lib/python3.11/site-packages (from django->design-django-theme==1.4.8) (0.5.2)
11.64 Downloading django_compressor-4.5.1-py2.py3-none-any.whl (145 kB)
11.66 Downloading rcssmin-1.1.2-cp311-cp311-manylinux2014_aarch64.whl (49 kB)
11.69 Downloading rjsmin-1.2.2-cp311-cp311-manylinux2014_aarch64.whl (32 kB)
11.71 Downloading django_sass_processor-1.4.1-py3-none-any.whl (20 kB)
11.74 Downloading django_appconf-1.0.6-py3-none-any.whl (6.4 kB)
11.74 Building wheels for collected packages: design-django-theme, libsass
11.74 Building wheel for design-django-theme (setup.py): started
12.01 Building wheel for design-django-theme (setup.py): finished with status 'done'
12.02 Created wheel for design-django-theme: filename=design_django_theme-1.4.8-py3-none-any.whl size=2365450 sha256=6534a9d6d209d3cfe766914ecffd7b6a88cbc6a616997ce1504cddfa4217a91b
12.02 Stored in directory: /root/.cache/pip/wheels/50/db/76/b8e56291faaab78c11319f66fad9a38d570eee1908f4a3ab77
12.02 Building wheel for libsass (setup.py): started
12.12 Building wheel for libsass (setup.py): finished with status 'error'
12.12 error: subprocess-exited-with-error
12.12
12.12 × python setup.py bdist_wheel did not run successfully.
12.12 │ exit code: 1
12.12 ╰─> [21 lines of output]
12.12 running bdist_wheel
12.12 running build
12.12 running build_py
12.12 creating build
12.12 creating build/lib.linux-aarch64-cpython-311
12.12 copying pysassc.py -> build/lib.linux-aarch64-cpython-311
12.12 copying sass.py -> build/lib.linux-aarch64-cpython-311
12.12 copying sasstests.py -> build/lib.linux-aarch64-cpython-311
12.12 creating build/lib.linux-aarch64-cpython-311/sassutils
12.12 copying sassutils/builder.py -> build/lib.linux-aarch64-cpython-311/sassutils
12.12 copying sassutils/__init__.py -> build/lib.linux-aarch64-cpython-311/sassutils
12.12 copying sassutils/distutils.py -> build/lib.linux-aarch64-cpython-311/sassutils
12.12 copying sassutils/wsgi.py -> build/lib.linux-aarch64-cpython-311/sassutils
12.12 running build_ext
12.12 building '_sass' extension
12.12 creating build/temp.linux-aarch64-cpython-311
12.12 creating build/temp.linux-aarch64-cpython-311/libsass
12.12 creating build/temp.linux-aarch64-cpython-311/libsass/src
12.12 creating build/temp.linux-aarch64-cpython-311/libsass/src/memory
12.12 gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPy_LIMITED_API -I./libsass/include -I/usr/local/include/python3.11 -c _sass.c -o build/temp.linux-aarch64-cpython-311/_sass.o -fPIC -std=gnu++0x -Wall -Wno-parentheses -Werror=switch -DLIBSASS_VERSION=\"3.6.6\"
12.12 error: command 'gcc' failed: No such file or directory
12.12 [end of output]
12.12
12.12 note: This error originates from a subprocess, and is likely not a problem with pip.
12.12 ERROR: Failed building wheel for libsass
12.12 Running setup.py clean for libsass
12.23 Successfully built design-django-theme
12.23 Failed to build libsass
12.24 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (libsass)
------
failed to solve: process "/bin/sh -c git clone --depth=1 --branch v1.4.0 https://github.com/italia/spid-cie-oidc-django && \tcd spid-cie-oidc-django && \tpip install --upgrade pip && \tpip install -e . && \tpip install design-django-theme==1.4.8 && \tpip install tzdata" did not complete successfully: exit code: 1
Create a SpringBoot relying party example project to identify java requirements and SDk opportuniy