test: prove allowed_ips is ignored on key and policy level#7970
test: prove allowed_ips is ignored on key and policy level#7970probelabs[bot] wants to merge 1 commit intomasterfrom
Conversation
🚨 Jira Linter FailedCommit: The Jira linter failed to validate your PR. Please check the error details below: 🔍 Click to view error detailsNext Steps
This comment will be automatically deleted once the linter passes. |
|
This PR adds tests to confirm that the Files Changed Analysis
The changes are purely additive, introducing 64 lines of test code with no deletions. Architecture & Impact Assessment
Scope Discovery & Context Expansion
Metadata
Powered by Visor from Probelabs Last updated: 2026-04-04T07:30:02.991Z | Triggered by: pr_opened | Commit: 13e0158 💡 TIP: You can chat with Visor using |
✅ Security Check PassedNo security issues found – changes LGTM. ✅ Security Check PassedNo security issues found – changes LGTM. \n\n✅ Architecture Check PassedNo architecture issues found – changes LGTM. ✅ Performance Check PassedNo performance issues found – changes LGTM. Powered by Visor from Probelabs Last updated: 2026-04-04T07:29:58.633Z | Triggered by: pr_opened | Commit: 13e0158 💡 TIP: You can chat with Visor using |
|
API Changes no api changes detected |
|




Problem / Task
A user reported that
allowed_ips(IP Binding per Key) is not working and is being overridden by policy. We need a test to prove whether it works or is ignored.Changes
Added
user/session_allowed_ips_test.gowith two tests:TestSessionState_AllowedIPs_Ignored: Proves thatallowed_ipsis completely ignored when unmarshaling aSessionState(Key).TestPolicy_AllowedIPs_Ignored: Proves thatallowed_ipsis completely ignored when unmarshaling aPolicy.This confirms that
allowed_ipsis strictly an API-level feature (APIDefinition) and is not natively supported for individual keys or policies.Testing
go test -v ./user -run TestSessionState_AllowedIPs_Ignoredgo test -v ./user -run TestPolicy_AllowedIPs_IgnoredBoth tests pass, confirming the behavior.