Skip to content
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

I can develop skills in Emulator without an app password #5726

Closed
8 tasks done
clearab opened this issue Jan 28, 2020 · 4 comments
Closed
8 tasks done

I can develop skills in Emulator without an app password #5726

clearab opened this issue Jan 28, 2020 · 4 comments
Assignees
Labels
Area: Authentication The issue is related to authenticating users (SSO, OAuth, etc.) Area: Skills The issue is related to skills feature-request A request for new functionality or an enhancement to an existing one. P1 Painful if we don't fix, won't block releasing Size: L The issue is complex but it is well understood, it will take 4 to 8 days to complete

Comments

@clearab
Copy link
Contributor

clearab commented Jan 28, 2020

Scenario

As a developer, I need to be able to test by skill as a skill (not a stand alone bot) from the emulator without registering an app Id/password).

Background

Several sections of the bot framework code need to know if the activity being process is in a consumer bot or a skill bot. The code uses the claims extracted from the auth header to determine this and that requires that the consumer and the skill have an AppId and Password configured.

This causes friction for developers that are not quite ready to register the consumer or the skill as a bot.

Here are the places where we use SkillValidation.IsSkillClaim() in the framework code and samples:

Constraints

  • The scenario only applies when the channelId is Emulator, all other channels will require AppId and password.
  • All the bots involved should be running locally (parent and consumers), if any of them has or require and App/Id and password, all the bots will require it too (e.g.: I can't have a consumer running locally without appId and password that calls a skill that has an appId and password configured.

Solution

We introduced a new RoleType = "skill" that is set on the Recipient of the activity when an activity is sent from the consumer bot to a child bot through BotframeworkHttpClient.

We also updated the auth logic in the framework to create a special claim for anonymous skill calls (see SkillValidation.CreateAnonymousSkillClaim() for details on the claim) that is set when there is no AuthHeader and the channel is Emulator.

Component Impact

  • Emulator
  • Composer
  • BF SDK

Tracking Status

Dotnet SDK 4752

  • PR
  • Merged

Javascript SDK 2860

  • PR
  • Merged

Python SDK 1396

  • PR
  • Merged

Java SDK 809

  • PR
  • Merged
@clearab clearab added R8 Release 8 - March 16th, 2020 Skills labels Jan 28, 2020
@clearab clearab removed the R8 Release 8 - March 16th, 2020 label Jan 29, 2020
@gabog gabog added the P1 Painful if we don't fix, won't block releasing label Jan 31, 2020
@clearab clearab added P2 Nice to have and removed P1 Painful if we don't fix, won't block releasing labels Feb 6, 2020
@stevengum
Copy link
Member

This has implications for generating the callerId (see microsoft/botbuilder-dotnet#3753)

@clearab
Copy link
Contributor Author

clearab commented Apr 17, 2020

Yeah, we'll probably need to have an new IRI for the Emulator

@gabog gabog added Area: Skills The issue is related to skills and removed Skills labels Aug 12, 2020
@gabog gabog added feature-request A request for new functionality or an enhancement to an existing one. P1 Painful if we don't fix, won't block releasing draft The issue definition is still being worked on and it is not ready to start development. and removed P2 Nice to have labels Sep 11, 2020
@gabog gabog added the Size: L The issue is complex but it is well understood, it will take 4 to 8 days to complete label Sep 17, 2020
@gabog gabog added this to the R11 milestone Sep 21, 2020
@gabog gabog changed the title Developing skills without an app password I can develop skills in Emulator without an app password Sep 29, 2020
@gabog gabog added the Area: Authentication The issue is related to authenticating users (SSO, OAuth, etc.) label Oct 2, 2020
@gabog gabog removed this from the R11 milestone Oct 2, 2020
@gabog
Copy link
Contributor

gabog commented Oct 22, 2020

dotnet, JS and Python are done, Java will be done in a future release

@gabog gabog closed this as completed Oct 22, 2020
@tracyboehrer
Copy link
Member

Java merged today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Authentication The issue is related to authenticating users (SSO, OAuth, etc.) Area: Skills The issue is related to skills feature-request A request for new functionality or an enhancement to an existing one. P1 Painful if we don't fix, won't block releasing Size: L The issue is complex but it is well understood, it will take 4 to 8 days to complete
Projects
None yet
Development

No branches or pull requests

5 participants