Major
Detail
Major
Detail
In EPP it happened that in SecurityStorage there are references to groups that never existed. (There have never been rows for these IDs in the groups table.) We don't know how this happened and we can't find out. However, this caused the commit of an import to fail, which directly resulted in a call from the customer. The only solution in this case is to have the SecurityStorage rebuilt.
Improvement
It is sufficient to log an error in the case. It is unnecessary to let the whole commit fail. This only leads to unnecessary panic mails and calls from the customer. Besides, not much can be broken by this: Groups that do not exist cannot have too many or too few permissions.
Stacktrace
Expected 'com.top_logic.tool.boundsec.wrap.Group', found 'null' java.lang.ClassCastException: Expected 'com.top_logic.tool.boundsec.wrap.Group', found 'null' at com.top_logic.basic.CollectionUtil.dynamicCast(CollectionUtil.java:543) at com.top_logic.util.db.DBUtil$ResultAsMapFromStringToWrapperList.resolve(DBUtil.java:463) at com.top_logic.util.db.DBUtil$ResultAsMapFromStringToWrapperList.extractResult(DBUtil.java:451) at com.top_logic.util.db.DBUtil$ResultAsMapFromStringToWrapperList.extractResult(DBUtil.java:417) at com.top_logic.util.db.DBUtil.executeQuery(DBUtil.java:625) at com.top_logic.knowledge.security.SecurityStorage$SecurityStorageExecutor.getGroupsByObject(SecurityStorage.java:1608) at com.top_logic.element.boundsec.ElementSecurityStorage.internalUpdateSecurity(ElementSecurityStorage.java:126) at com.top_logic.knowledge.security.SecurityStorage.updateSecurity(SecurityStorage.java:1123) at com.top_logic.element.boundsec.manager.ElementSecurityUpdateManager.handleSecurityUpdate(ElementSecurityUpdateManager.java:200) at com.top_logic.element.boundsec.manager.StorageAccessManager.doHandleSecurityUpdate(StorageAccessManager.java:424) at com.top_logic.element.boundsec.manager.StorageAccessManager.handleSecurityUpdate(StorageAccessManager.java:417) at com.top_logic.knowledge.service.db2.DefaultDBContext.handleSecurityUdate(DefaultDBContext.java:1176) at com.top_logic.knowledge.service.db2.DefaultDBContext.commitTransaction(DefaultDBContext.java:757) at com.top_logic.knowledge.service.db2.TransactionImpl.internalCommit(TransactionImpl.java:163) at com.top_logic.knowledge.service.AbstractTransaction.commit(AbstractTransaction.java:71)
Test
No test. The effort to create this situation is too high in relation to the tiny changes.