Skip to content

Record client ips#141

Merged
simonmicro merged 18 commits intonextfrom
feature/record_client_ips
Apr 11, 2026
Merged

Record client ips#141
simonmicro merged 18 commits intonextfrom
feature/record_client_ips

Conversation

@simonmicro
Copy link
Copy Markdown
Member

@simonmicro simonmicro commented Dec 6, 2025

After #140
Resolves #121

@simonmicro simonmicro requested a review from Copilot December 6, 2025 19:38
@simonmicro simonmicro self-assigned this Dec 6, 2025
@simonmicro simonmicro added the enhancement New feature or request label Dec 6, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements client IP address recording functionality (#121) by adding a lastRequestIP column to the SQLite database schema. The implementation includes database schema migration from version 0 to version 1, template updates to display the IP addresses, and code changes to capture and store client IPs during KMS activation requests.

Key Changes

  • Added lastRequestIP TEXT column to the SQLite database schema with automatic migration for existing databases
  • Updated the HTML template to display client IP addresses in a new "Last Address" column
  • Refactored database code to use column name mappings for better maintainability and consistent field naming (appIdapplicationId, requestTimelastRequestTime)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
py-kms/pykms_Sql.py Added database schema versioning with metadata table, implemented migration to add lastRequestIP column, refactored SQL operations to use column name mappings, and improved error handling
py-kms/templates/clients.html Added "Last Address" column header and displays IP address with "N/A" fallback for null values
py-kms/pykms_Server.py Updated SQL module initialization to check availability flag and improved error handling with traceback logging
py-kms/pykms_Base.py Updated infoDict to capture client IP from srv_config['raddr'][0] and renamed keys for consistency
py-kms/pykms_Client.py Modernized datetime usage and improved regex pattern with raw string literal

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread py-kms/pykms_Sql.py Outdated
Comment thread py-kms/pykms_Client.py Outdated
Comment thread py-kms/pykms_Sql.py Outdated
Comment thread py-kms/pykms_Sql.py Outdated
Comment thread py-kms/pykms_Server.py Outdated
Comment thread py-kms/templates/clients.html Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread py-kms/pykms_Sql.py Outdated
Comment thread py-kms/pykms_Server.py Outdated
Comment thread py-kms/templates/clients.html Outdated
Comment thread py-kms/pykms_Sql.py Outdated
@simonmicro simonmicro force-pushed the feature/record_client_ips branch from a4ab407 to 894caf5 Compare December 6, 2025 20:03
@simonmicro simonmicro requested a review from Copilot December 6, 2025 20:03
@simonmicro simonmicro force-pushed the feature/record_client_ips branch from 894caf5 to 161eb48 Compare December 6, 2025 20:04
@simonmicro simonmicro changed the base branch from master to next December 6, 2025 20:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread py-kms/pykms_Sql.py Outdated
Comment thread py-kms/pykms_Sql.py
Comment thread py-kms/pykms_Sql.py Outdated
Comment thread py-kms/templates/clients.html Outdated
Comment thread py-kms/pykms_Sql.py Outdated
Comment thread .github/workflows/test_basic_client.yml Outdated
Comment thread py-kms/pykms_Sql.py Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread py-kms/pykms_Sql.py
Comment thread .github/workflows/test_basic_client.yml
Comment thread py-kms/pykms_Sql.py
@simonmicro simonmicro marked this pull request as ready for review January 18, 2026 20:01
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Added db schema migration
Rewrite to a more generic ORM column handling

Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
Signed-off-by: simonmicro <simon@simonmicro.de>
@simonmicro simonmicro force-pushed the feature/record_client_ips branch from 1c28865 to ba9d1f0 Compare April 11, 2026 13:21
@simonmicro simonmicro merged commit 59aaa13 into next Apr 11, 2026
2 checks passed
@simonmicro simonmicro deleted the feature/record_client_ips branch April 11, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show client IPvX in WebUI

2 participants