Skip to content

Commit

Permalink
v1.0.1 (#78)
Browse files Browse the repository at this point in the history
* Add templates for importing the SPID button and its scripts

  - Import where the SPID button is needed and with a parameter
    size=('s'|'m'|'l'|'xl')
  - Import scripts required for SPID button at the end of the page
  - Add template filter spid_button_size

* Add settings for required and optional attributes (#73)

* Add spid_attributes module and clean attribute maps

* Add SPID_REQUIRED_ATTRIBUTES and SPID_OPTIONAL_ATTRIBUTES settings

* Add comment on how to provide a full static SAML_CONFIG

* v1.0.0 (#74)

* chore: removed spid-testenv2

* v1.0.0

- chore: removed spid-testenv2
- feat: added spid-saml-check demo idp
- feat: spid buttons templates (@brunato )

Co-authored-by: Davide Brunato <brunato@sissa.it>

* Fix SPID_SAML_CHECK_DEMO_METADATA_URL default

  - Set `SPID_SAML_CHECK_DEMO_METADATA_URL` default to 'https://demo.spid.gov.it/metadata.xml'
  - Maybe this setting has become useless because the demo IdP metadata URL is well known and has a fixed value

* Change test IdP settings

  - Add SPID_VALIDATOR_IDP_ACTIVE and SPID_VALIDATOR_METADATA_URL
  - SPID_SAML_CHECK_DEMO_REMOTE_METADATA_ACTIVE -> SPID_DEMO_IDP_ACTIVE
  - SPID_SAML_CHECK_DEMO_METADATA_URL -> SPID_DEMO_METADATA_URL
  - SPID_SAML_CHECK_REMOTE_METADATA_ACTIVE -> SPID_SAML_CHECK_IDP_ACTIVE
    (also checking the old name as fallback)
  - New template tags for checking if add test IdPs to SPID button

* v1.0.1

* feat: release-drafter gh action

* chore: black code linting

Co-authored-by: Davide Brunato <brunato@sissa.it>
  • Loading branch information
Giuseppe De Marco and brunato authored Jul 16, 2021
1 parent fffcde5 commit ad53ea3
Show file tree
Hide file tree
Showing 21 changed files with 1,334 additions and 1,085 deletions.
54 changes: 54 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
-
title: 'Features'
labels:
- 'enhancement'
- 'feat'
- 'feature'
-
title: 'Bug Fixes'
labels:
- 'bug'
- 'bugfix'
- 'fix'
-
title: 'Maintenance'
labels:
- 'chore'
- 'style'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels: ['major']
minor:
labels: ['minor']
patch:
labels: ['patch']
default: patch
exclude-labels: ['skip']
autolabeler:
-
label: 'bug'
branch:
- '/bug\/.+/'
- '/bugfix\/.+/'
- '/fix\/.+/'
-
label: 'enhancement'
branch:
- '/dependabot\/.+/'
- '/enhancement\/.+/'
- '/feat\/.+/'
- '/feature\/.+/'
-
label: 'chore'
branch:
- '/chore\/.+/'
- '/style\/.+/'
template: |
## Release notes
$CHANGES
17 changes: 17 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release drafter

on:
push:
branches: [main, develop]
pull_request:
types: [opened, reopened, synchronize]

jobs:
update_release_draft:
name: Update draft release
runs-on: ubuntu-latest
steps:
-
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ To run the demo project:
- python -B ./manage.py collectstatic --noinput
- uwsgi --https 0.0.0.0:8000,./certificates/public.cert,./certificates/private.key --module example.wsgi:application --env example.settings --chdir .

or execute the run.sh script with these environment settings to enable tests idps:
or execute the run.sh script with these environment settings to enable tests IdPs:

````
SPID_SAML_CHECK_REMOTE_METADATA_ACTIVE=True SPID_SAML_CHECK_DEMO_METADATA_ACTIVE=True bash run.sh
SPID_SAML_CHECK_IDP_ACTIVE=True SPID_DEMO_IDP_ACTIVE=True bash run.sh
````

If you choosed to use *spid-testenv2*, before starting it, you just have to save the
If you chose to use *spid-testenv2*, before starting it, you just have to save the
current demo metadata in *spid-testenv2* configuration, this way:

````
Expand Down Expand Up @@ -219,8 +219,8 @@ Warnings
--------

- debug server uses the same SAML2 certificates, please create your SAML2 certificates for production and also a real TLS one for httpd!
- Read djangosaml2 documentation, set SESSION_COOKIE_SECURE in your project settings.py
- The SPID Button template is only for test purpose, please don't use it in production, do your customization instead!
- Read djangosaml2 documentation, remember to set SESSION_COOKIE_SECURE in your project settings.py
- The SPID Button template is only for test purpose, please don't use it in production, do your customizations instead!
- In a production environment please don't use "remote" as metadata storage, use "local" or "mdq" instead!
- When using spid-saml-check via docker image, mind that the metadata download url would match to `https://172.17.0.1:8000/spid/metadata` and not to localhost!

Expand Down
6 changes: 3 additions & 3 deletions example/spid_config/spid_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
SPID_IDENTITY_PROVIDERS_URL = 'https://registry.spid.gov.it/assets/data/idp.json'
SPID_IDENTITY_PROVIDERS_METADATA_DIR = os.path.join(BASE_DIR, 'spid_config/metadata/')

SPID_SAML_CHECK_REMOTE_METADATA_ACTIVE = os.environ.get('SPID_SAML_CHECK_REMOTE_METADATA_ACTIVE', 'False') == 'True'
SPID_SAML_CHECK_IDP_ACTIVE = os.environ.get('SPID_SAML_CHECK_IDP_ACTIVE', 'False') == 'True'
SPID_SAML_CHECK_METADATA_URL = os.environ.get('SPID_SAML_CHECK_METADATA_URL', 'http://localhost:8080/metadata.xml')

SPID_SAML_CHECK_DEMO_REMOTE_METADATA_ACTIVE = os.environ.get('SPID_SAML_CHECK_DEMO_REMOTE_METADATA_ACTIVE', 'False') == 'True'
SPID_SAML_CHECK_DEMO_METADATA_URL = os.environ.get('SPID_SAML_CHECK_DEMO_METADATA_URL', 'http://localhost:8080/demo/metadata.xml')
SPID_DEMO_IDP_ACTIVE = os.environ.get('SPID_DEMO_IDP_ACTIVE', 'False') == 'True'
SPID_DEMO_METADATA_URL = os.environ.get('SPID_DEMO_METADATA_URL', 'http://localhost:8080/demo/metadata.xml')

# Avviso 29v3
SPID_PREFIXES = dict(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="djangosaml2-spid",
version='1.0.0',
version='1.0.1',
description="Djangosaml2 SPID Service Provider",
long_description=README,
long_description_content_type='text/markdown',
Expand Down
2 changes: 1 addition & 1 deletion src/djangosaml2_spid/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class Djangosaml2SpidConfig(AppConfig):
name = 'djangosaml2_spid'
name = "djangosaml2_spid"
Loading

0 comments on commit ad53ea3

Please sign in to comment.