microsoft / microsoft/aspire

Generate and pass an access token to resources consuming a dev tunnel resource

Open
#11,343 3 comments 0 reactions 0 assignees View on GitHub
area-integrations devtunnels
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

Generate and pass an access token to resources consuming a dev tunnel resource URL via `WithReference` when the dev tunnel does not have public anonymous access enabled.

Token can be generated via the CLI: `devtunnel token --scope connect`

Token will be valid for 1 hour.

Should be passed to consuming resource in an environment variable. Default name `TUNNEL_TOKEN` but could be customized via a parameter, e.g. `WithReference(targetResource, tunnelResource, "API_TOKEN")`.

It should be possible to do this only for tunnel ports without anonymous access enabled by inspecting the tunnel model.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.