-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Use instance discovery for trusted hosts and combine authority classes #1582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Per discussion: First invocation of |
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.
As a general thought, do we want to include logging in PRs going forward? Probably most applicable to the new network requests in this PR. Otherwise LGTM
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.
Largely looks good to me, thanks for all the tests!
import { TENANT_PLACEHOLDER, EVENT_NAME_PREFIX } from "./TelemetryConstants"; | ||
import { CryptoUtils } from "../utils/CryptoUtils"; | ||
import { UrlUtils } from "../utils/UrlUtils"; | ||
import { TrustedAuthority } from "../authority/TrustedAuthority"; | ||
|
||
export const scrubTenantFromUri = (uri: string): String => { |
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.
Can we create a utility class with static functions instead of exporting function constants?
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 that's reasonable but since this PR isn't really changing any telemetry files other than to fix compilation, I think that can be taken separately.
This PR does several things in regards to Authorities:
resolveEndpointsAsync
is called.Developers can opt out of the network call in one of 3 ways:
validateAuthority: false
knownAuthorities
config optionauthorityMetadata
config optionNote: This does not include
preferred_cache
orpreferred_network
fields and does not include a scheduled refresh. These can be added in separate PRs if needed for core.