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

Feature/907 postgres flexible server #23

Merged
merged 34 commits into from
Jun 20, 2024

Conversation

sambles
Copy link
Contributor

@sambles sambles commented Feb 16, 2024

Needs PR OasisLMF/OasisPlatform#1040 to work

  • Tidy up and clean out comments
  • Update parameters.json with new options for flexi server
  • deploy.sh gets stuck on first try, works on 2nd run of ./deploy.sh base
Command ran in 1812.503 seconds (init: 0.089, invoke: 1812.414)
Generating user passwords...
Generating secret oasis-db-password...
Generating secret keycloak-db-password...
Generating secret celery-db-password...
ERROR: argument --value: expected one argument

Examples from AI knowledge base:
az keyvault secret set --name MySecret --value {value} --vault-name MyKeyVault
Create a secret (if one doesn't exist) or update a secret in a KeyVault. (autogenerated)

az keyvault secret set --description {description} --name MySecret --value {value} --vault-name MyKeyVault
Create a secret (if one doesn't exist) or update a secret in a KeyVault. (autogenerated)

https://docs.microsoft.com/en-US/cli/azure/keyvault/secret#az_keyvault_secret_set
Read more about the command in reference docs

@sambles sambles changed the base branch from master to develop February 16, 2024 17:29
@sambles sambles mentioned this pull request Feb 16, 2024
5 tasks
@sambles
Copy link
Contributor Author

sambles commented Feb 19, 2024

https://stackoverflow.com/questions/75697268/keycloak-on-azure-to-postgresql-certificates-do-not-conform-to-algorithm-constr

It would seem that the Azure Database for Postgresql - Single Server, is using the SHA256 DigiCertGlobalRootG2, for anyone using Single Server would not have this problem.

But for Flexible server, is still using the old SHA1 Root Certificate, causing this error.

Container log:

2024-02-19 11:34:53,443 WARN  [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator] (JPA Startup Thread) HHH000342: Could not obtain connection to query metadata: java.lang.NullPointerException: Cannot invoke "org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(java.sql.SQLException, String)" because the return value of "org.hibernate.resource.transaction.backend.jta.internal.JtaIsolationDelegate.sqlExceptionHelper()" is null
	at org.hibernate.resource.transaction.backend.jta.internal.JtaIsolationDelegate.doTheWork(JtaIsolationDelegate.java:186)
	at org.hibernate.resource.transaction.backend.jta.internal.JtaIsolationDelegate.lambda$delegateWork$1(JtaIsolationDelegate.java:75)
	at org.hibernate.resource.transaction.backend.jta.internal.JtaIsolationDelegate.doInSuspendedTransaction(JtaIsolationDelegate.java:107)
	at org.hibernate.resource.transaction.backend.jta.internal.JtaIsolationDelegate.delegateWork(JtaIsolationDelegate.java:72)
	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.getJdbcEnvironmentUsingJdbcMetadata(JdbcEnvironmentInitiator.java:279)
	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:193)
	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:69)
	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:119)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:264)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:239)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:216)
	at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:52)
	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:125)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:248)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:216)
	at org.hibernate.boot.internal.SessionFactoryOptionsBuilder.<init>(SessionFactoryOptionsBuilder.java:273)
	at io.quarkus.hibernate.orm.runtime.recording.PrevalidatedQuarkusMetadata.buildSessionFactoryOptionsBuilder(PrevalidatedQuarkusMetadata.java:70)
	at io.quarkus.hibernate.orm.runtime.boot.FastBootEntityManagerFactoryBuilder.build(FastBootEntityManagerFactoryBuilder.java:81)
	at io.quarkus.hibernate.orm.runtime.FastBootHibernatePersistenceProvider.createEntityManagerFactory(FastBootHibernatePersistenceProvider.java:74)
	at jakarta.persistence.Persistence.createEntityManagerFactory(Persistence.java:80)
	at jakarta.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
	at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.get(JPAConfig.java:156)
	at io.quarkus.hibernate.orm.runtime.JPAConfig$1.run(JPAConfig.java:64)
	at java.base/java.lang.Thread.run(Thread.java:840)

2024-02-19 11:34:53,570 WARN  [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal
2024-02-19 11:34:53,797 INFO  [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'
2024-02-19 11:34:54,088 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!
2024-02-19 11:34:54,333 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel `ISPN`
2024-02-19 11:34:54,344 INFO  [org.jgroups.JChannel] (keycloak-cache-init) local_addr: 2b0a28bf-95c0-4f43-a137-83fd2402431e, name: keycloak-7f748d5b84-p4v9v-45573
2024-02-19 11:34:54,358 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1MB, but the OS only allocated 212.99KB
2024-02-19 11:34:54,359 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 20MB, but the OS only allocated 212.99KB
2024-02-19 11:34:54,359 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1MB, but the OS only allocated 212.99KB
2024-02-19 11:34:54,359 WARN  [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 25MB, but the OS only allocated 212.99KB
2024-02-19 11:34:54,388 INFO  [org.jgroups.protocols.FD_SOCK2] (keycloak-cache-init) server listening on *.31468
2024-02-19 11:34:54,878 WARN  [io.quarkus.vertx.http.runtime.VertxHttpRecorder] (main) The X-Forwarded-* and Forwarded headers will be considered when determining the proxy address. This configuration can cause a security issue as clients can forge requests and send a forwarded header that is not overwritten by the proxy. Please consider use one of these headers just to forward the proxy address in requests.
2024-02-19 11:34:54,934 WARN  [io.agroal.pool] (agroal-11) Datasource '<default>': SSL error: Certificates do not conform to algorithm constraints
2024-02-19 11:34:56,455 INFO  [org.jgroups.protocols.pbcast.GMS] (keycloak-cache-init) keycloak-7f748d5b84-p4v9v-45573: no members discovered after 2017 ms: creating cluster as coordinator
2024-02-19 11:34:56,465 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000094: Received new cluster view for channel ISPN: [keycloak-7f748d5b84-p4v9v-45573|0] (1) [keycloak-7f748d5b84-p4v9v-45573]
2024-02-19 11:34:56,485 INFO  [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000079: Channel `ISPN` local address is `keycloak-7f748d5b84-p4v9v-45573`, physical addresses are `[10.240.0.30:47004]`
2024-02-19 11:34:56,496 WARN  [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled
2024-02-19 11:34:57,395 INFO  [org.infinispan.CLUSTER] (main) ISPN000080: Disconnecting JGroups channel `ISPN`
2024-02-19 11:34:57,450 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (production) mode
2024-02-19 11:34:57,451 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to obtain JDBC connection
2024-02-19 11:34:57,451 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: SSL error: Certificates do not conform to algorithm constraints
2024-02-19 11:34:57,452 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Certificates do not conform to algorithm constraints
2024-02-19 11:34:57,453 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Certificates do not conform to algorithm constraints
2024-02-19 11:34:57,455 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Algorithm constraints check failed on signature algorithm: SHA1withRSA
2024-02-19 11:34:57,456 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.

@sambles
Copy link
Contributor Author

sambles commented Feb 20, 2024

Working ~ but the cert used is causing problems with the ingress
Screenshot from 2024-02-20 11-14-33

@sambles sambles linked an issue Feb 20, 2024 that may be closed by this pull request
Base automatically changed from develop to master March 25, 2024 11:48
@benhayes21 benhayes21 self-requested a review April 2, 2024 13:21
@benhayes21 benhayes21 requested review from slashme101 and removed request for benhayes21 April 2, 2024 13:22
@sambles sambles force-pushed the feature/907-postgres-flexible-server__password-auth branch from 22edf41 to 08fde66 Compare April 16, 2024 13:16
@sambles sambles assigned sambles and unassigned slashme101 May 16, 2024
@sambles sambles removed the request for review from slashme101 June 19, 2024 11:26
@sambles sambles merged commit 00269bc into master Jun 20, 2024
@sambles sambles deleted the feature/907-postgres-flexible-server__password-auth branch June 20, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Platform 2 - Azure PostgreSQL Flexible server
2 participants