Skip to content

Commit

Permalink
Fix auth tests
Browse files Browse the repository at this point in the history
  • Loading branch information
carlesarnal committed Feb 27, 2025
1 parent db9f18d commit 50efb10
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected NetworkPolicy desired(ApicurioRegistry3 primary, Context<ApicurioRegis
var httpPolicy = new io.fabric8.kubernetes.api.model.networking.v1.NetworkPolicyPortBuilder()
.withPort(new IntOrStringBuilder().withValue(8080).build()).build();

if (!tls.getInsecureRequests().equals("enabled")) {
if (tls.getInsecureRequests() != null && !tls.getInsecureRequests().equals("enabled")) {
networkPolicy.getSpec().setIngress(List.of(new NetworkPolicyIngressRuleBuilder()
.withPorts(httpsPolicy)
.build()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected Service desired(ApicurioRegistry3 primary, Context<ApicurioRegistry3>
.withTargetPort(new IntOrStringBuilder().withValue(8443).build())
.build();

if (tls.getInsecureRequests().equals("enabled")) {
if (tls.getInsecureRequests() != null && tls.getInsecureRequests().equals("enabled")) {
s.getSpec().setPorts(List.of(httpsPort, httpPort));
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ spec:
app:
ingress:
host: simple-app.apps.cluster.example
tls:
truststoreSecretRef:
name: keycloak-truststore
key: truststore
truststorePasswordSecretRef:
name: keycloak-truststore
key: password
auth:
enabled: true
appClientId: registry-api
Expand All @@ -29,14 +36,7 @@ spec:
role: admin
claimName: test
claimValue: test
tls:
tlsVerificationType: required
truststoreSecretRef:
name: keycloak-truststore
key: truststore
truststorePasswordSecretRef:
name: keycloak-truststore
key: password
tlsVerificationType: required
ui:
ingress:
host: simple-ui.apps.cluster.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ spec:
basicAuth:
enabled: true
cacheExpiration: 25
tls:
tlsVerificationType: none
tlsVerificationType: none
ui:
ingress:
host: simple-ui.apps.cluster.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ spec:
app:
ingress:
host: simple-app.apps.cluster.example
tls:
truststoreSecretRef:
name: keycloak-truststore
key: truststore
truststorePasswordSecretRef:
name: keycloak-truststore
key: password
auth:
enabled: true
appClientId: registry-api
uiClientId: apicurio-registry
authServerUrl: https://simple-keycloak.apps.cluster.example/realms/registry
redirectURI: https://simple-ui.apps.cluster.example
logoutURL: https://simple-ui.apps.cluster.example
tls:
tlsVerificationType: required
truststoreSecretRef:
name: keycloak-truststore
key: truststore
truststorePasswordSecretRef:
name: keycloak-truststore
key: password
tlsVerificationType: required
ui:
ingress:
host: simple-ui.apps.cluster.example
Expand Down

0 comments on commit 50efb10

Please sign in to comment.