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

Local token provider for r11s driver #4126

Merged
merged 1 commit into from
Oct 28, 2020

Conversation

tanviraumi
Copy link
Contributor

@tanviraumi tanviraumi commented Oct 27, 2020

Follow up of #3954. This PR adds a local token provider for r11s drivers to use. Following the model of InsecureUrlResolver, this one is called InsecureTokenProvider. The provider is meant to be used for testing and local running purposes.

InsecureUrlResolver still signs a jwt token. Next PR will remove the signing part from and drivers will only rely on token provider.

@msfluid-bot
Copy link
Collaborator

@fluidframework/base-host: No change
Metric NameBaseline SizeCompare SizeSize Diff
main.js 176.35 KB 176.35 KB No change
Total Size 176.35 KB 176.35 KB No change
@fluid-example/bundle-size-tests: No change
Metric NameBaseline SizeCompare SizeSize Diff
container.js 239.58 KB 239.58 KB No change
sharedString.js 225.58 KB 225.58 KB No change
Total Size 465.15 KB 465.15 KB No change

Baseline commit: 85293a9

Generated by 🚫 dangerJS against c4ba2ea

@tanviraumi tanviraumi marked this pull request as ready for review October 27, 2020 23:17
@tanviraumi tanviraumi requested a review from SamBroner October 28, 2020 00:28
Copy link
Contributor

@SamBroner SamBroner left a comment

Choose a reason for hiding this comment

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

Yes!

* As the name implies this is not secure and should not be used in production. It simply makes the example easier
* to get up and running.
*/
export class InsecureTokenProvider implements ITokenProvider {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: can we reuse the other token provider?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which one?

@tanviraumi tanviraumi merged commit f7bbba1 into microsoft:main Oct 28, 2020
@tanviraumi tanviraumi deleted the insecure_token_provider branch October 28, 2020 01:04
@curtisman
Copy link
Member

I don't quite like the fact that test-runtime-utils is taking a dependency to routerlicious-driver package. Feels like it belongs to some routerlicious specific thing.

@tanviraumi
Copy link
Contributor Author

I don't quite like the fact that test-runtime-utils is taking a dependency to routerlicious-driver package. Feels like it belongs to some routerlicious specific thing.

Totally agree. I thought about it but did not find a better place. r11s-driver bundles the interfaces and implementations in one single package. And driver-base seems to be shared between both drivers. Any recommendation on placing the ITokenProvider interface?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants