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

Use swagger api for IDP configuration details #3200

Merged

Conversation

cesnietor
Copy link
Collaborator

@cesnietor cesnietor commented Jan 18, 2024

Updates IDPConfigurationDetails.tsx to use swagger api.
Component uses multiple requests there so three were done:

  • Fetching info
  • Updatating info
  • Enabling info

Other changes:

  • for some reason the consoleApi.ts file was not including the JSON type so I had to add the consumes parameter in the swagger yaml.

Test Steps

Configure your MinIO with an IDP as defined in here:

  1. Clone repo https://github.com/minio/minio-iam-testing
  2. Run:
# To use with Docker:
make docker-run
  1. Configure the IDP using mc:
mc idp openid add myminio \                         
    config_url="http://localhost:5556/dex/.well-known/openid-configuration" \
    client_id="minio-client-app" \
    client_secret="minio-client-app-secret" \
    scopes="openid,groups,email,profile" \
    redirect_uri="http://127.0.0.1:10000/oauth_callback" \
    role_policy="consoleAdmin"
  1. Go to UI -> Administrator/Identity/OpenID (open id info should be listed as defined above)
  2. Update the role_policy in the UI to readonly (click save and it should require you to restart, policy should be updated in the info UI)
  3. Try causing errors e.g. defining both role_policy and claim_name (error should be shown as snack bar.)

Screenshots:
Screenshot 2024-01-18 at 2 23 48 PM
Screenshot 2024-01-18 at 2 23 57 PM

@cesnietor cesnietor merged commit b544395 into minio:master Jan 18, 2024
29 checks passed
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