New issue
Advanced search Search tips

Issue 671456 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 617952



Sign in to add a comment

get_user_groups endpoint for chrome-infra-auth

Project Member Reported by andyb...@chromium.org, Dec 6 2016

Issue description

Given
identity=<email> 

returns all groups that identity is a member of. A batch variant of this endpoint would be helpful for latency as well.
 
Blocking: 617952
This available on chrome-infra-auth-dev:

Single request:

GET https://chrome-infra-auth-dev.appspot.com//auth/api/v1/memberships/list?identity=user:vadimsh@google.com

Reply:
{"memberships": [
  {"group": "administrators"}, 
  {"group": "all"}, 
  {"group": "auth-service-access"}, 
  ...
]}

Batch request:

POST https://chrome-infra-auth-dev.appspot.com//auth/api/v1/memberships/list

Request:
{
  "per_identity": {
    "user:vadimsh@google.com": nil,
    "user:someone@example.com": nil
  }
}

(nil's are call options, currently there are none. This is to make it consistent with /memberships/check batch call that does have options)

Reply:
{
  "per_identity": {
    "user:vadimsh@google.com": {"memberships": [
      {"group": "administrators"}, 
      {"group": "all"}, 
      {"group": "auth-service-access"}, 
      ...
    ]},
    "user:someone@example.com": {"memberships": [
      {"group": "all"}, 
      {"group": "authenticated-users"}, 
      {"group": "domain-example-com"}
    ]}
  }
}

Please also read the (new) API doc for general overview: https://chrome-infra-auth-dev.appspot.com/auth/api

---

Will close as fixed after deploying this to main chrome-infra-auth instance.
Status: Fixed (was: Assigned)
This has been deployed to https://chrome-infra-auth.appspot.com.

Sign in to add a comment