diff --git a/README.md b/README.md index 1ee3294..fdc182c 100644 --- a/README.md +++ b/README.md @@ -70,8 +70,13 @@ Examples Run `spid_sp_test -h` for inline documentation. ```` -usage: spid_sp_test [-h] [--metadata-url METADATA_URL] [--idp-metadata] [-l [LIST [LIST ...]]] [--extra] [--authn-url AUTHN_URL] [-tr] [-nsr] [-tp TEMPLATE_PATH] [-tn [TEST_NAMES [TEST_NAMES ...]]] - [-tj [TEST_JSONS [TEST_JSONS ...]]] [-aj ATTR_JSON] [-report] [-o O] [-d {CRITICAL,ERROR,WARNING,INFO,DEBUG}] [-xp XMLSEC_PATH] [--production] [--html-path HTML_PATH] [--exit-zero] +usage: spid_sp_test [-h] [--metadata-url METADATA_URL] [--idp-metadata] [-l [LIST [LIST ...]]] [--extra] [--authn-url AUTHN_URL] [-tr] [-nsr] + [-tp TEMPLATE_PATH] [-tn [TEST_NAMES [TEST_NAMES ...]]] [-tj [TEST_JSONS [TEST_JSONS ...]]] [-aj ATTR_JSON] + [-o REPORT_OUTPUT_FILE] [-rf {json,html}] [-d {CRITICAL,ERROR,WARNING,INFO,DEBUG}] [-xp XMLSEC_PATH] [--production] + [--response-html-dumps RESPONSE_HTML_DUMPS] [--exit-zero] + [-pr {saml2-sp,spid-sp-public,spid-sp-private,spid-sp-ag-public-full,spid-sp-ag-public-lite,spid-sp-op-public-full,spid-sp-op-public-lite,cie-sp-public,cie-sp-private}] + [-ap AUTHN_PLUGIN] [-rm REQUEST_METHOD] [-rb REQUEST_BODY] [-rct REQUEST_CONTENT_TYPE] + src/spid_sp_test/spid_sp_test -h for help ```` @@ -98,7 +103,7 @@ spid_sp_test --metadata-url http://localhost:8000/spid/metadata --authn-url http JSON report, add `-o filename.json` to write to a file, `-rf html -o html_report/` to export to a HTML page ```` -spid_sp_test --metadata-url http://localhost:8000/spid/metadata --authn-url http://localhost:8000/spid/login/?idp=https://localhost:8080 --extra --debug CRITICAL -json +spid_sp_test --metadata-url http://localhost:8000/spid/metadata --authn-url http://localhost:8000/spid/login/?idp=https://localhost:8080 --extra -rf json ```` Given a metadata file and a authn file (see `tests/metadata` and `tests/authn` for example) export all the test response without sending them to SP: @@ -153,7 +158,7 @@ The container working directory is set to `/spid` therefore, local files should Test Responses and html dumps ----------------------------- -By enabling the response dump with the `--html-path HTML_PATH` option, you will get N html files (page of your SP) as follows: +By enabling the response dump with the `--response-html-dumps HTML_PATH` option, you will get N html files (page of your SP) as follows: - test description, commented - SAML Response sent, commented diff --git a/build_pypi.sh b/build_pypi.sh index d020a88..7f31d70 100644 --- a/build_pypi.sh +++ b/build_pypi.sh @@ -1,4 +1,4 @@ #!/bin/bash PROJ_NAME=$(ls | grep *.egg-info | sed -e 's/.egg-info//g') ; rm -R build/ dist/* *.egg-info ; pip uninstall $PROJ_NAME ; python setup.py build sdist - +twine upload dist/* diff --git a/setup.py b/setup.py index fb06e04..44d1bb7 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ def readme(): setup( name=_pkg_name, - version='0.9.5', + version='0.9.6', description="SAML2 SPID Service Provider validation tool that can be run from the command line", long_description=readme(), long_description_content_type='text/markdown', diff --git a/src/spid_sp_test/__init__.py b/src/spid_sp_test/__init__.py index bc2c4ab..977fd6d 100644 --- a/src/spid_sp_test/__init__.py +++ b/src/spid_sp_test/__init__.py @@ -13,6 +13,7 @@ class AbstractSpidCheck(object): def __init__(self, *args, **kwargs): self.results = [] self.errors = [] + self.warnings = [] self.logger = logger self.error_counter = 0 self.verify_ssl = kwargs.get("verify_ssl", False) @@ -49,13 +50,13 @@ def handle_result( elif level in ("error", "critical"): self.handle_error(title, description, traceback) elif level == "warning": - self.results.append( - { + data = { "result": "warning", "test": title, "value": value, - } - ) + } + self.results.append(data) + self.warnings.append(data) def handle_error(self, error_message, description="", traceback: str = None): getattr(self.logger, "error")(error_message) diff --git a/src/spid_sp_test/html/index.html b/src/spid_sp_test/html/index.html index caf9394..b6a9ee3 100644 --- a/src/spid_sp_test/html/index.html +++ b/src/spid_sp_test/html/index.html @@ -185,7 +185,6 @@

Seguici su

{% endblock footer_contacts_section %} - {% block footer_bottom_content %}

Sezione Link Utili