Skip to content
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

Add IAM API to attach/detach policies for LDAP #16182

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

donatello
Copy link
Member

Description

The new API allows to add or remove policy associations to an LDAP user or group.

This new API validates that the user or group exists in LDAP directory. For the user policy association, the user may be specified by either the login name or by full DN. For the group policy association, the full DN is required.

Motivation and Context

Add support for mc admin idp ldap attach | detach commands.

How to test this PR?

Setup LDAP + MinIO as in https://github.com/minio/minio-iam-testing and try the attach detach commands with mc from the companion PR.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

@donatello
Copy link
Member Author

Uses minio/madmin-go#158

cmd/admin-handlers-idp-ldap.go Outdated Show resolved Hide resolved
internal/config/identity/ldap/ldap.go Outdated Show resolved Hide resolved
@donatello
Copy link
Member Author

Needs minio/pkg#50

@minio minio deleted a comment from minio-trusted Dec 7, 2022
@minio minio deleted a comment from minio-trusted Dec 7, 2022
@donatello
Copy link
Member Author

PTAL Ready for review.

@minio-trusted
Copy link
Contributor

Mint Automation

Test Result
mint-large-bucket.sh ✔️
mint-fs.sh ✔️
mint-erasure.sh ✔️
mint-dist-erasure.sh ✔️
mint-compress-encrypt-dist-erasure.sh ✔️
mint-pools.sh more...

16182-e8354ca/mint-pools.sh.log:

Running with
SERVER_ENDPOINT:      15.15.15.4:31121
ACCESS_KEY:           minio
SECRET_KEY:           ***REDACTED***
ENABLE_HTTPS:         0
SERVER_REGION:        us-east-1
MINT_DATA_DIR:        /mint/data
MINT_MODE:            full
ENABLE_VIRTUAL_STYLE: 0
RUN_ON_FAIL:          0

To get logs, run 'docker cp 2c6fca5c9d45:/mint/log /tmp/mint-logs'

(1/14) Running aws-sdk-go tests ... done in 2 seconds
(2/14) Running aws-sdk-java tests ... done in 1 seconds
(3/14) Running aws-sdk-php tests ... done in 43 seconds
(4/14) Running aws-sdk-ruby tests ... done in 7 seconds
(5/14) Running awscli tests ... done in 1 minutes and 1 seconds
(6/14) Running healthcheck tests ... done in 0 seconds
(7/14) Running mc tests ... done in 17 seconds
(8/14) Running minio-go tests ... done in 56 seconds
(9/14) Running minio-java tests ... FAILED in 32 seconds
{
  "name": "minio-java",
  "function": "getObjectRetention()",
  "duration": 81,
  "status": "FAIL",
  "error": "java.time.format.DateTimeParseException: Text '2022-12-10T03:16:20.4Z' could not be parsed at index 19 >>> [io.minio.Xml.unmarshal(Xml.java:55), io.minio.MinioAsyncClient.lambda$getObjectRetention$35(MinioAsyncClient.java:1738), java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642), java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506), java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073), io.minio.S3Base$1.onResponse(S3Base.java:559), okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519), java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128), java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628), java.base/java.lang.Thread.run(Thread.java:829)]"
}
(9/14) Running minio-js tests ... done in 52 seconds
(10/14) Running minio-py tests ... done in 1 minutes and 54 seconds
(11/14) Running s3cmd tests ... done in 16 seconds
(12/14) Running s3select tests ... done in 5 seconds
(13/14) Running versioning tests ... done in 3 minutes and 5 seconds

Executed 13 out of 14 tests successfully.

Deleting image on docker hub
Deleting image locally

@harshavardhana harshavardhana merged commit e061275 into minio:master Dec 9, 2022
@donatello donatello deleted the ldap-attach-detach branch December 10, 2022 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants