Skip to content

Conversation

@tanmaymanolkar1
Copy link
Contributor

@tanmaymanolkar1 tanmaymanolkar1 requested a review from a team as a code owner September 6, 2024 22:37
@github-actions
Copy link

github-actions bot commented Sep 6, 2024

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

@tanmaymanolkar1 tanmaymanolkar1 requested review from a team and removed request for a team September 6, 2024 22:39
@tanmaymanolkar1 tanmaymanolkar1 added the No-Changelog This Pull-Request has no associated changelog entry. label Sep 6, 2024
@tanmaymanolkar1 tanmaymanolkar1 requested review from a team and shahzaibj September 9, 2024 20:41
MSA,
COMMON,
AAD,
UNKNOWN;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's have one more: TENANTED, when there's target tenant in authority

So,

COMMON,
MSA,
ORGANIZATIONS,
TENANTED

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't tenanted be AAD?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the goal here is to identify which service we are talking to and be able to easily identify that in telemetry. With your suggestion @mohitc1 I think it is better engineering data but needs the reader to know how to interpret it i.e. reader needs to know that tenanted and organizations represent AAD

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can choose another name like SINGLE_ORGANIZATION (similar to Audience class names). This for completeness.
We don't need to comeback and update this later if we realize need of /organizations vs / in future.

Copy link
Contributor

@shahzaibj shahzaibj Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's actually 3 different types of things can track and emit:

  1. Service we are talking to. Possible values:
  • MSA
  • AAD
  1. Audience type in authority. Possible values:
  • COMMON
  • MSA
  • ORGANIZATIONS
  • TENANTED
  1. The actual authority (OII). Possible values:
  • login.micosoftonline.com/common
  • login.microsoftonine.us/common
  • login.microsoftonine.cn/common
  • login.microsoftonline.com/consumers
  • login.microsoftonline.com/organizations
  • login.microsoftonline.com/<MSA_MEGA_TENANT_ID>
  • login.micorsoftonline.com<SOME_AAD_TENANT_ID>

My 2 cents, I think there is value in no.3 because this will help us know actually which endpoint we are talking to and could be super helpful for debugging issues. It can even help track if we are talking to a different cloud and which one specifically and also help track tenant id for guest scenarios.

Number 1 is more for tracking quickly which service we are talking to (AAD vs MSA) for things such as easily filtering out MSA no_account_found errors as expected.

The number 2 is somewhere between 1 and 3 i.e. it is somewhat product information but also somewhat debugging information. I'm not too sure if we need all 3 as some may be overkill. I'm thinking we should do no. 3 and then either one of no. 1 and no. 2.

Thoughts? @mohitc1 @tanmaymanolkar1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree we need all to capture the request target completely. But we need not capture all these separately.
We can optimize on what we capture.
Option 1:
If we capture just two fields
Cloud: login.microsoftonline.com, login.microsoftonine.cn, login.microsoftonine.us (or any shortened form to save data)
AND
(Audience type without OII: COMMON, ORGANIZATIONS, SINGLE_ORGANIZATION, MSA, MSA_MEGA_TENANT
OR audience type with OII: COMMON, ORGANIZATIONS, MSA, MSA_MEGA_TENANT, )

Option2:
We simply capture authority URL e.g. login.microsoftline.com/.. everything else can be derived from this. This would be OII.

Copy link
Contributor

@shahzaibj shahzaibj Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My worry with Option 2 is just not knowing how much it will add to complexity in the telemetry backend. We can write helper functions to derive these things but need to make sure that those helper functions get integrated into any materialized views etc and not sure if there would be any perf impact. @tanmaymanolkar1 You may want to do a quick analysis about how easy this will be on the backend.

COMMON,
AAD,
UNKNOWN;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should move this and the method to broker itself. Telemetry is for broker only.

At this layer it's extra stuff present in AzureActiveDirectoryAudience

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@tanmaymanolkar1
Copy link
Contributor Author

Closing this PR as I will move the changes to broker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No-Changelog This Pull-Request has no associated changelog entry.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants