@Override
  public String toString() {
    List<String> parts = new ArrayList<>(Arrays.asList(resource, operation, target, key));
    if (ALL.equals(key)) {
      parts.remove(3);
      if (ALL.equals(target)) {
        parts.remove(2);
        if (ALL.equals(operation)) {
          parts.remove(1);
        }
      }
    }

    return parts.stream().collect(Collectors.joining(":"));
  }
returns the key, could be "*" meaning all keys.

@return the key
geode-core/src/main/java/org/apache/geode/security/ResourcePermission.java