Merged
Conversation
Add more metrics Fix AtJetStreamIdentity to make Handle optional. Document metrics.
Line up the messages in the jetstream sample Remove the agent from the jetstream sample
Add more metrics Fix AtJetStreamIdentity to make Handle optional. Document metrics.
Line up the messages in the jetstream sample Remove the agent from the jetstream sample
…luesky into version/v1.7.0
Add optional delays into posting sample to allow for metric monitoring. Add metrics tests Add sample app with delays to validate nonce rotation Fix nonce refresh doing OIDC logout
… specified Add the AllowLoopback to BuildOAuth2LoginUri Temporarily add myget for prerelease SSRF package
Change CreateOAuthClient to use helper and add SSRF protections Wire through SSRF protection in ProxyHttpMessageHandlerBuilder Add SSRF protection and proxy support to JetStream
Test Results 7 files 7 suites 57s ⏱️ Results for commit a3c505c. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Pull request overview
Merges the v1.8.0 feature set: adds OpenTelemetry metrics, introduces SSRF protections/default URI validation, tightens Jetstream WebSocket safety limits, and modernizes many files to file-scoped namespaces plus assorted docs/samples updates.
Changes:
- Add OpenTelemetry meters + registration extensions and wire optional
IMeterFactorythrough agents/clients. - Add SSRF mitigations (default discovery URI validation + dependency) and reduce accidental credential leakage via redacted
ToString(). - Add Jetstream safety improvements (
MaxMessageSize) and multiple API/DTO updates + broad file-scoped namespace refactors.
Reviewed changes
Copilot reviewed 298 out of 610 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/idunno.AtProto/SecurityHelpers.cs | Adds default discovery URI validation to mitigate SSRF. |
| src/idunno.AtProto/AtProtoHttpClientMetrics.cs | Introduces HTTP client metric instruments (counters/histogram). |
| src/idunno.AtProto/DidPlcDirectory/DirectoryMetrics.cs | Introduces DID PLC directory metric instruments. |
| src/idunno.AtProto/AtProtoMetricsExtensions.cs | Adds OTEL MeterProviderBuilder extension methods for registering meters. |
| src/idunno.AtProto/WebSocketExtensions.cs | Adds max message size enforcement for WebSocket receives and logging. |
| src/idunno.AtProto/Jetstream/JetstreamOptions.cs | Exposes MaxMessageSize option to guard against oversized Jetstream messages. |
| src/idunno.AtProto/Authentication/OAuthClient.cs | Adjusts handler factory types; impacts handler lifetime/disposal patterns. |
| src/idunno.AtProto/Logger.cs | Adds new structured log events for SSRF and WebSocket oversize handling. |
| samples/Samples.Timeline/Program.cs | Updates sample; currently forces proxy usage (likely accidental). |
| src/idunno.AtProto.Types/Cid.cs | Adds == / != operators and expands XML docs. |
Files not reviewed (1)
- src/idunno.AtProto.OAuthCallback/Resources.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AtProtoHttpClientMetricsincluding request duration, request count and failure count.DidPlcDirectoryincluding request duration, request count and failure count.OpenTelemetry.Metrics:AddAtProtoHttpClientMetrics,AddAtProtoDirectoryMetrics, andAddAtProtoJetStreamMetrics.AtProtoHttpClientto allow for use withMetricsFactory.ThrottledtoAccountStatusin Jetstream account events.MaxMessageSizetoJetStreamOptionsto guard against a malicious jetstream server sending overly large messages.AtProtoAgent.BuildOAuthLoginUrito allow for validation of the discovered PDS and authorization server URIs.ToString()onAtProtoCredentialto return a redacted string in case of accidental logging.AtProtoAgent,AtProtoHttpClientandAtProtoJetStreamwith idunno.Security.Ssrf.AllowLoopbackparameter toBuildOAuth2LoginUrito allow loopback addresses in discovered URIs for testing and development purposes. This is disabled by default.Cid.Botproperty toProfilerecord to set or unset the profile self labelindicating a bot account, see [APP-1928] add bot/automated account badge and self-labeling settings
SelfLabelsproperty toProfileViewBasicwhich returns a list of self labels applied to a profileSelfLabelsproperty toPostView.SelfLabelValuesclass.BotandDiscourageShowingToLoggedOutUsertoSelfLabelValues.JsonPolymorphicattributes to individual records to remove the extraneousExtensionDataentries.CreateStatus,GetStatusandUpdateStatustoBlueskyAgent.DurationMinutesonStatusand setters toExternalPropertiesto allow for updating of an existing profile status.AtJetStreamIdentityclass to makeHandleproperty nullable.JetstreamMetricsJetStream.MeterNameandJetStream.MeterVersionproperties public to allow for easy OTEL configuration.JetStreamMetricsfrompublictointernalbecause it is not intended for public use.[Serializable]fromAtProtoCredential.CredentialinCredentialExceptionfrom serialization because it may contain sensitive information.SuggestedActorsto includeRecIdStr, see Add recIdStr to suggested follows by actorNotification.Declaration.AllowSubscriptionsfor easy updating of the value.SetStatusas obsolete in favor ofCreateStatusandUpdateStatus.SelfLabelNamesas obsolete in favor ofSelfLabelValues, as the new name is more correct.