From f31c7417247230fe5c0ba2feebbefec6dc7ca8e8 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Fri, 8 May 2026 14:41:26 -0500 Subject: [PATCH] Format policies --- .../authorization_grant/authorization_grant_test.rego | 10 ++++------ policies/compat_login/compat_login_test.rego | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/policies/authorization_grant/authorization_grant_test.rego b/policies/authorization_grant/authorization_grant_test.rego index cb3acd39a..5186e6c3e 100644 --- a/policies/authorization_grant/authorization_grant_test.rego +++ b/policies/authorization_grant/authorization_grant_test.rego @@ -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 diff --git a/policies/compat_login/compat_login_test.rego b/policies/compat_login/compat_login_test.rego index 7d4a7f5b0..ca6d7290a 100644 --- a/policies/compat_login/compat_login_test.rego +++ b/policies/compat_login/compat_login_test.rego @@ -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