Comments (3)
@AndersAbel Yeah I agree, the ID should be null, if Activity.Current was null at the time of creation. It should not magically appear later after deserialization.
But if custom code creates an ErrorMessage it now needs to be updated to include setting the ActivityId.
I don't have any code like that. I doubt it is a common use case.
from identityserver.
It makes perfect sense to include Activity.Current?.Id
in ErrorMessage
.
The Events are being phased out in favour of the new open telemetry compatible activities/logs/metrics.
from identityserver.
@JustusGreiberORGADATA I've now implemented this and submitted a PR. I first tried using your suggestion:
public string? ActivtityId { get; set; } = Activity.Current?.Id;
However, this had one problem if there is no Current activity in the ErrorMessage that is serialized. Then the deserializer will not write the property at all (because it's null in the payload). That will leave the default value in the object created to receive the values of the deserializer. The end result was that if there was no current activity when the error message was created, the activity Id of when the error was displayed/used would be used on the ErrorMessage. I would expect that if a null activity was passed in to serialization, then a null activity would be read back too.
The more straight forward solution is to let the creator of the ErrorMessage
initialize the ActivityId
. In IdentityServer that is only done in one place in the AuthorizeHttpWriter
. But if custom code creates an ErrorMessage
it now needs to be updated to include setting the ActivityId
.
from identityserver.
Related Issues (20)
- Adding a JSON claim to the JWT/Userinfo endpoint is a bit unintuitive because of different valueType constants HOT 7
- Back channel logout token might incorrectly contain `logout_token` as `iss` HOT 5
- Polling interval and throttling service
- Updating signing in build pipeline
- Unify EF Test Infrastructure
- Support absolute expiration of server side sessions when CoordinateLifetimeWithUserSession is enabled
- Consider marking the IdentityServer session cookies with `__Host` prefix
- OpenTelemetry Metrics Naming HOT 5
- Evolve IConcurrencyLock.Unlock to allow asynchronicity
- Raise an error if the idp doesn't match the requested idp HOT 2
- duende.identityserver is missing NuGet package README file
- Consider different approach for optional services from DI HOT 1
- Filter subject tokens (from token exchange) from logs HOT 4
- Check for empty ClientIds and Types collections in PersistedGrantFilter HOT 2
- Rewrite LicenseValidator.ValidateClient to not use ConcurrentDictionary HOT 1
- Consider post-quantum cryptography sample
- Consider allowing customization of PromptValuesSupported
- Consider allowing multiple IEventSink registrations HOT 2
- Investigate support for X509 Certs and EC Keys HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from identityserver.