Skip to content

Enable contract testing on OIDC protected resources on Quarkus testing tools #94

Closed
@patoulatchi

Description

@patoulatchi

Reason/Context

The context of the feature request has been discussed here:
https://github.com/orgs/microcks/discussions/1379

Description

Support of creation of valid bearer tokens against the OIDC Quarkus devservice tools (keycloak) to be able to contract test API which are authenticated.

Implementation ideas

The keycloak related information (url/port/client/secret/username/password) could be provided by the test implementer in the TestRequest builder. Something similar to this below:

TestRequest testRequest = new TestRequest.Builder()
      .serviceId("My API:1.0.0-SNAPSHOT")
      .runnerType(TestRunnerType.OPEN_API_SCHEMA.name())
      .testEndpoint("http://host.testcontainers.internal:" + quarkusHttpPort)
      .withKeycloakUrl("http://host.testcontainers.internal:" + keycloakPort).withClient("myOidcClient").with....
      .build();

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions