We have a need to log access attempts to UD for compliance purposes. I’m not sure what the best way to go about this is. I’ve attempted to instrument the authentication.ps1 and roles.ps1 file, but that only gets me so far. I’m still missing remote IP info for the request. Is there any way I can obtain this? It would probably need to be within the authentication.ps1 file, as I would need to log the remote IP of any unsuccessful auth attempts as well.
I mean it certainly can be done (see: c# - Asp Net Web API 2.1 get client IP address - Stack Overflow)
It may be a feature request kind of thing but I don’t think so to be honest.
Since interactions inside of PSU are all API calls, I don’t see why this wouldn’t be doable. I’ll try to mess around with this in a bit.
Thanks. Seems like a super basic thing to have for any type of web framework…
Is the underlying c# code for UD freely available for modification? If so, please point to the repo.
PSU is closed source. Aside from missing the remote IP in auth.ps1\roles.ps1 is there anything else you need?
UserAgent if possible as well, can’t remember from my testing if that’s already available in the $Request or not, though.
I’ll just make all the headers available like with dashboards and APIs.
Thanks @adam, this will be helpful for us as we are trying to achieve soc2 compliance and need to log authentication attempts. This seems like the best way to accomplish that to me. Any idea which release we might see this in?
I can get this done for the next 1.5 release.
Hey Adam, I see that 2.0.0 is now out. Has this feature been added? If so, can you detail how I can access the context/data from the auth code? Thanks
This didn’t get merged into 2.0.0 but will be available in 2.0.1 and 1.5.20