mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-05-14 14:45:23 +00:00
Format policies
This commit is contained in:
@@ -308,13 +308,12 @@ test_session_limiting_under_max_session_threshold if {
|
||||
"allow": authorization_grant.allow,
|
||||
"need_to_remove_sessions": need_to_remove_sessions(authorization_grant.violation),
|
||||
} with input.user as user
|
||||
# Some value above `soft_limit` but below `max_session_threshold`
|
||||
with input.session_counts as {"total": 42}
|
||||
with input.session_counts as {"total": 42} # Some value above `soft_limit` but below `max_session_threshold`
|
||||
with data.session_limit as {
|
||||
"soft_limit": 32,
|
||||
"hard_limit": 64,
|
||||
# The main thing we're trying to test
|
||||
"max_session_threshold": 64
|
||||
"max_session_threshold": 64,
|
||||
}
|
||||
not result.allow
|
||||
result.need_to_remove_sessions == 11
|
||||
@@ -325,13 +324,12 @@ test_no_session_limiting_past_max_session_threshold if {
|
||||
"allow": authorization_grant.allow,
|
||||
"need_to_remove_sessions": need_to_remove_sessions(authorization_grant.violation),
|
||||
} with input.user as user
|
||||
# Some value above the limits and `max_session_threshold`
|
||||
with input.session_counts as {"total": 128}
|
||||
with input.session_counts as {"total": 128} # Some value above the limits and `max_session_threshold`
|
||||
with data.session_limit as {
|
||||
"soft_limit": 32,
|
||||
"hard_limit": 64,
|
||||
# The main thing we're trying to test
|
||||
"max_session_threshold": 64
|
||||
"max_session_threshold": 64,
|
||||
}
|
||||
result.allow
|
||||
result.need_to_remove_sessions == 0
|
||||
|
||||
@@ -204,15 +204,14 @@ test_session_limiting_under_max_session_threshold if {
|
||||
"allow": compat_login.allow,
|
||||
"need_to_remove_sessions": need_to_remove_sessions(compat_login.violation),
|
||||
} with input.user as user
|
||||
# Some value above `soft_limit` but below `max_session_threshold`
|
||||
with input.session_counts as {"total": 42}
|
||||
with input.session_counts as {"total": 42} # Some value above `soft_limit` but below `max_session_threshold`
|
||||
with input.login as {"type": "m.login.sso"}
|
||||
with input.session_replaced as false
|
||||
with data.session_limit as {
|
||||
"soft_limit": 32,
|
||||
"hard_limit": 64,
|
||||
# The main thing we're trying to test
|
||||
"max_session_threshold": 64
|
||||
"max_session_threshold": 64,
|
||||
}
|
||||
not result.allow
|
||||
result.need_to_remove_sessions == 11
|
||||
@@ -223,15 +222,14 @@ test_no_session_limiting_past_max_session_threshold if {
|
||||
"allow": compat_login.allow,
|
||||
"need_to_remove_sessions": need_to_remove_sessions(compat_login.violation),
|
||||
} with input.user as user
|
||||
# Some value above the limits and `max_session_threshold`
|
||||
with input.session_counts as {"total": 128}
|
||||
with input.session_counts as {"total": 128} # Some value above the limits and `max_session_threshold`
|
||||
with input.login as {"type": "m.login.sso"}
|
||||
with input.session_replaced as false
|
||||
with data.session_limit as {
|
||||
"soft_limit": 32,
|
||||
"hard_limit": 64,
|
||||
# The main thing we're trying to test
|
||||
"max_session_threshold": 64
|
||||
"max_session_threshold": 64,
|
||||
}
|
||||
result.allow
|
||||
result.need_to_remove_sessions == 0
|
||||
|
||||
Reference in New Issue
Block a user