diff --git a/.gitignore b/.gitignore index f6f89d8..e94c8e1 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,4 @@ dmypy.json .vscode node_modules/ +volume \ No newline at end of file diff --git a/README.md b/README.md index b2c9978..f46eea0 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,14 @@ localstack extensions install localstack-extension-authress ``` ## Usage +1. [Start LocalStack](https://docs.localstack.cloud/getting-started/installation/#starting-localstack-with-docker-compose) if it isn't started already. You can do this by running: + +```sh +ACTIVATE_PRO=1 LOCALSTACK_AUTH_TOKEN="LOCALSTACK_AUTH_TOKEN" EXTENSION_DEV_MODE=1 DEBUG=1 localstack start +``` + +If you run into any issues doing that, check out the [Troubleshooting Guide](./troubleshooting.md). + The auth extension runs at `http://authress.localhost.localstack.cloud:4566`. You can configure API calls to the authorization server by passing this url as the `authressApiUrl` or the `authress_api_url` depending on which SDK you are using. diff --git a/contributing.md b/contributing.md index 0c2fb30..eb223d4 100644 --- a/contributing.md +++ b/contributing.md @@ -32,5 +32,5 @@ ACTIVATE_PRO=1 LOCALSTACK_API_KEY=API_KEY EXTENSION_DEV_MODE=1 DEBUG=1 localstac ``` ### For local debugging -After plugin installation from the pypi, the plugin will be available in: +After plugin installation from the PyPI, the plugin will be available in: `~/.cache/localstack/volume/lib/extensions/python_venv/lib/python3.10/site-packages/localstack_extension_authress` \ No newline at end of file diff --git a/localstack_extension_authress/extension.py b/localstack_extension_authress/extension.py index 676873e..e30cf3c 100644 --- a/localstack_extension_authress/extension.py +++ b/localstack_extension_authress/extension.py @@ -126,4 +126,3 @@ def on_platform_ready(self): Called when LocalStack is ready and the Ready marker has been printed. """ pass - \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index e69de29..62c3e16 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1,7 @@ +# requirements.txt +# +# installs dependencies from ./setup.py, and the package itself, +# in editable mode +. + +setuptools >= 21.0.0 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 5cd150c..aaa538c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,7 +14,7 @@ zip_safe = False packages = find: install_requires = localstack>=2.2.1.dev20230812232603 - authress>=3.0.26 + authress>=3.0.78 [options.entry_points] localstack.extensions = diff --git a/troubleshooting.md b/troubleshooting.md new file mode 100644 index 0000000..f1e26c2 --- /dev/null +++ b/troubleshooting.md @@ -0,0 +1,7 @@ +## + +Try running the command directly to start docker: + +```sh +docker run --rm --name localstack_main -v ~/.cache/localstack-cli/license.json:/etc/localstack/conf.d/license.json:ro -v ~/.cache/localstack-cli/machine.json:/var/lib/localstack/cache/machine.json:ro -v /tmp/localstack-2_2_1_dev20230812232603-entrypoint.sh:/usr/local/bin/docker-entrypoint-dev.sh:ro -v ~/.cache/localstack/volume:/var/lib/localstack -v /var/run/docker.sock:/var/run/docker.sock -p 127.0.0.1:443:443 -p 127.0.0.1:4566:4566 -p 127.0.0.1:4510-4559:4510-4559 -e LOCALSTACK_AUTH_TOKEN=LOCALSTACK_AUTH_TOKEN -e EXTENSION_DEV_MODE=1 -e ACTIVATE_PRO=1 -e LOCALSTACK_CLI=1 -e DEBUG=1 -e DOCKER_HOST=unix:///var/run/docker.sock -e SET_TERM_HANDLER=1 --expose 53 --expose 53/udp localstack/localstack-pro --entrypoint docker-entrypoint-dev.sh +``` \ No newline at end of file