Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
efca75e3
Commit
efca75e3
authored
6 years ago
by
Jelle Witteveen
Browse files
Options
Downloads
Patches
Plain Diff
Create a setting for the allowed assertion offset
parent
0b089801
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config-templates/config.php
+9
-0
9 additions, 0 deletions
config-templates/config.php
modules/saml/lib/Message.php
+5
-3
5 additions, 3 deletions
modules/saml/lib/Message.php
with
14 additions
and
3 deletions
config-templates/config.php
+
9
−
0
View file @
efca75e3
...
...
@@ -176,6 +176,15 @@ $config = [
*/
'enable.http_post'
=>
false
,
/*
* Set the allowed time difference between encrypting/decrypting assertions
*
* If you have an server that is constantly out of sync, this option
* allows you to adjust the allowed time-frame.
*
* Defaults to 60.
*/
'assertion.allowed_offset'
=>
60
,
/************************
...
...
This diff is collapsed.
Click to expand it.
modules/saml/lib/Message.php
+
5
−
3
View file @
efca75e3
...
...
@@ -656,20 +656,22 @@ class Message
$currentURL
=
\SimpleSAML\Utils\HTTP
::
getSelfURLNoQuery
();
// check various properties of the assertion
$config
=
\SimpleSAML\Configuration
::
getInstance
();
$allowed_assertion_offset
=
$config
->
getInteger
(
'assertion.allowed_offset'
,
60
);
$notBefore
=
$assertion
->
getNotBefore
();
if
(
$notBefore
!==
null
&&
$notBefore
>
time
()
+
60
)
{
if
(
$notBefore
!==
null
&&
$notBefore
>
time
()
+
$allowed_assertion_offset
)
{
throw
new
\SimpleSAML\Error\Exception
(
'Received an assertion that is valid in the future. Check clock synchronization on IdP and SP.'
);
}
$notOnOrAfter
=
$assertion
->
getNotOnOrAfter
();
if
(
$notOnOrAfter
!==
null
&&
$notOnOrAfter
<=
time
()
-
60
)
{
if
(
$notOnOrAfter
!==
null
&&
$notOnOrAfter
<=
time
()
-
$allowed_assertion_offset
)
{
throw
new
\SimpleSAML\Error\Exception
(
'Received an assertion that has expired. Check clock synchronization on IdP and SP.'
);
}
$sessionNotOnOrAfter
=
$assertion
->
getSessionNotOnOrAfter
();
if
(
$sessionNotOnOrAfter
!==
null
&&
$sessionNotOnOrAfter
<=
time
()
-
60
)
{
if
(
$sessionNotOnOrAfter
!==
null
&&
$sessionNotOnOrAfter
<=
time
()
-
$allowed_assertion_offset
)
{
throw
new
\SimpleSAML\Error\Exception
(
'Received an assertion with a session that has expired. Check clock synchronization on IdP and SP.'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment