Repository: minio/minio (language: go)

Issue:
Unsupported admin action 'admin:UpdatePolicyAssociation'
<!--- Provide a general summary of the issue in the Title above -->
I am not able to add `admin:UpdatePolicyAssociation` as an action to a access token policy.

## Expected Behavior
I can add `admin:UpdatePolicyAssociation` as an action to my access key policy
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->

## Current Behavior
I get `mc: <ERROR> Unable to edit the specified service account: unsupported admin action 'admin:UpdatePolicyAssociation'.`
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->

## Possible Solution
It appears that only part of minio recognizes the permission so it may need to be added to a different part of minio.
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->

## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
<!--- and make sure you have followed https://github.com/minio/minio/tree/release/docs/debugging to capture relevant logs -->
1. Create `update_associaton.json` with
```
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "admin:GetPolicy",
                "admin:UpdatePolicyAssociation"
            ]
        }
    ]
}
```
2. Run `mc admin user svcacct add <alias> <username> --policy update_association.json`

## Context
I am trying to add a specific permission to allow `mc idp ldap policy attach ...`
In the documentation I see `admin:AttachUserOrGroupPolicy` however that does not grant permission for this command.
Looking at the code I see [here](https://github.com/minio/minio/blob/master/cmd/admin-handlers-idp-ldap.go#L99C56-L99C85) that it looks for the permission `UpdatePolicyAssociationAction` that appears to be set [here](https://github.com/minio/pkg/blob/14363375c9712d99d54424a43af18ee82a37b63f/policy/admin-action.go#L149-L149) as `admin:UpdatePolicyAssociation` but it cannot be attached to a user.
This leaves me having to use `admin:*` that violates the principle of least privilege.
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

## Regression
No. I found no other issues on this.
<!-- Is this issue a regression? (Yes / No) -->
<!-- If Yes, optionally please include minio version or commit id or PR# that caused this regression, if you have these details. -->

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Version used (`minio --version`): 
```
minio version RELEASE.2023-08-16T20-17-30Z (commit-id=d09351bb10883d1b55579d11ad68efafaa86b700)
Runtime: go1.19.12 linux/amd64
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Copyright: 2015-2023 MinIO, Inc.
```
* Server setup and configuration: Using podman to run the container
* Operating System and version (`uname -a`): Linux <hostname> 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-2 (2023-07-27) x86_64 GNU/Linux



Discussion / hints:
@nreisingercres have you tried this with latest release?
I just tested with the newest version and have the same issue.
Version info I just tested:
```
minio version RELEASE.2023-09-20T22-49-55Z (commit-id=9788d85ea3a99eeed8073a57a21ccee71035f152)
Runtime: go1.21.1 linux/amd64
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Copyright: 2015-2023 MinIO, Inc.
```
> I just tested with the newest version and have the same issue. Version info I just tested:
> 
> ```
> minio version RELEASE.2023-09-20T22-49-55Z (commit-id=9788d85ea3a99eeed8073a57a21ccee71035f152)
> Runtime: go1.21.1 linux/amd64
> License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
> Copyright: 2015-2023 MinIO, Inc.
> ```

I will check.
> I just tested with the newest version and have the same issue.
> Version info I just tested:

@nreisingercres can you paste the error via `--debug` 

Fix patch:
diff --git a/go.mod b/go.mod
index a248ad8c624d3..ff2b6cf5f50cc 100644
--- a/go.mod
+++ b/go.mod
@@ -52,7 +52,7 @@ require (
 	github.com/minio/madmin-go/v3 v3.0.18
 	github.com/minio/minio-go/v7 v7.0.63
 	github.com/minio/mux v1.9.0
-	github.com/minio/pkg/v2 v2.0.1
+	github.com/minio/pkg/v2 v2.0.2
 	github.com/minio/selfupdate v0.6.0
 	github.com/minio/sha256-simd v1.0.1
 	github.com/minio/simdjson-go v0.4.5
diff --git a/go.sum b/go.sum
index 1a11ef82e7d55..a9aec0dbbde12 100644
--- a/go.sum
+++ b/go.sum
@@ -487,8 +487,8 @@ github.com/minio/mux v1.9.0 h1:dWafQFyEfGhJvK6AwLOt83bIG5bxKxKJnKMCi0XAaoA=
 github.com/minio/mux v1.9.0/go.mod h1:1pAare17ZRL5GpmNL+9YmqHoWnLmMZF9C/ioUCfy0BQ=
 github.com/minio/pkg v1.7.5 h1:UOUJjewE5zoaDPlCMJtNx/swc1jT1ZR+IajT7hrLd44=
 github.com/minio/pkg v1.7.5/go.mod h1:mEfGMTm5Z0b5EGxKNuPwyb5A2d+CC/VlUyRj6RJtIwo=
-github.com/minio/pkg/v2 v2.0.1 h1:MI3xMGCxoN5EEBRp98uEU5J0LlaF+8fLPtL8oHTHLX0=
-github.com/minio/pkg/v2 v2.0.1/go.mod h1:6xTAr5M9yobpUroXAAaTrGJ9fhOZIqKYOT0I87u2yZ4=
+github.com/minio/pkg/v2 v2.0.2 h1:cytXmC21fBNS+0NVKEE5FuYmQfY+HFTqis6Kkj3U9ac=
+github.com/minio/pkg/v2 v2.0.2/go.mod h1:6xTAr5M9yobpUroXAAaTrGJ9fhOZIqKYOT0I87u2yZ4=
 github.com/minio/selfupdate v0.6.0 h1:i76PgT0K5xO9+hjzKcacQtO7+MjJ4JKA8Ak8XQ9DDwU=
 github.com/minio/selfupdate v0.6.0/go.mod h1:bO02GTIPCMQFTEvE5h4DjYB58bCoZ35XLeBf0buTDdM=
 github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=


Test patch: