Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-7059

[KSW][OpenAPI] - Add OpenAPI identifier in the OAuth2 Quarkus properties to avoid naming clash

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • None
    • False
    • None
    • False
    • ---
    • ---

      KOGITO-6970 introduced the OAuth2 support, so users can easily configure each OAuth2 Security Schema independently:

      quarkus.oidc-client.petstore_auth.auth-server-url=${keycloak.url}
      quarkus.oidc-client.petstore_auth.discovery-enabled=false
      quarkus.oidc-client.petstore_auth.token-path=/tokens
      quarkus.oidc-client.petstore_auth.credentials.secret=secret
      quarkus.oidc-client.petstore_auth.grant.type=password
      quarkus.oidc-client.petstore_auth.grant-options.password.username=alice
      quarkus.oidc-client.petstore_auth.grant-options.password.password=alice
      quarkus.oidc-client.petstore_auth.client-id=petstore-app
      

      The problem is when more than one OpenAPI spec file in the project has the same Security Scheme name. We need a way to identify such cases. What we can do, is reuse what we already do in other use cases. Use the file name:

      quarkus.oidc-client."petstore.json#petstore_auth".auth-server-url=${keycloak.url}
      

      This can be a corner case, so for users using only one file or multiple files with different sec schema names, it would be cumbersome to add the OpenAPI spec identification every time.

      The extension can be smart and only name the OidcClient with the filename prefix when needed. This guarantees backward compatibility and enhances the user experience.

              wmedvede@redhat.com Walter Medvedeo
              rhn-support-zanini Ricardo Zanini
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: