Sorry for bothering again.
I spent a lot of time trying to find a solution.
I set up a simple maven project with this main:
@SpringBootApplication
public class FirstSpringApplication {
@Autowired
private ZeebeClient client;
public static void main(String[] args) {
SpringApplication.run(FirstSpringApplication.class, args);
}
I tried the suggested solution for oidc in springboot, having this form:
camunda:
client:
mode: oidc
tenant-ids:
- <default>
auth:
oidc-type: keycloak
issuer: http://host/auth/realms/camunda-platform
zeebe:
enabled: true
gateway-url: http://host:443
base-url: http://host:443
prefer-rest-over-grpc: false
audience: zeebe-api
operate:
enabled: true
base-url: http://host:operate
audience: operate-api
tasklist:
enabled: true
base-url: http://host:tasklist
audience: tasklist-api
optimize:
enabled: true
base-url: http://host:optimize
audience: optimize-api
identity:
enabled: true
base-url: http://host:identity
audience: identity-api
It said: unable to determine authentication.
I tried it in the same structure, but provided the client credentials as well:
camunda:
client:
mode: oidc
tenant-ids:
- <123456>
auth:
plaintext: false
oidc-type: keycloak
issuer: https://host/auth/realms/camunda-platform
client-id: customapplication
client-secret: xxsecretxx
zeebe:
enabled: true
gateway-url: https://host:443
base-url: https://host:443
prefer-rest-over-grpc: false
audience: zeebe-api
operate:
enabled: true
base-url: https://host/operate
audience: operate-api
tasklist:
enabled: true
base-url: https://host/tasklist
audience: tasklist-api
optimize:
enabled: true
base-url: https://host/optimize
audience: optimize-api
identity:
enabled: true
base-url: https://host/identity4
audience: identity-api
I got this error again:
2024-06-07T15:47:34.682+02:00 ERROR 29456 --- [ main] i.c.c.auth.DefaultNoopAuthentication : Unable to determine authentication. Please check your configuration
2024-06-07T15:47:34.697+02:00 WARN 29456 --- [ main] i.m.c.i.simple.SimpleMeterRegistry : A MeterFilter is being configured after a Meter has been registered to this registry. All MeterFilters should
be configured before any Meters are registered. If that is not possible or you have a use case where it should be allowed, let the Micrometer maintainers know at https://github.com/micrometer-metrics/micrometer/issu
es/4920. Enable DEBUG level logging on this logger to see a stack trace of the call configuring this MeterFilter.
2024-06-07T15:47:34.698+02:00 WARN 29456 --- [ main] i.m.c.i.simple.SimpleMeterRegistry : A MeterFilter is being configured after a Meter has been registered to this registry. All MeterFilters should
be configured before any Meters are registered. If that is not possible or you have a use case where it should be allowed, let the Micrometer maintainers know at https://github.com/micrometer-metrics/micrometer/issu
es/4920. Enable DEBUG level logging on this logger to see a stack trace of the call configuring this MeterFilter.
2024-06-07T15:47:34.722+02:00 INFO 29456 --- [ main] z.s.c.c.ZeebeClientProdAutoConfiguration : Creating ZeebeClient using ZeebeClientConfiguration [ZeebeClientConfiguration{properties=ZeebeClientConfigura
tionProperties{environment=ApplicationEnvironment {activeProfiles=[], defaultProfiles=[default], propertySources=[ConfigurationPropertySourcesPropertySource {name='configurationProperties'}, PropertiesPropertySource
{name='systemProperties'}, OriginAwareSystemEnvironmentPropertySource {name='systemEnvironment'}, RandomValuePropertySource {name='random'}, OriginTrackedMapPropertySource {name='Config resource 'class path resource
[application.yaml]' via location 'optional:classpath:/''}]}, connectionMode='null', defaultTenantId='<default>', defaultJobWorkerTenantIds=[<default>], applyEnvironmentVariableOverrides=false, enabled=true, broker=Br
oker{gatewayAddress='null, grpcAddress=null, restAddress=null, keepAlive=PT45S}, cloud=Cloud{clusterId='null', clientId='null', clientSecret='null', region='bru-2', scope='null', baseUrl='zeebe.camunda.io', authUrl='
https://login.cloud.camunda.io/oauth/token', port=443, credentialsCachePath='null'}, worker=Worker{maxJobsActive=32, threads=1, defaultName='null', defaultType='null', override={}}, message=Message{timeToLive=PT1H, m
axMessageSize=4194304}, security=Security{plaintext=false, overrideAuthority='null', certPath='null'}, job=Job{timeout=PT5M, pollInterval=PT0.1S}, ownsJobWorkerExecutor=true, defaultJobWorkerStreamEnabled=false, requ
estTimeout=PT10S}, commonConfigurationProperties=CommonConfigurationProperties{keycloak=Keycloak{url='null', realm='null', tokenUrl='null'}} Client{clientId='***', clientSecret='***', username='***', password='***',
enabled=false, url='null', authUrl='null', baseUrl='null'}, authentication=io.camunda.common.auth.DefaultNoopAuthentication@5d43409a, jsonMapper=io.camunda.zeebe.client.impl.ZeebeObjectMapper@6ede46f6, interceptors=[
]}]
I remarked, that a lot of properties are filled with null, so I thought, maybe the structure has changed. I’ve tried this as well:
zeebe:
client:
broker:
gatewayAddress: host:443
security:
plaintext: false
client:
authUrl: xxx
client-id: xxx
client-secret: xxx
And a lot of other constellations. I could not find anything that works to connect to zeebe.
I would be grateful (once again) for a helpful solution.
Right now, I consider trying to use plain Java and going away from Spring (altough it looked way more comfortable).