Skip to content

Allow configuration of metadata caching/expiry via settings - #68

Merged
pitbulk merged 1 commit into
SAML-Toolkits:masterfrom
open-craft:edx3-expiry-settings
Jun 24, 2015
Merged

Allow configuration of metadata caching/expiry via settings#68
pitbulk merged 1 commit into
SAML-Toolkits:masterfrom
open-craft:edx3-expiry-settings

Conversation

@bradenmacdonald

Copy link
Copy Markdown
Contributor

Curently, python-saml does not allow users to set the time period for which metadata is valid using settings. I have added two new settings to allow the user to control the default expiry date and/or maximum cache time. In addition, you can opt to leave one, the other, or both unspecified. Although leaving both unspecified is against the spec, it is commonly done and is helpful for integration tests and development environments.

I also found and fixed a bug: the cacheDuration attribute in the XML is supposed to be a duration value like PT86400S (Period of Time 86400 Seconds - i.e. one day), and IdP implementations are required to record the time at which they fetched the metadata in order to compute the cache expiry time. However, the code was instead putting an absolute timestamp in this field, which would get interpreted as an extremely long maximum cache time (45+ years).


This is a contribution from edX, developed by OpenCraft as part of bringing integrated SAML support to the edX platform, via a new python-social-auth SAML backend.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.05%) to 97.84% when pulling 5860526 on open-craft:edx3-expiry-settings into c44971e on onelogin:master.

@bradenmacdonald

Copy link
Copy Markdown
Contributor Author

@pitbulk Do you have an idea of when you'll be able to review this PR and the other two pending PRs we have opened? We're currently using a fork of this repo but we'd love to see these merged so we can just use the official release if possible. Thanks!

pitbulk added a commit that referenced this pull request Jun 24, 2015
Allow configuration of metadata caching/expiry via settings
@pitbulk
pitbulk merged commit 3f90130 into SAML-Toolkits:master Jun 24, 2015
@bradenmacdonald
bradenmacdonald deleted the edx3-expiry-settings branch June 24, 2015 16:40
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.

3 participants