kiwigrid / keycloak-controller

This controller manages Keycloak clients and realms over Kubernetes resources.
https://hub.docker.com/r/kiwigrid/keycloak-controller
MIT License
35 stars 13 forks source link

Keycloak 10.0+ #23

Closed patrickleet closed 4 years ago

patrickleet commented 4 years ago

There are API errors using this against Keycloak 10

patrickleet commented 4 years ago
{"timestampSeconds":1589146964,"timestampNanos":106000000,"severity":"ERROR","thread":"pool-1-thread-1","logger":"io.micronaut.scheduling.DefaultTaskExceptionHandler","message":"Error invoking scheduled task for bean [com.kiwigrid.keycloak.controller.ApplicationHandler@78be3571] javax.ws.rs.ProcessingException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field \"clientSessionIdleTimeout\" (class org.keycloak.representations.idm.RealmRepresentation), not marked as ignorable (126 known properties: \"userFederationMappers\", \"rememberMe\", \"duplicateEmailsAllowed\", \"adminEventsDetailsEnabled\", \"users\", \"webAuthnPolicyRequireResidentKey\", \"webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister\", \"components\", \"otpPolicyType\", \"accessCodeLifespanUserAction\", \"id\", \"webAuthnPolicyAttestationConveyancePreference\", \"enabledEventTypes\", \"applications\", \"webAuthnPolicyPasswordlessSignatureAlgorithms\", \"eventsListeners\", \"ssoSessionMaxLifespanRememberMe\", \"defaultDefaultClientScopes\", \"webAuthnPolicyPasswordlessCreateTimeout\", \"notBefore\", \"publicKey\", \"smtpServer\", \"resetPasswordAllowed\", \"webAuthnPolicyAvoidSameAuthenticatorRegister\", \"accessTokenLifespanForImplicitFlow\", \"webAuthnPolicyPasswordlessUserVerificationRequirement\", \"clientScopes\", \"internationalizationEnabled\", \"attributes\", \"accessTokenLifespan\", \"passwordCredentialGrantAllowed\", \"federatedUsers\", \"applicationScopeMappings\", \"displayName\", \"refreshTokenMaxReuse\", \"oauthClients\", \"defaultGroups\", \"browserFlow\" [truncated]])\n at [Source: (org.jboss.resteasy.client.jaxrs.internal.ClientResponse$InputStreamWrapper); line: 1, column: 469] (through reference chain: org.keycloak.representations.idm.RealmRepresentation[\"clientSessionIdleTimeout\"])\njavax.ws.rs.client.ResponseProcessingException: javax.ws.rs.ProcessingException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field \"clientSessionIdleTimeout\" (class org.keycloak.representations.idm.RealmRepresentation), not marked as ignorable (126 known properties: \"userFederationMappers\", \"rememberMe\", \"duplicateEmailsAllowed\", \"adminEventsDetailsEnabled\", \"users\", \"webAuthnPolicyRequireResidentKey\", \"webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister\", \"components\", \"otpPolicyType\", \"accessCodeLifespanUserAction\", \"id\", \"webAuthnPolicyAttestationConveyancePreference\", \"enabledEventTypes\", \"applications\", \"webAuthnPolicyPasswordlessSignatureAlgorithms\", \"eventsListeners\", \"ssoSessionMaxLifespanRememberMe\", \"defaultDefaultClientScopes\", \"webAuthnPolicyPasswordlessCreateTimeout\", \"notBefore\", \"publicKey\", \"smtpServer\", \"resetPasswordAllowed\", \"webAuthnPolicyAvoidSameAuthenticatorRegister\", \"accessTokenLifespanForImplicitFlow\", \"webAuthnPolicyPasswordlessUserVerificationRequirement\", \"clientScopes\", \"internationalizationEnabled\", \"attributes\", \"accessTokenLifespan\", \"passwordCredentialGrantAllowed\", \"federatedUsers\", \"applicationScopeMappings\", \"displayName\", \"refreshTokenMaxReuse\", \"oauthClients\", \"defaultGroups\", \"browserFlow\" [truncated]])\n at [Source: (org.jboss.resteasy.client.jaxrs.internal.ClientResponse$InputStreamWrapper); line: 1, column: 469] (through reference chain: org.keycloak.representations.idm.RealmRepresentation[\"clientSessionIdleTimeout\"])\n\tat org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:156)\n\tat org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:60)\n\tat org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:150)\n\tat org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:112)\n\tat org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:76)\n\tat com.sun.proxy.$Proxy60.toRepresentation(Unknown Source)\n\tat com.kiwigrid.keycloak.controller.client.ClientController.lambda$realm$2(ClientController.java:161)\n\tat java.base/java.util.Optional.filter(Optional.java:223)\n\tat com.kiwigrid.keycloak.controller.client.ClientController.realm(ClientController.java:159)\n\tat com.kiwigrid.keycloak.controller.client.ClientController.apply(ClientController.java:48)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)\n\tat java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)\n\tat java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)\n\tat java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)\n\tat java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)\n\tat java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)\n\tat java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\n\tat java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)\n\tat com.kiwigrid.keycloak.controller.client.ClientController.retry(ClientController.java:135)\n\tat com.kiwigrid.keycloak.controller.ApplicationHandler.retry(ApplicationHandler.java:30)\n\tat com.kiwigrid.keycloak.controller.$ApplicationHandlerDefinition$$exec1.invokeInternal(Unknown Source)\n\tat io.micronaut.context.AbstractExecutableMethod.invoke(AbstractExecutableMethod.java:144)\n\tat io.micronaut.inject.DelegatingExecutableMethod.invoke(DelegatingExecutableMethod.java:76)\n\tat io.micronaut.scheduling.processor.ScheduledMethodProcessor.lambda$process$5(ScheduledMethodProcessor.java:110)\n\tat io.micrometer.core.instrument.composite.CompositeTimer.record(CompositeTimer.java:79)\n\tat io.micrometer.core.instrument.Timer.lambda$wrap$0(Timer.java:143)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)\n\tat java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base/java.lang.Thread.run(Thread.java:834)\nCaused by: javax.ws.rs.ProcessingException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field \"clientSessionIdleTimeout\" (class org.keycloak.representations.idm.RealmRepresentation), not marked as ignorable (126 known properties: \"userFederationMappers\", \"rememberMe\", \"duplicateEmailsAllowed\", \"adminEventsDetailsEnabled\", \"users\", \"webAuthnPolicyRequireResidentKey\", \"webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister\", \"components\", \"otpPolicyType\", \"accessCodeLifespanUserAction\", \"id\", \"webAuthnPolicyAttestationConveyancePreference\", \"enabledEventTypes\", \"applications\", \"webAuthnPolicyPasswordlessSignatureAlgorithms\", \"eventsListeners\", \"ssoSessionMaxLifespanRememberMe\", \"defaultDefaultClientScopes\", \"webAuthnPolicyPasswordlessCreateTimeout\", \"notBefore\", \"publicKey\", \"smtpServer\", \"resetPasswordAllowed\", \"webAuthnPolicyAvoidSameAuthenticatorRegister\", \"accessTokenLifespanForImplicitFlow\", \"webAuthnPolicyPasswordlessUserVerificationRequirement\", \"clientScopes\", \"internationalizationEnabled\", \"attributes\", \"accessTokenLifespan\", \"passwordCredentialGrantAllowed\", \"federatedUsers\", \"applicationScopeMappings\", \"displayName\", \"refreshTokenMaxReuse\", \"oauthClients\", \"defaultGroups\", \"browserFlow\" [truncated]])\n at [Source: (org.jboss.resteasy.client.jaxrs.internal.ClientResponse$InputStreamWrapper); line: 1, column: 469] (through reference chain: org.keycloak.representations.idm.RealmRepresentation[\"clientSessionIdleTimeout\"])\n\tat org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:375)\n\tat org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:268)\n\tat org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:231)\n\tat org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:120)\n\t... 32 common frames omitted\nCaused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field \"clientSessionIdleTimeout\" (class org.keycloak.representations.idm.RealmRepresentation), not marked as ignorable (126 known properties: \"userFederationMappers\", \"rememberMe\", \"duplicateEmailsAllowed\", \"adminEventsDetailsEnabled\", \"users\", \"webAuthnPolicyRequireResidentKey\", \"webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister\", \"components\", \"otpPolicyType\", \"accessCodeLifespanUserAction\", \"id\", \"webAuthnPolicyAttestationConveyancePreference\", \"enabledEventTypes\", \"applications\", \"webAuthnPolicyPasswordlessSignatureAlgorithms\", \"eventsListeners\", \"ssoSessionMaxLifespanRememberMe\", \"defaultDefaultClientScopes\", \"webAuthnPolicyPasswordlessCreateTimeout\", \"notBefore\", \"publicKey\", \"smtpServer\", \"resetPasswordAllowed\", \"webAuthnPolicyAvoidSameAuthenticatorRegister\", \"accessTokenLifespanForImplicitFlow\", \"webAuthnPolicyPasswordlessUserVerificationRequirement\", \"clientScopes\", \"internationalizationEnabled\", \"attributes\", \"accessTokenLifespan\", \"passwordCredentialGrantAllowed\", \"federatedUsers\", \"applicationScopeMappings\", \"displayName\", \"refreshTokenMaxReuse\", \"oauthClients\", \"defaultGroups\", \"browserFlow\" [truncated]])\n at [Source: (org.jboss.resteasy.client.jaxrs.internal.ClientResponse$InputStreamWrapper); line: 1, column: 469] (through reference chain: org.keycloak.representations.idm.RealmRepresentation[\"clientSessionIdleTimeout\"])\n\tat com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)\n\tat com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:823)\n\tat com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1153)\n\tat com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1589)\n\tat com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1567)\n\tat com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:294)\n\tat com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)\n\tat com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1574)\n\tat com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:965)\n\tat org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.readFrom(ResteasyJackson2Provider.java:135)\n\tat org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:66)\n\tat org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:56)\n\tat org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:341)\n\t... 35 common frames omitted\n","context":"default","serviceContext":{"version":"1.0","service":"keycloak-controller"}}
monotek commented 4 years ago

related to: https://github.com/kiwigrid/keycloak-controller/pull/24

monotek commented 4 years ago

fixed with: https://github.com/kiwigrid/keycloak-controller/pull/24