-
Notifications
You must be signed in to change notification settings - Fork 599
Add an opt-out DisableTelemetry option in the OpenID Connect middleware #1140
Conversation
@PinpointTownes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good, just a small doc comment tweak.
@@ -241,5 +241,12 @@ public new IOpenIdConnectEvents Events | |||
/// This is disabled by default. | |||
/// </summary> | |||
public bool SkipUnrecognizedRequests { get; set; } = false; | |||
|
|||
/// <summary> | |||
/// Indicates whether telemetry should be disabled. When this feature is disabled, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps change the second sentence to be worded with positives instead of the double-negative? E.g. "When this feature is enabled, blah blah is sent to the blah blah". I just think it's a bit easier to read that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. @Tratcher is on a boat somewhere but when he returns to land we'll get this in.
var res = transaction.Response; | ||
Assert.Equal(HttpStatusCode.Redirect, res.StatusCode); | ||
Assert.DoesNotContain(OpenIdConnectParameterNames.SkuTelemetry, res.Headers.Location.Query); | ||
Assert.DoesNotContain(OpenIdConnectParameterNames.VersionTelemetry, res.Headers.Location.Query); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use one positive test they verifies the presence of these parameters. Could be added to an existing test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. FYI, I didn't update ChallengeIssuedCorrectlyForFormPost
because the telemetry parameters are never sent when opting for POST authorization requests.
Fixes #1035.
/cc @Eilon @Tratcher @brentschmaltz @polita