Migration From Quarkus 1.3.2.FInal to 1.4.2.Final affected Vault Access - quarkus

In my old setup for Quarkus 1.3.2.Final
I have this in my property file
quarkus.vault.url=${vault_path}
quarkus.vault.tls.use-kubernetes-ca-cert=true
quarkus.vault.authentication.kubernetes.role=${someVaultRole}
quarkus.vault.tls.ca-cert=${someTlsCertLocation}
quarkus.vault.kv-secret-engine-mount-path=${someSecretEngingPath}
when i tried to access the secrets using VaultKVSecretEngine.readSecret(path), it gives me the secrets for that path
But when I try to migrate to Quarkus 1.4.2.Final, I got this error
"io.quarkus.vault.runtime.client.VaultClientException code=403 body={\"errors\":[\"1 error occurred:\\n\\t* permission denied\\n\\n\"]}\
when i tried to call VaultKVSecretEngine.readSecret(path) with my old setup.
Question is, what are the configs in my application.properties that i missed for quarkus 1.4.2.final vault access?

since by default, quarkus 1.4.2.Final uses kv-secret-engine-version 2, it is needed to specify the kv-secret-engine-version to version 1 when migrating from quarkus 1.3.2.Final to 1.4.2.Final since 1.3.2.Final uses kv-secret-engine-version 1

Related

Spring Cloud Bootstrap Config prepending "bootstrapProperties-" to all of my BootstrapProperties

My team and I updated a spring boot application in order to work with oauth2, but with the updated we jumped from Spring Boot 1.5.2 to Spring Boot 2.5.8. The oauth2 is now implemented although the new version of the app cannot found any client encryption keys from the config server. Checking the logs of the last version I have:
INFO Nov 17 16:30:51 [main] org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration: LOCAL_HOST:, APP_ID:, OPERATION_NAME:, TRANSACTION_ID:, CALL_PATH:, REMOTE_HOST:, USER: - Located property source: CompositePropertySource [name='configService', propertySources=[MapPropertySource [name='fulfillments-event-validation-job'], MapPropertySource [name='config-internal']]]
After this log there are several com.esrx.inf.config.client.CustomEnvironmentDecryptApplicationInitializer* logs where it loads the values of config server and decrypts them
But in the new version I have this logs:
INFO Nov 18 02:25:53 [main] org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration: LOCAL_HOST:, APP_ID:, OPERATION_NAME:, TRANSACTION_ID:, CALL_PATH:, REMOTE_HOST:, USER: - Located property source: [BootstrapPropertySource {name='bootstrapProperties-configClient'}, BootstrapPropertySource {name='bootstrapProperties-fulfillments-event-validation-job'}, BootstrapPropertySource {name='bootstrapProperties-config-internal'}]
After this log there are not even one log for com.esrx.inf.config.client.CustomEnvironmentDecryptApplicationInitializer*
The old app can load and decrypt the config server values, the new version doesn't even load the values of config server.
old version
new version
spring-boot-starter-test 1.5.2
2.5.8
it does not have this one
spring-cloud-starter-bootstrap 3.0.5
spring-cloud-starter-config 1.3.0
3.0.6
configService
bootstrapProperties-configClient
fulfillments-event-validation-job
bootstrapProperties-fulfillments-event-validation-job
config-internal
bootstrapProperties-config-internal
So I'm thinking the error is with the values of the new version, for some reason is prepending en every value the string "bootstrapProperties-". You know any related to this issue?
I changed the configuration of my pom and application.properties several times.
At the end I stayed with spring-cloud-starter-bootstrap in order for the app to run.

Getting exception "Not using JDBC" while using quarkus-hibernate-reactive-panache with quarkus-reactive-mysql-client - (Quarkus 1.12.2.Final)

Quarkus 1.12.2.Final
Getting the following exception while using reactive hibernate (quarkus-hibernate-reactive-panache) with reactive MySQL client (quarkus-reactive-mysql-client), kindly suggests what could be the issue.
2021-04-01 11:35:28,694 ERROR [org.hib.eng.jdb.spi.SqlExceptionHelper] (Quarkus Main Thread) Not using JDBC
2021-04-01 11:35:28,727 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): java.sql.SQLException: Not using JDBC
at org.hibernate.reactive.provider.service.NoJdbcConnectionProvider.getConnection(NoJdbcConnectionProvider.java:25)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:180)
Some details
My application.properties
quarkus.datasource.jdbc=false
quarkus.datasource.db-kind=mysql
quarkus.datasource.username=root
quarkus.datasource.password=root
quarkus.datasource.reactive.url=mysql://localhost:3306/mydb
quarkus.datasource.reactive.max-size=20
My Repository Implementation
#ApplicationScoped public class EventRepository implements PanacheRepository<Event> {
}
Change your application.properties to
quarkus.datasource.db-kind=mysql
quarkus.datasource.username=root
quarkus.datasource.password=root
quarkus.datasource.reactive.url=vertx-reactive:mysql://localhost:3306/mydb
quarkus.datasource.reactive.max-size=20
Here is the cause of the problem -> I used property "quarkus.hibernate-orm.database.generation=update". It seems like the use of this property requires JDBC connection, removed it, and it's working fine.
Any of the below config sets can work.
quarkus.datasource.db-kind=mysql
quarkus.datasource.username=****
quarkus.datasource.password=****
quarkus.datasource.reactive.url=mysql://localhost:3306/db
or
quarkus.datasource.reactive.url=vertx-reactive:mysql://localhost:3306/db
"The latest version available of Hibernate Reactive doesn't support schema update and validation yet."
Relative issue here:
Not using JDBC problem met in native build · Issue #19918 · quarkusio/quarkus · GitHub
Can you try to add the following property to your settings?
quarkus.hibernate-orm.database.generation=update
You can write drop-and-create to re-create your db when you run your server as well. See details here.
Hmm. JDBC and Hibernate update should work in your case. Do you have a JDBC extension (dependency) in your project? If not, try to ad one.
In case of a postgres you can add extension this way:
./mvnw quarkus:add-extension -Dextensions="jdbc-postgresql
More info here
Add the agroal extension plus one of jdbc-db2, jdbc-derby, jdbc-h2, jdbc-mariadb, jdbc-mssql, jdbc-mysql, jdbc-oracle or jdbc-postgresql.
https://quarkus.io/guides/datasource
Add this dependency to your pom.xml file.
<!-- https://mvnrepository.com/artifact/io.quarkus/quarkus-jdbc-postgresql -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
<version>2.9.2.Final</version>
</dependency>

Spring Boot - Liquibase - WebSphere - Cannot create filesystem for url file xxx/jsf-nls.jar

Configuration
My Spring Boot/Liquibase specifications & configuration is as per this question.
Issue
Everything goes well in my local environment with embedded Tomcat. When i migrate the war file to IBM WebSphere 8.5.5.15, i see this warning:
[7/29/20 11:04:17:302] 000002ff database I liquibase.database Could not set remarks reporting on OracleDatabase: com.zaxxer.hikari.pool.HikariProxyConnection.setRemarksReporting(boolean)
[7/29/20 11:04:18:066] 000002ff lockservice I liquibase.lockservice Successfully acquired change log lock
[7/29/20 11:04:18:090] 000002ff integration W liquibase.integration Cannot create filesystem for url file:/opt/IBM/WebSphere/AppServer/lib/jsf-nls.jar: /opt/IBM/WebSphere/AppServer/lib/jsf-nls.jar
java.nio.file.FileSystemNotFoundException: /opt/IBM/WebSphere/AppServer/lib/jsf-nls.jar
at com.sun.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:120)
at com.sun.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:139)
at java.nio.file.FileSystems.newFileSystem(FileSystems.java:390)
at liquibase.resource.ClassLoaderResourceAccessor.loadRootPaths(ClassLoaderResourceAccessor.java:63)
:
I have checked and the jar file is not there at the location that it is looking for it.
Question
It's only a warning, everything else is working as expected, should i be concerned about this warning?

Spring Boot Actuator Liquibase endpoint fail

I'm trying to use Liquibase with Spring Boot.
Here is my application.properties file:
# ----------------------------------------
# DATA PROPERTIES
# ----------------------------------------
spring.datasource.url=jdbc:postgresql://xxxxxx:5432/dev
spring.datasource.schema=my_schema
spring.datasource.username=my_username
spring.datasource.password=my_password
# LIQUIBASE (LiquibaseProperties)
liquibase.default-schema=${spring.datasource.schema}
liquibase.user=${spring.datasource.username}
liquibase.password=${spring.datasource.password}
Change sets are well applied (table creation is ok).
The problem comes when I access /liquibase actuator's endpoint, I get a 500 error:
Unable to get Liquibase changelog
I also get the following log:
org.postgresql.util.PSQLException: ERROR: relation "public.databasechangelog" does not exist
If thing the problem is the schema prefix used to access changelog table: "public" versus "my_schema".
I thought spring.datasource.schema was the right parameter to set ?
Here is a working solution (come from this answer):
# ----------------------------------------
# DATA PROPERTIES
# ----------------------------------------
spring.datasource.url=jdbc:postgresql://xxxxxx:5432/dev?currentSchema=my_schema
Just a guess here - I think that the issue is that your 'real' schema is being set by the spring.datasource.schema but the liquibase tables are being stored in public and it may be that the Spring Boot actuator doesn't know that those can be separate.

configuring springXD Horthonworks

I try to Configuring Spring XD to use Hadoop (horthonworks) but when I excute this line In a terminal "./xd-singlenode --hadoopDistro hadoop11" ,I get error 'hadoop11' is not a valid value for option --hadoopDistro Possible values are [cdh5, hdp22, phd21, hadoop27, phd30]
The error message is pretty clear, the Spring Xd version your are trying to use is wrong. For horthonworks configuration you should use hdp22.
Regards

Resources