Project

General

Profile

Actions

Defect #1392

closed

Audit can't be viewed after retrying a password change or account create

Added by Alena Peterová over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ondřej Kopr
Category:
Audit
Target version:
Start date:
11/27/2018
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

Version: 9.3.0

When some provisioning operation containing a password (creation of an account, password change) falls into provisioning queue due to an error or read-only system, and then retrying of this operation is successful, then Audit log can't be viewed due to an internal server error.

The problem is with viewing audit records of the type IdmConfidentialStorageValue, action "create", after the confidential value was deleted.

Steps to reproduce:
  • Set a system with a password attribute to read-only
  • Change password to some account on this system
  • Change the system to read-write
  • Retry the password change
  • Go to Audit

Stack trace:


java.lang.NullPointerException: null
    at eu.bcvsolutions.idm.core.model.service.impl.DefaultIdmConfidentialStorageValueService.toDto(DefaultIdmConfidentialStorageValueService.java:50)
    at eu.bcvsolutions.idm.core.model.service.impl.DefaultIdmConfidentialStorageValueService.toDto(DefaultIdmConfidentialStorageValueService.java:1)
    at eu.bcvsolutions.idm.core.api.service.AbstractReadDtoService.toDto(AbstractReadDtoService.java:367)
    at eu.bcvsolutions.idm.core.api.service.AbstractReadDtoService.get(AbstractReadDtoService.java:172)
    at eu.bcvsolutions.idm.core.api.service.AbstractReadDtoService$$FastClassBySpringCGLIB$$120a9283.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
    at eu.bcvsolutions.idm.core.model.service.impl.DefaultIdmConfidentialStorageValueService$$EnhancerBySpringCGLIB$$c5bd30b4.get(<generated>)
    at eu.bcvsolutions.idm.core.api.rest.lookup.DefaultDtoLookup.lookup(DefaultDtoLookup.java:29)
    at eu.bcvsolutions.idm.core.model.service.impl.DefaultLookupService.lookupDto(DefaultLookupService.java:82)
    at eu.bcvsolutions.idm.core.model.service.impl.DefaultLookupService.lookupDto(DefaultLookupService.java:92)
    at eu.bcvsolutions.idm.core.audit.rest.impl.IdmAuditController.loadEmbeddedEntity(IdmAuditController.java:314)
    at eu.bcvsolutions.idm.core.audit.rest.impl.IdmAuditController.lambda$0(IdmAuditController.java:111)
    at java.lang.Iterable.forEach(Iterable.java:75)
    at eu.bcvsolutions.idm.core.audit.rest.impl.IdmAuditController.find(IdmAuditController.java:110)
    at eu.bcvsolutions.idm.core.audit.rest.impl.IdmAuditController.find(IdmAuditController.java:1)
    at eu.bcvsolutions.idm.core.api.rest.AbstractReadDtoController.find(AbstractReadDtoController.java:171)
    at eu.bcvsolutions.idm.core.audit.rest.impl.IdmAuditController.findQuick(IdmAuditController.java:103)


Files

audit_screenshot.png (61 KB) audit_screenshot.png Alena Peterová, 12/03/2018 03:55 PM

Related issues

Related to IdStory Identity Manager - Defect #1388: Password is not sent when retrying Create operationClosedOndřej Kopr11/23/2018

Actions
Actions #1

Updated by Ondřej Kopr over 5 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Ondřej Kopr over 5 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Alena Peterová
  • Target version set to Opal (9.4.0-rc.1)
  • % Done changed from 0 to 90

Sorry for longer responding time from my side, I'm not currently on develop.

The issue is similar/same like in #1388. I tested your scenario in current develop and its works. Please could you test it in current develop? If you want, you are probably best for made review in #1388 now.

Please can I ask you for review for this ticket and #1388? Thank you.

Actions #3

Updated by Ondřej Kopr over 5 years ago

  • Related to Defect #1388: Password is not sent when retrying Create operation added
Actions #5

Updated by Alena Peterová over 5 years ago

Thank you for preparing the testing environment. The bug in Audit for entities is still there, please see the screenshot.

Actions #6

Updated by Alena Peterová over 5 years ago

  • Assignee changed from Alena Peterová to Ondřej Kopr
Actions #7

Updated by Ondřej Kopr over 5 years ago

  • % Done changed from 90 to 0

Alena Peterová wrote:

Thank you for preparing the testing environment. The bug in Audit for entities is still there, please see the screenshot.

Ok I'm so sorry for my mistake. After I read description I tested provisioning operation batch, archive and queue.

Actions #8

Updated by Ondřej Kopr over 5 years ago

  • Assignee changed from Ondřej Kopr to Alena Peterová
  • % Done changed from 0 to 90

So I finally found the problem. This is about getDto method in Patrik's IdmConfidentialStorageValueService. Owner is provisioning operation and the provisioning operation is not present, and value is null => null pointer. I fix it by add one more null check into DefaultIdmConfidentialStorageValueService.

Test are included.

Commit: https://github.com/bcvsolutions/CzechIdMng/commit/a5961262dc08b9eddd8b9e39dc4b26256c982a1c (branch develop)

Virtual was also redeployed, please could you check the audit again, you can use the virtual? Thank you.

Actions #9

Updated by Alena Peterová over 5 years ago

  • Assignee changed from Alena Peterová to Ondřej Kopr

It works fine now, thanks!

Actions #10

Updated by Ondřej Kopr over 5 years ago

  • Assignee changed from Ondřej Kopr to Vít Švanda

Please Vitek could you check code? Thank you.

Actions #11

Updated by Vít Švanda over 5 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Vít Švanda to Ondřej Kopr
  • % Done changed from 90 to 100

I did review and fix looks fine, thanks for test.

Actions #12

Updated by Ondřej Kopr over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF