Adarsh-Me commented on code in PR #500:
URL: https://github.com/apache/hugegraph-doc/pull/500#discussion_r4107902061


##########
content/en/docs/clients/restful-api/auth.md:
##########
@@ -8,6 +8,13 @@ description: "Authentication REST API: Manage users, roles, 
permissions, and acc
 > **Version Change Notice**:
 > - 1.7.0+: Auth API paths use GraphSpace format, such as 
 > `/graphspaces/DEFAULT/auth/users`, and group/target IDs match their names 
 > (e.g., `admin`)
 > - 1.5.x and earlier: Auth API paths include graph name, and group/target IDs 
 > use format like `-69:grant`. See [HugeGraph 1.5.x RESTful 
 > API](https://github.com/apache/hugegraph-doc/tree/release-1.5.0)
+>
+> Group paths are the exception in 1.7.0: there `GroupAPI` is served at 
`/auth/groups`
+> with no GraphSpace prefix, while on 1.5.x it carried the graph name
+> (`/graphs/{graph}/auth/groups`) like the other auth APIs. The
+> `/graphspaces/{graphspace}/auth/groups` forms below need a build that 
includes
+> [apache/hugegraph#3096](https://github.com/apache/hugegraph/pull/3096), 
which is newer
+> than the 1.7.0 release. On 1.7.0 the prefixed group path returns 404.

Review Comment:
   Fixed in 817d347. The notice now says unregistered and names the condition: 
`AuthenticationFilter` is `@PreMatching`, so with authentication on a missing 
Authorization header throws NotAuthorizedException (401) and a non-whitelisted 
IP throws ForbiddenException (403); 404 comes back only with authentication 
off. Chinese mirrored.



##########
content/en/docs/clients/restful-api/auth.md:
##########
@@ -246,6 +253,10 @@ GET 
http://localhost:8080/graphspaces/DEFAULT/auth/users/boss/role
 Groups grant corresponding resource permissions, and users are assigned to 
different groups, thereby having different resource permissions.
 The group interface includes APIs for creating groups, deleting groups, 
modifying groups, and querying group-related information.
 
+> `GroupAPI` itself is served at `/auth/groups` with no GraphSpace prefix, and 
that is
+> the only group path on 1.7.0. The `/graphspaces/DEFAULT/auth/groups` form 
used below
+> needs a build containing 
[apache/hugegraph#3096](https://github.com/apache/hugegraph/pull/3096).
+

Review Comment:
   Fixed in 817d347. `build(graphSpace)` persists `scopedPrefix` + a dashless 
UUID and `createGroup` sets id = name, so a DEFAULT group is 
`~hubble_role:v1:REVGQVVMVA:<32 hex>`. All five group examples now carry that 
id, and the PUT body drops `group_name`, which `build(HugeGroup)` rejects. 
Chinese mirrored.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to