Skip to content

Make metadata expiration time configurable - #1860

Merged
johanib merged 2 commits into
OpenConext:mainfrom
AramMutluWork:main
Apr 16, 2026
Merged

johanib merged 2 commits into
OpenConext:mainfrom
AramMutluWork:main

Conversation

@AramMutluWork

Copy link
Copy Markdown
Contributor

The expiration time of the metadata defines the validUntil until attribute in the metadata of Engineblock. By default this a constant in the code set to 86.400 seconds (24 hours).

At the request of one of the connected Service Providers, we want to increase this value to 1,814,400 seconds (21 days). If something goes wrong with the automatic reading of our metadata, they will have more time to fix this error before users experience login problems.

To avoid having to set this up again with every release, we want to make this configurable, I left the default at 24 hours as before.

@MKodde MKodde left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nice and useful new contribution!

I see a lot of nice things, but looking at this critically, I have some suggestion/questions:

  1. Now that the exp time is no longer hard coded; would we not need some validation/verification if a correct value is configured? What happens with negative values, floating points, string values,... This validation does not need to be very comprehensive, and by looking at your type definition, the application only allows for integer values. But that can still be a negative value. Maybe check for that in the MetadataRenderer constructor?
  2. I'd love to see the MetaDataRendererTest be extended with a couple of additional tests to verify that the expected expiration time matches with the one configured

Comment thread tests/unit/OpenConext/EngineBlock/Xml/MetadataRendererTest.php Outdated
@baszoetekouw baszoetekouw added this to the 7.1.0 milestone Nov 11, 2025
@baszoetekouw

Copy link
Copy Markdown
Member

@AramMutluWork could you please take a look at @MKodde's suggestions? Also, a merge conflict has arisen (probably because the config file location has changes for Symfony 5).

Once these issues are addressed, I'd like to merge this for 7.2.

@baszoetekouw baszoetekouw modified the milestones: 7.1.0, 7.2.0 Mar 3, 2026
@johanib johanib moved this from New to Backlog in PHP development Mar 16, 2026
@johanib johanib moved this from Backlog to In Progress in PHP development Apr 9, 2026
@johanib
johanib force-pushed the main branch 2 times, most recently from 221846f to 6f7c76e Compare April 9, 2026 13:18
@johanib
johanib requested a review from kayjoosten April 9, 2026 13:19
@tvdijen

tvdijen commented Apr 9, 2026 •

Copy link
Copy Markdown
Contributor

I think allowing a little clock-skew would be appropriate here. SAML2INT allows a clock-skew between 3-5 minutes for SAML messages. For SAML metadata (SAML2MDIOP) there is no such requirement, but I think it makes sense to allow some skew. I'm keen to know how SURF looks at this.

Wasn't there a setting for clock-skew already? Or am I mixing up with the SimpleSAMLphp-project that has this setting?

Comment thread tests/unit/OpenConext/EngineBlock/Xml/MetadataRendererTest.php Outdated
Comment thread CHANGELOG.md Outdated
@github-project-automation github-project-automation Bot moved this from In Progress to Backlog in PHP development Apr 10, 2026
@kayjoosten kayjoosten moved this from Backlog to In Progress in PHP development Apr 10, 2026
@johanib

johanib commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

I think allowing a little clock-skew would be appropriate here. SAML2INT allows a clock-skew between 3-5 minutes for SAML messages. For SAML metadata (SAML2MDIOP) there is no such requirement, but I think it makes sense to allow some skew. I'm keen to know how SURF looks at this.

Wasn't there a setting for clock-skew already? Or am I mixing up with the SimpleSAMLphp-project that has this setting?

I can't find a clock skew setting / feature in EB.
Since this PR is straight forward, I'll create a new ticket to track metadata clock skew seperatly.

@johanib
johanib merged commit afb2b0b into OpenConext:main Apr 16, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Delivered in PHP development Apr 16, 2026
@baszoetekouw baszoetekouw moved this from Delivered to Ready for release in PHP development Jul 7, 2026
@baszoetekouw baszoetekouw moved this from Ready for release to Done in PHP development Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants