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

validUntil updateable Metadata dependency breakage #568

Open
ckbaker10 opened this issue Dec 7, 2023 · 3 comments
Open

validUntil updateable Metadata dependency breakage #568

ckbaker10 opened this issue Dec 7, 2023 · 3 comments

Comments

@ckbaker10
Copy link

ckbaker10 commented Dec 7, 2023

Hello,

The validUntil field being mandatory in the generated metadata leads to the fact that metadata expiry must be monitored or automated.

Some IdPs don't provide that feature easily accessible which breaks the libraries usability

A real world example exists in Nextcloud, nextcloud/user_saml#36

I've added a parameter to disable the validUntil from being included, as well as matching tests

Pull request: #569

@RoSk0
Copy link

RoSk0 commented Nov 28, 2024

Great to see #569 merged, but I don't see how can I use this feature as there is no interface to pass that ignoreValidUntil to the metadata builder.

Am I missing something?

@pitbulk
Copy link
Contributor

pitbulk commented Nov 28, 2024

@RoSk0

If you have the settings

$settings = $auth->getSettings();

You can invoke it with:

$spData = $settings->getSPData(); 
$security = $settings->getSecurityData();
$ignoreValidUntil = True;
$metadata = Metadata::builder($spData;, $security['authnRequestsSigned'], $security['wantAssertionsSigned'], $validUntil, $cacheDuration, $settings->getContacts(), $settings->getOrganization(), [], $ignoreValidUntil);

RoSk0 added a commit to RoSk0/php-saml that referenced this issue Nov 28, 2024
@RoSk0
Copy link

RoSk0 commented Nov 28, 2024

Hm, right. Sure, but why ?

I mean the output of Metadata::builder() would be incomplete and also that is not the recommended way according to docs here /~https://github.com/SAML-Toolkits/php-saml/tree/4.2.0?tab=readme-ov-file#sp-metadata-endpointsmetadataphp .

Are you saying I need to duplicate all the logic from the \OneLogin\Saml2\Settings::getSPMetadata() to generate the full metadata XML?

I believe it would be better to do it this way #602 . What to you think @pitbulk ?

pitbulk added a commit that referenced this issue Dec 6, 2024
#568 follow up - simplify generating metadata without validUntil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants