beeinventor / keycloak-cognito-migration Goto Github PK
View Code? Open in Web Editor NEWA Keycloak UserStorageProvider for migrating users from AWS Cognito
License: MIT License
A Keycloak UserStorageProvider for migrating users from AWS Cognito
License: MIT License
I have entered all the required details but facing this issue when I click on sync all users.
2023-01-17 16:12:06,244 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-9) Uncaught server error: java.lang.IllegalStateException: Access to the legacy store is no longer possible via this method. Adjust your code according to the Keycloak 19 Upgrading Guide.
at org.keycloak.services.DefaultKeycloakSession.userLocalStorage(DefaultKeycloakSession.java:174)
at com.beeinventor.keycloak.CognitoMigrationUserStorageProviderFactory$Closure_sync_0.invoke(src/haxe/com/beeinventor/keycloak/CognitoMigrationUserStorageProviderFactory.hx:220)
at com.beeinventor.keycloak.CognitoMigrationUserStorageProviderFactory$Closure_sync_0.invoke(src/haxe/com/beeinventor/keycloak/CognitoMigrationUserStorageProviderFactory.hx)
Any solution for this?
When I try to build and package it always ends with the erorr:
haxelib path: /home/keycloak/haxe/versions/1ec0856/haxelib: error while loading shared libraries: libneko.so.2: cannot open shared object file: No such file or directory
Currently when adding the built provider .jar file into the new /opt/keycloak/provider/
folder as part of Quarkus build it causes an error:
#15 4.244 2022-02-28 13:39:28,700 WARN [org.keycloak.services] (build-71) KC-SERVICES0047: cognito-migration (com.beeinventor.keycloak.CognitoMigrationResourceProviderFactory) is implementing the internal SPI realm-restapi-extension. This SPI is internal and may change without notice
#15 4.704 ERROR: Failed to run 'build' command.
#15 4.704 ERROR: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
#15 4.704 [error]: Build step io.quarkus.deployment.index.ApplicationArchiveBuildStep#build threw an exception: java.lang.NullPointerException
#15 4.704 at org.jboss.jandex.FieldInternal.hashCode(FieldInternal.java:99)
#15 4.704 at org.jboss.jandex.StrongInternPool.hash(StrongInternPool.java:152)
#15 4.704 at org.jboss.jandex.StrongInternPool.intern(StrongInternPool.java:237)
#15 4.704 at org.jboss.jandex.NameTable.intern(NameTable.java:117)
#15 4.704 at org.jboss.jandex.ClassInfo.setFields(ClassInfo.java:745)
#15 4.704 at org.jboss.jandex.Indexer.index(Indexer.java:1993)
#15 4.704 at io.quarkus.deployment.index.IndexingUtil.indexJar(IndexingUtil.java:123)
#15 4.704 at io.quarkus.deployment.index.IndexingUtil.indexJar(IndexingUtil.java:92)
#15 4.704 at io.quarkus.deployment.index.IndexingUtil.indexJar(IndexingUtil.java:56)
#15 4.704 at io.quarkus.deployment.index.ApplicationArchiveBuildStep$2.apply(ApplicationArchiveBuildStep.java:313)
#15 4.704 at io.quarkus.deployment.index.ApplicationArchiveBuildStep$2.apply(ApplicationArchiveBuildStep.java:309)
#15 4.704 at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134)
#15 4.704 at io.quarkus.deployment.index.ApplicationArchiveBuildStep.handleJarPath(ApplicationArchiveBuildStep.java:309)
#15 4.704 at io.quarkus.deployment.index.ApplicationArchiveBuildStep.createApplicationArchive(ApplicationArchiveBuildStep.java:213)
#15 4.704 at io.quarkus.deployment.index.ApplicationArchiveBuildStep.scanForOtherIndexes(ApplicationArchiveBuildStep.java:154)
#15 4.704 at io.quarkus.deployment.index.ApplicationArchiveBuildStep.build(ApplicationArchiveBuildStep.java:105)
#15 4.704 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
#15 4.704 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
#15 4.704 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
#15 4.704 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
#15 4.704 at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:882)
#15 4.704 at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
#15 4.704 at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
#15 4.704 at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
#15 4.704 at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
#15 4.704 at java.base/java.lang.Thread.run(Thread.java:829)
#15 4.704 at org.jboss.threads.JBossThread.run(JBossThread.java:501)
#15 4.704
#15 4.704 ERROR: Build failure: Build failed due to errors
#15 4.704 [error]: Build step io.quarkus.deployment.index.ApplicationArchiveBuildStep#build threw an exception: java.lang.NullPointerException
#15 4.704 at org.jboss.jandex.FieldInternal.hashCode(FieldInternal.java:99)
#15 4.704 at org.jboss.jandex.StrongInternPool.hash(StrongInternPool.java:152)
#15 4.704 at org.jboss.jandex.StrongInternPool.intern(StrongInternPool.java:237)
#15 4.704 at org.jboss.jandex.NameTable.intern(NameTable.java:117)
#15 4.704 at org.jboss.jandex.ClassInfo.setFields(ClassInfo.java:745)
#15 4.704 at org.jboss.jandex.Indexer.index(Indexer.java:1993)
#15 4.704 at io.quarkus.deployment.index.IndexingUtil.indexJar(IndexingUtil.java:123)
#15 4.704 at io.quarkus.deployment.index.IndexingUtil.indexJar(IndexingUtil.java:92)
#15 4.704 at io.quarkus.deployment.index.IndexingUtil.indexJar(IndexingUtil.java:56)
#15 4.704 at io.quarkus.deployment.index.ApplicationArchiveBuildStep$2.apply(ApplicationArchiveBuildStep.java:313)
#15 4.704 at io.quarkus.deployment.index.ApplicationArchiveBuildStep$2.apply(ApplicationArchiveBuildStep.java:309)
#15 4.704 at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134)
#15 4.704 at io.quarkus.deployment.index.ApplicationArchiveBuildStep.handleJarPath(ApplicationArchiveBuildStep.java:309)
#15 4.704 at io.quarkus.deployment.index.ApplicationArchiveBuildStep.createApplicationArchive(ApplicationArchiveBuildStep.java:213)
#15 4.704 at io.quarkus.deployment.index.ApplicationArchiveBuildStep.scanForOtherIndexes(ApplicationArchiveBuildStep.java:154)
#15 4.704 at io.quarkus.deployment.index.ApplicationArchiveBuildStep.build(ApplicationArchiveBuildStep.java:105)
#15 4.704 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
#15 4.704 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
#15 4.704 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
#15 4.704 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
#15 4.704 at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:882)
#15 4.704 at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
#15 4.704 at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
#15 4.704 at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
#15 4.704 at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
#15 4.704 at java.base/java.lang.Thread.run(Thread.java:829)
#15 4.704 at org.jboss.threads.JBossThread.run(JBossThread.java:501)
#15 4.704
I did the setup in keycloak, entered the aws credentials of a user pool but when clicking synch users
I got the following error logs:
12:12:29,446 INFO [stdout] (default task-1717) src/haxe/com/beeinventor/keycloak/Cognito.hx:52: paginationToken, null
12:12:29,446 INFO [stdout] (default task-1717) src/haxe/com/beeinventor/keycloak/Cognito.hx:57: got 2 users
12:12:29,446 INFO [stdout] (default task-1717) src/haxe/com/beeinventor/keycloak/CognitoMigrationUserStorageProvider.hx:145: createUsersIfNotExist 2
12:12:29,446 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-1717) Uncaught server error: java.lang.NoSuchMethodError: 'java.util.stream.Stream org.keycloak.storage.user.UserQueryProvider.searchForUserByUserAttributeStream(org.keycloak.models.RealmModel, java.lang.String, java.lang.String)'
at deployment.keycloak-cognito-migration-1.5.1.jar//com.beeinventor.keycloak.CognitoMigrationUserStorageProvider.createUsersIfNotExist(src/haxe/com/beeinventor/keycloak/CognitoMigrationUserStorageProvider.hx:151)
at deployment.keycloak-cognito-migration-1.5.1.jar//com.beeinventor.keycloak.CognitoMigrationUserStorageProviderFactory$Closure_sync_0.invoke(src/haxe/com/beeinventor/keycloak/CognitoMigrationUserStorageProviderFactory.hx:229)
Any ideas about what can be wrong with the NoSuchMethodError searchForUserByUserAttributeStream
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.