Skip to content

Commit

Permalink
feat: activated client security (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordenReuter authored Jun 20, 2024
1 parent b5757f6 commit 5fdce82
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ org.eclipse.microprofile.rest.client.propagateHeaders=apm-principal-token
%prod.quarkus.rest-client.onecx_workspace_svc.url=http://onecx-workspace-svc:8080
%prod.quarkus.rest-client.onecx_product_store_svc.url=http://onecx-product-store-svc:8080
%prod.quarkus.rest-client.onecx_iam_svc.url=http://onecx-iam-kc-svc:8080
%prod.quarkus.oidc-client.client-id=${quarkus.application.name}
quarkus.openapi-generator.codegen.input-base-dir=target/tmp/openapi
quarkus.openapi-generator.codegen.spec.onecx_permission_svc_yaml.config-key=onecx_permission_svc
quarkus.openapi-generator.codegen.spec.onecx_permission_svc_yaml.base-package=gen.org.tkit.onecx.permission.client
Expand All @@ -41,6 +40,11 @@ quarkus.openapi-generator.codegen.spec.onecx_iam_svc_v1_yaml.return-response=tru
quarkus.openapi-generator.codegen.spec.onecx_iam_svc_v1_yaml.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
quarkus.openapi-generator.codegen.spec.onecx_iam_svc_v1_yaml.model-name-suffix=IamV1
quarkus.openapi-generator.codegen.spec.onecx_iam_svc_v1_yaml.additional-model-type-annotations=@io.quarkus.runtime.annotations.RegisterForReflection;
%prod.quarkus.rest-client.onecx_permission_svc_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
%prod.quarkus.rest-client.onecx_workspace_svc_v1_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
%prod.quarkus.rest-client.onecx_product_store_svc_v1_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
%prod.quarkus.rest-client.onecx_iam_svc_v1_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
%prod.quarkus.oidc-client.client-id=${quarkus.application.name}
----
====

Expand Down Expand Up @@ -92,6 +96,9 @@ app:
read: permission on all GET requests and POST search
write: permission on PUT, POST, PATCH requests, where objects are saved or updated
delete: permission on all DELETE requests
keycloak:
client:
enabled: true
----

3 changes: 3 additions & 0 deletions src/main/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ app:
read: permission on all GET requests and POST search
write: permission on PUT, POST, PATCH requests, where objects are saved or updated
delete: permission on all DELETE requests
keycloak:
client:
enabled: true
10 changes: 8 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ org.eclipse.microprofile.rest.client.propagateHeaders=apm-principal-token
%prod.quarkus.rest-client.onecx_product_store_svc.url=http://onecx-product-store-svc:8080
%prod.quarkus.rest-client.onecx_iam_svc.url=http://onecx-iam-kc-svc:8080

%prod.quarkus.oidc-client.client-id=${quarkus.application.name}

# DEV
%dev.quarkus.rest-client.onecx_workspace_svc.url=${quarkus.mockserver.endpoint}
%dev.quarkus.rest-client.onecx_permission_svc.url=${quarkus.mockserver.endpoint}
Expand Down Expand Up @@ -59,6 +57,14 @@ quarkus.openapi-generator.codegen.spec.onecx_iam_svc_v1_yaml.additional-api-type
quarkus.openapi-generator.codegen.spec.onecx_iam_svc_v1_yaml.model-name-suffix=IamV1
quarkus.openapi-generator.codegen.spec.onecx_iam_svc_v1_yaml.additional-model-type-annotations=@io.quarkus.runtime.annotations.RegisterForReflection;

# OIDC
%prod.quarkus.rest-client.onecx_permission_svc_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
%prod.quarkus.rest-client.onecx_workspace_svc_v1_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
%prod.quarkus.rest-client.onecx_product_store_svc_v1_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
%prod.quarkus.rest-client.onecx_iam_svc_v1_yaml.providers=io.quarkus.oidc.client.reactive.filter.OidcClientRequestReactiveFilter
%prod.quarkus.oidc-client.client-id=${quarkus.application.name}


# INTEGRATION TEST
quarkus.test.integration-test-profile=test

Expand Down

0 comments on commit 5fdce82

Please sign in to comment.