fix: security hardening for PAM import engine#1903
Open
jlima8900 wants to merge 15 commits intoKeeper-Security:masterfrom
Open
fix: security hardening for PAM import engine#1903jlima8900 wants to merge 15 commits intoKeeper-Security:masterfrom
jlima8900 wants to merge 15 commits intoKeeper-Security:masterfrom
Conversation
* commander KC - (1128, 1115, 1114) bug fix chnages * File flag fix under "epm deployment download" in commander * confirmation promp added for kepm agent delete command without --force flag * Kepm PR review changes
…ead of cumulative list
* Fixed double new lines on some terminals (Linux, MacOS) * Improved handling of non-terminal protocols * Update to keeper_pam_webrtc_rs>=2.1.5
Corrects logic in needs_security_audit: remove the erroneous "or None" that forced password mismatch to always be true, and determine alignment by comparing stored score and breach-watch revisions only when a current password exists. Adds retrieval of score_revision and sec_revision and updates needs_alignment accordingly. Includes new unit and integration tests (unit-tests/test_security_audit.py and tests/test_security_audit_refresh.py) to validate revision-based alignment, password removal, and other audit-refresh scenarios.
* Added "Connect As" options allowing for aditional records to provide credentials and host:port * Added keeper webrtc version to SDP attribute a=keeper-webrtc:X.Y.Z
The execute_rest() function previously retried throttled (403) responses every 10 seconds with no maximum retry count. This caused Commander to hang indefinitely when throttled, and the 10-second retry interval prevented the server's cooldown timer from expiring. Changes: - Add max retry count (3 attempts) before raising KeeperApiError - Parse the server's "try again in X minutes/seconds" message - Use exponential backoff (30s, 60s, 120s) capped at server's suggestion - Cap server wait time at 300s to prevent excessive delays - Log throttle attempts as warnings instead of debug - After max retries, raise KeeperApiError so callers can handle it The --fail-on-throttle flag continues to work as before (immediate error). Unit tests (9 cases): - Normal request unaffected by throttle logic - Throttle twice then succeed (backoff 30s, 60s) - KeeperApiError raised after 3 retries - --fail-on-throttle skips retries entirely - Parses "try again in X seconds" correctly - Parses "try again in X minutes" correctly - Caps server wait at 300s - Exponential backoff progression (30s, 60s, 120s) - Missing message defaults to 60s
…er-Security#1885) - Make record argument optional; session-only probes run without it - Add Python-side network probes: DNS, HTTPS, WebSocket, TCP/UDP STUN, TURN Allocate, UDP port sweep across ephemeral range - Add PAM Configuration section (record required): DAG load, config linkage, gateway registered/online, connections/portForwards - Add --verbose flag for DAG allowedSettings table and record typed fields
- Warn user that gateway token output contains sensitive credentials - Clear gateway token from memory after display - Add max iteration guard (1000) on folder name deduplication loop to prevent infinite spin from pathological vault state
- Loop guard: terminates after MAX_ITERATIONS, finds name on 1st/3rd try - Token clearing: tokens cleared from memory after display, res captures before clear - Warning message: bootstrap token warning present in source - Gateway data structure: all expected keys initialized
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan