Important

You are viewing documentation for an older version of Confluent Platform. For the latest, click here.

confluent iam rolebinding list

Description

List the role bindings for a particular principal and scope.

confluent iam rolebinding list [flags]

Flags

--principal string                    Principal whose rolebindings should be listed.
--role string                         List rolebindings under a specific role given to a principal.
--resource string                     If specified with a role and no principals, list principals with rolebindings to the role for this qualified resource.
--kafka-cluster-id string             Kafka cluster ID for scope of rolebinding listings.
--schema-registry-cluster-id string   Schema Registry cluster ID for scope of rolebinding listings.
--ksql-cluster-id string              KSQL cluster ID for scope of rolebinding listings.
--connect-cluster-id string           Kafka Connect cluster ID for scope of rolebinding listings.
-h, --help                            Print command information.

Global Flags

-v, --verbose count   Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace).

Examples

Only use the --resource flag when specifying a --role with no --principal specified. If specifying a --principal, then the --resource flag is ignored. To list role bindings for a specific role on an identified resource:

iam rolebinding list --kafka-cluster-id CID  --role DeveloperRead --resource Topic

    Principal   |     Role      | ResourceType | Name  | PatternType
+---------------+---------------+--------------+-------+-------------+
  Group:hobbits | DeveloperRead | Topic        | drink | LITERAL
  Group:hobbits | DeveloperRead | Topic        | food  | LITERAL

To list the role bindings for a specific principal:

iam rolebinding list --kafka-cluster-id $CID --principal User:frodo

      Principal     |      Role      | ResourceType |  Name  | PatternType
+-------------------+----------------+--------------+--------+-------------+
  Group:hobbits     | DeveloperRead  | Topic        | drink  | LITERAL
  Group:hobbits     | DeveloperRead  | Topic        | food   | LITERAL
  Group:hobbits     | DeveloperWrite | Topic        | shire- | PREFIXED
  Group:ringBearers | DeveloperWrite | Topic        | ring-  | PREFIXED
  User:frodo        | SecurityAdmin  | Cluster      |        |

To list the role bindings for a specific principal, filtered to a specific role:

iam rolebinding list --kafka-cluster-id $CID --principal User:frodo --role DeveloperRead

      Principal     |      Role      | ResourceType |  Name  | PatternType
+-------------------+----------------+--------------+--------+-------------+
  Group:hobbits     | DeveloperRead  | Topic        | drink  | LITERAL
  Group:hobbits     | DeveloperRead  | Topic        | food   | LITERAL

To list the principals bound to a specific role:

iam rolebinding list --kafka-cluster-id $CID --role DeveloperWrite

      Principal
+-------------------+
  Group:hobbits
  Group:ringBearers

To list the principals bound to a specific resource with a specific role:

iam rolebinding list --kafka-cluster-id $CID --role DeveloperWrite --resource Topic:shire-parties

    Principal
+---------------+
  Group:hobbits