Open irvingHerrera opened 2 years ago
hi
You can replace it with your AuditHubFilter
. I will check the Actions
issue.
I have replaced AuditHubFilter with a custom one but I still can't find the problem. I managed to see that every UI related action generates a scope for audilog.
I have verified that it is possible to filter with auditingManager.Current.Log.Actions.IsNullOrEmpty(). But I have noticed that the actions are generated when some method of the Applications layer is called. Then AuditingInterceptor comes into action but I have not been able to verify what the interceptor comes from on which generated scope.
A scope is generated for each event performed on the UI (click, hover, over, mousevent, etc.)
I have been able to notice that if it detects the changes made in the entity but there comes a point where the tracking of the action is lost is there a way in AuditingIntercept to know which scope corresponds to the generated action?
Thank you very much
hi
I made a new changes: https://github.com/abpframework/abp/pull/11687
Hi maliming.
I hope you are well. I have updated abp to version 5.1.4 where I can see your changes being applied. But the above mentioned problem here persists
I was able to detect that in the AuditingInterceptor class on the line he execution of the method is done in the application layer, which is just when I perform an action on the database
In the AbpDbContext class on this line auditLog is null and does not get the changes made to the entity.
Apparently the scope that arrives in SaveChangesAsync is not the same as the one that is being executed in AuditingInterceptor but auditLog is initialized in the AuditingInterceptor class.
I've been trying to figure this out but couldn't find a solution, do you have any idea how I could solve this? Thank you very much
I have prepared an example repository where you can see the behavior mentioned here repo
hi
I will check it.
See https://github.com/abpframework/abp/pull/11807
context.Services.AddSignalR(options =>
{
var p = options.GetType().GetProperty("HubFilters", BindingFlags.Default | BindingFlags.Instance | BindingFlags.NonPublic);
var pp = p.GetValue(options);
var m = typeof(List<IHubFilter>).GetMethod("Clear");
m.Invoke(pp, BindingFlags.Default, null, null, null);
options.AddFilter<AbpHubContextAccessorHubFilter>();
options.AddFilter<AbpAuthenticationHubFilter>();
options.AddFilter<AbpUowHubFilter>();
options.AddFilter<AbpAuditHubFilter>();
});
Hi maliming.
i have checked the latest version of abp 5.2 RC1 I can notice that the changes mentioned here are already implemented. But now I see that they have removed the AbpAuditHubFilter filter.
I've made the changes you mention to the signalr middleware and it overrides the AbpUowHubFilter filter so it doesn't do anything so entity history is back to work
Will anything change for the final 5.2 release as an internal fix for abp?
Thank you
Since Blazor's mechanism(https://github.com/dotnet/aspnetcore/issues/30115) AbpUowHubFilter
may be have bugs, I rolled back the commit and am working on the latest solution.
Any news on this?
It looks like Microsoft won't be fixing the problem anytime soon what do you recommend as a workaround - audit logging is a security feature, so the current state is a security risk Currently, only deletions are logged
Is it possible to trigger the audit logging manually ( within dbcontext or the repository ) ?
Is there any solutions ? Its been more than a year since this ticket opened. We need help.
It looks like Microsoft won't be fixing the problem anytime soon what do you recommend as a workaround - audit logging is a security feature, so the current state is a security risk Currently, only deletions are logged
Is it possible to trigger the audit logging manually ( within dbcontext or the repository ) ?
@puschie286 Have you found a solution in this way?
@ogulcancakir sry but no - only not to rely on the entity history :/
Is this fixed now guys?
Not yet.
Is this fixed now guys?
Is there any work around on this? I really need to have the entity changes to my system, we are going to publish our product soon
Only one or two entity to have their logs in enough for now
Can you guide me more please? how to solve it ?
Due to the current limitations of blazor, it cannot be resolved.
So any alternative way to implement this feature?
I am also in need of an alternative. Audit log is necessary for our site.
See #11807
context.Services.AddSignalR(options => { var p = options.GetType().GetProperty("HubFilters", BindingFlags.Default | BindingFlags.Instance | BindingFlags.NonPublic); var pp = p.GetValue(options); var m = typeof(List<IHubFilter>).GetMethod("Clear"); m.Invoke(pp, BindingFlags.Default, null, null, null); options.AddFilter<AbpHubContextAccessorHubFilter>(); options.AddFilter<AbpAuthenticationHubFilter>(); options.AddFilter<AbpUowHubFilter>(); options.AddFilter<AbpAuditHubFilter>(); });
This solution without AbpUowHubFiler and AbpAuditHubFilter seems to work. Is this currently a recommended approach?
hi @MannRobertJ
There are currently no other options.
Hi, I am also facing the same issue. Did it get resolved in .Net 8 ?
Hi, I am also facing the same issue. Did it get resolved in .Net 8 ?
Not yet.
Abp 8.1.1 also not fixed,Follow-up continue to follow
Hi! I am using the history of entities, the project currently started in version 4.3, migrated to 4.4 and finally to version 5.1.3
When the project updated to version 5.1.3 the entity history started to fail. After doing some tests I have been able to notice the following.
The next HubFilter on this line there is nothing UI action (auditingManager.Current.Log.Actions).
Continuing with the tests that I have carried out, I have noticed that it is possibly a concurrency problem when generating the scope of auditingManager and registering the action in the AuditingInterceptor.cs class.
Unfortunately I couldn't solve the problem. Any idea how I could fix this?.
Thank you very much