Skip to content

Hosting changes: refactoring & support no-auth setup scenario#384

Merged
singhk97 merged 8 commits intonext/corefrom
next/core-token-validation-fix
Mar 26, 2026
Merged

Hosting changes: refactoring & support no-auth setup scenario#384
singhk97 merged 8 commits intonext/corefrom
next/core-token-validation-fix

Conversation

@singhk97
Copy link
Copy Markdown
Collaborator

@singhk97 singhk97 commented Mar 20, 2026

  1. Fix missing RequireAuthorization in CompatBot sample.
  2. Refactor service collection setup.
  3. Use BotConfig as single source for reading & propagating configuration instead of doing that all over.
  4. Move Msal setup logic to separate class
  5. Support scenario where auth is not provided. Warning logs will be emitted. Clients will be created without auth. Incomming token validation will use a bypass scheme.

Logs when setting up auth using the different config formats

No credentials setup

image

Testing with Agents Plaground

image

edit: it had multiple redundant logs before

Msal Config setup

image

Core config setup

image

BF config setup

image

@singhk97 singhk97 added the CORE label Mar 20, 2026
@rido-min
Copy link
Copy Markdown
Member

from the screenshots, seems we are duplicating the same Warning multiple times. Can we review those logs to have a single entry?

Copy link
Copy Markdown
Member

@rido-min rido-min left a comment

Choose a reason for hiding this comment

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

LGTM, but I'd like to validate in a real environment with UMI and FIC before merging

TenantId = section["TenantId"] ?? string.Empty,
ClientId = section["ClientId"] ?? string.Empty,
ClientSecret = section["ClientSecret"],
Scope = section["Scope"] ?? configuration["Scope"] ?? BotScope,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we need to clarify where to read the Scope from, seems we are reading from the root, and from the section

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch, in Msal config format scope should be read from the section only.

@singhk97
Copy link
Copy Markdown
Collaborator Author

singhk97 commented Mar 20, 2026

from the screenshots, seems we are duplicating the same Warning multiple times. Can we review those logs to have a single entry?

yeah, i will do another pass of refactoring to avoid redundant log statements

@singhk97
Copy link
Copy Markdown
Collaborator Author

singhk97 commented Mar 25, 2026

Verified it works with UMI, FIC, and Agents Playground in the no-auth scenario.

image

Copy link
Copy Markdown
Member

@rido-min rido-min left a comment

Choose a reason for hiding this comment

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

LGTM, the only missing piece is to clarify where to read the scope from, and I'm fine doing it in a next PR

@singhk97 singhk97 merged commit 72f97c8 into next/core Mar 26, 2026
6 checks passed
@singhk97 singhk97 deleted the next/core-token-validation-fix branch March 26, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants