gravitee-io / issues

Gravitee.io - API Platform - Issues
64 stars 26 forks source link

Cannot create new OpenID identity providers #6585

Open mtwomey opened 2 years ago

mtwomey commented 2 years ago

Expected Behavior

Upon creating and configuring a new OpenID identity provider, you can not save the provider.

Current Behavior

Upon creating and configuring a new OpenID identity provider, the Create button at the bottom remains disabled (greyed-out).

Possible Solution

Form validation needs correction.

Steps to Reproduce (for bugs)

  1. Follow the docker-compose directions here to bring up a few new local installation of Gravitee-AM
  2. Attempt to create a new OpenID identity provider
  3. Observer the create button remains disabled after completing all fields

Context

Can not create the desired identity provider.

Your Environment

leleueri commented 2 years ago

Hi @mtwomey

Thanks you for reporting this issue.

According to the configuration schema, the required fields depend on the response type.

It is probably a limitation of the form generator we use to display the form that display the '*' only for non conditional required fields. Here after you can find the rules.

  "required": [
    "clientId",
    "responseType"
  ],
  "oneOf":[
    {
      "required": [
        "wellKnownUri"
      ]
    },
    {
      "required": [
        "userAuthorizationUri",
        "accessTokenUri",
        "userProfileUri"
      ]
    }
  ],
  "if": {
    "properties": {
      "responseType": { "const": "code" }
    }
  },
  "then": { "required": ["clientSecret"] }
mtwomey commented 2 years ago

Thank you - after experimenting with different combinations of filled out and blank fields, I got this working. I can see why it's tricky to validate. Fields should probably disable when other fields are filled.