Skip to content

List (KsqlAdmin) role bindings for user not showing the Logical ksql clusterId#1522

Merged
Brian Strauch (brianstrauch) merged 7 commits intomainfrom
KSQL-9550
Nov 17, 2022
Merged

List (KsqlAdmin) role bindings for user not showing the Logical ksql clusterId#1522
Brian Strauch (brianstrauch) merged 7 commits intomainfrom
KSQL-9550

Conversation

@pgaref
Copy link
Contributor

Checklist

  1. [CRUCIAL] Is the change for CP or CCloud functionalities that are already live in prod?
    • yes: ok

What

https://confluentinc.atlassian.net/browse/KSQL-9550
List role bindings for user not showing the Logical ksql cluster id to differentiate.
Added an extra List call to get pksqlid, output changed from:

    Principal   |                  Email                   |       Role        | Environment | Cloud Cluster | Cluster Type | Logical Cluster | Resource Type | Name | Pattern Type  
----------------+------------------------------------------+-------------------+-------------+---------------+--------------+-----------------+---------------+------+---------------
  User:u-y9gdx6 | pgarefalakis+ksql+test_stag@confluent.io | KsqlAdmin         | env-nx6qz6  | lkc-8gookr    |              |                 |               |      |               
  User:u-y9gdx6 | pgarefalakis+ksql+test_stag@confluent.io | KsqlAdmin         | env-nx6qz6  | lkc-kjzdov    |              |                 |               |      |               
  User:u-y9gdx6 | pgarefalakis+ksql+test_stag@confluent.io | OrganizationAdmin |             |               |              |                 |               |      |   

to:

    Principal   |                  Email                   |       Role        | Environment | Cloud Cluster | Cluster Type | Logical Cluster | Resource Type |          Name          | Pattern Type  
----------------+------------------------------------------+-------------------+-------------+---------------+--------------+-----------------+---------------+------------------------+---------------
  User:u-y9gdx6 | pgarefalakis+ksql+test_stag@confluent.io | KsqlAdmin         | env-nx6qz6  | lkc-8gookr    | ksqlDB       |                 | KSQL          | ksqlDB_cluster_0       | LITERAL       
  User:u-y9gdx6 | pgarefalakis+ksql+test_stag@confluent.io | KsqlAdmin         | env-nx6qz6  | lkc-kjzdov    | ksqlDB       | pksqlc-ynnj6    | KSQL          | panos_ksqlDB_cluster_0 | LITERAL       
  User:u-y9gdx6 | pgarefalakis+ksql+test_stag@confluent.io | OrganizationAdmin |             |               |              |                 |               |                        |     

Note: ksqlDB_cluster_0 is delete thus does not have a pksqlc anymore (this should not happen in practice as we automatically cleanup role binding when a Ksql cluster is being deleted)

References

Test & Review

@brianstrauch

Panagiotis (Panos) Garefalakis (@pgaref) This PR looks good, but it's untested. Can you add an integration test to tests/iam_test.go?

@pgaref
Copy link
Contributor Author

Panagiotis (Panos) Garefalakis (@pgaref) This PR looks good, but it's untested. Can you add an integration test to tests/iam_test.go?

Yes, working on this as we speak! Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants