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

Add null checks for auth plugin processing #1138

Closed
Jotschi opened this issue Sep 30, 2020 · 0 comments
Closed

Add null checks for auth plugin processing #1138

Jotschi opened this issue Sep 30, 2020 · 0 comments
Labels
bug enhancement f/security Security related features

Comments

@Jotschi
Copy link
Contributor

Jotschi commented Sep 30, 2020

Running auth plugins which return results which may contain null fields can cause OLocalHashTableException: Null keys are not supported.. Role names and group names must be checked for null. A warning should be printed when a null values was used.
Lookup should be done via uuid or name.

cms-api-getmesh-master-0 getmesh Exception `562B569E` in storage `plocal:/graphdb/storage`: 3.0.28 - Veloce (build 7f2fc09560546cde8f7cfacd91423de88b192678, branch UNKNOWN)
cms-api-getmesh-master-0 getmesh com.orientechnologies.orient.core.exception.OLocalHashTableException: Null keys are not supported.
cms-api-getmesh-master-0 getmesh DB name="storage"
cms-api-getmesh-master-0 getmesh Component Name="MeshVertexImpl"
cms-api-getmesh-master-0 getmesh at com.orientechnologies.orient.core.storage.index.hashindex.local.OLocalHashTable.checkNullSupport(OLocalHashTable.java:1336)
cms-api-getmesh-master-0 getmesh at com.orientechnologies.orient.core.storage.index.hashindex.local.OLocalHashTable.get(OLocalHashTable.java:181)
cms-api-getmesh-master-0 getmesh at com.orientechnologies.orient.core.storage.index.engine.OHashTableIndexEngine.get(OHashTableIndexEngine.java:159)
cms-api-getmesh-master-0 getmesh at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doGetIndexValue(OAbstractPaginatedStorage.java:2979)
cms-api-getmesh-master-0 getmesh at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.getIndexValue(OAbstractPaginatedStorage.java:2960)
cms-api-getmesh-master-0 getmesh at com.orientechnologies.orient.core.index.OIndexOneValue.get(OIndexOneValue.java:58)
cms-api-getmesh-master-0 getmesh at com.orientechnologies.orient.core.index.OIndexOneValue.get(OIndexOneValue.java:45)
cms-api-getmesh-master-0 getmesh at com.orientechnologies.orient.core.index.OIndexAbstractDelegate.get(OIndexAbstractDelegate.java:59)
cms-api-getmesh-master-0 getmesh at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:238)
cms-api-getmesh-master-0 getmesh at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:38)
cms-api-getmesh-master-0 getmesh at com.gentics.mesh.graphdb.index.OrientDBIndexHandler.findByUuid(OrientDBIndexHandler.java:406)
cms-api-getmesh-master-0 getmesh at com.gentics.mesh.core.data.root.RootVertex.findByUuid(RootVertex.java:170)
cms-api-getmesh-master-0 getmesh at com.gentics.mesh.auth.MeshOAuth2ServiceImpl.runPlugins(MeshOAuth2ServiceImpl.java:378)
cms-api-getmesh-master-0 getmesh at com.gentics.mesh.auth.MeshOAuth2ServiceImpl.lambda$syncUser$7(MeshOAuth2ServiceImpl.java:227)
cms-api-getmesh-master-0 getmesh at com.gentics.mesh.graphdb.OrientDBDatabase.tx(OrientDBDatabase.java:417)
cms-api-getmesh-master-0 getmesh at com.gentics.mesh.graphdb.spi.Database.lambda$maybeTx$6(Database.java:189)
cms-api-getmesh-master-0 getmesh at io.vertx.reactivex.core.Vertx$2.handle(Vertx.java:597)
cms-api-getmesh-master-0 getmesh at io.vertx.reactivex.core.Vertx$2.handle(Vertx.java:595)
cms-api-getmesh-master-0 getmesh at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:316)
cms-api-getmesh-master-0 getmesh at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
cms-api-getmesh-master-0 getmesh at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
cms-api-getmesh-master-0 getmesh at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
cms-api-getmesh-master-0 getmesh at java.base/java.lang.Thread.run(Unknown Source)
cms-api-getmesh-master-0 getmesh 13:54:33.463 [] ERROR [vert.x-worker-thread-4] - Error while executing mapping plugin {auth-plugin}. Ignoring result.
cms-api-getmesh-master-0 getmesh com.orientechnologies.orient.core.exception.OLocalHashTableException: Null keys are not supported.
@Jotschi Jotschi added bug enhancement f/security Security related features labels Sep 30, 2020
Jotschi pushed a commit that referenced this issue Sep 30, 2020
Add more null checks and debug output for mapping and jwt code. Fixes #1138
@Jotschi Jotschi closed this as completed in 5821bc0 Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement f/security Security related features
Projects
None yet
Development

No branches or pull requests

1 participant