Skip to content

feat(iam): support api-key get option to retrieve the ApiKey principal policies #4709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 14, 2025

Conversation

Gnoale
Copy link
Contributor

@Gnoale Gnoale commented May 9, 2025

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Release note for CHANGELOG:

Description

Adding an argument with-policies (default to true) to the iam api-key get command

  • org owner ouput:

In this case we don't list any policy with an informative message, as the user has full control over the org

User Type:
owner (owner has all permissions over the organization)

Api Key:
AccessKey         SCWEBEM4J7VT79C0T0GA
UserID            3153ad6d-2866-4471-b0b3-6728cf875a1c
Description       -
CreatedAt         1 month ago
UpdatedAt         1 month ago
DefaultProjectID  6867048b-fe12-4e96-835e-41c79a39604b
Editable          true
Deletable         true
Managed           false
CreationIP        51.159.73.9

iam api-key get SCW***** with-policies=true

  • Member user output
User Type:
member

Api Key:
AccessKey         SCWS6E3R4BX4V8GMPVYD
UserID            c65552fc-27de-4a60-a835-2145b8c142f4
Description       Generated by the Scaleway CLI
CreatedAt         1 week ago
UpdatedAt         1 week ago
DefaultProjectID  6867048b-fe12-4e96-835e-41c79a39604b
Editable          true
Deletable         true
Managed           false
CreationIP        51.159.73.145

Policies:
Copy of Editors (4feb1f44-1726-4373-bf9b-01c828ddb0ca)                            AllProductsFullAccess OrganizationReadOnly ProjectManager SupportTicketReadOnly
Copy of test-cli-iam-api-key-get-policies (39ddc97c-457c-40df-b076-0f83c1cc7d2b)  IPAMReadOnly

Fixes #4698

@github-actions github-actions bot added the iam IAM issues, bugs and feature requests label May 9, 2025
@Gnoale Gnoale force-pushed the apikey-permissions branch from 3c23166 to 383f905 Compare May 9, 2025 13:09
@Gnoale Gnoale marked this pull request as ready for review May 9, 2025 13:11
@Gnoale Gnoale requested review from a team and remyleone as code owners May 9, 2025 13:11
@Gnoale Gnoale force-pushed the apikey-permissions branch 2 times, most recently from 6eb351c to 477d138 Compare May 9, 2025 13:21
@Gnoale Gnoale marked this pull request as draft May 12, 2025 13:05
@Gnoale Gnoale force-pushed the apikey-permissions branch 4 times, most recently from bb5be3f to 5c81c15 Compare May 14, 2025 08:54
@Gnoale Gnoale marked this pull request as ready for review May 14, 2025 08:54
@Gnoale Gnoale requested a review from a team as a code owner May 14, 2025 12:24
@github-actions github-actions bot added the k8s Kubernetes Kapsule issues, bugs and feature requests label May 14, 2025
Gnoale added 4 commits May 14, 2025 14:34
* when calling Marshal with sections in options, the map kind was not correctly handled because the map marshaling occured only inside the struct case
@Gnoale Gnoale force-pushed the apikey-permissions branch from 2169921 to bf408bc Compare May 14, 2025 12:40
@remyleone remyleone changed the title support api-key get option to retrieve the ApiKey principal policies feat(iam): add support to retrieve the ApiKey principal policies from scw iam api-key get May 14, 2025
@Gnoale Gnoale changed the title feat(iam): add support to retrieve the ApiKey principal policies from scw iam api-key get feat(iam): support api-key get option to retrieve the ApiKey principal policies May 14, 2025
@Gnoale Gnoale added this pull request to the merge queue May 14, 2025
Merged via the queue into master with commit 416b188 May 14, 2025
16 checks passed
@Gnoale Gnoale deleted the apikey-permissions branch May 14, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iam IAM issues, bugs and feature requests k8s Kubernetes Kapsule issues, bugs and feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support to show the PermissionSets attached to an API key
2 participants