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

feat: Add apps proxy local development docs #2187

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
--exclude '^https://app.datadoghq.eu/.*'
--exclude '^https://community.chocolatey.org/.*'
--exclude '^https://packages.debian.org/$'
--exclude '^https://test.hub.keboola.local/$'

- name: Run code linters
run: make lint
Expand Down
68 changes: 68 additions & 0 deletions docs/apps-proxy/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Apps proxy Architecture Overview

- Serves for data apps authentication and authorization.
- Typicall usage is to perform OIDC login through some OIDC provider (e.g Microsoft login, google login etc.)
- Has possibility to add basic authorization which consists of password prompt on a web page.


## Entrypoint

[cmd/apps-proxy/main.go](../../cmd/apps-proxy/main.go)

## Apps Proxy Options

## Operations

In `/etc/hosts` add this:

```
127.0.0.1 test.hub.keboola.local
127.0.0.1 hub.keboola.local
```
In project directory run:

```
docker compose run --rm --service-ports dev --net=my-test bash
```

Inside this bash run:

```
make run-app-proxy
```

There is a sandboxes service mock in place which returns configuration of data app. Simply adjust the [provisioning/apps-proxy/dev/sandboxesMock.json](../../provisioning/apps-proxy/dev/sandboxesMock.json) if you want to change received configuration by local testing.

Out of the container check for <containerid> using

```
docker ps -a
```

Find ID of the container running the `dev` environment.

Next clone this repository: GitHub - [fsouza/docker-ssl-proxy](https://github.com/fsouza/docker-ssl-proxy)

In its directory run this:

```
docker build -t https-proxy .
```

And then in this command replace <containerid> with the id from earlier:

```
docker run --net=cli_default --rm \
--env DOMAIN=test.hub.keboola.local \
--env TARGET_HOST=<containerid> \
--env TARGET_HOST_HEADER=test.hub.keboola.local \
--env TARGET_PORT=8002 \
-p 443:443 \
--volume=./ca:/etc/nginx/ca \
--volume=./certs:/etc/nginx/certs \
https-proxy
```

Now the proxy should be available under https://test.hub.keboola.local/.


Loading