Skip to content

Grant access to MapStore resources by IP #972 - #11333

Merged
offtherailz merged 11 commits into
geosolutions-it:masterfrom
rowheat02:ipgroups
Nov 7, 2025
Merged

offtherailz merged 11 commits into
geosolutions-it:masterfrom
rowheat02:ipgroups

Conversation

@rowheat02

@rowheat02 rowheat02 commented Jul 18, 2025 •

Copy link
Copy Markdown
Contributor

Description

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

#11332

What is the current behavior?

#11332
No Resource Access By IP.

What is the new behavior?

  • Resource can be given access by IP.
  • For the whole system, IPs can be managed in the IP manager page(CRUD)
    image
  • Permission can be given in the Permission section of the resource( same list of IPs managed from IP manager page)
    image
  • If the resource has IP permission, the resource can be accessed even if user is not the owner or is not in the shared group.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

IP Manager

  • New IP Manager section in Resources Catalog for managing IP address ranges
  • Full CRUD operations: Create, Read, Update, Delete IP ranges
  • CIDR format support (e.g., 192.168.1.0/24)
  • Search and filter functionality for IP ranges
  • Client-side pagination and filtering

IP-Based Resource Permissions

  • Integration with resource permissions system
  • Grant view/edit permissions to resources based on IP ranges
  • IP tab in Permissions panel for selecting IP ranges
  • Supports both user/group and IP-based access control simultaneously

@rowheat02 rowheat02 self-assigned this Jul 18, 2025
@rowheat02 rowheat02 changed the title mock ip addresses management and incoprate it in permission Grant access to MapStore resources by IP #972 Jul 18, 2025
@rowheat02

rowheat02 commented Jul 18, 2025 •

Copy link
Copy Markdown
Contributor Author

OUTDATED: See the description
Like in this video:
https://github.com/user-attachments/assets/28b814cc-ff1a-4c4a-b27e-1fb235228d06

  1. IP address management page has been created besides Tags management tab inside Manager page for IP management(CRUD)

    image
  2. On the Permission section of resource, IP addresses to grant access can be viewed and added as a permission.

    image
  3. Till now APIs for IP management are mocked.

Expectation from backend:

  • CRUD API Endpoints for IP address management
    - GET /geostore/rest/ipaddresses - List available IP addresses
    - POST /geostore/rest/ipaddresses - Create new IP address entry
    - PUT /geostore/rest/ipaddresses/{id} - Update IP address entry
    - DELETE /geostore/rest/ipaddresses/{id} - Delete IP address entry

  • On this end point rest/geostore/resources/resource/<resourceID>/permissions , similar to how groups are sent, IP rule are also sent.

    <SecurityRuleList><SecurityRule><canRead>true</canRead><canWrite>false</canWrite><group><id>479</id><groupName>everyone</groupName></group></SecurityRule><SecurityRule><canRead>true</canRead><canWrite>false</canWrite><group><id>53916</id><groupName>test_group</groupName></group></SecurityRule><SecurityRule><canRead>true</canRead><canWrite>false</canWrite><ip><id>3</id><ipAddress>192.12.22.1</ipAddress><description></description></ip></SecurityRule><SecurityRule><canRead>true</canRead><canWrite>true</canWrite><user><id>51359</id><name>rohitg</name></user></SecurityRule></SecurityRuleList>
    image - On GET api also this rule of IP also should be included.
  • After backend work, Needs to be revisited along with integrating the real APIs, some refactor and writing unit tests.

@offtherailz

Copy link
Copy Markdown
Member

de-DE translation is missing, see output of CI:

data.de-DE.json
-->	messages.ipmanager is missing
	messages.home.examples is present in the current file but not in the base file
-->	messages.manager.ipmanagerTab is missing
	messages.toc.backgroundSwitcher is present in the current file but not in the base file
-->	messages.resourcesCatalog.ipmanagerSection is missing
-->	messages.resourcesCatalog.ip is missing
-->	messages.resourcesCatalog.manageIPs is

@tdipisa tdipisa added this to the 2025.02.00 milestone Aug 11, 2025
@rowheat02 rowheat02 linked an issue Oct 29, 2025 that may be closed by this pull request
2 tasks
@rowheat02
rowheat02 marked this pull request as ready for review October 29, 2025 11:30
@rowheat02
rowheat02 requested a review from offtherailz October 29, 2025 11:31
@rowheat02 rowheat02 removed their assignment Oct 29, 2025
@tdipisa tdipisa modified the milestones: 2025.02.00, 2026.01.00 Nov 4, 2025
@tdipisa tdipisa added the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Nov 4, 2025

@offtherailz offtherailz left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

- [ ] I can assign Edit permission to IPs, but IPs are not in fact able to edit (the endpoints and the UI require a login for editing). This thing has not been condidered. We should figure out what to do in this case. --> ok as it is.

  • UI talks inconsistency about IP address and ranges. We should name them all "IP range" IMHO. Talking about IPs regards only the specific case of subnetmask 32. See my comment inline and adapt the UI

Comment thread web/client/translations/data.en-US.json Resolved
Comment thread web/client/translations/data.en-US.json Resolved
Comment thread web/client/translations/data.en-US.json Resolved
@rowheat02
rowheat02 requested a review from offtherailz November 7, 2025 07:32
Comment thread web/client/translations/data.it-IT.json Resolved
Comment thread web/client/translations/data.it-IT.json Outdated
Comment on lines +4549 to +4553
"newIP": "Nuovo Intervallo IP",
"editTitle": "Modifica Intervallo IP",
"editTooltip": "Modifica Intervallo IP",
"deleteTitle": "Elimina Intervallo IP",
"deleteTooltip": "Elimina Intervallo IP",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"newIP": "Nuovo Intervallo IP",
"editTitle": "Modifica Intervallo IP",
"editTooltip": "Modifica Intervallo IP",
"deleteTitle": "Elimina Intervallo IP",
"deleteTooltip": "Elimina Intervallo IP",
"newIP": "Nuovo intervallo IP",
"editTitle": "Modifica intervallo IP",
"editTooltip": "Modifica intervallo IP",
"deleteTitle": "Elimina intervallo IP",
"deleteTooltip": "Elimina intervallo IP",

Comment thread web/client/translations/data.fr-FR.json Resolved
Comment thread web/client/translations/data.es-ES.json Resolved
@offtherailz

Copy link
Copy Markdown
Member

@ElenaGallo, could you please test this on DEV ? Thank you

@offtherailz
offtherailz enabled auto-merge (squash) November 7, 2025 08:46
@offtherailz
offtherailz merged commit f31a5b6 into geosolutions-it:master Nov 7, 2025
@tdipisa

tdipisa commented Nov 7, 2025

Copy link
Copy Markdown
Member

@ElenaGallo backport is necessary here. Let us know.

@ElenaGallo

Copy link
Copy Markdown
Contributor

@rowheat02 @offtherailz When an IP address with Edit permission is added to a resource, anonymous users should not see the Permissions tab in that resource's permissions panel

1ip.mp4

@rowheat02

Copy link
Copy Markdown
Contributor Author

@ElenaGallo New PR for the bug has been raised: #11690.
Assigned @offtherailz for the review.

@ElenaGallo

Copy link
Copy Markdown
Contributor

test passed, @rowheat02 please backport to 2025.02.xx. Thanks

rowheat02 added a commit to rowheat02/MapStore2 that referenced this pull request Nov 20, 2025
@tdipisa tdipisa removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Feature used for new functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grant access to MapStore resources by IP

4 participants