Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.
This repository was archived by the owner on Dec 3, 2023. It is now read-only.

com.google.cloud.Identity does not support the new IAM deleted user syntax  #322

Description

@clementdenis

The new IAM deleted user syntax is not supported by com.google.cloud.Identity:
https://cloud.google.com/iam/docs/policies#handle-deleted-members

Environment details

  1. Affects the Core library and all dependant libraries
  2. OS type and version: any
  3. Java version: any
  4. google-cloud-core version(s): any

Steps to reproduce

  1. Try to parse a deleted user string with Identity.valueOf
  2. This results either to a stacktrace (1.74.0 and lower) or a DELETED identity type (1.75.0 and higher)

Code example

Identity identity = Identity.valueOf("deleted:user:[email protected]?uid=234567890123456789012");
System.out.println("type = " + identity.getType());
System.out.println("value = " + identity.getValue());

Stack trace

1.74.0 and lower

java.lang.IllegalArgumentException: Illegal identity string: "deleted:user:[email protected]?uid=234567890123456789012"

1.75.0 and higher

type = DELETED
value = user:[email protected]?uid=234567890123456789012

The "fix" is caused by an unrelated change: 24667e5

External references such as API reference guides

https://cloud.google.com/iam/docs/policies#handle-deleted-members

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.status: investigatingThe issue is under investigation, which is determined to be non-trivial.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions