Botframework-solutions: Support Local Debugging without Authorization or Secrets

Created on 2 Nov 2019  路  3Comments  路  Source: microsoft/botframework-solutions

What project is affected?

Microsoft.Bot.Builder.Skills

What language is this in?

C#

What happens?

Recent changes that added IWhitelistAuthenticationProvider to SkillController and SkillWebSocketAdapter prevents disconnected local debugging.

What are the steps to reproduce this issue?

Attempt to run SkillsController or SkillWebSocketAdapter locally without specifying MicrosoftAppId and MicrosoftAppPassword

What were you expecting to happen?

Code should support local debugging without network. My current bot project supported this until updating to the most recent version.

Can you share any logs, error output, etc.?

Any screenshots or additional context?

Suggested changes

  • Abstract the code which establishes MsJWTAuthenticationProvider and Authenticator inro a common library, to avoid duplication and to enable dependency injection
  • Update SkillController and SkillWebSocketAdapter to take IAuthenicator instead of IWhitelistAuthenticationProvider.
Bug

Most helpful comment

Hi,

Even we are facing the same issue when try to debug the latest skill sample project with out specifying app id & app password. Facing below issue.

Ideally before creating azure resources, we have to be sure it works using bot emulator.
In earlier versions we used to before test it by leaving the app id & app secret blank. Kindly help here

ArgumentNullException: Value cannot be null.
Parameter name: microsoftAppId

Microsoft.Bot.Builder.Skills.Auth.MsJWTAuthenticationProvider..ctor(string microsoftAppId, string openIdMetadataUrl) in MsJWTAuthenticationProvider.cs, line 20

All 3 comments

Hi,

Even we are facing the same issue when try to debug the latest skill sample project with out specifying app id & app password. Facing below issue.

Ideally before creating azure resources, we have to be sure it works using bot emulator.
In earlier versions we used to before test it by leaving the app id & app secret blank. Kindly help here

ArgumentNullException: Value cannot be null.
Parameter name: microsoftAppId

Microsoft.Bot.Builder.Skills.Auth.MsJWTAuthenticationProvider..ctor(string microsoftAppId, string openIdMetadataUrl) in MsJWTAuthenticationProvider.cs, line 20

So when you are trying to enable local debugging of skill, can you tell me how you configure the VA side to work locally with the skill? The reason I'm asking is because in order to talk to a skill, with the current implementation, you have to specify a skill's app id. otherwise the skill dialog won't work. only when i understand your full scenario then i can have a solution for you.

Thanks.

@lzc850612 added context PR #2679

Was this page helpful?
0 / 5 - 0 ratings