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

fix: sonar issues #37

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/modules/onecx-iam-bff/pages/onecx-iam-bff-docs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ quarkus.openapi-generator.codegen.spec.onecx_iam_kc_svc_yaml.base-package=gen.or
quarkus.openapi-generator.codegen.spec.onecx_iam_kc_svc_yaml.return-response=true
quarkus.openapi-generator.codegen.spec.onecx_iam_kc_svc_yaml.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders
quarkus.openapi-generator.codegen.spec.onecx_iam_kc_svc_yaml.additional-model-type-annotations=@io.quarkus.runtime.annotations.RegisterForReflection;
%prod.quarkus.rest-client.onecx_iam_kc_svc_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
quarkus.openapi-generator.codegen.spec.onecx_iam_kc_svc_yaml.enable-security-generation=false
%prod.quarkus.rest-client.onecx_iam_kc_svc.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
%prod.quarkus.oidc-client.client-id=${quarkus.application.name}
----
====
Expand Down Expand Up @@ -61,5 +62,8 @@ app:
keycloak:
client:
enabled: true
spec:
kcConfig:
defaultClientScopes: [ ocx-ia:all, ocx-pm:read ]
----

58 changes: 29 additions & 29 deletions docs/modules/onecx-iam-bff/pages/onecx-iam-bff-extensions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,37 @@ h| Version

| https://quarkus.io/guides/rest[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-rest.adoc[Link]
| 3.11.1
| 3.12.2

| quarkus-smallrye-openapi

| https://quarkus.io/guides/openapi-swaggerui[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-smallrye-openapi.adoc[Link]
| 3.11.1
| 3.12.2

| quarkus-rest-jackson

| https://quarkus.io/guides/rest-json[Link]
|
| 3.11.1
| 3.12.2

| quarkus-smallrye-health

| https://quarkus.io/guides/smallrye-health[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-smallrye-health.adoc[Link]
| 3.11.1
| 3.12.2

| quarkus-opentelemetry

| https://quarkus.io/guides/opentelemetry[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-opentelemetry.adoc[Link]
| 3.11.1
| 3.12.2

| quarkus-micrometer-registry-prometheus

| https://quarkus.io/guides/telemetry-micrometer[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-micrometer-registry-prometheus.adoc[Link]
| 3.11.1
| 3.12.2

| quarkus-openapi-generator

Expand All @@ -54,92 +54,92 @@ h| Version

| https://quarkus.io/guides/rest-client[Link]
|
| 3.11.1
| 3.12.2

| tkit-quarkus-log-cdi

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-cdi.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
| 2.25.0
| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
| 2.28.0

| tkit-quarkus-log-rs

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-rs.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
| 2.25.0
| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
| 2.28.0

| tkit-quarkus-log-json

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-json.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
| 2.25.0
| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
| 2.28.0

| tkit-quarkus-rest

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-rest.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest.adoc[Link]
| 2.25.0
| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest.adoc[Link]
| 2.28.0

| tkit-quarkus-rest-context

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-rest-context.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest-context.adoc[Link]
| 2.25.0
| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-rest-context.adoc[Link]
| 2.28.0

| tkit-quarkus-jpa

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-jpa.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa.adoc[Link]
| 2.25.0
| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-jpa.adoc[Link]
| 2.28.0

| quarkus-hibernate-validator

| https://quarkus.io/guides/validation[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-hibernate-validator.adoc[Link]
| 3.11.1
| 3.12.2

| onecx-permissions

| https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-permissions.html[Link]
| https://github.com/onecx/onecx-quarkus/blob/0.20.0/docs/modules/onecx-quarkus/pages/includes/onecx-permissions.adoc[Link]
| 0.20.0
| https://github.com/onecx/onecx-quarkus/blob/0.24.0/docs/modules/onecx-quarkus/pages/includes/onecx-permissions.adoc[Link]
| 0.24.0

| quarkus-oidc

| https://quarkus.io/guides/security-oidc-bearer-token-authentication-tutorial[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-oidc.adoc[Link]
| 3.11.1
| 3.12.2

| tkit-quarkus-security

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-security.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.25.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link]
| 2.25.0
| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link]
| 2.28.0

| onecx-core

| https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-core.html[Link]
|
| 0.20.0
| 0.24.0

| quarkus-arc

| https://quarkus.io/guides/cdi-reference[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-arc.adoc[Link]
| 3.11.1
| 3.12.2

| quarkus-container-image-docker

| https://quarkus.io/guides/container-image[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-container-image-docker.adoc[Link]
| 3.11.1
| 3.12.2


| quarkus-rest-client-oidc-filter

|
|
| 3.11.1
| 3.12.2


|===
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ class RolesRestControllerTest extends AbstractTest {

KeycloakTestClient keycloakClient = new KeycloakTestClient();

static final String mockId = "MOCK_ID";
static final String MOCK_ID = "MOCK_ID";

@BeforeEach
void resetExpectation() {
try {
mockServerClient.clear(mockId);
mockServerClient.clear(MOCK_ID);
} catch (Exception ex) {
// mockId not existing
}
Expand Down Expand Up @@ -76,7 +76,7 @@ void searchRolesByCriteriaTest() {
mockServerClient.when(request().withPath("/internal/roles/search")
.withMethod(HttpMethod.POST))
.withPriority(100)
.withId(mockId)
.withId(MOCK_ID)
.respond(httpRequest -> response().withStatusCode(Response.Status.OK.getStatusCode())
.withContentType(MediaType.APPLICATION_JSON)
.withBody(JsonBody.json(rolePageResult)));
Expand Down Expand Up @@ -139,7 +139,7 @@ void searchRolesByCriteriaTest_shouldReturnBadRequest_whenBadRequestResponse() {
.withMethod(HttpMethod.POST)
.withBody(JsonBody.json(roleSearchCriteria)))
.withPriority(100)
.withId(mockId)
.withId(MOCK_ID)
.respond(httpRequest -> response().withStatusCode(BAD_REQUEST.getStatusCode())
.withContentType(MediaType.APPLICATION_JSON)
.withBody(JsonBody.json(problemDetailResponse)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ class UsersRestControllerTest extends AbstractTest {

KeycloakTestClient keycloakClient = new KeycloakTestClient();

static final String mockId = "MOCK_ID_USER";
static final String MOCK_ID = "MOCK_ID_USER";

@BeforeEach
void resetExpectation() {

try {
mockServerClient.clear(mockId);
mockServerClient.clear(MOCK_ID);
} catch (Exception ex) {
// mockId not existing
}
Expand All @@ -58,7 +58,7 @@ void resetPasswordTest() {
mockServerClient.when(request().withPath("/internal/users/password")
.withMethod(HttpMethod.PUT))
.withPriority(100)
.withId(mockId)
.withId(MOCK_ID)
.respond(httpRequest -> response().withStatusCode((Response.Status.NO_CONTENT.getStatusCode()))
.withContentType(MediaType.APPLICATION_JSON));

Expand Down Expand Up @@ -108,7 +108,7 @@ void resetPasswordTest_shouldReturnBadRequest_whenBadRequestResponse() {
//Mockserver
mockServerClient.when(request().withPath("/internal/users/password").withMethod(HttpMethod.PUT)
.withBody(JsonBody.json(userResetPasswordRequest)))
.withId(mockId)
.withId(MOCK_ID)
.respond(httpRequest -> response().withStatusCode(Response.Status.BAD_REQUEST.getStatusCode())
.withContentType(MediaType.APPLICATION_JSON)
.withBody(JsonBody.json(problemDetailResponse)));
Expand Down Expand Up @@ -178,7 +178,7 @@ void searchUsersByCriteriaTest() {
mockServerClient.when(request().withPath("/internal/users/search")
.withMethod(HttpMethod.POST))
.withPriority(100)
.withId(mockId)
.withId(MOCK_ID)
.respond(httpRequest -> response().withStatusCode(Response.Status.OK.getStatusCode())
.withContentType(MediaType.APPLICATION_JSON)
.withBody(JsonBody.json(userPageResult)));
Expand Down Expand Up @@ -232,7 +232,7 @@ void searchRolesByCriteriaTest_shouldReturnBadRequest_whenBadRequestResponse() {
//Mockserver
mockServerClient.when(request().withPath("/internal/users/search").withMethod(HttpMethod.POST)
.withBody(JsonBody.json(userSearchCriteria)))
.withId(mockId)
.withId(MOCK_ID)
.respond(httpRequest -> response().withStatusCode(Response.Status.BAD_REQUEST.getStatusCode())
.withContentType(MediaType.APPLICATION_JSON)
.withBody(JsonBody.json(problemDetailResponse)));
Expand Down
Loading