Skip to content

Update List Expire logic#91

Merged
Jt3kt merged 1 commit intoLogRhythm-Tools:dev-1.3.3from
jberkers42:jberkers42-list-expirelogic
Sep 21, 2022
Merged

Update List Expire logic#91
Jt3kt merged 1 commit intoLogRhythm-Tools:dev-1.3.3from
jberkers42:jberkers42-list-expirelogic

Conversation

@jberkers42
Copy link
Contributor

Only add TimeToLiveSeconds if list is set to expire, else API returns error.

Previous logic added the TimeToLiveSeconds property to all List Create/Update requests whether set to expire or not. This logic corrects the behaviour so the property is only added if the list is set to expire.

Only add TimeToLiveSeconds if list is set to expire, else API returns error.
@Jt3kt
Copy link
Contributor

Jt3kt commented Sep 21, 2022

Looks good, was on my list to fix this one up!

@Jt3kt Jt3kt merged commit 5f78253 into LogRhythm-Tools:dev-1.3.3 Sep 21, 2022
Jt3kt added a commit that referenced this pull request Aug 22, 2025
* Update Merge-LrIdentities.ps1

Remove help file contents that are no longer appropriate

* Update LR.Tools_Installer.gif

Add modern representation of LogRhythm.Tools installer.

* Update List Expire logic (#91)

Only add TimeToLiveSeconds if list is set to expire, else API returns error.

Co-authored-by: John Berkers <jberkers@ipsec.com.au>

* Add support for Networks in Add-LrListItem (#90)

* Add Network support to Add-LrListItem

* Network support for Remove-LrListItem

Co-authored-by: John Berkers <jberkers@ipsec.com.au>

* Fixes to Get-LrNetworks (#95)

- Fix #92 by swithing BIP and EIP params to IpAddress
- Fix #93 by updating pagination logic

Co-authored-by: John Berkers <jberkers@ipsec.com.au>

* Update Version Validation (#94)

Adds a fix to prevent user input for API Version conflict from what the module expects.  Good contribution @lincolnsayhelloworld!

* Add test for AddressFamily (#97)

* Add test for AddressFamily

* IPv4 Address family is InterNetwork

* Test-IPv4AddressInRange should return a boolan value
Was returning an object representing the Valid/Value/Private state of the IPaddress

Co-authored-by: John Berkers <jberkers@ipsec.com.au>

* Potential solution to issue #96

Added in regex for matching various valid structures for IPv6, upon match it updates the IsValid from $true to $false.

* Update LogRhythm.Tools.json

Updating the reference JSON to match the current production release of LR and showcase that the version now supports double digits for minor release markers.

* Update New-LrHost.ps1

Correction to fix this cmdlet for establishing a new host record.

* Add support for RF v3 API

Pull the v2 out of the LogRhythm.Tools.json and move it into the cmdlet.  This is due to RF releasing some v3 API endpoints.

* New v3 RF cmdlets

Add cmdlets for Get-RfAlerts and Update-RfAlert

* Create Add-LrLogSource.ps1

* Create Get-LrLogSourceTypeDetails.ps1

* Create Get-LrMpePolicies.ps1

* Create Get-LrMpePolicy.ps1

* Create Get-LrMpeRules.ps1

* Update Update-LrLogSource.ps1

Fix for #99
Add ability to set Mpe Policy based on input MPE Policy ID.

* Update Get-LrLogSourceTypes.ps1

Basic cleanup

* Create Invoke-ManageWinLocalSources.ps1

Example that provides a working model for automatically adding Windows log sources locally on enabled Windows Agents.

* Update Invoke-ManageWinLocalSources.ps1

Shifting where some actions take place reduces the number of API requests required to perform the task.

* Update Invoke-ManageWinLocalSources.ps1

Add some counters to be able to review the results of the automation.

* Exabeam initial

Covers retrieving API Token, setting API Token, and retrieving data from Contexts in Exabeam.

* Update Invoke-ManageWinLocalSources.ps1

Example that can be used to automatically configure Windows log sources for active agents in an environment.

* Update ModuleInfo.json

* Cmdlets to support Exa context lists

In-progress development

* Updates

* Exabeam Resources

* Update path for RecordedFuture

* Update Invoke-ExaExportFHK.ps1

* Update Invoke-ExaExportFHK.ps1

* Update Get-LrtExaFHKResults.ps1

* Basic Updates

* Hour restart logic

* Update Invoke-ExaExportFHK.ps1

* Add end hour support

* Updated handler for start

* Fix order and error

* Add search date as the core

* Small updates

* Add month roll over handler

* Update cmdlet to generic search

* Update Invoke-ExaExportFHK.ps1

* Rename Get-ExaSearch

Update Invoke-ExaExportFHK example.

* Improve logic to go from older to newer logs

* Update Invoke-ExaExportFHK.ps1

Add memory cleanup for longer run jobs

* Update Get-ExaSearch.ps1

* Delete Invoke-ExaExportFHK.ps1

No longer needed

---------

Co-authored-by: John Berkers <jberkers42@gmail.com>
Co-authored-by: John Berkers <jberkers@ipsec.com.au>
Co-authored-by: lincolnsayhelloworld <109524229+lincolnsayhelloworld@users.noreply.github.com>
Jt3kt added a commit that referenced this pull request Jan 2, 2026
* Update Merge-LrIdentities.ps1

Remove help file contents that are no longer appropriate

* Update LR.Tools_Installer.gif

Add modern representation of LogRhythm.Tools installer.

* Update List Expire logic (#91)

Only add TimeToLiveSeconds if list is set to expire, else API returns error.

Co-authored-by: John Berkers <jberkers@ipsec.com.au>

* Add support for Networks in Add-LrListItem (#90)

* Add Network support to Add-LrListItem

* Network support for Remove-LrListItem

Co-authored-by: John Berkers <jberkers@ipsec.com.au>

* Fixes to Get-LrNetworks (#95)

- Fix #92 by swithing BIP and EIP params to IpAddress
- Fix #93 by updating pagination logic

Co-authored-by: John Berkers <jberkers@ipsec.com.au>

* Update Version Validation (#94)

Adds a fix to prevent user input for API Version conflict from what the module expects.  Good contribution @lincolnsayhelloworld!

* Add test for AddressFamily (#97)

* Add test for AddressFamily

* IPv4 Address family is InterNetwork

* Test-IPv4AddressInRange should return a boolan value
Was returning an object representing the Valid/Value/Private state of the IPaddress

Co-authored-by: John Berkers <jberkers@ipsec.com.au>

* Potential solution to issue #96

Added in regex for matching various valid structures for IPv6, upon match it updates the IsValid from $true to $false.

* Update LogRhythm.Tools.json

Updating the reference JSON to match the current production release of LR and showcase that the version now supports double digits for minor release markers.

* Update New-LrHost.ps1

Correction to fix this cmdlet for establishing a new host record.

* Add support for RF v3 API

Pull the v2 out of the LogRhythm.Tools.json and move it into the cmdlet.  This is due to RF releasing some v3 API endpoints.

* New v3 RF cmdlets

Add cmdlets for Get-RfAlerts and Update-RfAlert

* Create Add-LrLogSource.ps1

* Create Get-LrLogSourceTypeDetails.ps1

* Create Get-LrMpePolicies.ps1

* Create Get-LrMpePolicy.ps1

* Create Get-LrMpeRules.ps1

* Update Update-LrLogSource.ps1

Fix for #99
Add ability to set Mpe Policy based on input MPE Policy ID.

* Update Get-LrLogSourceTypes.ps1

Basic cleanup

* Create Invoke-ManageWinLocalSources.ps1

Example that provides a working model for automatically adding Windows log sources locally on enabled Windows Agents.

* Update Invoke-ManageWinLocalSources.ps1

Shifting where some actions take place reduces the number of API requests required to perform the task.

* Update Invoke-ManageWinLocalSources.ps1

Add some counters to be able to review the results of the automation.

* Exabeam initial

Covers retrieving API Token, setting API Token, and retrieving data from Contexts in Exabeam.

* Update Invoke-ManageWinLocalSources.ps1

Example that can be used to automatically configure Windows log sources for active agents in an environment.

* Update ModuleInfo.json

* Cmdlets to support Exa context lists

In-progress development

* Updates

* Exabeam Resources

* Update path for RecordedFuture

* Update Invoke-ExaExportFHK.ps1

* Update Invoke-ExaExportFHK.ps1

* Update Get-LrtExaFHKResults.ps1

* Basic Updates

* Hour restart logic

* Update Invoke-ExaExportFHK.ps1

* Add end hour support

* Updated handler for start

* Fix order and error

* Add search date as the core

* Small updates

* Add month roll over handler

* Update cmdlet to generic search

* Update Invoke-ExaExportFHK.ps1

* Rename Get-ExaSearch

Update Invoke-ExaExportFHK example.

* Improve logic to go from older to newer logs

* Update Invoke-ExaExportFHK.ps1

Add memory cleanup for longer run jobs

* Update Get-ExaSearch.ps1

* Delete Invoke-ExaExportFHK.ps1

No longer needed

* Update Exabeam Search and New cmdlet for retrieving correlation rules

---------

Co-authored-by: John Berkers <jberkers42@gmail.com>
Co-authored-by: John Berkers <jberkers@ipsec.com.au>
Co-authored-by: lincolnsayhelloworld <109524229+lincolnsayhelloworld@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants