Skip to content

Conversation

@bhaveshamre
Copy link
Contributor

What changes were proposed in this pull request?

This PR implements enhanced Security Zone visibility and access restrictions in Apache Ranger. The main goal is to ensure that a security zone is visible only to users who are authorized to administer or audit that zone.

Key changes introduced:

Restricted Zone Visibility

A security zone is now visible only to:

Zone Admin users / groups / roles

Zone Auditor users / groups / roles

Super Admin users (global ADMIN)

All other users cannot see non-public zones.

Updated Access Logic

Zone Admins: Can view the zone and fully manage it (create/edit/delete policies).

Zone Auditors: Can view the zone and access its audit logs only. Cannot modify zone/policies.

Unauthorized users: Cannot view the zone, its policies, or its audits.

Public zones continue to be visible to all.

Backend Enforcement

Visibility and filtering logic added/updated in:

PublicAPIsv2 (all zone-fetching API endpoints)

SecurityZoneREST

SecurityZoneDBStore (core business logic)

DAO layer (XXSecurityZoneDao, XXUserDao, RangerDaoManagerBase)

JPA named queries (jpa_named_queries.xml)

UI Data Filtering

Updated zone filtering for:

Security Zone homepage (getAllZones)

Main homepage header zone info (getSecurityZoneHeaderInfoList)

Service homepage (getSecurityZoneHeaderInfoListByServiceId)

How was this patch tested?

I have verified the changes locally by running mvn clean compile package install and then bringing up the Ranger environment to ensure that the updated security-zone visibility logic works correctly during development testing.

Copy link
Contributor

@pradeepagrawal8184 pradeepagrawal8184 left a comment

Choose a reason for hiding this comment

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

Have you tested this patch with all db flavors in fresh and upgrade case ?

@bhaveshamre
Copy link
Contributor Author

Have you tested this patch with all db flavors in fresh and upgrade case ?

Yes, the patch has been tested against MySQL, Oracle, and PostgreSQL for both fresh and upgrade cases.

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