opentelekomcloud / python-otcextensions

Extension of the OpenStackSDK && OpenStackClient with OpenTelekomCloud services
https://docs.otc-service.com/python-otcextensions
Apache License 2.0
24 stars 27 forks source link

Openstack role list only returns built-in roles #474

Closed Jaybee18 closed 1 month ago

Jaybee18 commented 1 month ago

I don't really know if this is in the scope of this project. If not, just close this issue.

When running

openstack role list

Only built-in roles are returned:

+----------------------------------+-----------------+
| ID                               | Name            |
+----------------------------------+-----------------+
| 04f313c749de42bba8f3081215be5819 | system_all_47   |
| 052dd2a25bca48d3a77b483df6440b52 | system_all_104  |
| 05dbc34ab3554d04913388e086c155ac | system_all_28   |
| 07cf80057bfe48c9980d3ecace8de19c | system_all_102  |
| 0b8f489d35fe42cca704da2220589cb3 | system_all_65   |
| 0c17da620e554bbca945da8bd369a09c | readonly        |
| 0d7fe9ed1c4840198fcb04a2c5aac465 | system_all_109  |
| 0dbf49c84c4444e0a69ced3e94cd3049 | dbss_sys        |

...

| f622024b0b904d90920b8e816c7bab88 | system_all_90   |
| f91ad60455764ea1b210d592f4c35372 | system_all_58   |
| fb5e567112984af8b3f85243742c5d9c | system_all_81   |
| fceb1e48f9054b6886bcc2b9c9fd2637 | system_all_75   |
| fed841e0f634475ca703f62574c214ff | system_all_39   |
+----------------------------------+-----------------+

But I would like to also get the user-defined roles and policies. The example in the documentation suggests, that custom roles will also be listed. Is this a mistake or am I using the cli wrong?

anton-sidelnikov commented 1 month ago

Hi @Jaybee18 the best would be to contact service@open-telekom-cloud.com and ask them what should be returned by this api call.

sekoban commented 1 month ago

@anton-sidelnikov @Jaybee18

To my knowledge there are 2 APIs. Seems current implementation returns the "builtin" roles/policies (/v3/roles)

But there is another one (/v3.0/OS-ROLE/roles), which returns the custom roles/policies

Jaybee18 commented 1 month ago

Hello @anton-sidelnikov and @sekoban,

Thank you for the response. I am also aware of the v3-v3.0-endpoint-thing, I had to take it into account while developing our developer platform a few times. I will write the service and ask them what this command should return according to them.

anton-sidelnikov commented 1 month ago

So, at least we know that v3.0 endpoints not covered by our sdk-cli, need to put it in our development plan.

anton-sidelnikov commented 1 month ago

Not yet released

anton-sidelnikov commented 1 month ago

Hi @Jaybee18, On latest version (0.32.1) of otce you can use: openstack iam custom role list