Skip to content

Commit

Permalink
[#4582] Added weekly celery task for updating the saml metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
vaszig committed Sep 4, 2024
1 parent c25cb2b commit 065b3d1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/openforms/authentication/tasks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from django.core.management import call_command

from openforms.celery import app


Expand All @@ -7,3 +9,16 @@ def hash_identifying_attributes(auth_info_id: int):

auth_info = AuthInfo.objects.get(id=auth_info_id)
auth_info.hash_identifying_attributes()


@app.task
def update_saml_metadata() -> None:
"""
A weekly task for updating the SAML metadata concerning DigiD/Eherkenning
Calling the command update_stored_metadata which is part of the
`digid_eherkenning.management.commands` module of django-digid-eherkenning library.
Updates the stored metadata file and prepopulates the db fields.
"""
call_command("update_stored_metadata", "digid")
call_command("update_stored_metadata", "eherkenning")
4 changes: 4 additions & 0 deletions src/openforms/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,10 @@
"task": "django_yubin.tasks.delete_old_emails",
"schedule": crontab(hour=0, minute=0, day_of_week="*"),
},
"update-saml-digid-eherkenning": {
"task": "openforms.authentication.tasks.update_saml_metadata",
"schedule": crontab(hour=0, minute=0, day_of_week="sunday"),
},
}

RETRY_SUBMISSIONS_TIME_LIMIT = config(
Expand Down

0 comments on commit 065b3d1

Please sign in to comment.