-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASA VPN-SESSIONDB: Bug Fixes with new data #323
Conversation
BREAKING CHANGES: * Fix spelling of `received` - `BYTES_RECEIVED` - `PACKETS_RECEIVED` * Distinguish between total byte counts and individual tunnel byte counts - total bytes becomes `TOTAL_BYTES_TRANSMITTED` and `TOTAL_BYTES_RECEIVED` - tunnel bytes stays `BYTES_TRANSMITTED` and `BYTEC_RECEIVED` * Change capturing the connection type from using unique named capture groups, to using the same capture group: - `IKE_CONNECTION_TYPE becomes `CONNECTION_TYPE` - `IPSEC_CONNECTION_TYPE becomes `CONNECTION_TYPE` - Support added for NAC connections will also be recorded as `CONNECTION_TYPE` BUG FIXES: * Update opening lines to allow for, but not require, spaces (`^\s+` -> `^\s*`) * Add support for multiple Connections under the same `Session Type` header * Update IKE matches to account for IKE or IKE with version number * `PROTOCOL` - change capture to support for Protocol fields with multiple protocols * `ENCRYPTION` - Change capture to support for Encryption fields with multiple encryption types * `DURATION` - Change capture to support any datetime format: * `TOTAL_*_SESSIONS` - Add support for IKE/IPSEC tunnel counts on separate lines (TOTAL_IKE_SESSIONS, TOTAL_IPSEC_SESSIONS): * `SESSION_ID` - Add support for output that uses `Tunnel ID` format that is Index + Session ID: - Index of `1000` - Session ID of `1` - Tunnel ID would be `1000.1` - Thus the regex looks for anything after `(?:\d+\.)` for Session ID NEW CAPTURE GROUPS: * `FILTER_NAME` - Add support for capturing Filter Name * `HASHING` - Add support for capturing Hashing algorithms * `IPV6_FILTER_NAME` - Add support for capturing IPv6 Filters * `PRF` - Add support for capturing Pseudo Random Function * `IDLE_TIMEOUT_*` - Add support for captureing Idle Timeout data: - `IDLE_TIMEOUT_INTERVAL` - `IDLE_TIMEOUT_INTERVAL_UNIT` - `IDLE_TIMEOUT_REMAINING` - `IDLE_TIMEOUT_REMAINING_UNI` * `REKEY_DATA_*` - Add support for Rekey data intervals and timeouts: - Distinguish between time and data rekey values (`\(\w\)` -> `\([Tt]\)` and `\([Dd]\)` - `REKEY_DATA_INTERVAL` - `REKEY_DATA_INTERVAL_UNIT` - `REKEY_DATA_REMAINING` - `REKEY_DATA_REMAINING_UNIT` * NAC - Add support for NAC connections: - `REVAL_TIMEOUT` - `REVAL_TIMOUT_UNIT` - `REVAL_TIMEOUT_REMAINING` - `REVAL_TIMEOUT_REMAINING_UNIT` - `STATUS_QUERY_INTERVAL` - `STATUS_QUERY_INTERVAL_UNIT` - `EAP_OVER_UDP_TIMER` - `EAP_OVER_UDP_TIMER_UNIT` - `POSTURE_HOLDTIME_REMAINING` - `POSTURE_HOLDTIME_REMAINING_UNIT` - `POSTURE_TOKEN` - `REDIRECT_URL` GENERAL ENHANCEMENTS: * Add end-of-line to each expression (`\s*$$`) * Add catch-all error to ensure parser integrity (`.* -> Error`) * Change Record to take place on Session/Protocol Header TEST UPDATES: * Update existing test parsed file to account for updates * Add new test files with additional output formats
@jmcgill298 Thanks for all the work on this! Would it be worth while to set the Also, I'm not sure if it'd be worth it to change |
https://www.cisco.com/c/en/us/td/docs/security/asa/asa-command-reference/S/cmdref3/s14.html
I think all of your concerns stem back to including IKE as part of the overall session data, but I don't think that it would necessarily represent all possible options.
I think it would be better to record each section individually, and handle assembling data in post-processing. |
@FragmentedPacket based on our conversation yesterday, are you good with this solution? |
@jmcgill298 Yup. Everything makes sense! |
BREAKING CHANGES: * Fix spelling of `received` - `BYTES_RECEIVED` - `PACKETS_RECEIVED` * Distinguish between total byte counts and individual tunnel byte counts - total bytes becomes `TOTAL_BYTES_TRANSMITTED` and `TOTAL_BYTES_RECEIVED` - tunnel bytes stays `BYTES_TRANSMITTED` and `BYTEC_RECEIVED` * Change capturing the connection type from using unique named capture groups, to using the same capture group: - `IKE_CONNECTION_TYPE becomes `CONNECTION_TYPE` - `IPSEC_CONNECTION_TYPE becomes `CONNECTION_TYPE` - Support added for NAC connections will also be recorded as `CONNECTION_TYPE` BUG FIXES: * Update opening lines to allow for, but not require, spaces (`^\s+` -> `^\s*`) * Add support for multiple Connections under the same `Session Type` header * Update IKE matches to account for IKE or IKE with version number * `PROTOCOL` - change capture to support for Protocol fields with multiple protocols * `ENCRYPTION` - Change capture to support for Encryption fields with multiple encryption types * `DURATION` - Change capture to support any datetime format: * `TOTAL_*_SESSIONS` - Add support for IKE/IPSEC tunnel counts on separate lines (TOTAL_IKE_SESSIONS, TOTAL_IPSEC_SESSIONS): * `SESSION_ID` - Add support for output that uses `Tunnel ID` format that is Index + Session ID: - Index of `1000` - Session ID of `1` - Tunnel ID would be `1000.1` - Thus the regex looks for anything after `(?:\d+\.)` for Session ID NEW CAPTURE GROUPS: * `FILTER_NAME` - Add support for capturing Filter Name * `HASHING` - Add support for capturing Hashing algorithms * `IPV6_FILTER_NAME` - Add support for capturing IPv6 Filters * `PRF` - Add support for capturing Pseudo Random Function * `IDLE_TIMEOUT_*` - Add support for captureing Idle Timeout data: - `IDLE_TIMEOUT_INTERVAL` - `IDLE_TIMEOUT_INTERVAL_UNIT` - `IDLE_TIMEOUT_REMAINING` - `IDLE_TIMEOUT_REMAINING_UNI` * `REKEY_DATA_*` - Add support for Rekey data intervals and timeouts: - Distinguish between time and data rekey values (`\(\w\)` -> `\([Tt]\)` and `\([Dd]\)` - `REKEY_DATA_INTERVAL` - `REKEY_DATA_INTERVAL_UNIT` - `REKEY_DATA_REMAINING` - `REKEY_DATA_REMAINING_UNIT` * NAC - Add support for NAC connections: - `REVAL_TIMEOUT` - `REVAL_TIMOUT_UNIT` - `REVAL_TIMEOUT_REMAINING` - `REVAL_TIMEOUT_REMAINING_UNIT` - `STATUS_QUERY_INTERVAL` - `STATUS_QUERY_INTERVAL_UNIT` - `EAP_OVER_UDP_TIMER` - `EAP_OVER_UDP_TIMER_UNIT` - `POSTURE_HOLDTIME_REMAINING` - `POSTURE_HOLDTIME_REMAINING_UNIT` - `POSTURE_TOKEN` - `REDIRECT_URL` GENERAL ENHANCEMENTS: * Add end-of-line to each expression (`\s*$$`) * Add catch-all error to ensure parser integrity (`.* -> Error`) * Change Record to take place on Session/Protocol Header TEST UPDATES: * Update existing test parsed file to account for updates * Add new test files with additional output formats
BREAKING CHANGES:
received
BYTES_RECEIVED
PACKETS_RECEIVED
TOTAL_BYTES_TRANSMITTED
andTOTAL_BYTES_RECEIVED
BYTES_TRANSMITTED
andBYTEC_RECEIVED
IKE_CONNECTION_TYPE
becomesCONNECTION_TYPE
IPSEC_CONNECTION_TYPE
becomesCONNECTION_TYPE
CONNECTION_TYPE
BUG FIXES:
^\s+
->^\s*
)Session Type
headerPROTOCOL
- change capture to support for Protocol fields with multiple protocolsENCRYPTION
- Change capture to support for Encryption fields with multiple encryption typesDURATION
- Change capture to support any datetime format:TOTAL_*_SESSIONS
- Add support for IKE/IPSEC tunnel counts on separate lines:TOTAL_IKE_SESSIONS
TOTAL_IPSEC_SESSIONS
SESSION_ID
- Add support for output that usesTunnel ID
format that is Index + Session ID:1000
1
1000.1
(?:\d+\.)
for Session IDNEW CAPTURE GROUPS:
FILTER_NAME
- Add support for capturing Filter NameHASHING
- Add support for capturing Hashing algorithmsIPV6_FILTER_NAME
- Add support for capturing IPv6 FiltersPRF
- Add support for capturing Pseudo Random FunctionIDLE_TIMEOUT_*
- Add support for captureing Idle Timeout data:IDLE_TIMEOUT_INTERVAL
IDLE_TIMEOUT_INTERVAL_UNIT
IDLE_TIMEOUT_REMAINING
IDLE_TIMEOUT_REMAINING_UNI
REKEY_DATA_*
- Add support for Rekey data intervals and timeouts:\(\w\)
->\([Tt]\)
and\([Dd]\)
REKEY_DATA_INTERVAL
REKEY_DATA_INTERVAL_UNIT
REKEY_DATA_REMAINING
REKEY_DATA_REMAINING_UNIT
REVAL_TIMEOUT
REVAL_TIMOUT_UNIT
REVAL_TIMEOUT_REMAINING
REVAL_TIMEOUT_REMAINING_UNIT
STATUS_QUERY_INTERVAL
STATUS_QUERY_INTERVAL_UNIT
EAP_OVER_UDP_TIMER
EAP_OVER_UDP_TIMER_UNIT
POSTURE_HOLDTIME_REMAINING
POSTURE_HOLDTIME_REMAINING_UNIT
POSTURE_TOKEN
REDIRECT_URL
GENERAL ENHANCEMENTS:
\s*$$
).* -> Error
)TEST UPDATES:
ISSUE TYPE
COMPONENT
cisco_asa_show_vpn-sessiondb_detail_l2l
SUMMARY
New data collected for command output; this updates the template to account for this info.
Fixes #231
Alternate solution to #237