Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Now allowing Authsources to set validUntil and cacheDuration for Metadata. #1481

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

tommy2d
Copy link

@tommy2d tommy2d commented Jul 12, 2021

Now allowing generation of SP metadata XML that includes @validuntil or @cacheDuration at EntityDescriptor.

modules/saml/docs/sp.md Outdated Show resolved Hide resolved
@tvdijen tvdijen changed the title Now allowing Authsources to set maxCache and maxDuration for Metadata. Now allowing Authsources to set validUntil and cacheDuration for Metadata. Aug 24, 2021
Copy link
Member

@thijskh thijskh left a comment

Choose a reason for hiding this comment

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

Needs to be changed according to the (later) changes to the SP metadata refactoring + unit test update so we keep coverage of the new code up to date.

if ($metadata['expire'] - time() < $this->maxDuration) {
$this->maxDuration = $metadata['expire'] - time();
if ($metadata['expire'] - time() < $this->cacheDuration) {
$this->cacheDuration = $metadata['expire'] - time();
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand what this code wants to achieve. There is an expiration in the metadata. So we whould likely set validUntil to that value I think? Not cacheDuration? In any case the docs should probably say how the option interacts with expire.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed.. I think it's also the wrong setting being set here.. Our metadata-converter converts validUntil to expire.
I think it makes sense to drop the expire-option in favour of validUntil.

lib/SimpleSAML/Metadata/SAMLBuilder.php Outdated Show resolved Hide resolved
modules/saml/www/sp/metadata.php Outdated Show resolved Hide resolved
@tvdijen tvdijen force-pushed the metadataMaxCacheMaxDuration branch from a96e0bf to 575b81d Compare August 27, 2021 18:51
@tvdijen tvdijen changed the base branch from simplesamlphp-1.19 to master August 27, 2021 18:53
@tvdijen tvdijen force-pushed the metadataMaxCacheMaxDuration branch from 575b81d to ec3e5ec Compare August 27, 2021 19:19
@codecov
Copy link

codecov bot commented Aug 27, 2021

Codecov Report

Merging #1481 (3defd30) into master (31a49a8) will increase coverage by 0.00%.
The diff coverage is 60.00%.

@@            Coverage Diff            @@
##             master    #1481   +/-   ##
=========================================
  Coverage     40.05%   40.05%           
- Complexity     3531     3532    +1     
=========================================
  Files           141      141           
  Lines         10596    10598    +2     
=========================================
+ Hits           4244     4245    +1     
- Misses         6352     6353    +1     

@tvdijen
Copy link
Member

tvdijen commented Aug 27, 2021

I've rebased against master because the PR targeted the 1.19-branch and this is not something we can merge there. I've made a backup of the branch before I did.
@thijskh : Do you agree that the expire-setting has now become obsolete and should go?

@thijskh
Copy link
Member

thijskh commented Sep 4, 2021

There's still quite a lot of code that refers to expire when talking about remote entities I think. Are you referring to that or to the setting for hosted entities (does that exist?).

@tvdijen
Copy link
Member

tvdijen commented Sep 4, 2021

It does not exist for hosted entities I think, so for remote entities... validUntil is translated to the expire setting by our metadata converter and I think it makes sense to rename it to validUntil.. We have to update the metarefresh-module as well if we do so

@tvdijen tvdijen force-pushed the master branch 2 times, most recently from 29f7b69 to 1a911ce Compare May 12, 2023 16:07
@tvdijen tvdijen force-pushed the master branch 3 times, most recently from c7c8357 to fdbe001 Compare June 12, 2023 14:28
@tvdijen tvdijen force-pushed the master branch 8 times, most recently from 3b5f5ba to 96357ee Compare July 19, 2023 12:37
@tvdijen tvdijen force-pushed the master branch 5 times, most recently from 7587851 to d523b31 Compare August 2, 2023 11:58
@tvdijen tvdijen force-pushed the master branch 3 times, most recently from 8c90121 to d534e3b Compare September 5, 2023 08:09
@tvdijen tvdijen force-pushed the master branch 2 times, most recently from bc1c5c8 to d0a5974 Compare October 17, 2023 21:17
@tvdijen tvdijen force-pushed the master branch 3 times, most recently from ccb9b02 to 120a100 Compare December 1, 2023 14:34
@tvdijen tvdijen force-pushed the master branch 2 times, most recently from 6004a77 to 58bf8db Compare May 4, 2024 23:45
@tvdijen tvdijen force-pushed the master branch 2 times, most recently from 5c9fb2c to 0970efc Compare May 27, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants