-
Notifications
You must be signed in to change notification settings - Fork 37
create dedicated auth token pages for azure and snowflake #571
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
Merged
HarshCasper
merged 4 commits into
main
from
doc-156-fix-azure-and-snowflake-docs-linking-to-aws-auth-token
Jun 8, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,239 @@ | ||
| --- | ||
| title: Auth Token | ||
| description: Configure your Auth Token to access and activate LocalStack for Azure. | ||
| template: doc | ||
| sidebar: | ||
| order: 1 | ||
| --- | ||
|
|
||
| import { Code, Tabs, TabItem } from '@astrojs/starlight/components'; | ||
|
|
||
| ## Introduction | ||
|
|
||
| An Auth Token is required to activate the LocalStack for Azure emulator. | ||
| It identifies and authenticates users outside the LocalStack Web Application, granting access to your workspace and to advanced features such as the Azure emulator image. | ||
|
|
||
| Auth Tokens are issued at the workspace level in [app.localstack.cloud](https://app.localstack.cloud) and are not specific to any single LocalStack product. | ||
| The same token works across every LocalStack product your account has access to, including LocalStack for AWS, Azure, and Snowflake. | ||
|
|
||
| Auth Tokens come in two types: a **Developer Auth Token** and a **CI Auth Token**: | ||
|
|
||
| - The **Developer Auth Token** uniquely identifies a user within a workspace. | ||
| Every user has their own Auth Token. | ||
| It cannot be deleted but can be rotated for security reasons if needed. | ||
| - The **CI Auth Token** uniquely identifies a subscription rather than a specific user. | ||
| It is designed for use in CI environments and other non-developer contexts, and is stored in the workspace where it can be managed by members with appropriate permissions. | ||
|
|
||
| In both cases, the Auth Token grants access to whatever product(s) the associated user or subscription is entitled to. | ||
| Both the **Developer Auth Token** and **CI Auth Token** can be managed on the [Auth Tokens page](https://app.localstack.cloud/workspace/auth-tokens). | ||
|
|
||
| :::danger | ||
|
|
||
| - It's crucial to keep your Auth Token confidential. | ||
| Do not include it in source code management systems, such as Git repositories. | ||
| - Be aware that if an Auth Token is committed to a public repository, it is at risk of exposure and could remain in the repository's history, even if attempts are made to rewrite it. | ||
| - In case your Auth Token is accidentally published, immediately rotate it on the [Auth Token page](https://app.localstack.cloud/workspace/auth-tokens). | ||
| ::: | ||
|
|
||
| ## Managing your License | ||
|
|
||
| LocalStack for Azure is currently in private preview. | ||
| To access it, you need a LocalStack account with **any active subscription**. This can be a paid subscription, a trial, or the Hobby subscription (terms apply). | ||
|
|
||
| :::note | ||
| During the private preview, Azure access is enabled manually and cannot be self-served: | ||
|
|
||
| - If you already have a LocalStack subscription (any type), [contact support](https://localstack.cloud/contact/) to have Azure access added. | ||
| - If you don't have a LocalStack subscription yet, sign up for a [Hobby subscription](https://app.localstack.cloud/sign-up) and then [contact support](https://localstack.cloud/contact/) to have Azure access added. | ||
|
|
||
| Once Azure access is enabled on your subscription, you can use the emulator with your Developer Auth Token or CI Auth Token, just like any other LocalStack product. | ||
| ::: | ||
|
|
||
| After your subscription has Azure access, assign the license to a user by following these steps: | ||
|
|
||
| - Visit the [Users & Licenses page](https://app.localstack.cloud/workspace/members). | ||
| - Select a user in the **Workspace Members** section for license assignment. | ||
| - Define the user's role via the **Member Role** dropdown. | ||
| Single users automatically receive the **Admin** role. | ||
| - Toggle **Advanced Permissions** to set specific permissions. | ||
| Single users automatically receive full permissions. | ||
| - Click **Save** to complete the assignment. | ||
| Single users assign licenses to themselves. | ||
|
|
||
| If you have joined a workspace, you need to be assigned a license by the workspace administrator. | ||
| When switching workspaces or licenses, make sure you are assigned to the correct license. | ||
|
|
||
| :::note | ||
| If you do not assign a license, the Azure emulator will not start even if you have a valid Auth Token. | ||
| ::: | ||
|
|
||
| To view your own assigned license, visit the [My License page](https://app.localstack.cloud/workspace/my-license). | ||
| For more details on inviting users, assigning licenses, or managing roles, see [Users and Licenses](/aws/capabilities/web-app/managing-users-licenses/). | ||
|
|
||
| ## Configuring your Auth Token | ||
|
|
||
| The Azure emulator reads the Auth Token from the `LOCALSTACK_AUTH_TOKEN` environment variable. | ||
| You can configure the Auth Token in several ways, depending on your setup. | ||
| The following sections describe the various methods of providing your Auth Token to the Azure container. | ||
|
|
||
| :::danger | ||
|
|
||
| - It's crucial to keep your Auth Token confidential. | ||
| Do not include it in source code management systems, such as Git repositories. | ||
| - Be aware that if an Auth Token is committed to a public repository, it is at risk of exposure and could remain in the repository's history, even if attempts are made to rewrite it. | ||
| - In case your Auth Token is accidentally published, immediately rotate it on the [Auth Token page](https://app.localstack.cloud/workspace/auth-tokens). | ||
| ::: | ||
|
|
||
| ### LocalStack CLI | ||
|
|
||
| You should set the `LOCALSTACK_AUTH_TOKEN` environment variable either before or during the startup of LocalStack using the `localstack` command-line interface (CLI). | ||
| When starting the Azure emulator, point the CLI at the Azure image via `IMAGE_NAME`: | ||
|
|
||
| <Tabs> | ||
| <TabItem label="macOS/Linux"> | ||
| <Code | ||
| code={`localstack auth set-token <YOUR_AUTH_TOKEN>\nIMAGE_NAME=localstack/localstack-azure-alpha localstack start`} | ||
| lang="shell" | ||
| /> | ||
| </TabItem> | ||
| <TabItem label="Windows"> | ||
| <Code | ||
| code={`localstack auth set-token <YOUR_AUTH_TOKEN>\n$env:IMAGE_NAME="localstack/localstack-azure-alpha"; localstack start`} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As above re image name. |
||
| lang="powershell" | ||
| /> | ||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| :::note | ||
|
|
||
| 1. You can alternatively `export LOCALSTACK_AUTH_TOKEN=<YOUR_AUTH_TOKEN>` in your shell session. | ||
| The CLI transmits the token to the Azure container, enabling license activation. | ||
| 2. The `localstack auth set-token` command is only available for the `localstack` CLI and cannot be used with a Docker or Docker Compose setup. | ||
| ::: | ||
|
|
||
| You have the option to run the Azure container in the background by appending the `-d` flag to the `localstack start` command. | ||
|
|
||
| ### Docker | ||
|
|
||
| To start the Azure emulator via Docker, provide the Auth Token using the `-e` flag: | ||
|
|
||
| ```bash {5} | ||
| docker run \ | ||
| --rm -it \ | ||
| -p 4566:4566 \ | ||
| -v /var/run/docker.sock:/var/run/docker.sock \ | ||
| -e LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:- } \ | ||
| localstack/localstack-azure-alpha | ||
| ``` | ||
|
|
||
| For more information about starting the Azure emulator with Docker, take a look at our [Azure installation guide](/azure/getting-started/#docker-cli). | ||
|
|
||
| ### Docker Compose | ||
|
|
||
| To start the Azure emulator using `docker compose`, include the `LOCALSTACK_AUTH_TOKEN` environment variable in your `docker-compose.yml` file: | ||
|
|
||
| ```yaml | ||
| environment: | ||
| - LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:?} | ||
| ``` | ||
|
|
||
| You can manually set the Auth Token, or use the `export` command to establish the Auth Token in your current shell session. | ||
| This ensures the Auth Token is transmitted to the Azure container, enabling license activation. | ||
|
|
||
| ### CI Environments | ||
|
|
||
| CI environments require a CI Auth Token. | ||
| Developer Auth Tokens cannot be used in CI. | ||
| CI Auth Tokens are available on the [Auth Tokens page](https://app.localstack.cloud/workspace/auth-tokens) and are configured similarly to Developer Auth Tokens. | ||
|
|
||
| To set the CI Auth Token, add the Auth Token value in the `LOCALSTACK_AUTH_TOKEN` environment variable of your CI provider, and reference it when starting the Azure emulator in your CI workflow. | ||
| The same patterns used for [LocalStack in CI](/aws/integrations/continuous-integration/) apply to Azure — swap the image for `localstack/localstack-azure-alpha`. | ||
|
|
||
| ## Rotating the Auth Token | ||
|
|
||
| Your personal Auth Token provides full access to your workspace and LocalStack license. | ||
| Treat it as confidential and avoid sharing or storing it in source control management systems (SCMs) like Git. | ||
|
|
||
| If you believe your Auth Token has been compromised or becomes known to someone else, reset it without delay. | ||
| When you reset a token, the old one is immediately deactivated and can no longer access your license or workspace. | ||
| Previous tokens cannot be restored. | ||
|
|
||
| To rotate your Auth Token, go to the [Auth Token page](https://app.localstack.cloud/workspace/auth-tokens) and select the **Reset Auth Token** option. | ||
|
|
||
| ## Verifying activation | ||
|
|
||
| The simplest way to verify that the Azure emulator activated successfully is to query the health endpoint: | ||
|
|
||
| <Tabs> | ||
| <TabItem label="macOS/Linux"> | ||
|
|
||
| ```bash | ||
| curl http://localhost:4566/_localstack/info | jq | ||
| ``` | ||
|
|
||
| </TabItem> | ||
| <TabItem label="Windows"> | ||
|
|
||
| ```bash | ||
| Invoke-WebRequest -Uri http://localhost:4566/_localstack/info | ConvertFrom-Json | ||
| ``` | ||
|
|
||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| A successful activation returns `"is_license_activated": true`. | ||
| You can also check the container logs for a message indicating successful license activation: | ||
|
|
||
| ```bash | ||
| [...] Successfully activated license | ||
| ``` | ||
|
|
||
| Otherwise, check the [Troubleshooting](#troubleshooting) section below. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| The Azure emulator requires a successful license activation to start. | ||
| If activation fails, the container exits and prints an error message similar to: | ||
|
|
||
| ```bash | ||
| =============================================== | ||
| License activation failed! | ||
|
|
||
| Reason: The credentials defined in your environment are invalid. Please make sure to set the LOCALSTACK_AUTH_TOKEN variable to a valid auth token. You can find your Auth Token in the LocalStack web app https://app.localstack.cloud. | ||
|
|
||
| Due to this error, LocalStack has quit. The Azure emulator can only be used with a valid license. | ||
| ``` | ||
|
|
||
| The most common causes are listed below. | ||
|
|
||
| ### Missing credentials | ||
|
|
||
| You need to provide an Auth Token to start the Azure emulator. | ||
| You can find your Auth Token on the [Auth Tokens page](https://app.localstack.cloud/workspace/auth-tokens) in the LocalStack Web Application. | ||
|
|
||
| If you are using the `localstack` CLI, you can set the `LOCALSTACK_AUTH_TOKEN` environment variable to your Auth Token or use the following command to set it up: | ||
|
|
||
| ```bash | ||
| localstack auth set-token <YOUR_AUTH_TOKEN> | ||
| ``` | ||
|
|
||
| ### Invalid license | ||
|
|
||
| The issue may occur if there is no valid license linked to your account (for example, because it has expired), or if the license has not been assigned to your user. | ||
| You can check your license status in the LocalStack Web Application on the [My License page](https://app.localstack.cloud/workspace/my-license). | ||
| If your license does not grant access to the Azure emulator, [contact us](https://localstack.cloud/contact/) to upgrade. | ||
|
|
||
| ### License server unreachable | ||
|
|
||
| LocalStack initiates offline activation when the license server is unreachable, requiring re-activation every 24 hours. | ||
| Log output may indicate issues with your machine resolving the LocalStack API domain, which can be verified using a tool like `dig`: | ||
|
|
||
| ```bash | ||
| dig api.localstack.cloud | ||
| ``` | ||
|
|
||
| If the result shows a status other than `status: NOERROR`, your machine is unable to resolve this domain. | ||
| Certain corporate DNS servers may filter requests to specific domains. | ||
| Kindly reach out to your network administrator to safelist the `localstack.cloud` domain. | ||
|
|
||
| If you continue to have problems with license activation, or if the steps above do not help, do not hesitate to [contact us](https://localstack.cloud/contact/). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we've changed the image name to localstack-azure, i.e. no longer -alpha.