[
https://issues.apache.org/jira/browse/ATLAS-5434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18147989#comment-18147989
]
ASF subversion and git services commented on ATLAS-5434:
--------------------------------------------------------
Commit ab73e99c326cdc5bb32b42e42a84cd8d6754f9dd in atlas's branch
refs/heads/atlas-2.6 from UmeshPatil-1
[ https://gitbox.apache.org/repos/asf?p=atlas.git;h=ab73e99c32 ]
ATLAS-5207: Fix webapp test-compile on atlas-2.6 and restore ATLAS-5320 hook
parallel API (#801)
* ATLAS-5207 (2.6 follow-up): fix webapp testCompile; restore ATLAS-5320 hook
parallel API
- AtlasJwtAuthWrapperTest missing Knox filter import after server-common move.
- AtlasSecurityConfigTest ctor missing AtlasHeaderPreAuthFilter /
AtlasJwtAuthWrapper.
- RestNotificationTest missing commons-configuration2 BaseConfiguration import.
Restore ATLAS-5320 parallel preprocessing surface (getPreprocessorHookConsumers,
9-arg ctor, HOOK_PREPROCESS) on NotificationHookConsumer without reverting full
ATLAS-5207 consumer merge. Align webapp tests with open source changes 5207.
Refs: ATLAS-5207
* ATLAS-5207 (2.6 follow-up): add SERVICE_NOTIFICATION_POST to AtlasPrivilege
for rest-notification compile
ATLAS-5388 (c2f780e7a) renamed the enum to POST_NOTIFICATION for topic-scoped
auth on 2.6.
ATLAS-5434 (39aeb1949) added verifyAccess(SERVICE_NOTIFICATION_POST) on
rest-notification-webapp NotificationREST without restoring the enum constant,
causing rest-notification-webapp compile failure after webapp testCompile was
fixed.
Add SERVICE_NOTIFICATION_POST alongside POST_NOTIFICATION to complete 5434 and
align
with PR #622 / master REST auth without reverting ATLAS-5388.
Refs: ATLAS-5207, ATLAS-5388, ATLAS-5434, PR #801, PR #799, PR #622.
* ATLAS-5207 (2.6 follow-up): align AtlasSecurityConfigTest with header/JWT
filter chain
> Missing SERVICE_NOTIFICATION_POST authorization on rest-notification
> NotificationREST POST /topic/{topicName} for 2.6 branch.
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: ATLAS-5434
> URL: https://issues.apache.org/jira/browse/ATLAS-5434
> Project: Atlas
> Issue Type: Bug
> Components: atlas-core
> Affects Versions: 2.6.0
> Reporter: Umesh Patil
> Assignee: Umesh Patil
> Priority: Major
> Labels: authorization, rest-notification
> Fix For: 2.6.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> h2. Summary
> The rest-notification-webapp module (introduced in ATLAS-5207 / PR #622) is
> missing authorization on the Kafka hook notification REST endpoint POST
> /api/atlas/v2/notification/topic/\{topicName}.Rest-notification did not —
> allowing authenticated read-only users (e.g. DATA_SCIENTIST / rangertagsync)
> to POST hook messages (including ENTITY_CREATE_V2) to ATLAS_HOOK and reach
> the entity pipeline via Kafka.
> h2. Related work
> * Parent feature JIRA: ATLAS-5433
> * Merged PR: [GitHub PR #799|https://github.com/apache/atlas/pull/622]
> h2. Problem (before fix)
> ||Entry point||Authorization||
> | | |
> |rest-notification NotificationREST|Missing verifyAccess — VULNERABLE|
> *Attack path:* Read-only user authenticates to rest-notification server (port
> 41000) → POST ENTITY_CREATE_V2 JSON to
> /rest/api/atlas/v2/notification/topic/ATLAS_HOOK → message published to Kafka
> → main Atlas consumer processes entity create/update/delete.
> h2. Expected behavior (requirement)
> Read-only users must receive HTTP 403 on rest-notification POST. Admin users
> must still receive HTTP 204. Unauthenticated users must receive HTTP 401.
> h2. Proposed fix
> {code:java}
> AtlasAuthorizationUtils.verifyAccess(
> new AtlasAdminAccessRequest(AtlasPrivilege.SERVICE_NOTIFICATION_POST),
> "post on rest notification service");
> {code}
> *File:*
> rest-notification-webapp/src/main/java/org/apache/atlas/notification/rest/web/rest/NotificationREST.java
> *Imports required:*
> * org.apache.atlas.authorize.AtlasAdminAccessRequest
> * org.apache.atlas.authorize.AtlasAuthorizationUtils
> * org.apache.atlas.authorize.AtlasPrivilege
> h2. How to test
> # Start main Atlas (port 21000): atlas_start.py
> # Start rest-notification (port 41000):
> rest-notification-webapp/bin/rest_start.py
> # Distro default credentials: admin/admin, rangertagsync/rangertagsync
> * Test A — read-only POST to rest-notification → expect HTTP 403
> * Test B — admin POST to rest-notification → expect HTTP 204
> * Test C — read-only POST to webapp → expect HTTP 403 (unchanged)
> * Test D — entity GET after Test A → expect HTTP 404 (not created)
> * Test F — unauthenticated POST → expect HTTP 401
> Example curl (read-only, must fail with 403):
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)